diff --git a/clients/client-connect/src/Connect.ts b/clients/client-connect/src/Connect.ts index d070a66820f9..e9111b2ae67f 100644 --- a/clients/client-connect/src/Connect.ts +++ b/clients/client-connect/src/Connect.ts @@ -30,6 +30,11 @@ import { AssociateLexBotCommandInput, AssociateLexBotCommandOutput, } from "./commands/AssociateLexBotCommand"; +import { + AssociatePhoneNumberContactFlowCommand, + AssociatePhoneNumberContactFlowCommandInput, + AssociatePhoneNumberContactFlowCommandOutput, +} from "./commands/AssociatePhoneNumberContactFlowCommand"; import { AssociateQueueQuickConnectsCommand, AssociateQueueQuickConnectsCommandInput, @@ -45,6 +50,11 @@ import { AssociateSecurityKeyCommandInput, AssociateSecurityKeyCommandOutput, } from "./commands/AssociateSecurityKeyCommand"; +import { + ClaimPhoneNumberCommand, + ClaimPhoneNumberCommandInput, + ClaimPhoneNumberCommandOutput, +} from "./commands/ClaimPhoneNumberCommand"; import { CreateAgentStatusCommand, CreateAgentStatusCommandInput, @@ -198,6 +208,11 @@ import { DescribeInstanceStorageConfigCommandInput, DescribeInstanceStorageConfigCommandOutput, } from "./commands/DescribeInstanceStorageConfigCommand"; +import { + DescribePhoneNumberCommand, + DescribePhoneNumberCommandInput, + DescribePhoneNumberCommandOutput, +} from "./commands/DescribePhoneNumberCommand"; import { DescribeQueueCommand, DescribeQueueCommandInput, @@ -263,6 +278,11 @@ import { DisassociateLexBotCommandInput, DisassociateLexBotCommandOutput, } from "./commands/DisassociateLexBotCommand"; +import { + DisassociatePhoneNumberContactFlowCommand, + DisassociatePhoneNumberContactFlowCommandInput, + DisassociatePhoneNumberContactFlowCommandOutput, +} from "./commands/DisassociatePhoneNumberContactFlowCommand"; import { DisassociateQueueQuickConnectsCommand, DisassociateQueueQuickConnectsCommandInput, @@ -365,6 +385,11 @@ import { ListPhoneNumbersCommandInput, ListPhoneNumbersCommandOutput, } from "./commands/ListPhoneNumbersCommand"; +import { + ListPhoneNumbersV2Command, + ListPhoneNumbersV2CommandInput, + ListPhoneNumbersV2CommandOutput, +} from "./commands/ListPhoneNumbersV2Command"; import { ListPromptsCommand, ListPromptsCommandInput, ListPromptsCommandOutput } from "./commands/ListPromptsCommand"; import { ListQueueQuickConnectsCommand, @@ -418,11 +443,21 @@ import { ListUserHierarchyGroupsCommandOutput, } from "./commands/ListUserHierarchyGroupsCommand"; import { ListUsersCommand, ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand"; +import { + ReleasePhoneNumberCommand, + ReleasePhoneNumberCommandInput, + ReleasePhoneNumberCommandOutput, +} from "./commands/ReleasePhoneNumberCommand"; import { ResumeContactRecordingCommand, ResumeContactRecordingCommandInput, ResumeContactRecordingCommandOutput, } from "./commands/ResumeContactRecordingCommand"; +import { + SearchAvailablePhoneNumbersCommand, + SearchAvailablePhoneNumbersCommandInput, + SearchAvailablePhoneNumbersCommandOutput, +} from "./commands/SearchAvailablePhoneNumbersCommand"; import { SearchVocabulariesCommand, SearchVocabulariesCommandInput, @@ -535,6 +570,11 @@ import { UpdateInstanceStorageConfigCommandInput, UpdateInstanceStorageConfigCommandOutput, } from "./commands/UpdateInstanceStorageConfigCommand"; +import { + UpdatePhoneNumberCommand, + UpdatePhoneNumberCommandInput, + UpdatePhoneNumberCommandOutput, +} from "./commands/UpdatePhoneNumberCommand"; import { UpdateQueueHoursOfOperationCommand, UpdateQueueHoursOfOperationCommandInput, @@ -847,6 +887,38 @@ export class Connect extends ConnectClient { } } + /** + *

Associates a contact flow with a phone number claimed to your Amazon Connect instance.

+ */ + public associatePhoneNumberContactFlow( + args: AssociatePhoneNumberContactFlowCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public associatePhoneNumberContactFlow( + args: AssociatePhoneNumberContactFlowCommandInput, + cb: (err: any, data?: AssociatePhoneNumberContactFlowCommandOutput) => void + ): void; + public associatePhoneNumberContactFlow( + args: AssociatePhoneNumberContactFlowCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociatePhoneNumberContactFlowCommandOutput) => void + ): void; + public associatePhoneNumberContactFlow( + args: AssociatePhoneNumberContactFlowCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssociatePhoneNumberContactFlowCommandOutput) => void), + cb?: (err: any, data?: AssociatePhoneNumberContactFlowCommandOutput) => void + ): Promise | void { + const command = new AssociatePhoneNumberContactFlowCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This API is in preview release for Amazon Connect and is subject to change.

*

Associates a set of quick connects with a queue.

@@ -945,6 +1017,38 @@ export class Connect extends ConnectClient { } } + /** + *

Claims an available phone number to your Amazon Connect instance.

+ */ + public claimPhoneNumber( + args: ClaimPhoneNumberCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public claimPhoneNumber( + args: ClaimPhoneNumberCommandInput, + cb: (err: any, data?: ClaimPhoneNumberCommandOutput) => void + ): void; + public claimPhoneNumber( + args: ClaimPhoneNumberCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ClaimPhoneNumberCommandOutput) => void + ): void; + public claimPhoneNumber( + args: ClaimPhoneNumberCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ClaimPhoneNumberCommandOutput) => void), + cb?: (err: any, data?: ClaimPhoneNumberCommandOutput) => void + ): Promise | void { + const command = new ClaimPhoneNumberCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This API is in preview release for Amazon Connect and is subject to change.

*

Creates an agent status for the specified Amazon Connect instance.

@@ -2027,6 +2131,38 @@ export class Connect extends ConnectClient { } } + /** + *

Gets details and status of a phone number that’s claimed to your Amazon Connect instance

+ */ + public describePhoneNumber( + args: DescribePhoneNumberCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public describePhoneNumber( + args: DescribePhoneNumberCommandInput, + cb: (err: any, data?: DescribePhoneNumberCommandOutput) => void + ): void; + public describePhoneNumber( + args: DescribePhoneNumberCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribePhoneNumberCommandOutput) => void + ): void; + public describePhoneNumber( + args: DescribePhoneNumberCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribePhoneNumberCommandOutput) => void), + cb?: (err: any, data?: DescribePhoneNumberCommandOutput) => void + ): Promise | void { + const command = new DescribePhoneNumberCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This API is in preview release for Amazon Connect and is subject to change.

*

Describes the specified queue.

@@ -2452,6 +2588,38 @@ export class Connect extends ConnectClient { } } + /** + *

Removes the contact flow association from a phone number claimed to your Amazon Connect instance, if a contact flow association exists.

+ */ + public disassociatePhoneNumberContactFlow( + args: DisassociatePhoneNumberContactFlowCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disassociatePhoneNumberContactFlow( + args: DisassociatePhoneNumberContactFlowCommandInput, + cb: (err: any, data?: DisassociatePhoneNumberContactFlowCommandOutput) => void + ): void; + public disassociatePhoneNumberContactFlow( + args: DisassociatePhoneNumberContactFlowCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociatePhoneNumberContactFlowCommandOutput) => void + ): void; + public disassociatePhoneNumberContactFlow( + args: DisassociatePhoneNumberContactFlowCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisassociatePhoneNumberContactFlowCommandOutput) => void), + cb?: (err: any, data?: DisassociatePhoneNumberContactFlowCommandOutput) => void + ): Promise | void { + const command = new DisassociatePhoneNumberContactFlowCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This API is in preview release for Amazon Connect and is subject to change.

*

Disassociates a set of quick connects from a queue.

@@ -3185,6 +3353,40 @@ export class Connect extends ConnectClient { } } + /** + *

Lists phone numbers claimed to your Amazon Connect instance.

+ *

For more information about phone numbers, see Set Up Phone Numbers for Your + * Contact Center in the Amazon Connect Administrator Guide.

+ */ + public listPhoneNumbersV2( + args: ListPhoneNumbersV2CommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listPhoneNumbersV2( + args: ListPhoneNumbersV2CommandInput, + cb: (err: any, data?: ListPhoneNumbersV2CommandOutput) => void + ): void; + public listPhoneNumbersV2( + args: ListPhoneNumbersV2CommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListPhoneNumbersV2CommandOutput) => void + ): void; + public listPhoneNumbersV2( + args: ListPhoneNumbersV2CommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListPhoneNumbersV2CommandOutput) => void), + cb?: (err: any, data?: ListPhoneNumbersV2CommandOutput) => void + ): Promise | void { + const command = new ListPhoneNumbersV2Command(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Provides information about the prompts for the specified Amazon Connect instance.

*/ @@ -3600,6 +3802,38 @@ export class Connect extends ConnectClient { } } + /** + *

Releases a phone number previously claimed to an Amazon Connect instance.

+ */ + public releasePhoneNumber( + args: ReleasePhoneNumberCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public releasePhoneNumber( + args: ReleasePhoneNumberCommandInput, + cb: (err: any, data?: ReleasePhoneNumberCommandOutput) => void + ): void; + public releasePhoneNumber( + args: ReleasePhoneNumberCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ReleasePhoneNumberCommandOutput) => void + ): void; + public releasePhoneNumber( + args: ReleasePhoneNumberCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ReleasePhoneNumberCommandOutput) => void), + cb?: (err: any, data?: ReleasePhoneNumberCommandOutput) => void + ): Promise | void { + const command = new ReleasePhoneNumberCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

When a contact is being recorded, and the recording has been suspended using * SuspendContactRecording, this API resumes recording the call.

@@ -3635,6 +3869,38 @@ export class Connect extends ConnectClient { } } + /** + *

Searches for available phone numbers that you can claim to your Amazon Connect instance.

+ */ + public searchAvailablePhoneNumbers( + args: SearchAvailablePhoneNumbersCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public searchAvailablePhoneNumbers( + args: SearchAvailablePhoneNumbersCommandInput, + cb: (err: any, data?: SearchAvailablePhoneNumbersCommandOutput) => void + ): void; + public searchAvailablePhoneNumbers( + args: SearchAvailablePhoneNumbersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchAvailablePhoneNumbersCommandOutput) => void + ): void; + public searchAvailablePhoneNumbers( + args: SearchAvailablePhoneNumbersCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SearchAvailablePhoneNumbersCommandOutput) => void), + cb?: (err: any, data?: SearchAvailablePhoneNumbersCommandOutput) => void + ): Promise | void { + const command = new SearchAvailablePhoneNumbersCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Searches for vocabularies within a specific Amazon Connect instance using State, NameStartsWith, and LanguageCode.

*/ @@ -4037,7 +4303,7 @@ export class Connect extends ConnectClient { /** *

Adds the specified tags to the specified resource.

*

The supported resource types are users, routing profiles, queues, quick connects, contact - * flows, agent status, and hours of operation.

+ * flows, agent status, hours of operation, and phone number.

*

For sample policies that use tags, see Amazon Connect Identity-Based * Policy Examples in the Amazon Connect Administrator Guide.

*/ @@ -4513,6 +4779,38 @@ export class Connect extends ConnectClient { } } + /** + *

Updates your claimed phone number from its current Amazon Connect instance to another Amazon Connect instance in the same Region.

+ */ + public updatePhoneNumber( + args: UpdatePhoneNumberCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updatePhoneNumber( + args: UpdatePhoneNumberCommandInput, + cb: (err: any, data?: UpdatePhoneNumberCommandOutput) => void + ): void; + public updatePhoneNumber( + args: UpdatePhoneNumberCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdatePhoneNumberCommandOutput) => void + ): void; + public updatePhoneNumber( + args: UpdatePhoneNumberCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdatePhoneNumberCommandOutput) => void), + cb?: (err: any, data?: UpdatePhoneNumberCommandOutput) => void + ): Promise | void { + const command = new UpdatePhoneNumberCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

This API is in preview release for Amazon Connect and is subject to change.

*

Updates the hours of operation for the specified queue.

diff --git a/clients/client-connect/src/ConnectClient.ts b/clients/client-connect/src/ConnectClient.ts index 791d5440a1df..2d3fbe33db46 100644 --- a/clients/client-connect/src/ConnectClient.ts +++ b/clients/client-connect/src/ConnectClient.ts @@ -69,6 +69,10 @@ import { AssociateLambdaFunctionCommandOutput, } from "./commands/AssociateLambdaFunctionCommand"; import { AssociateLexBotCommandInput, AssociateLexBotCommandOutput } from "./commands/AssociateLexBotCommand"; +import { + AssociatePhoneNumberContactFlowCommandInput, + AssociatePhoneNumberContactFlowCommandOutput, +} from "./commands/AssociatePhoneNumberContactFlowCommand"; import { AssociateQueueQuickConnectsCommandInput, AssociateQueueQuickConnectsCommandOutput, @@ -81,6 +85,7 @@ import { AssociateSecurityKeyCommandInput, AssociateSecurityKeyCommandOutput, } from "./commands/AssociateSecurityKeyCommand"; +import { ClaimPhoneNumberCommandInput, ClaimPhoneNumberCommandOutput } from "./commands/ClaimPhoneNumberCommand"; import { CreateAgentStatusCommandInput, CreateAgentStatusCommandOutput } from "./commands/CreateAgentStatusCommand"; import { CreateContactFlowCommandInput, CreateContactFlowCommandOutput } from "./commands/CreateContactFlowCommand"; import { @@ -165,6 +170,10 @@ import { DescribeInstanceStorageConfigCommandInput, DescribeInstanceStorageConfigCommandOutput, } from "./commands/DescribeInstanceStorageConfigCommand"; +import { + DescribePhoneNumberCommandInput, + DescribePhoneNumberCommandOutput, +} from "./commands/DescribePhoneNumberCommand"; import { DescribeQueueCommandInput, DescribeQueueCommandOutput } from "./commands/DescribeQueueCommand"; import { DescribeQuickConnectCommandInput, @@ -202,6 +211,10 @@ import { DisassociateLambdaFunctionCommandOutput, } from "./commands/DisassociateLambdaFunctionCommand"; import { DisassociateLexBotCommandInput, DisassociateLexBotCommandOutput } from "./commands/DisassociateLexBotCommand"; +import { + DisassociatePhoneNumberContactFlowCommandInput, + DisassociatePhoneNumberContactFlowCommandOutput, +} from "./commands/DisassociatePhoneNumberContactFlowCommand"; import { DisassociateQueueQuickConnectsCommandInput, DisassociateQueueQuickConnectsCommandOutput, @@ -266,6 +279,7 @@ import { } from "./commands/ListLambdaFunctionsCommand"; import { ListLexBotsCommandInput, ListLexBotsCommandOutput } from "./commands/ListLexBotsCommand"; import { ListPhoneNumbersCommandInput, ListPhoneNumbersCommandOutput } from "./commands/ListPhoneNumbersCommand"; +import { ListPhoneNumbersV2CommandInput, ListPhoneNumbersV2CommandOutput } from "./commands/ListPhoneNumbersV2Command"; import { ListPromptsCommandInput, ListPromptsCommandOutput } from "./commands/ListPromptsCommand"; import { ListQueueQuickConnectsCommandInput, @@ -300,10 +314,15 @@ import { ListUserHierarchyGroupsCommandOutput, } from "./commands/ListUserHierarchyGroupsCommand"; import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand"; +import { ReleasePhoneNumberCommandInput, ReleasePhoneNumberCommandOutput } from "./commands/ReleasePhoneNumberCommand"; import { ResumeContactRecordingCommandInput, ResumeContactRecordingCommandOutput, } from "./commands/ResumeContactRecordingCommand"; +import { + SearchAvailablePhoneNumbersCommandInput, + SearchAvailablePhoneNumbersCommandOutput, +} from "./commands/SearchAvailablePhoneNumbersCommand"; import { SearchVocabulariesCommandInput, SearchVocabulariesCommandOutput } from "./commands/SearchVocabulariesCommand"; import { StartChatContactCommandInput, StartChatContactCommandOutput } from "./commands/StartChatContactCommand"; import { @@ -376,6 +395,7 @@ import { UpdateInstanceStorageConfigCommandInput, UpdateInstanceStorageConfigCommandOutput, } from "./commands/UpdateInstanceStorageConfigCommand"; +import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from "./commands/UpdatePhoneNumberCommand"; import { UpdateQueueHoursOfOperationCommandInput, UpdateQueueHoursOfOperationCommandOutput, @@ -455,9 +475,11 @@ export type ServiceInputTypes = | AssociateInstanceStorageConfigCommandInput | AssociateLambdaFunctionCommandInput | AssociateLexBotCommandInput + | AssociatePhoneNumberContactFlowCommandInput | AssociateQueueQuickConnectsCommandInput | AssociateRoutingProfileQueuesCommandInput | AssociateSecurityKeyCommandInput + | ClaimPhoneNumberCommandInput | CreateAgentStatusCommandInput | CreateContactFlowCommandInput | CreateContactFlowModuleCommandInput @@ -491,6 +513,7 @@ export type ServiceInputTypes = | DescribeInstanceAttributeCommandInput | DescribeInstanceCommandInput | DescribeInstanceStorageConfigCommandInput + | DescribePhoneNumberCommandInput | DescribeQueueCommandInput | DescribeQuickConnectCommandInput | DescribeRoutingProfileCommandInput @@ -504,6 +527,7 @@ export type ServiceInputTypes = | DisassociateInstanceStorageConfigCommandInput | DisassociateLambdaFunctionCommandInput | DisassociateLexBotCommandInput + | DisassociatePhoneNumberContactFlowCommandInput | DisassociateQueueQuickConnectsCommandInput | DisassociateRoutingProfileQueuesCommandInput | DisassociateSecurityKeyCommandInput @@ -526,6 +550,7 @@ export type ServiceInputTypes = | ListLambdaFunctionsCommandInput | ListLexBotsCommandInput | ListPhoneNumbersCommandInput + | ListPhoneNumbersV2CommandInput | ListPromptsCommandInput | ListQueueQuickConnectsCommandInput | ListQueuesCommandInput @@ -539,7 +564,9 @@ export type ServiceInputTypes = | ListUseCasesCommandInput | ListUserHierarchyGroupsCommandInput | ListUsersCommandInput + | ReleasePhoneNumberCommandInput | ResumeContactRecordingCommandInput + | SearchAvailablePhoneNumbersCommandInput | SearchVocabulariesCommandInput | StartChatContactCommandInput | StartContactRecordingCommandInput @@ -564,6 +591,7 @@ export type ServiceInputTypes = | UpdateHoursOfOperationCommandInput | UpdateInstanceAttributeCommandInput | UpdateInstanceStorageConfigCommandInput + | UpdatePhoneNumberCommandInput | UpdateQueueHoursOfOperationCommandInput | UpdateQueueMaxContactsCommandInput | UpdateQueueNameCommandInput @@ -591,9 +619,11 @@ export type ServiceOutputTypes = | AssociateInstanceStorageConfigCommandOutput | AssociateLambdaFunctionCommandOutput | AssociateLexBotCommandOutput + | AssociatePhoneNumberContactFlowCommandOutput | AssociateQueueQuickConnectsCommandOutput | AssociateRoutingProfileQueuesCommandOutput | AssociateSecurityKeyCommandOutput + | ClaimPhoneNumberCommandOutput | CreateAgentStatusCommandOutput | CreateContactFlowCommandOutput | CreateContactFlowModuleCommandOutput @@ -627,6 +657,7 @@ export type ServiceOutputTypes = | DescribeInstanceAttributeCommandOutput | DescribeInstanceCommandOutput | DescribeInstanceStorageConfigCommandOutput + | DescribePhoneNumberCommandOutput | DescribeQueueCommandOutput | DescribeQuickConnectCommandOutput | DescribeRoutingProfileCommandOutput @@ -640,6 +671,7 @@ export type ServiceOutputTypes = | DisassociateInstanceStorageConfigCommandOutput | DisassociateLambdaFunctionCommandOutput | DisassociateLexBotCommandOutput + | DisassociatePhoneNumberContactFlowCommandOutput | DisassociateQueueQuickConnectsCommandOutput | DisassociateRoutingProfileQueuesCommandOutput | DisassociateSecurityKeyCommandOutput @@ -662,6 +694,7 @@ export type ServiceOutputTypes = | ListLambdaFunctionsCommandOutput | ListLexBotsCommandOutput | ListPhoneNumbersCommandOutput + | ListPhoneNumbersV2CommandOutput | ListPromptsCommandOutput | ListQueueQuickConnectsCommandOutput | ListQueuesCommandOutput @@ -675,7 +708,9 @@ export type ServiceOutputTypes = | ListUseCasesCommandOutput | ListUserHierarchyGroupsCommandOutput | ListUsersCommandOutput + | ReleasePhoneNumberCommandOutput | ResumeContactRecordingCommandOutput + | SearchAvailablePhoneNumbersCommandOutput | SearchVocabulariesCommandOutput | StartChatContactCommandOutput | StartContactRecordingCommandOutput @@ -700,6 +735,7 @@ export type ServiceOutputTypes = | UpdateHoursOfOperationCommandOutput | UpdateInstanceAttributeCommandOutput | UpdateInstanceStorageConfigCommandOutput + | UpdatePhoneNumberCommandOutput | UpdateQueueHoursOfOperationCommandOutput | UpdateQueueMaxContactsCommandOutput | UpdateQueueNameCommandOutput diff --git a/clients/client-connect/src/commands/AssociatePhoneNumberContactFlowCommand.ts b/clients/client-connect/src/commands/AssociatePhoneNumberContactFlowCommand.ts new file mode 100644 index 000000000000..46ad8beda34c --- /dev/null +++ b/clients/client-connect/src/commands/AssociatePhoneNumberContactFlowCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { AssociatePhoneNumberContactFlowRequest } from "../models/models_0"; +import { + deserializeAws_restJson1AssociatePhoneNumberContactFlowCommand, + serializeAws_restJson1AssociatePhoneNumberContactFlowCommand, +} from "../protocols/Aws_restJson1"; + +export interface AssociatePhoneNumberContactFlowCommandInput extends AssociatePhoneNumberContactFlowRequest {} +export interface AssociatePhoneNumberContactFlowCommandOutput extends __MetadataBearer {} + +/** + *

Associates a contact flow with a phone number claimed to your Amazon Connect instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, AssociatePhoneNumberContactFlowCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, AssociatePhoneNumberContactFlowCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new AssociatePhoneNumberContactFlowCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link AssociatePhoneNumberContactFlowCommandInput} for command's `input` shape. + * @see {@link AssociatePhoneNumberContactFlowCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class AssociatePhoneNumberContactFlowCommand extends $Command< + AssociatePhoneNumberContactFlowCommandInput, + AssociatePhoneNumberContactFlowCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AssociatePhoneNumberContactFlowCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "AssociatePhoneNumberContactFlowCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: AssociatePhoneNumberContactFlowRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: AssociatePhoneNumberContactFlowCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1AssociatePhoneNumberContactFlowCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1AssociatePhoneNumberContactFlowCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ClaimPhoneNumberCommand.ts b/clients/client-connect/src/commands/ClaimPhoneNumberCommand.ts new file mode 100644 index 000000000000..46a34dc36fa1 --- /dev/null +++ b/clients/client-connect/src/commands/ClaimPhoneNumberCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { ClaimPhoneNumberRequest, ClaimPhoneNumberResponse } from "../models/models_0"; +import { + deserializeAws_restJson1ClaimPhoneNumberCommand, + serializeAws_restJson1ClaimPhoneNumberCommand, +} from "../protocols/Aws_restJson1"; + +export interface ClaimPhoneNumberCommandInput extends ClaimPhoneNumberRequest {} +export interface ClaimPhoneNumberCommandOutput extends ClaimPhoneNumberResponse, __MetadataBearer {} + +/** + *

Claims an available phone number to your Amazon Connect instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, ClaimPhoneNumberCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, ClaimPhoneNumberCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new ClaimPhoneNumberCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ClaimPhoneNumberCommandInput} for command's `input` shape. + * @see {@link ClaimPhoneNumberCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class ClaimPhoneNumberCommand extends $Command< + ClaimPhoneNumberCommandInput, + ClaimPhoneNumberCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ClaimPhoneNumberCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "ClaimPhoneNumberCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ClaimPhoneNumberRequest.filterSensitiveLog, + outputFilterSensitiveLog: ClaimPhoneNumberResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ClaimPhoneNumberCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ClaimPhoneNumberCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ClaimPhoneNumberCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/DescribePhoneNumberCommand.ts b/clients/client-connect/src/commands/DescribePhoneNumberCommand.ts new file mode 100644 index 000000000000..cb965025c552 --- /dev/null +++ b/clients/client-connect/src/commands/DescribePhoneNumberCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { DescribePhoneNumberRequest, DescribePhoneNumberResponse } from "../models/models_0"; +import { + deserializeAws_restJson1DescribePhoneNumberCommand, + serializeAws_restJson1DescribePhoneNumberCommand, +} from "../protocols/Aws_restJson1"; + +export interface DescribePhoneNumberCommandInput extends DescribePhoneNumberRequest {} +export interface DescribePhoneNumberCommandOutput extends DescribePhoneNumberResponse, __MetadataBearer {} + +/** + *

Gets details and status of a phone number that’s claimed to your Amazon Connect instance

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, DescribePhoneNumberCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, DescribePhoneNumberCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new DescribePhoneNumberCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribePhoneNumberCommandInput} for command's `input` shape. + * @see {@link DescribePhoneNumberCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class DescribePhoneNumberCommand extends $Command< + DescribePhoneNumberCommandInput, + DescribePhoneNumberCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribePhoneNumberCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "DescribePhoneNumberCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DescribePhoneNumberRequest.filterSensitiveLog, + outputFilterSensitiveLog: DescribePhoneNumberResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: DescribePhoneNumberCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1DescribePhoneNumberCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1DescribePhoneNumberCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/DisassociatePhoneNumberContactFlowCommand.ts b/clients/client-connect/src/commands/DisassociatePhoneNumberContactFlowCommand.ts new file mode 100644 index 000000000000..70b0abba74dd --- /dev/null +++ b/clients/client-connect/src/commands/DisassociatePhoneNumberContactFlowCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { DisassociatePhoneNumberContactFlowRequest } from "../models/models_0"; +import { + deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommand, + serializeAws_restJson1DisassociatePhoneNumberContactFlowCommand, +} from "../protocols/Aws_restJson1"; + +export interface DisassociatePhoneNumberContactFlowCommandInput extends DisassociatePhoneNumberContactFlowRequest {} +export interface DisassociatePhoneNumberContactFlowCommandOutput extends __MetadataBearer {} + +/** + *

Removes the contact flow association from a phone number claimed to your Amazon Connect instance, if a contact flow association exists.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, DisassociatePhoneNumberContactFlowCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, DisassociatePhoneNumberContactFlowCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new DisassociatePhoneNumberContactFlowCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisassociatePhoneNumberContactFlowCommandInput} for command's `input` shape. + * @see {@link DisassociatePhoneNumberContactFlowCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class DisassociatePhoneNumberContactFlowCommand extends $Command< + DisassociatePhoneNumberContactFlowCommandInput, + DisassociatePhoneNumberContactFlowCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisassociatePhoneNumberContactFlowCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "DisassociatePhoneNumberContactFlowCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: DisassociatePhoneNumberContactFlowRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DisassociatePhoneNumberContactFlowCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_restJson1DisassociatePhoneNumberContactFlowCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ListPhoneNumbersV2Command.ts b/clients/client-connect/src/commands/ListPhoneNumbersV2Command.ts new file mode 100644 index 000000000000..c0badcfcfb89 --- /dev/null +++ b/clients/client-connect/src/commands/ListPhoneNumbersV2Command.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { ListPhoneNumbersV2Request, ListPhoneNumbersV2Response } from "../models/models_0"; +import { + deserializeAws_restJson1ListPhoneNumbersV2Command, + serializeAws_restJson1ListPhoneNumbersV2Command, +} from "../protocols/Aws_restJson1"; + +export interface ListPhoneNumbersV2CommandInput extends ListPhoneNumbersV2Request {} +export interface ListPhoneNumbersV2CommandOutput extends ListPhoneNumbersV2Response, __MetadataBearer {} + +/** + *

Lists phone numbers claimed to your Amazon Connect instance.

+ *

For more information about phone numbers, see Set Up Phone Numbers for Your + * Contact Center in the Amazon Connect Administrator Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, ListPhoneNumbersV2Command } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, ListPhoneNumbersV2Command } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new ListPhoneNumbersV2Command(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListPhoneNumbersV2CommandInput} for command's `input` shape. + * @see {@link ListPhoneNumbersV2CommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class ListPhoneNumbersV2Command extends $Command< + ListPhoneNumbersV2CommandInput, + ListPhoneNumbersV2CommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListPhoneNumbersV2CommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "ListPhoneNumbersV2Command"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListPhoneNumbersV2Request.filterSensitiveLog, + outputFilterSensitiveLog: ListPhoneNumbersV2Response.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListPhoneNumbersV2CommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ListPhoneNumbersV2Command(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ListPhoneNumbersV2Command(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/ReleasePhoneNumberCommand.ts b/clients/client-connect/src/commands/ReleasePhoneNumberCommand.ts new file mode 100644 index 000000000000..c614cb09a3b9 --- /dev/null +++ b/clients/client-connect/src/commands/ReleasePhoneNumberCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { ReleasePhoneNumberRequest } from "../models/models_0"; +import { + deserializeAws_restJson1ReleasePhoneNumberCommand, + serializeAws_restJson1ReleasePhoneNumberCommand, +} from "../protocols/Aws_restJson1"; + +export interface ReleasePhoneNumberCommandInput extends ReleasePhoneNumberRequest {} +export interface ReleasePhoneNumberCommandOutput extends __MetadataBearer {} + +/** + *

Releases a phone number previously claimed to an Amazon Connect instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, ReleasePhoneNumberCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, ReleasePhoneNumberCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new ReleasePhoneNumberCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ReleasePhoneNumberCommandInput} for command's `input` shape. + * @see {@link ReleasePhoneNumberCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class ReleasePhoneNumberCommand extends $Command< + ReleasePhoneNumberCommandInput, + ReleasePhoneNumberCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ReleasePhoneNumberCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "ReleasePhoneNumberCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ReleasePhoneNumberRequest.filterSensitiveLog, + outputFilterSensitiveLog: (output: any) => output, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ReleasePhoneNumberCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1ReleasePhoneNumberCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1ReleasePhoneNumberCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/SearchAvailablePhoneNumbersCommand.ts b/clients/client-connect/src/commands/SearchAvailablePhoneNumbersCommand.ts new file mode 100644 index 000000000000..3c49b2809582 --- /dev/null +++ b/clients/client-connect/src/commands/SearchAvailablePhoneNumbersCommand.ts @@ -0,0 +1,101 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { SearchAvailablePhoneNumbersRequest } from "../models/models_0"; +import { SearchAvailablePhoneNumbersResponse } from "../models/models_1"; +import { + deserializeAws_restJson1SearchAvailablePhoneNumbersCommand, + serializeAws_restJson1SearchAvailablePhoneNumbersCommand, +} from "../protocols/Aws_restJson1"; + +export interface SearchAvailablePhoneNumbersCommandInput extends SearchAvailablePhoneNumbersRequest {} +export interface SearchAvailablePhoneNumbersCommandOutput + extends SearchAvailablePhoneNumbersResponse, + __MetadataBearer {} + +/** + *

Searches for available phone numbers that you can claim to your Amazon Connect instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, SearchAvailablePhoneNumbersCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, SearchAvailablePhoneNumbersCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new SearchAvailablePhoneNumbersCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link SearchAvailablePhoneNumbersCommandInput} for command's `input` shape. + * @see {@link SearchAvailablePhoneNumbersCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class SearchAvailablePhoneNumbersCommand extends $Command< + SearchAvailablePhoneNumbersCommandInput, + SearchAvailablePhoneNumbersCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: SearchAvailablePhoneNumbersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "SearchAvailablePhoneNumbersCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: SearchAvailablePhoneNumbersRequest.filterSensitiveLog, + outputFilterSensitiveLog: SearchAvailablePhoneNumbersResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: SearchAvailablePhoneNumbersCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1SearchAvailablePhoneNumbersCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return deserializeAws_restJson1SearchAvailablePhoneNumbersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/SearchVocabulariesCommand.ts b/clients/client-connect/src/commands/SearchVocabulariesCommand.ts index 49d4c1f7fa2f..a85fbf2f27b8 100644 --- a/clients/client-connect/src/commands/SearchVocabulariesCommand.ts +++ b/clients/client-connect/src/commands/SearchVocabulariesCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { SearchVocabulariesRequest, SearchVocabulariesResponse } from "../models/models_0"; +import { SearchVocabulariesRequest, SearchVocabulariesResponse } from "../models/models_1"; import { deserializeAws_restJson1SearchVocabulariesCommand, serializeAws_restJson1SearchVocabulariesCommand, diff --git a/clients/client-connect/src/commands/StartChatContactCommand.ts b/clients/client-connect/src/commands/StartChatContactCommand.ts index 55565940495e..f58503274420 100644 --- a/clients/client-connect/src/commands/StartChatContactCommand.ts +++ b/clients/client-connect/src/commands/StartChatContactCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { StartChatContactRequest, StartChatContactResponse } from "../models/models_0"; +import { StartChatContactRequest, StartChatContactResponse } from "../models/models_1"; import { deserializeAws_restJson1StartChatContactCommand, serializeAws_restJson1StartChatContactCommand, diff --git a/clients/client-connect/src/commands/StartContactRecordingCommand.ts b/clients/client-connect/src/commands/StartContactRecordingCommand.ts index d2af5f3dce10..7c958541d43f 100644 --- a/clients/client-connect/src/commands/StartContactRecordingCommand.ts +++ b/clients/client-connect/src/commands/StartContactRecordingCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { StartContactRecordingRequest, StartContactRecordingResponse } from "../models/models_0"; +import { StartContactRecordingRequest, StartContactRecordingResponse } from "../models/models_1"; import { deserializeAws_restJson1StartContactRecordingCommand, serializeAws_restJson1StartContactRecordingCommand, diff --git a/clients/client-connect/src/commands/StartContactStreamingCommand.ts b/clients/client-connect/src/commands/StartContactStreamingCommand.ts index 16e22efaeac7..ebf8ff6735c6 100644 --- a/clients/client-connect/src/commands/StartContactStreamingCommand.ts +++ b/clients/client-connect/src/commands/StartContactStreamingCommand.ts @@ -12,7 +12,7 @@ import { } from "@aws-sdk/types"; import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; -import { StartContactStreamingRequest, StartContactStreamingResponse } from "../models/models_0"; +import { StartContactStreamingRequest, StartContactStreamingResponse } from "../models/models_1"; import { deserializeAws_restJson1StartContactStreamingCommand, serializeAws_restJson1StartContactStreamingCommand, diff --git a/clients/client-connect/src/commands/TagResourceCommand.ts b/clients/client-connect/src/commands/TagResourceCommand.ts index bd0007136983..c037991ad98b 100644 --- a/clients/client-connect/src/commands/TagResourceCommand.ts +++ b/clients/client-connect/src/commands/TagResourceCommand.ts @@ -24,7 +24,7 @@ export interface TagResourceCommandOutput extends __MetadataBearer {} /** *

Adds the specified tags to the specified resource.

*

The supported resource types are users, routing profiles, queues, quick connects, contact - * flows, agent status, and hours of operation.

+ * flows, agent status, hours of operation, and phone number.

*

For sample policies that use tags, see Amazon Connect Identity-Based * Policy Examples in the Amazon Connect Administrator Guide.

* @example diff --git a/clients/client-connect/src/commands/UpdatePhoneNumberCommand.ts b/clients/client-connect/src/commands/UpdatePhoneNumberCommand.ts new file mode 100644 index 000000000000..b0aaf644e717 --- /dev/null +++ b/clients/client-connect/src/commands/UpdatePhoneNumberCommand.ts @@ -0,0 +1,95 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient"; +import { UpdatePhoneNumberRequest, UpdatePhoneNumberResponse } from "../models/models_1"; +import { + deserializeAws_restJson1UpdatePhoneNumberCommand, + serializeAws_restJson1UpdatePhoneNumberCommand, +} from "../protocols/Aws_restJson1"; + +export interface UpdatePhoneNumberCommandInput extends UpdatePhoneNumberRequest {} +export interface UpdatePhoneNumberCommandOutput extends UpdatePhoneNumberResponse, __MetadataBearer {} + +/** + *

Updates your claimed phone number from its current Amazon Connect instance to another Amazon Connect instance in the same Region.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectClient, UpdatePhoneNumberCommand } from "@aws-sdk/client-connect"; // ES Modules import + * // const { ConnectClient, UpdatePhoneNumberCommand } = require("@aws-sdk/client-connect"); // CommonJS import + * const client = new ConnectClient(config); + * const command = new UpdatePhoneNumberCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdatePhoneNumberCommandInput} for command's `input` shape. + * @see {@link UpdatePhoneNumberCommandOutput} for command's `response` shape. + * @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape. + * + */ +export class UpdatePhoneNumberCommand extends $Command< + UpdatePhoneNumberCommandInput, + UpdatePhoneNumberCommandOutput, + ConnectClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdatePhoneNumberCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ConnectClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ConnectClient"; + const commandName = "UpdatePhoneNumberCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UpdatePhoneNumberRequest.filterSensitiveLog, + outputFilterSensitiveLog: UpdatePhoneNumberResponse.filterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UpdatePhoneNumberCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UpdatePhoneNumberCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UpdatePhoneNumberCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-connect/src/commands/index.ts b/clients/client-connect/src/commands/index.ts index 4e527a6650a5..dcf0a2aac1f4 100644 --- a/clients/client-connect/src/commands/index.ts +++ b/clients/client-connect/src/commands/index.ts @@ -4,9 +4,11 @@ export * from "./AssociateDefaultVocabularyCommand"; export * from "./AssociateInstanceStorageConfigCommand"; export * from "./AssociateLambdaFunctionCommand"; export * from "./AssociateLexBotCommand"; +export * from "./AssociatePhoneNumberContactFlowCommand"; export * from "./AssociateQueueQuickConnectsCommand"; export * from "./AssociateRoutingProfileQueuesCommand"; export * from "./AssociateSecurityKeyCommand"; +export * from "./ClaimPhoneNumberCommand"; export * from "./CreateAgentStatusCommand"; export * from "./CreateContactFlowCommand"; export * from "./CreateContactFlowModuleCommand"; @@ -40,6 +42,7 @@ export * from "./DescribeHoursOfOperationCommand"; export * from "./DescribeInstanceAttributeCommand"; export * from "./DescribeInstanceCommand"; export * from "./DescribeInstanceStorageConfigCommand"; +export * from "./DescribePhoneNumberCommand"; export * from "./DescribeQueueCommand"; export * from "./DescribeQuickConnectCommand"; export * from "./DescribeRoutingProfileCommand"; @@ -53,6 +56,7 @@ export * from "./DisassociateBotCommand"; export * from "./DisassociateInstanceStorageConfigCommand"; export * from "./DisassociateLambdaFunctionCommand"; export * from "./DisassociateLexBotCommand"; +export * from "./DisassociatePhoneNumberContactFlowCommand"; export * from "./DisassociateQueueQuickConnectsCommand"; export * from "./DisassociateRoutingProfileQueuesCommand"; export * from "./DisassociateSecurityKeyCommand"; @@ -75,6 +79,7 @@ export * from "./ListIntegrationAssociationsCommand"; export * from "./ListLambdaFunctionsCommand"; export * from "./ListLexBotsCommand"; export * from "./ListPhoneNumbersCommand"; +export * from "./ListPhoneNumbersV2Command"; export * from "./ListPromptsCommand"; export * from "./ListQueueQuickConnectsCommand"; export * from "./ListQueuesCommand"; @@ -88,7 +93,9 @@ export * from "./ListTagsForResourceCommand"; export * from "./ListUseCasesCommand"; export * from "./ListUserHierarchyGroupsCommand"; export * from "./ListUsersCommand"; +export * from "./ReleasePhoneNumberCommand"; export * from "./ResumeContactRecordingCommand"; +export * from "./SearchAvailablePhoneNumbersCommand"; export * from "./SearchVocabulariesCommand"; export * from "./StartChatContactCommand"; export * from "./StartContactRecordingCommand"; @@ -113,6 +120,7 @@ export * from "./UpdateContactScheduleCommand"; export * from "./UpdateHoursOfOperationCommand"; export * from "./UpdateInstanceAttributeCommand"; export * from "./UpdateInstanceStorageConfigCommand"; +export * from "./UpdatePhoneNumberCommand"; export * from "./UpdateQueueHoursOfOperationCommand"; export * from "./UpdateQueueMaxContactsCommand"; export * from "./UpdateQueueNameCommand"; diff --git a/clients/client-connect/src/models/models_0.ts b/clients/client-connect/src/models/models_0.ts index 99201aca7fa0..540c6d7f15b4 100644 --- a/clients/client-connect/src/models/models_0.ts +++ b/clients/client-connect/src/models/models_0.ts @@ -759,6 +759,32 @@ export namespace AssociateLexBotRequest { }); } +export interface AssociatePhoneNumberContactFlowRequest { + /** + *

A unique identifier for the phone number.

+ */ + PhoneNumberId: string | undefined; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact flow.

+ */ + ContactFlowId: string | undefined; +} + +export namespace AssociatePhoneNumberContactFlowRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociatePhoneNumberContactFlowRequest): any => ({ + ...obj, + }); +} + export interface AssociateQueueQuickConnectsRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

@@ -913,6 +939,85 @@ export namespace AssociateSecurityKeyResponse { }); } +export interface ClaimPhoneNumberRequest { + /** + *

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

+ */ + TargetArn: string | undefined; + + /** + *

The phone number you want to claim. Phone numbers are formatted [+] [country code] [subscriber number including area code].

+ */ + PhoneNumber: string | undefined; + + /** + *

The description of the phone number.

+ */ + PhoneNumberDescription?: string; + + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + Tags?: { [key: string]: string }; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; +} + +export namespace ClaimPhoneNumberRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ClaimPhoneNumberRequest): any => ({ + ...obj, + }); +} + +export interface ClaimPhoneNumberResponse { + /** + *

The identifier of the phone number.

+ */ + PhoneNumberId?: string; + + /** + *

The Amazon Resource Name (ARN) of the phone number.

+ */ + PhoneNumberArn?: string; +} + +export namespace ClaimPhoneNumberResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ClaimPhoneNumberResponse): any => ({ + ...obj, + }); +} + +/** + *

An entity with the same name already exists.

+ */ +export class IdempotencyException extends __BaseException { + readonly name: "IdempotencyException" = "IdempotencyException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "IdempotencyException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IdempotencyException.prototype); + this.Message = opts.Message; + } +} + export interface CreateAgentStatusRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

@@ -1177,27 +1282,6 @@ export namespace CreateContactFlowModuleResponse { }); } -/** - *

An entity with the same name already exists.

- */ -export class IdempotencyException extends __BaseException { - readonly name: "IdempotencyException" = "IdempotencyException"; - readonly $fault: "client" = "client"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "IdempotencyException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IdempotencyException.prototype); - this.Message = opts.Message; - } -} - /** *

The problems with the module. Please fix before trying again.

*/ @@ -3322,189 +3406,556 @@ export namespace DescribeInstanceStorageConfigResponse { }); } -export interface DescribeQueueRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier for the queue.

- */ - QueueId: string | undefined; -} - -export namespace DescribeQueueRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: DescribeQueueRequest): any => ({ - ...obj, - }); -} - -export enum QueueStatus { - DISABLED = "DISABLED", - ENABLED = "ENABLED", -} - -/** - *

Contains information about a queue.

- */ -export interface Queue { - /** - *

The name of the queue.

- */ - Name?: string; - - /** - *

The Amazon Resource Name (ARN) for the queue.

- */ - QueueArn?: string; - - /** - *

The identifier for the queue.

- */ - QueueId?: string; - - /** - *

The description of the queue.

- */ - Description?: string; - - /** - *

The outbound caller ID name, number, and outbound whisper flow.

- */ - OutboundCallerConfig?: OutboundCallerConfig; - - /** - *

The identifier for the hours of operation.

- */ - HoursOfOperationId?: string; - - /** - *

The maximum number of contacts that can be in the queue before it is considered full.

- */ - MaxContacts?: number; - - /** - *

The status of the queue.

- */ - Status?: QueueStatus | string; - - /** - *

The tags used to organize, track, or control access for this resource.

- */ - Tags?: { [key: string]: string }; -} - -export namespace Queue { - /** - * @internal - */ - export const filterSensitiveLog = (obj: Queue): any => ({ - ...obj, - }); -} - -export interface DescribeQueueResponse { - /** - *

The name of the queue.

- */ - Queue?: Queue; -} - -export namespace DescribeQueueResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: DescribeQueueResponse): any => ({ - ...obj, - }); -} - -export interface DescribeQuickConnectRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId: string | undefined; - +export interface DescribePhoneNumberRequest { /** - *

The identifier for the quick connect.

+ *

The identifier of the phone number.

*/ - QuickConnectId: string | undefined; + PhoneNumberId: string | undefined; } -export namespace DescribeQuickConnectRequest { +export namespace DescribePhoneNumberRequest { /** * @internal */ - export const filterSensitiveLog = (obj: DescribeQuickConnectRequest): any => ({ + export const filterSensitiveLog = (obj: DescribePhoneNumberRequest): any => ({ ...obj, }); } -/** - *

Contains information about a quick connect.

- */ -export interface QuickConnect { - /** - *

The Amazon Resource Name (ARN) of the quick connect.

- */ - QuickConnectARN?: string; - - /** - *

The identifier for the quick connect.

- */ - QuickConnectId?: string; - - /** - *

The name of the quick connect.

- */ - Name?: string; - - /** - *

The description.

- */ - Description?: string; - - /** - *

Contains information about the quick connect.

- */ - QuickConnectConfig?: QuickConnectConfig; - - /** - *

The tags used to organize, track, or control access for this resource.

- */ - Tags?: { [key: string]: string }; -} - -export namespace QuickConnect { +export enum PhoneNumberCountryCode { + AD = "AD", + AE = "AE", + AF = "AF", + AG = "AG", + AI = "AI", + AL = "AL", + AM = "AM", + AN = "AN", + AO = "AO", + AQ = "AQ", + AR = "AR", + AS = "AS", + AT = "AT", + AU = "AU", + AW = "AW", + AZ = "AZ", + BA = "BA", + BB = "BB", + BD = "BD", + BE = "BE", + BF = "BF", + BG = "BG", + BH = "BH", + BI = "BI", + BJ = "BJ", + BL = "BL", + BM = "BM", + BN = "BN", + BO = "BO", + BR = "BR", + BS = "BS", + BT = "BT", + BW = "BW", + BY = "BY", + BZ = "BZ", + CA = "CA", + CC = "CC", + CD = "CD", + CF = "CF", + CG = "CG", + CH = "CH", + CI = "CI", + CK = "CK", + CL = "CL", + CM = "CM", + CN = "CN", + CO = "CO", + CR = "CR", + CU = "CU", + CV = "CV", + CW = "CW", + CX = "CX", + CY = "CY", + CZ = "CZ", + DE = "DE", + DJ = "DJ", + DK = "DK", + DM = "DM", + DO = "DO", + DZ = "DZ", + EC = "EC", + EE = "EE", + EG = "EG", + EH = "EH", + ER = "ER", + ES = "ES", + ET = "ET", + FI = "FI", + FJ = "FJ", + FK = "FK", + FM = "FM", + FO = "FO", + FR = "FR", + GA = "GA", + GB = "GB", + GD = "GD", + GE = "GE", + GG = "GG", + GH = "GH", + GI = "GI", + GL = "GL", + GM = "GM", + GN = "GN", + GQ = "GQ", + GR = "GR", + GT = "GT", + GU = "GU", + GW = "GW", + GY = "GY", + HK = "HK", + HN = "HN", + HR = "HR", + HT = "HT", + HU = "HU", + ID = "ID", + IE = "IE", + IL = "IL", + IM = "IM", + IN = "IN", + IO = "IO", + IQ = "IQ", + IR = "IR", + IS = "IS", + IT = "IT", + JE = "JE", + JM = "JM", + JO = "JO", + JP = "JP", + KE = "KE", + KG = "KG", + KH = "KH", + KI = "KI", + KM = "KM", + KN = "KN", + KP = "KP", + KR = "KR", + KW = "KW", + KY = "KY", + KZ = "KZ", + LA = "LA", + LB = "LB", + LC = "LC", + LI = "LI", + LK = "LK", + LR = "LR", + LS = "LS", + LT = "LT", + LU = "LU", + LV = "LV", + LY = "LY", + MA = "MA", + MC = "MC", + MD = "MD", + ME = "ME", + MF = "MF", + MG = "MG", + MH = "MH", + MK = "MK", + ML = "ML", + MM = "MM", + MN = "MN", + MO = "MO", + MP = "MP", + MR = "MR", + MS = "MS", + MT = "MT", + MU = "MU", + MV = "MV", + MW = "MW", + MX = "MX", + MY = "MY", + MZ = "MZ", + NA = "NA", + NC = "NC", + NE = "NE", + NG = "NG", + NI = "NI", + NL = "NL", + NO = "NO", + NP = "NP", + NR = "NR", + NU = "NU", + NZ = "NZ", + OM = "OM", + PA = "PA", + PE = "PE", + PF = "PF", + PG = "PG", + PH = "PH", + PK = "PK", + PL = "PL", + PM = "PM", + PN = "PN", + PR = "PR", + PT = "PT", + PW = "PW", + PY = "PY", + QA = "QA", + RE = "RE", + RO = "RO", + RS = "RS", + RU = "RU", + RW = "RW", + SA = "SA", + SB = "SB", + SC = "SC", + SD = "SD", + SE = "SE", + SG = "SG", + SH = "SH", + SI = "SI", + SJ = "SJ", + SK = "SK", + SL = "SL", + SM = "SM", + SN = "SN", + SO = "SO", + SR = "SR", + ST = "ST", + SV = "SV", + SX = "SX", + SY = "SY", + SZ = "SZ", + TC = "TC", + TD = "TD", + TG = "TG", + TH = "TH", + TJ = "TJ", + TK = "TK", + TL = "TL", + TM = "TM", + TN = "TN", + TO = "TO", + TR = "TR", + TT = "TT", + TV = "TV", + TW = "TW", + TZ = "TZ", + UA = "UA", + UG = "UG", + US = "US", + UY = "UY", + UZ = "UZ", + VA = "VA", + VC = "VC", + VE = "VE", + VG = "VG", + VI = "VI", + VN = "VN", + VU = "VU", + WF = "WF", + WS = "WS", + YE = "YE", + YT = "YT", + ZA = "ZA", + ZM = "ZM", + ZW = "ZW", +} + +export enum PhoneNumberWorkflowStatus { + Claimed = "CLAIMED", + Failed = "FAILED", + InProgress = "IN_PROGRESS", +} + +/** + *

The status of the phone number.

+ */ +export interface PhoneNumberStatus { /** - * @internal + *

The status.

*/ - export const filterSensitiveLog = (obj: QuickConnect): any => ({ - ...obj, - }); -} + Status?: PhoneNumberWorkflowStatus | string; -export interface DescribeQuickConnectResponse { /** - *

Information about the quick connect.

+ *

The status message.

*/ - QuickConnect?: QuickConnect; + Message?: string; } -export namespace DescribeQuickConnectResponse { +export namespace PhoneNumberStatus { /** * @internal */ - export const filterSensitiveLog = (obj: DescribeQuickConnectResponse): any => ({ + export const filterSensitiveLog = (obj: PhoneNumberStatus): any => ({ ...obj, }); } -export interface DescribeRoutingProfileRequest { +export enum PhoneNumberType { + DID = "DID", + TOLL_FREE = "TOLL_FREE", +} + +/** + *

Information about a phone number that has been claimed to your Amazon Connect instance.

+ */ +export interface ClaimedPhoneNumberSummary { + /** + *

The identifier of the phone number.

+ */ + PhoneNumberId?: string; + + /** + *

The Amazon Resource Name (ARN) of the phone number.

+ */ + PhoneNumberArn?: string; + + /** + *

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

+ */ + PhoneNumber?: string; + + /** + *

The ISO country code.

+ */ + PhoneNumberCountryCode?: PhoneNumberCountryCode | string; + + /** + *

The type of phone number.

+ */ + PhoneNumberType?: PhoneNumberType | string; + + /** + *

The description of the phone number.

+ */ + PhoneNumberDescription?: string; + + /** + *

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

+ */ + TargetArn?: string; + + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + Tags?: { [key: string]: string }; + + /** + *

The status of the phone number.

+ */ + PhoneNumberStatus?: PhoneNumberStatus; +} + +export namespace ClaimedPhoneNumberSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ClaimedPhoneNumberSummary): any => ({ + ...obj, + }); +} + +export interface DescribePhoneNumberResponse { + /** + *

Information about a phone number that's been claimed to your Amazon Connect instance. + *

+ */ + ClaimedPhoneNumberSummary?: ClaimedPhoneNumberSummary; +} + +export namespace DescribePhoneNumberResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribePhoneNumberResponse): any => ({ + ...obj, + }); +} + +export interface DescribeQueueRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier for the queue.

+ */ + QueueId: string | undefined; +} + +export namespace DescribeQueueRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeQueueRequest): any => ({ + ...obj, + }); +} + +export enum QueueStatus { + DISABLED = "DISABLED", + ENABLED = "ENABLED", +} + +/** + *

Contains information about a queue.

+ */ +export interface Queue { + /** + *

The name of the queue.

+ */ + Name?: string; + + /** + *

The Amazon Resource Name (ARN) for the queue.

+ */ + QueueArn?: string; + + /** + *

The identifier for the queue.

+ */ + QueueId?: string; + + /** + *

The description of the queue.

+ */ + Description?: string; + + /** + *

The outbound caller ID name, number, and outbound whisper flow.

+ */ + OutboundCallerConfig?: OutboundCallerConfig; + + /** + *

The identifier for the hours of operation.

+ */ + HoursOfOperationId?: string; + + /** + *

The maximum number of contacts that can be in the queue before it is considered full.

+ */ + MaxContacts?: number; + + /** + *

The status of the queue.

+ */ + Status?: QueueStatus | string; + + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + Tags?: { [key: string]: string }; +} + +export namespace Queue { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Queue): any => ({ + ...obj, + }); +} + +export interface DescribeQueueResponse { + /** + *

The name of the queue.

+ */ + Queue?: Queue; +} + +export namespace DescribeQueueResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeQueueResponse): any => ({ + ...obj, + }); +} + +export interface DescribeQuickConnectRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier for the quick connect.

+ */ + QuickConnectId: string | undefined; +} + +export namespace DescribeQuickConnectRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeQuickConnectRequest): any => ({ + ...obj, + }); +} + +/** + *

Contains information about a quick connect.

+ */ +export interface QuickConnect { + /** + *

The Amazon Resource Name (ARN) of the quick connect.

+ */ + QuickConnectARN?: string; + + /** + *

The identifier for the quick connect.

+ */ + QuickConnectId?: string; + + /** + *

The name of the quick connect.

+ */ + Name?: string; + + /** + *

The description.

+ */ + Description?: string; + + /** + *

Contains information about the quick connect.

+ */ + QuickConnectConfig?: QuickConnectConfig; + + /** + *

The tags used to organize, track, or control access for this resource.

+ */ + Tags?: { [key: string]: string }; +} + +export namespace QuickConnect { + /** + * @internal + */ + export const filterSensitiveLog = (obj: QuickConnect): any => ({ + ...obj, + }); +} + +export interface DescribeQuickConnectResponse { + /** + *

Information about the quick connect.

+ */ + QuickConnect?: QuickConnect; +} + +export namespace DescribeQuickConnectResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeQuickConnectResponse): any => ({ + ...obj, + }); +} + +export interface DescribeRoutingProfileRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

*/ @@ -4252,19 +4703,40 @@ export namespace DisassociateLexBotRequest { }); } -export interface DisassociateQueueQuickConnectsRequest { +export interface DisassociatePhoneNumberContactFlowRequest { /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ *

The identifier of the phone number.

*/ - InstanceId: string | undefined; + PhoneNumberId: string | undefined; /** - *

The identifier for the queue.

+ *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

*/ - QueueId: string | undefined; + InstanceId: string | undefined; +} +export namespace DisassociatePhoneNumberContactFlowRequest { /** - *

The quick connects to disassociate from the queue.

+ * @internal + */ + export const filterSensitiveLog = (obj: DisassociatePhoneNumberContactFlowRequest): any => ({ + ...obj, + }); +} + +export interface DisassociateQueueQuickConnectsRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier for the queue.

+ */ + QueueId: string | undefined; + + /** + *

The quick connects to disassociate from the queue.

*/ QuickConnectIds: string[] | undefined; } @@ -6139,415 +6611,170 @@ export namespace ListIntegrationAssociationsRequest { export interface IntegrationAssociationSummary { /** *

The identifier for the AppIntegration association.

- */ - IntegrationAssociationId?: string; - - /** - *

The Amazon Resource Name (ARN) for the AppIntegration association.

- */ - IntegrationAssociationArn?: string; - - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

- */ - InstanceId?: string; - - /** - *

The integration type.

- */ - IntegrationType?: IntegrationType | string; - - /** - *

The Amazon Resource Name (ARN) for the AppIntegration.

- */ - IntegrationArn?: string; - - /** - *

The URL for the external application.

- */ - SourceApplicationUrl?: string; - - /** - *

The user-provided, friendly name for the external application.

- */ - SourceApplicationName?: string; - - /** - *

The name of the source.

- */ - SourceType?: SourceType | string; -} - -export namespace IntegrationAssociationSummary { - /** - * @internal - */ - export const filterSensitiveLog = (obj: IntegrationAssociationSummary): any => ({ - ...obj, - }); -} - -export interface ListIntegrationAssociationsResponse { - /** - *

The associations.

- */ - IntegrationAssociationSummaryList?: IntegrationAssociationSummary[]; - - /** - *

If there are additional results, this is the token for the next set of results.

- */ - NextToken?: string; -} - -export namespace ListIntegrationAssociationsResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListIntegrationAssociationsResponse): any => ({ - ...obj, - }); -} - -export interface ListLambdaFunctionsRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The token for the next set of results. Use the value returned in the previous - * response in the next request to retrieve the next set of results.

- */ - NextToken?: string; - - /** - *

The maximum number of results to return per page.

- */ - MaxResults?: number; -} - -export namespace ListLambdaFunctionsRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListLambdaFunctionsRequest): any => ({ - ...obj, - }); -} - -export interface ListLambdaFunctionsResponse { - /** - *

The Lambdafunction ARNs associated with the specified instance.

- */ - LambdaFunctions?: string[]; - - /** - *

If there are additional results, this is the token for the next set of results.

- */ - NextToken?: string; -} - -export namespace ListLambdaFunctionsResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListLambdaFunctionsResponse): any => ({ - ...obj, - }); -} - -export interface ListLexBotsRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The token for the next set of results. Use the value returned in the previous - * response in the next request to retrieve the next set of results.

- */ - NextToken?: string; - - /** - *

The maximum number of results to return per page. If no value is specified, the default is 10. - *

- */ - MaxResults?: number; -} - -export namespace ListLexBotsRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListLexBotsRequest): any => ({ - ...obj, - }); -} - -export interface ListLexBotsResponse { - /** - *

The names and Regions of the Amazon Lex bots associated with the specified instance.

- */ - LexBots?: LexBot[]; - - /** - *

If there are additional results, this is the token for the next set of results.

- */ - NextToken?: string; -} - -export namespace ListLexBotsResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListLexBotsResponse): any => ({ - ...obj, - }); -} - -export enum PhoneNumberCountryCode { - AD = "AD", - AE = "AE", - AF = "AF", - AG = "AG", - AI = "AI", - AL = "AL", - AM = "AM", - AN = "AN", - AO = "AO", - AQ = "AQ", - AR = "AR", - AS = "AS", - AT = "AT", - AU = "AU", - AW = "AW", - AZ = "AZ", - BA = "BA", - BB = "BB", - BD = "BD", - BE = "BE", - BF = "BF", - BG = "BG", - BH = "BH", - BI = "BI", - BJ = "BJ", - BL = "BL", - BM = "BM", - BN = "BN", - BO = "BO", - BR = "BR", - BS = "BS", - BT = "BT", - BW = "BW", - BY = "BY", - BZ = "BZ", - CA = "CA", - CC = "CC", - CD = "CD", - CF = "CF", - CG = "CG", - CH = "CH", - CI = "CI", - CK = "CK", - CL = "CL", - CM = "CM", - CN = "CN", - CO = "CO", - CR = "CR", - CU = "CU", - CV = "CV", - CW = "CW", - CX = "CX", - CY = "CY", - CZ = "CZ", - DE = "DE", - DJ = "DJ", - DK = "DK", - DM = "DM", - DO = "DO", - DZ = "DZ", - EC = "EC", - EE = "EE", - EG = "EG", - EH = "EH", - ER = "ER", - ES = "ES", - ET = "ET", - FI = "FI", - FJ = "FJ", - FK = "FK", - FM = "FM", - FO = "FO", - FR = "FR", - GA = "GA", - GB = "GB", - GD = "GD", - GE = "GE", - GG = "GG", - GH = "GH", - GI = "GI", - GL = "GL", - GM = "GM", - GN = "GN", - GQ = "GQ", - GR = "GR", - GT = "GT", - GU = "GU", - GW = "GW", - GY = "GY", - HK = "HK", - HN = "HN", - HR = "HR", - HT = "HT", - HU = "HU", - ID = "ID", - IE = "IE", - IL = "IL", - IM = "IM", - IN = "IN", - IO = "IO", - IQ = "IQ", - IR = "IR", - IS = "IS", - IT = "IT", - JE = "JE", - JM = "JM", - JO = "JO", - JP = "JP", - KE = "KE", - KG = "KG", - KH = "KH", - KI = "KI", - KM = "KM", - KN = "KN", - KP = "KP", - KR = "KR", - KW = "KW", - KY = "KY", - KZ = "KZ", - LA = "LA", - LB = "LB", - LC = "LC", - LI = "LI", - LK = "LK", - LR = "LR", - LS = "LS", - LT = "LT", - LU = "LU", - LV = "LV", - LY = "LY", - MA = "MA", - MC = "MC", - MD = "MD", - ME = "ME", - MF = "MF", - MG = "MG", - MH = "MH", - MK = "MK", - ML = "ML", - MM = "MM", - MN = "MN", - MO = "MO", - MP = "MP", - MR = "MR", - MS = "MS", - MT = "MT", - MU = "MU", - MV = "MV", - MW = "MW", - MX = "MX", - MY = "MY", - MZ = "MZ", - NA = "NA", - NC = "NC", - NE = "NE", - NG = "NG", - NI = "NI", - NL = "NL", - NO = "NO", - NP = "NP", - NR = "NR", - NU = "NU", - NZ = "NZ", - OM = "OM", - PA = "PA", - PE = "PE", - PF = "PF", - PG = "PG", - PH = "PH", - PK = "PK", - PL = "PL", - PM = "PM", - PN = "PN", - PR = "PR", - PT = "PT", - PW = "PW", - PY = "PY", - QA = "QA", - RE = "RE", - RO = "RO", - RS = "RS", - RU = "RU", - RW = "RW", - SA = "SA", - SB = "SB", - SC = "SC", - SD = "SD", - SE = "SE", - SG = "SG", - SH = "SH", - SI = "SI", - SJ = "SJ", - SK = "SK", - SL = "SL", - SM = "SM", - SN = "SN", - SO = "SO", - SR = "SR", - ST = "ST", - SV = "SV", - SX = "SX", - SY = "SY", - SZ = "SZ", - TC = "TC", - TD = "TD", - TG = "TG", - TH = "TH", - TJ = "TJ", - TK = "TK", - TL = "TL", - TM = "TM", - TN = "TN", - TO = "TO", - TR = "TR", - TT = "TT", - TV = "TV", - TW = "TW", - TZ = "TZ", - UA = "UA", - UG = "UG", - US = "US", - UY = "UY", - UZ = "UZ", - VA = "VA", - VC = "VC", - VE = "VE", - VG = "VG", - VI = "VI", - VN = "VN", - VU = "VU", - WF = "WF", - WS = "WS", - YE = "YE", - YT = "YT", - ZA = "ZA", - ZM = "ZM", - ZW = "ZW", + */ + IntegrationAssociationId?: string; + + /** + *

The Amazon Resource Name (ARN) for the AppIntegration association.

+ */ + IntegrationAssociationArn?: string; + + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ */ + InstanceId?: string; + + /** + *

The integration type.

+ */ + IntegrationType?: IntegrationType | string; + + /** + *

The Amazon Resource Name (ARN) for the AppIntegration.

+ */ + IntegrationArn?: string; + + /** + *

The URL for the external application.

+ */ + SourceApplicationUrl?: string; + + /** + *

The user-provided, friendly name for the external application.

+ */ + SourceApplicationName?: string; + + /** + *

The name of the source.

+ */ + SourceType?: SourceType | string; } -export enum PhoneNumberType { - DID = "DID", - TOLL_FREE = "TOLL_FREE", +export namespace IntegrationAssociationSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: IntegrationAssociationSummary): any => ({ + ...obj, + }); +} + +export interface ListIntegrationAssociationsResponse { + /** + *

The associations.

+ */ + IntegrationAssociationSummaryList?: IntegrationAssociationSummary[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace ListIntegrationAssociationsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListIntegrationAssociationsResponse): any => ({ + ...obj, + }); +} + +export interface ListLambdaFunctionsRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return per page.

+ */ + MaxResults?: number; +} + +export namespace ListLambdaFunctionsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListLambdaFunctionsRequest): any => ({ + ...obj, + }); +} + +export interface ListLambdaFunctionsResponse { + /** + *

The Lambdafunction ARNs associated with the specified instance.

+ */ + LambdaFunctions?: string[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace ListLambdaFunctionsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListLambdaFunctionsResponse): any => ({ + ...obj, + }); +} + +export interface ListLexBotsRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The maximum number of results to return per page. If no value is specified, the default is 10. + *

+ */ + MaxResults?: number; +} + +export namespace ListLexBotsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListLexBotsRequest): any => ({ + ...obj, + }); +} + +export interface ListLexBotsResponse { + /** + *

The names and Regions of the Amazon Lex bots associated with the specified instance.

+ */ + LexBots?: LexBot[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace ListLexBotsResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListLexBotsResponse): any => ({ + ...obj, + }); } export interface ListPhoneNumbersRequest { @@ -6626,23 +6853,130 @@ export namespace PhoneNumberSummary { }); } -export interface ListPhoneNumbersResponse { +export interface ListPhoneNumbersResponse { + /** + *

Information about the phone numbers.

+ */ + PhoneNumberSummaryList?: PhoneNumberSummary[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace ListPhoneNumbersResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListPhoneNumbersResponse): any => ({ + ...obj, + }); +} + +export interface ListPhoneNumbersV2Request { + /** + *

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to. If TargetArn input is not provided, this API lists numbers claimed to all the Amazon Connect instances belonging to your account.

+ */ + TargetArn?: string; + + /** + *

The maximum number of results to return per page.

+ */ + MaxResults?: number; + + /** + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The ISO country code.

+ */ + PhoneNumberCountryCodes?: (PhoneNumberCountryCode | string)[]; + + /** + *

The type of phone number.

+ */ + PhoneNumberTypes?: (PhoneNumberType | string)[]; + + /** + *

The prefix of the phone number. If provided, it must contain + as part of the country code.

+ */ + PhoneNumberPrefix?: string; +} + +export namespace ListPhoneNumbersV2Request { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListPhoneNumbersV2Request): any => ({ + ...obj, + }); +} + +/** + *

Information about phone numbers that have been claimed to your Amazon Connect instance.

+ */ +export interface ListPhoneNumbersSummary { + /** + *

The identifier of the phone number.

+ */ + PhoneNumberId?: string; + + /** + *

The Amazon Resource Name (ARN) of the phone number.

+ */ + PhoneNumberArn?: string; + + /** + *

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

+ */ + PhoneNumber?: string; + + /** + *

The ISO country code.

+ */ + PhoneNumberCountryCode?: PhoneNumberCountryCode | string; + + /** + *

The type of phone number.

+ */ + PhoneNumberType?: PhoneNumberType | string; + + /** + *

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

+ */ + TargetArn?: string; +} + +export namespace ListPhoneNumbersSummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListPhoneNumbersSummary): any => ({ + ...obj, + }); +} + +export interface ListPhoneNumbersV2Response { /** - *

Information about the phone numbers.

+ *

If there are additional results, this is the token for the next set of results.

*/ - PhoneNumberSummaryList?: PhoneNumberSummary[]; + NextToken?: string; /** - *

If there are additional results, this is the token for the next set of results.

+ *

Information about phone numbers that have been claimed to your Amazon Connect instances.

*/ - NextToken?: string; + ListPhoneNumbersSummaryList?: ListPhoneNumbersSummary[]; } -export namespace ListPhoneNumbersResponse { +export namespace ListPhoneNumbersV2Response { /** * @internal */ - export const filterSensitiveLog = (obj: ListPhoneNumbersResponse): any => ({ + export const filterSensitiveLog = (obj: ListPhoneNumbersV2Response): any => ({ ...obj, }); } @@ -7308,271 +7642,25 @@ export interface SecurityProfileSummary { Arn?: string; /** - *

The name of the security profile.

- */ - Name?: string; -} - -export namespace SecurityProfileSummary { - /** - * @internal - */ - export const filterSensitiveLog = (obj: SecurityProfileSummary): any => ({ - ...obj, - }); -} - -export interface ListSecurityProfilesResponse { - /** - *

Information about the security profiles.

- */ - SecurityProfileSummaryList?: SecurityProfileSummary[]; - - /** - *

If there are additional results, this is the token for the next set of results.

- */ - NextToken?: string; -} - -export namespace ListSecurityProfilesResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListSecurityProfilesResponse): any => ({ - ...obj, - }); -} - -export interface ListTagsForResourceRequest { - /** - *

The Amazon Resource Name (ARN) of the resource.

- */ - resourceArn: string | undefined; -} - -export namespace ListTagsForResourceRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ - ...obj, - }); -} - -export interface ListTagsForResourceResponse { - /** - *

Information about the tags.

- */ - tags?: { [key: string]: string }; -} - -export namespace ListTagsForResourceResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ - ...obj, - }); -} - -/** - *

Provides summary information about the use cases for the specified integration - * association.

- */ -export interface ListUseCasesRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier for the integration association.

- */ - IntegrationAssociationId: string | undefined; - - /** - *

The token for the next set of results. Use the value returned in the previous - * response in the next request to retrieve the next set of results.

- */ - NextToken?: string; - - /** - *

The maximum number of results to return per page.

- */ - MaxResults?: number; -} - -export namespace ListUseCasesRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListUseCasesRequest): any => ({ - ...obj, - }); -} - -/** - *

Contains the - * use - * case.

- */ -export interface UseCase { - /** - *

The identifier for the use case.

- */ - UseCaseId?: string; - - /** - *

The Amazon Resource Name (ARN) for the use case.

- */ - UseCaseArn?: string; - - /** - *

The type of use case to associate to the integration association. Each integration - * association can have only one of each use case type.

- */ - UseCaseType?: UseCaseType | string; -} - -export namespace UseCase { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UseCase): any => ({ - ...obj, - }); -} - -export interface ListUseCasesResponse { - /** - *

The use cases.

- */ - UseCaseSummaryList?: UseCase[]; - - /** - *

If there are additional results, this is the token for the next set of results.

- */ - NextToken?: string; -} - -export namespace ListUseCasesResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListUseCasesResponse): any => ({ - ...obj, - }); -} - -export interface ListUserHierarchyGroupsRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The token for the next set of results. Use the value returned in the previous - * response in the next request to retrieve the next set of results.

- */ - NextToken?: string; - - /** - *

The maximum number of results to return per page.

- */ - MaxResults?: number; -} - -export namespace ListUserHierarchyGroupsRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListUserHierarchyGroupsRequest): any => ({ - ...obj, - }); -} - -export interface ListUserHierarchyGroupsResponse { - /** - *

Information about the hierarchy groups.

- */ - UserHierarchyGroupSummaryList?: HierarchyGroupSummary[]; - - /** - *

If there are additional results, this is the token for the next set of results.

- */ - NextToken?: string; -} - -export namespace ListUserHierarchyGroupsResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListUserHierarchyGroupsResponse): any => ({ - ...obj, - }); -} - -export interface ListUsersRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The token for the next set of results. Use the value returned in the previous - * response in the next request to retrieve the next set of results.

- */ - NextToken?: string; - - /** - *

The maximum number of results to return per page.

- */ - MaxResults?: number; -} - -export namespace ListUsersRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: ListUsersRequest): any => ({ - ...obj, - }); -} - -/** - *

Contains summary information about a user.

- */ -export interface UserSummary { - /** - *

The identifier of the user account.

- */ - Id?: string; - - /** - *

The Amazon Resource Name (ARN) of the user account.

- */ - Arn?: string; - - /** - *

The Amazon Connect user name of the user account.

+ *

The name of the security profile.

*/ - Username?: string; + Name?: string; } -export namespace UserSummary { +export namespace SecurityProfileSummary { /** * @internal */ - export const filterSensitiveLog = (obj: UserSummary): any => ({ + export const filterSensitiveLog = (obj: SecurityProfileSummary): any => ({ ...obj, }); } -export interface ListUsersResponse { +export interface ListSecurityProfilesResponse { /** - *

Information about the users.

+ *

Information about the security profiles.

*/ - UserSummaryList?: UserSummary[]; + SecurityProfileSummaryList?: SecurityProfileSummary[]; /** *

If there are additional results, this is the token for the next set of results.

@@ -7580,63 +7668,61 @@ export interface ListUsersResponse { NextToken?: string; } -export namespace ListUsersResponse { +export namespace ListSecurityProfilesResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ListUsersResponse): any => ({ + export const filterSensitiveLog = (obj: ListSecurityProfilesResponse): any => ({ ...obj, }); } -export interface ResumeContactRecordingRequest { - /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact.

- */ - ContactId: string | undefined; - +export interface ListTagsForResourceRequest { /** - *

The identifier of the contact. This is the identifier of the contact associated with the - * first interaction with the contact center.

+ *

The Amazon Resource Name (ARN) of the resource.

*/ - InitialContactId: string | undefined; + resourceArn: string | undefined; } -export namespace ResumeContactRecordingRequest { +export namespace ListTagsForResourceRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ResumeContactRecordingRequest): any => ({ + export const filterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ ...obj, }); } -export interface ResumeContactRecordingResponse {} +export interface ListTagsForResourceResponse { + /** + *

Information about the tags.

+ */ + tags?: { [key: string]: string }; +} -export namespace ResumeContactRecordingResponse { +export namespace ListTagsForResourceResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ResumeContactRecordingResponse): any => ({ + export const filterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ ...obj, }); } -export interface SearchVocabulariesRequest { +/** + *

Provides summary information about the use cases for the specified integration + * association.

+ */ +export interface ListUseCasesRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The maximum number of results to return per page.

+ *

The identifier for the integration association.

*/ - MaxResults?: number; + IntegrationAssociationId: string | undefined; /** *

The token for the next set of results. Use the value returned in the previous @@ -7645,88 +7731,57 @@ export interface SearchVocabulariesRequest { NextToken?: string; /** - *

The current state of the custom vocabulary.

- */ - State?: VocabularyState | string; - - /** - *

The starting pattern of the name of the vocabulary.

- */ - NameStartsWith?: string; - - /** - *

The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see - * What is Amazon Transcribe? - *

+ *

The maximum number of results to return per page.

*/ - LanguageCode?: VocabularyLanguageCode | string; + MaxResults?: number; } -export namespace SearchVocabulariesRequest { +export namespace ListUseCasesRequest { /** * @internal */ - export const filterSensitiveLog = (obj: SearchVocabulariesRequest): any => ({ + export const filterSensitiveLog = (obj: ListUseCasesRequest): any => ({ ...obj, }); } /** - *

Contains summary information about the custom vocabulary.

+ *

Contains the + * use + * case.

*/ -export interface VocabularySummary { - /** - *

A unique name of the custom vocabulary.

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

The identifier of the custom vocabulary.

- */ - Id: string | undefined; - - /** - *

The Amazon Resource Name (ARN) of the custom vocabulary.

- */ - Arn: string | undefined; - - /** - *

The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see - * What is Amazon Transcribe? - *

- */ - LanguageCode: VocabularyLanguageCode | string | undefined; - +export interface UseCase { /** - *

The current state of the custom vocabulary.

+ *

The identifier for the use case.

*/ - State: VocabularyState | string | undefined; + UseCaseId?: string; /** - *

The timestamp when the custom vocabulary was last modified.

+ *

The Amazon Resource Name (ARN) for the use case.

*/ - LastModifiedTime: Date | undefined; + UseCaseArn?: string; /** - *

The reason why the custom vocabulary was not created.

+ *

The type of use case to associate to the integration association. Each integration + * association can have only one of each use case type.

*/ - FailureReason?: string; + UseCaseType?: UseCaseType | string; } -export namespace VocabularySummary { +export namespace UseCase { /** * @internal */ - export const filterSensitiveLog = (obj: VocabularySummary): any => ({ + export const filterSensitiveLog = (obj: UseCase): any => ({ ...obj, }); } -export interface SearchVocabulariesResponse { +export interface ListUseCasesResponse { /** - *

The list of the available custom vocabularies.

+ *

The use cases.

*/ - VocabularySummaryList?: VocabularySummary[]; + UseCaseSummaryList?: UseCase[]; /** *

If there are additional results, this is the token for the next set of results.

@@ -7734,174 +7789,163 @@ export interface SearchVocabulariesResponse { NextToken?: string; } -export namespace SearchVocabulariesResponse { +export namespace ListUseCasesResponse { /** * @internal */ - export const filterSensitiveLog = (obj: SearchVocabulariesResponse): any => ({ + export const filterSensitiveLog = (obj: ListUseCasesResponse): any => ({ ...obj, }); } -/** - *

A chat message.

- */ -export interface ChatMessage { +export interface ListUserHierarchyGroupsRequest { /** - *

The type of the content. Supported types are text/plain.

+ *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

*/ - ContentType: string | undefined; + InstanceId: string | undefined; /** - *

The content of the chat message.

+ *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

*/ - Content: string | undefined; + NextToken?: string; + + /** + *

The maximum number of results to return per page.

+ */ + MaxResults?: number; } -export namespace ChatMessage { +export namespace ListUserHierarchyGroupsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: ChatMessage): any => ({ + export const filterSensitiveLog = (obj: ListUserHierarchyGroupsRequest): any => ({ ...obj, }); } -/** - *

The customer's details.

- */ -export interface ParticipantDetails { +export interface ListUserHierarchyGroupsResponse { + /** + *

Information about the hierarchy groups.

+ */ + UserHierarchyGroupSummaryList?: HierarchyGroupSummary[]; + /** - *

Display name of the participant.

+ *

If there are additional results, this is the token for the next set of results.

*/ - DisplayName: string | undefined; + NextToken?: string; } -export namespace ParticipantDetails { +export namespace ListUserHierarchyGroupsResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ParticipantDetails): any => ({ + export const filterSensitiveLog = (obj: ListUserHierarchyGroupsResponse): any => ({ ...obj, }); } -export interface StartChatContactRequest { +export interface ListUsersRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact flow for initiating the chat. - * To - * see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the - * contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of - * the ARN, shown here in bold:

- *

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx - *

- */ - ContactFlowId: string | undefined; - - /** - *

A custom key-value pair using an attribute map. The attributes are standard Amazon Connect - * attributes. They can be accessed in contact flows just like any other contact attributes.

- *

There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys - * can include only alphanumeric, dash, and underscore characters.

+ *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

*/ - Attributes?: { [key: string]: string }; + NextToken?: string; /** - *

Information identifying the participant.

+ *

The maximum number of results to return per page.

*/ - ParticipantDetails: ParticipantDetails | undefined; + MaxResults?: number; +} +export namespace ListUsersRequest { /** - *

The initial message to be sent to the newly created chat.

+ * @internal */ - InitialMessage?: ChatMessage; + export const filterSensitiveLog = (obj: ListUsersRequest): any => ({ + ...obj, + }); +} +/** + *

Contains summary information about a user.

+ */ +export interface UserSummary { /** - *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the - * request.

+ *

The identifier of the user account.

*/ - ClientToken?: string; + Id?: string; /** - *

The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. - * The minumum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).

+ *

The Amazon Resource Name (ARN) of the user account.

*/ - ChatDurationInMinutes?: number; + Arn?: string; /** - *

The supported chat message content types. Content types can be text/plain or both text/plain and text/markdown.

+ *

The Amazon Connect user name of the user account.

*/ - SupportedMessagingContentTypes?: string[]; + Username?: string; } -export namespace StartChatContactRequest { +export namespace UserSummary { /** * @internal */ - export const filterSensitiveLog = (obj: StartChatContactRequest): any => ({ + export const filterSensitiveLog = (obj: UserSummary): any => ({ ...obj, }); } -export interface StartChatContactResponse { - /** - *

The identifier of this contact within the Amazon Connect instance.

- */ - ContactId?: string; - +export interface ListUsersResponse { /** - *

The identifier for a chat participant. The participantId for a chat participant is the same - * throughout the chat lifecycle.

+ *

Information about the users.

*/ - ParticipantId?: string; + UserSummaryList?: UserSummary[]; /** - *

The token used by the chat participant to call CreateParticipantConnection. The participant token is valid for the lifetime of a chat - * participant.

+ *

If there are additional results, this is the token for the next set of results.

*/ - ParticipantToken?: string; + NextToken?: string; } -export namespace StartChatContactResponse { +export namespace ListUsersResponse { /** * @internal */ - export const filterSensitiveLog = (obj: StartChatContactResponse): any => ({ + export const filterSensitiveLog = (obj: ListUsersResponse): any => ({ ...obj, }); } -export enum VoiceRecordingTrack { - ALL = "ALL", - FROM_AGENT = "FROM_AGENT", - TO_AGENT = "TO_AGENT", -} +export interface ReleasePhoneNumberRequest { + /** + *

The identifier of the phone number.

+ */ + PhoneNumberId: string | undefined; -/** - *

Contains information about the recording configuration settings.

- */ -export interface VoiceRecordingConfiguration { /** - *

Identifies which track is being recorded.

+ *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

*/ - VoiceRecordingTrack?: VoiceRecordingTrack | string; + ClientToken?: string; } -export namespace VoiceRecordingConfiguration { +export namespace ReleasePhoneNumberRequest { /** * @internal */ - export const filterSensitiveLog = (obj: VoiceRecordingConfiguration): any => ({ + export const filterSensitiveLog = (obj: ReleasePhoneNumberRequest): any => ({ ...obj, }); } -export interface StartContactRecordingRequest { +export interface ResumeContactRecordingRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

*/ @@ -7917,122 +7961,95 @@ export interface StartContactRecordingRequest { * first interaction with the contact center.

*/ InitialContactId: string | undefined; - - /** - *

The person being recorded.

- */ - VoiceRecordingConfiguration: VoiceRecordingConfiguration | undefined; } -export namespace StartContactRecordingRequest { +export namespace ResumeContactRecordingRequest { /** * @internal */ - export const filterSensitiveLog = (obj: StartContactRecordingRequest): any => ({ + export const filterSensitiveLog = (obj: ResumeContactRecordingRequest): any => ({ ...obj, }); } -export interface StartContactRecordingResponse {} +export interface ResumeContactRecordingResponse {} -export namespace StartContactRecordingResponse { +export namespace ResumeContactRecordingResponse { /** * @internal */ - export const filterSensitiveLog = (obj: StartContactRecordingResponse): any => ({ + export const filterSensitiveLog = (obj: ResumeContactRecordingResponse): any => ({ ...obj, }); } -/** - *

The streaming configuration, such as the Amazon SNS streaming endpoint.

- */ -export interface ChatStreamingConfiguration { +export interface SearchAvailablePhoneNumbersRequest { /** - *

The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used - * to publish real-time message streaming for chat conversations.

+ *

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

*/ - StreamingEndpointArn: string | undefined; -} + TargetArn: string | undefined; -export namespace ChatStreamingConfiguration { /** - * @internal + *

The ISO country code.

*/ - export const filterSensitiveLog = (obj: ChatStreamingConfiguration): any => ({ - ...obj, - }); -} + PhoneNumberCountryCode: PhoneNumberCountryCode | string | undefined; -export interface StartContactStreamingRequest { /** - *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

+ *

The type of phone number.

*/ - InstanceId: string | undefined; + PhoneNumberType: PhoneNumberType | string | undefined; /** - *

The identifier of the contact. This is the identifier of the contact associated with the - * first interaction with the contact center.

+ *

The prefix of the phone number. If provided, it must contain + as part of the country code.

*/ - ContactId: string | undefined; + PhoneNumberPrefix?: string; /** - *

The streaming configuration, such as the Amazon SNS streaming endpoint.

+ *

The maximum number of results to return per page.

*/ - ChatStreamingConfiguration: ChatStreamingConfiguration | undefined; + MaxResults?: number; /** - *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the - * request.

+ *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

*/ - ClientToken?: string; + NextToken?: string; } -export namespace StartContactStreamingRequest { +export namespace SearchAvailablePhoneNumbersRequest { /** * @internal */ - export const filterSensitiveLog = (obj: StartContactStreamingRequest): any => ({ + export const filterSensitiveLog = (obj: SearchAvailablePhoneNumbersRequest): any => ({ ...obj, }); } -export interface StartContactStreamingResponse { +/** + *

Information about available phone numbers.

+ */ +export interface AvailableNumberSummary { /** - *

The identifier of the streaming configuration enabled.

+ *

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

*/ - StreamingId: string | undefined; -} + PhoneNumber?: string; -export namespace StartContactStreamingResponse { /** - * @internal + *

The ISO country code.

*/ - export const filterSensitiveLog = (obj: StartContactStreamingResponse): any => ({ - ...obj, - }); -} + PhoneNumberCountryCode?: PhoneNumberCountryCode | string; -/** - *

Outbound calls to the destination number are not allowed.

- */ -export class DestinationNotAllowedException extends __BaseException { - readonly name: "DestinationNotAllowedException" = "DestinationNotAllowedException"; - readonly $fault: "client" = "client"; /** - *

The message about the outbound calls.

+ *

The type of phone number.

*/ - Message?: string; + PhoneNumberType?: PhoneNumberType | string; +} + +export namespace AvailableNumberSummary { /** * @internal */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "DestinationNotAllowedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, DestinationNotAllowedException.prototype); - this.Message = opts.Message; - } + export const filterSensitiveLog = (obj: AvailableNumberSummary): any => ({ + ...obj, + }); } diff --git a/clients/client-connect/src/models/models_1.ts b/clients/client-connect/src/models/models_1.ts index a154d38de0d9..db2c3663787f 100644 --- a/clients/client-connect/src/models/models_1.ts +++ b/clients/client-connect/src/models/models_1.ts @@ -4,6 +4,7 @@ import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types"; import { ConnectServiceException as __BaseException } from "./ConnectServiceException"; import { AgentStatusState, + AvailableNumberSummary, ContactFlowModuleState, ContactFlowState, HoursOfOperationConfig, @@ -18,8 +19,441 @@ import { RoutingProfileQueueConfig, UserIdentityInfo, UserPhoneConfig, + VocabularyLanguageCode, + VocabularyState, } from "./models_0"; +export interface SearchAvailablePhoneNumbersResponse { + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; + + /** + *

A list of available phone numbers that you can claim for your Amazon Connect instance.

+ */ + AvailableNumbersList?: AvailableNumberSummary[]; +} + +export namespace SearchAvailablePhoneNumbersResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchAvailablePhoneNumbersResponse): any => ({ + ...obj, + }); +} + +export interface SearchVocabulariesRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The maximum number of results to return per page.

+ */ + MaxResults?: number; + + /** + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ */ + NextToken?: string; + + /** + *

The current state of the custom vocabulary.

+ */ + State?: VocabularyState | string; + + /** + *

The starting pattern of the name of the vocabulary.

+ */ + NameStartsWith?: string; + + /** + *

The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see + * What is Amazon Transcribe? + *

+ */ + LanguageCode?: VocabularyLanguageCode | string; +} + +export namespace SearchVocabulariesRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchVocabulariesRequest): any => ({ + ...obj, + }); +} + +/** + *

Contains summary information about the custom vocabulary.

+ */ +export interface VocabularySummary { + /** + *

A unique name of the custom vocabulary.

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

The identifier of the custom vocabulary.

+ */ + Id: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the custom vocabulary.

+ */ + Arn: string | undefined; + + /** + *

The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see + * What is Amazon Transcribe? + *

+ */ + LanguageCode: VocabularyLanguageCode | string | undefined; + + /** + *

The current state of the custom vocabulary.

+ */ + State: VocabularyState | string | undefined; + + /** + *

The timestamp when the custom vocabulary was last modified.

+ */ + LastModifiedTime: Date | undefined; + + /** + *

The reason why the custom vocabulary was not created.

+ */ + FailureReason?: string; +} + +export namespace VocabularySummary { + /** + * @internal + */ + export const filterSensitiveLog = (obj: VocabularySummary): any => ({ + ...obj, + }); +} + +export interface SearchVocabulariesResponse { + /** + *

The list of the available custom vocabularies.

+ */ + VocabularySummaryList?: VocabularySummary[]; + + /** + *

If there are additional results, this is the token for the next set of results.

+ */ + NextToken?: string; +} + +export namespace SearchVocabulariesResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: SearchVocabulariesResponse): any => ({ + ...obj, + }); +} + +/** + *

A chat message.

+ */ +export interface ChatMessage { + /** + *

The type of the content. Supported types are text/plain.

+ */ + ContentType: string | undefined; + + /** + *

The content of the chat message.

+ */ + Content: string | undefined; +} + +export namespace ChatMessage { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ChatMessage): any => ({ + ...obj, + }); +} + +/** + *

The customer's details.

+ */ +export interface ParticipantDetails { + /** + *

Display name of the participant.

+ */ + DisplayName: string | undefined; +} + +export namespace ParticipantDetails { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ParticipantDetails): any => ({ + ...obj, + }); +} + +export interface StartChatContactRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact flow for initiating the chat. + * To + * see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the + * contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of + * the ARN, shown here in bold:

+ *

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx + *

+ */ + ContactFlowId: string | undefined; + + /** + *

A custom key-value pair using an attribute map. The attributes are standard Amazon Connect + * attributes. They can be accessed in contact flows just like any other contact attributes.

+ *

There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys + * can include only alphanumeric, dash, and underscore characters.

+ */ + Attributes?: { [key: string]: string }; + + /** + *

Information identifying the participant.

+ */ + ParticipantDetails: ParticipantDetails | undefined; + + /** + *

The initial message to be sent to the newly created chat.

+ */ + InitialMessage?: ChatMessage; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; + + /** + *

The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. + * The minumum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).

+ */ + ChatDurationInMinutes?: number; + + /** + *

The supported chat message content types. Content types can be text/plain or both text/plain and text/markdown.

+ */ + SupportedMessagingContentTypes?: string[]; +} + +export namespace StartChatContactRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartChatContactRequest): any => ({ + ...obj, + }); +} + +export interface StartChatContactResponse { + /** + *

The identifier of this contact within the Amazon Connect instance.

+ */ + ContactId?: string; + + /** + *

The identifier for a chat participant. The participantId for a chat participant is the same + * throughout the chat lifecycle.

+ */ + ParticipantId?: string; + + /** + *

The token used by the chat participant to call CreateParticipantConnection. The participant token is valid for the lifetime of a chat + * participant.

+ */ + ParticipantToken?: string; +} + +export namespace StartChatContactResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartChatContactResponse): any => ({ + ...obj, + }); +} + +export enum VoiceRecordingTrack { + ALL = "ALL", + FROM_AGENT = "FROM_AGENT", + TO_AGENT = "TO_AGENT", +} + +/** + *

Contains information about the recording configuration settings.

+ */ +export interface VoiceRecordingConfiguration { + /** + *

Identifies which track is being recorded.

+ */ + VoiceRecordingTrack?: VoiceRecordingTrack | string; +} + +export namespace VoiceRecordingConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: VoiceRecordingConfiguration): any => ({ + ...obj, + }); +} + +export interface StartContactRecordingRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact.

+ */ + ContactId: string | undefined; + + /** + *

The identifier of the contact. This is the identifier of the contact associated with the + * first interaction with the contact center.

+ */ + InitialContactId: string | undefined; + + /** + *

The person being recorded.

+ */ + VoiceRecordingConfiguration: VoiceRecordingConfiguration | undefined; +} + +export namespace StartContactRecordingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContactRecordingRequest): any => ({ + ...obj, + }); +} + +export interface StartContactRecordingResponse {} + +export namespace StartContactRecordingResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContactRecordingResponse): any => ({ + ...obj, + }); +} + +/** + *

The streaming configuration, such as the Amazon SNS streaming endpoint.

+ */ +export interface ChatStreamingConfiguration { + /** + *

The Amazon Resource Name (ARN) of the standard Amazon SNS topic. The Amazon Resource Name (ARN) of the streaming endpoint that is used + * to publish real-time message streaming for chat conversations.

+ */ + StreamingEndpointArn: string | undefined; +} + +export namespace ChatStreamingConfiguration { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ChatStreamingConfiguration): any => ({ + ...obj, + }); +} + +export interface StartContactStreamingRequest { + /** + *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact. This is the identifier of the contact associated with the + * first interaction with the contact center.

+ */ + ContactId: string | undefined; + + /** + *

The streaming configuration, such as the Amazon SNS streaming endpoint.

+ */ + ChatStreamingConfiguration: ChatStreamingConfiguration | undefined; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; +} + +export namespace StartContactStreamingRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContactStreamingRequest): any => ({ + ...obj, + }); +} + +export interface StartContactStreamingResponse { + /** + *

The identifier of the streaming configuration enabled.

+ */ + StreamingId: string | undefined; +} + +export namespace StartContactStreamingResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartContactStreamingResponse): any => ({ + ...obj, + }); +} + +/** + *

Outbound calls to the destination number are not allowed.

+ */ +export class DestinationNotAllowedException extends __BaseException { + readonly name: "DestinationNotAllowedException" = "DestinationNotAllowedException"; + readonly $fault: "client" = "client"; + /** + *

The message about the outbound calls.

+ */ + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "DestinationNotAllowedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, DestinationNotAllowedException.prototype); + this.Message = opts.Message; + } +} + /** *

The contact is not permitted.

*/ @@ -947,6 +1381,54 @@ export namespace UpdateInstanceStorageConfigRequest { }); } +export interface UpdatePhoneNumberRequest { + /** + *

The identifier of the phone number.

+ */ + PhoneNumberId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

+ */ + TargetArn: string | undefined; + + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request.

+ */ + ClientToken?: string; +} + +export namespace UpdatePhoneNumberRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdatePhoneNumberRequest): any => ({ + ...obj, + }); +} + +export interface UpdatePhoneNumberResponse { + /** + *

The identifier of the phone number.

+ */ + PhoneNumberId?: string; + + /** + *

The Amazon Resource Name (ARN) of the phone number.

+ */ + PhoneNumberArn?: string; +} + +export namespace UpdatePhoneNumberResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdatePhoneNumberResponse): any => ({ + ...obj, + }); +} + export interface UpdateQueueHoursOfOperationRequest { /** *

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

diff --git a/clients/client-connect/src/pagination/ListPhoneNumbersV2Paginator.ts b/clients/client-connect/src/pagination/ListPhoneNumbersV2Paginator.ts new file mode 100644 index 000000000000..5a8b4cee814c --- /dev/null +++ b/clients/client-connect/src/pagination/ListPhoneNumbersV2Paginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + ListPhoneNumbersV2Command, + ListPhoneNumbersV2CommandInput, + ListPhoneNumbersV2CommandOutput, +} from "../commands/ListPhoneNumbersV2Command"; +import { Connect } from "../Connect"; +import { ConnectClient } from "../ConnectClient"; +import { ConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: ConnectClient, + input: ListPhoneNumbersV2CommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListPhoneNumbersV2Command(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Connect, + input: ListPhoneNumbersV2CommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.listPhoneNumbersV2(input, ...args); +}; +export async function* paginateListPhoneNumbersV2( + config: ConnectPaginationConfiguration, + input: ListPhoneNumbersV2CommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListPhoneNumbersV2CommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof Connect) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof ConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Connect | ConnectClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-connect/src/pagination/SearchAvailablePhoneNumbersPaginator.ts b/clients/client-connect/src/pagination/SearchAvailablePhoneNumbersPaginator.ts new file mode 100644 index 000000000000..4bb87fb11cff --- /dev/null +++ b/clients/client-connect/src/pagination/SearchAvailablePhoneNumbersPaginator.ts @@ -0,0 +1,59 @@ +import { Paginator } from "@aws-sdk/types"; + +import { + SearchAvailablePhoneNumbersCommand, + SearchAvailablePhoneNumbersCommandInput, + SearchAvailablePhoneNumbersCommandOutput, +} from "../commands/SearchAvailablePhoneNumbersCommand"; +import { Connect } from "../Connect"; +import { ConnectClient } from "../ConnectClient"; +import { ConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: ConnectClient, + input: SearchAvailablePhoneNumbersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchAvailablePhoneNumbersCommand(input), ...args); +}; +/** + * @private + */ +const makePagedRequest = async ( + client: Connect, + input: SearchAvailablePhoneNumbersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.searchAvailablePhoneNumbers(input, ...args); +}; +export async function* paginateSearchAvailablePhoneNumbers( + config: ConnectPaginationConfiguration, + input: SearchAvailablePhoneNumbersCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchAvailablePhoneNumbersCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof Connect) { + page = await makePagedRequest(config.client, input, ...additionalArguments); + } else if (config.client instanceof ConnectClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Connect | ConnectClient"); + } + yield page; + token = page.NextToken; + hasNext = !!token; + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-connect/src/pagination/index.ts b/clients/client-connect/src/pagination/index.ts index 2c2caae2e96c..accd66250fdf 100644 --- a/clients/client-connect/src/pagination/index.ts +++ b/clients/client-connect/src/pagination/index.ts @@ -16,6 +16,7 @@ export * from "./ListIntegrationAssociationsPaginator"; export * from "./ListLambdaFunctionsPaginator"; export * from "./ListLexBotsPaginator"; export * from "./ListPhoneNumbersPaginator"; +export * from "./ListPhoneNumbersV2Paginator"; export * from "./ListPromptsPaginator"; export * from "./ListQueueQuickConnectsPaginator"; export * from "./ListQueuesPaginator"; @@ -28,4 +29,5 @@ export * from "./ListSecurityProfilesPaginator"; export * from "./ListUseCasesPaginator"; export * from "./ListUserHierarchyGroupsPaginator"; export * from "./ListUsersPaginator"; +export * from "./SearchAvailablePhoneNumbersPaginator"; export * from "./SearchVocabulariesPaginator"; diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index dd66754b730b..5ee0c08d2d96 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -38,6 +38,10 @@ import { AssociateLambdaFunctionCommandOutput, } from "../commands/AssociateLambdaFunctionCommand"; import { AssociateLexBotCommandInput, AssociateLexBotCommandOutput } from "../commands/AssociateLexBotCommand"; +import { + AssociatePhoneNumberContactFlowCommandInput, + AssociatePhoneNumberContactFlowCommandOutput, +} from "../commands/AssociatePhoneNumberContactFlowCommand"; import { AssociateQueueQuickConnectsCommandInput, AssociateQueueQuickConnectsCommandOutput, @@ -50,6 +54,7 @@ import { AssociateSecurityKeyCommandInput, AssociateSecurityKeyCommandOutput, } from "../commands/AssociateSecurityKeyCommand"; +import { ClaimPhoneNumberCommandInput, ClaimPhoneNumberCommandOutput } from "../commands/ClaimPhoneNumberCommand"; import { CreateAgentStatusCommandInput, CreateAgentStatusCommandOutput } from "../commands/CreateAgentStatusCommand"; import { CreateContactFlowCommandInput, CreateContactFlowCommandOutput } from "../commands/CreateContactFlowCommand"; import { @@ -134,6 +139,10 @@ import { DescribeInstanceStorageConfigCommandInput, DescribeInstanceStorageConfigCommandOutput, } from "../commands/DescribeInstanceStorageConfigCommand"; +import { + DescribePhoneNumberCommandInput, + DescribePhoneNumberCommandOutput, +} from "../commands/DescribePhoneNumberCommand"; import { DescribeQueueCommandInput, DescribeQueueCommandOutput } from "../commands/DescribeQueueCommand"; import { DescribeQuickConnectCommandInput, @@ -171,6 +180,10 @@ import { DisassociateLambdaFunctionCommandOutput, } from "../commands/DisassociateLambdaFunctionCommand"; import { DisassociateLexBotCommandInput, DisassociateLexBotCommandOutput } from "../commands/DisassociateLexBotCommand"; +import { + DisassociatePhoneNumberContactFlowCommandInput, + DisassociatePhoneNumberContactFlowCommandOutput, +} from "../commands/DisassociatePhoneNumberContactFlowCommand"; import { DisassociateQueueQuickConnectsCommandInput, DisassociateQueueQuickConnectsCommandOutput, @@ -235,6 +248,7 @@ import { } from "../commands/ListLambdaFunctionsCommand"; import { ListLexBotsCommandInput, ListLexBotsCommandOutput } from "../commands/ListLexBotsCommand"; import { ListPhoneNumbersCommandInput, ListPhoneNumbersCommandOutput } from "../commands/ListPhoneNumbersCommand"; +import { ListPhoneNumbersV2CommandInput, ListPhoneNumbersV2CommandOutput } from "../commands/ListPhoneNumbersV2Command"; import { ListPromptsCommandInput, ListPromptsCommandOutput } from "../commands/ListPromptsCommand"; import { ListQueueQuickConnectsCommandInput, @@ -269,10 +283,15 @@ import { ListUserHierarchyGroupsCommandOutput, } from "../commands/ListUserHierarchyGroupsCommand"; import { ListUsersCommandInput, ListUsersCommandOutput } from "../commands/ListUsersCommand"; +import { ReleasePhoneNumberCommandInput, ReleasePhoneNumberCommandOutput } from "../commands/ReleasePhoneNumberCommand"; import { ResumeContactRecordingCommandInput, ResumeContactRecordingCommandOutput, } from "../commands/ResumeContactRecordingCommand"; +import { + SearchAvailablePhoneNumbersCommandInput, + SearchAvailablePhoneNumbersCommandOutput, +} from "../commands/SearchAvailablePhoneNumbersCommand"; import { SearchVocabulariesCommandInput, SearchVocabulariesCommandOutput } from "../commands/SearchVocabulariesCommand"; import { StartChatContactCommandInput, StartChatContactCommandOutput } from "../commands/StartChatContactCommand"; import { @@ -345,6 +364,7 @@ import { UpdateInstanceStorageConfigCommandInput, UpdateInstanceStorageConfigCommandOutput, } from "../commands/UpdateInstanceStorageConfigCommand"; +import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from "../commands/UpdatePhoneNumberCommand"; import { UpdateQueueHoursOfOperationCommandInput, UpdateQueueHoursOfOperationCommandOutput, @@ -423,9 +443,9 @@ import { AgentStatusSummary, AttachmentReference, Attribute, + AvailableNumberSummary, Channel, - ChatMessage, - ChatStreamingConfiguration, + ClaimedPhoneNumberSummary, Contact, ContactFlow, ContactFlowModule, @@ -437,7 +457,6 @@ import { CurrentMetricData, CurrentMetricResult, DefaultVocabulary, - DestinationNotAllowedException, Dimensions, DuplicateResourceException, EncryptionConfig, @@ -473,11 +492,14 @@ import { LexBotConfig, LexV2Bot, LimitExceededException, + ListPhoneNumbersSummary, MediaConcurrency, OutboundCallerConfig, - ParticipantDetails, + PhoneNumberCountryCode, PhoneNumberQuickConnectConfig, + PhoneNumberStatus, PhoneNumberSummary, + PhoneNumberType, ProblemDetail, PromptSummary, Queue, @@ -513,16 +535,20 @@ import { UserQuickConnectConfig, UserSummary, Vocabulary, - VocabularySummary, - VoiceRecordingConfiguration, } from "../models/models_0"; import { AnswerMachineDetectionConfig, + ChatMessage, + ChatStreamingConfiguration, ContactNotFoundException, + DestinationNotAllowedException, HierarchyLevelUpdate, HierarchyStructureUpdate, OutboundContactNotPermittedException, + ParticipantDetails, Reference, + VocabularySummary, + VoiceRecordingConfiguration, } from "../models/models_1"; export const serializeAws_restJson1AssociateApprovedOriginCommand = async ( @@ -747,6 +773,42 @@ export const serializeAws_restJson1AssociateLexBotCommand = async ( }); }; +export const serializeAws_restJson1AssociatePhoneNumberContactFlowCommand = async ( + input: AssociatePhoneNumberContactFlowCommandInput, + 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 || ""}` + + "/phone-number/{PhoneNumberId}/contact-flow"; + if (input.PhoneNumberId !== undefined) { + const labelValue: string = input.PhoneNumberId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PhoneNumberId."); + } + resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: PhoneNumberId."); + } + let body: any; + body = JSON.stringify({ + ...(input.ContactFlowId !== undefined && input.ContactFlowId !== null && { ContactFlowId: input.ContactFlowId }), + ...(input.InstanceId !== undefined && input.InstanceId !== null && { InstanceId: input.InstanceId }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1AssociateQueueQuickConnectsCommand = async ( input: AssociateQueueQuickConnectsCommandInput, context: __SerdeContext @@ -875,6 +937,35 @@ export const serializeAws_restJson1AssociateSecurityKeyCommand = async ( }); }; +export const serializeAws_restJson1ClaimPhoneNumberCommand = async ( + input: ClaimPhoneNumberCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/claim"; + let body: any; + body = JSON.stringify({ + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.PhoneNumber !== undefined && input.PhoneNumber !== null && { PhoneNumber: input.PhoneNumber }), + ...(input.PhoneNumberDescription !== undefined && + input.PhoneNumberDescription !== null && { PhoneNumberDescription: input.PhoneNumberDescription }), + ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }), + ...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1CreateAgentStatusCommand = async ( input: CreateAgentStatusCommandInput, context: __SerdeContext @@ -2175,6 +2266,35 @@ export const serializeAws_restJson1DescribeInstanceStorageConfigCommand = async }); }; +export const serializeAws_restJson1DescribePhoneNumberCommand = async ( + input: DescribePhoneNumberCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}"; + if (input.PhoneNumberId !== undefined) { + const labelValue: string = input.PhoneNumberId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PhoneNumberId."); + } + resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: PhoneNumberId."); + } + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "GET", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1DescribeQueueCommand = async ( input: DescribeQueueCommandInput, context: __SerdeContext @@ -2654,6 +2774,40 @@ export const serializeAws_restJson1DisassociateLexBotCommand = async ( }); }; +export const serializeAws_restJson1DisassociatePhoneNumberContactFlowCommand = async ( + input: DisassociatePhoneNumberContactFlowCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + + "/phone-number/{PhoneNumberId}/contact-flow"; + if (input.PhoneNumberId !== undefined) { + const labelValue: string = input.PhoneNumberId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PhoneNumberId."); + } + resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: PhoneNumberId."); + } + const query: any = { + ...(input.InstanceId !== undefined && { instanceId: input.InstanceId }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1DisassociateQueueQuickConnectsCommand = async ( input: DisassociateQueueQuickConnectsCommandInput, context: __SerdeContext @@ -3477,6 +3631,42 @@ export const serializeAws_restJson1ListPhoneNumbersCommand = async ( }); }; +export const serializeAws_restJson1ListPhoneNumbersV2Command = async ( + input: ListPhoneNumbersV2CommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/list"; + let body: any; + body = JSON.stringify({ + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.PhoneNumberCountryCodes !== undefined && + input.PhoneNumberCountryCodes !== null && { + PhoneNumberCountryCodes: serializeAws_restJson1PhoneNumberCountryCodes(input.PhoneNumberCountryCodes, context), + }), + ...(input.PhoneNumberPrefix !== undefined && + input.PhoneNumberPrefix !== null && { PhoneNumberPrefix: input.PhoneNumberPrefix }), + ...(input.PhoneNumberTypes !== undefined && + input.PhoneNumberTypes !== null && { + PhoneNumberTypes: serializeAws_restJson1PhoneNumberTypes(input.PhoneNumberTypes, context), + }), + ...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1ListPromptsCommand = async ( input: ListPromptsCommandInput, context: __SerdeContext @@ -3958,6 +4148,39 @@ export const serializeAws_restJson1ListUsersCommand = async ( }); }; +export const serializeAws_restJson1ReleasePhoneNumberCommand = async ( + input: ReleasePhoneNumberCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/{PhoneNumberId}"; + if (input.PhoneNumberId !== undefined) { + const labelValue: string = input.PhoneNumberId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PhoneNumberId."); + } + resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: PhoneNumberId."); + } + const query: any = { + ...(input.ClientToken !== undefined && { clientToken: input.ClientToken }), + }; + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "DELETE", + headers, + path: resolvedPath, + query, + body, + }); +}; + export const serializeAws_restJson1ResumeContactRecordingCommand = async ( input: ResumeContactRecordingCommandInput, context: __SerdeContext @@ -3986,6 +4209,39 @@ export const serializeAws_restJson1ResumeContactRecordingCommand = async ( }); }; +export const serializeAws_restJson1SearchAvailablePhoneNumbersCommand = async ( + input: SearchAvailablePhoneNumbersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/search-available"; + let body: any; + body = JSON.stringify({ + ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }), + ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }), + ...(input.PhoneNumberCountryCode !== undefined && + input.PhoneNumberCountryCode !== null && { PhoneNumberCountryCode: input.PhoneNumberCountryCode }), + ...(input.PhoneNumberPrefix !== undefined && + input.PhoneNumberPrefix !== null && { PhoneNumberPrefix: input.PhoneNumberPrefix }), + ...(input.PhoneNumberType !== undefined && + input.PhoneNumberType !== null && { PhoneNumberType: input.PhoneNumberType }), + ...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1SearchVocabulariesCommand = async ( input: SearchVocabulariesCommandInput, context: __SerdeContext @@ -4910,6 +5166,41 @@ export const serializeAws_restJson1UpdateInstanceStorageConfigCommand = async ( }); }; +export const serializeAws_restJson1UpdatePhoneNumberCommand = async ( + input: UpdatePhoneNumberCommandInput, + 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 || ""}` + "/phone-number/{PhoneNumberId}"; + if (input.PhoneNumberId !== undefined) { + const labelValue: string = input.PhoneNumberId; + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: PhoneNumberId."); + } + resolvedPath = resolvedPath.replace("{PhoneNumberId}", __extendedEncodeURIComponent(labelValue)); + } else { + throw new Error("No value provided for input HTTP label: PhoneNumberId."); + } + let body: any; + body = JSON.stringify({ + ClientToken: input.ClientToken ?? generateIdempotencyToken(), + ...(input.TargetArn !== undefined && input.TargetArn !== null && { TargetArn: input.TargetArn }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PUT", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UpdateQueueHoursOfOperationCommand = async ( input: UpdateQueueHoursOfOperationCommandInput, context: __SerdeContext @@ -6106,6 +6397,58 @@ const deserializeAws_restJson1AssociateLexBotCommandError = async ( } }; +export const deserializeAws_restJson1AssociatePhoneNumberContactFlowCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1AssociatePhoneNumberContactFlowCommandError(output, context); + } + const contents: AssociatePhoneNumberContactFlowCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1AssociatePhoneNumberContactFlowCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1AssociateQueueQuickConnectsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -6275,6 +6618,69 @@ const deserializeAws_restJson1AssociateSecurityKeyCommandError = async ( } }; +export const deserializeAws_restJson1ClaimPhoneNumberCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ClaimPhoneNumberCommandError(output, context); + } + const contents: ClaimPhoneNumberCommandOutput = { + $metadata: deserializeMetadata(output), + PhoneNumberArn: undefined, + PhoneNumberId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.PhoneNumberArn !== undefined && data.PhoneNumberArn !== null) { + contents.PhoneNumberArn = __expectString(data.PhoneNumberArn); + } + if (data.PhoneNumberId !== undefined && data.PhoneNumberId !== null) { + contents.PhoneNumberId = __expectString(data.PhoneNumberId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ClaimPhoneNumberCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "IdempotencyException": + case "com.amazonaws.connect#IdempotencyException": + throw await deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1CreateAgentStatusCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -8235,6 +8641,65 @@ const deserializeAws_restJson1DescribeInstanceStorageConfigCommandError = async } }; +export const deserializeAws_restJson1DescribePhoneNumberCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DescribePhoneNumberCommandError(output, context); + } + const contents: DescribePhoneNumberCommandOutput = { + $metadata: deserializeMetadata(output), + ClaimedPhoneNumberSummary: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.ClaimedPhoneNumberSummary !== undefined && data.ClaimedPhoneNumberSummary !== null) { + contents.ClaimedPhoneNumberSummary = deserializeAws_restJson1ClaimedPhoneNumberSummary( + data.ClaimedPhoneNumberSummary, + context + ); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DescribePhoneNumberCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1DescribeQueueCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -8940,6 +9405,58 @@ const deserializeAws_restJson1DisassociateLexBotCommandError = async ( } }; +export const deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommandError(output, context); + } + const contents: DisassociatePhoneNumberContactFlowCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1DisassociatePhoneNumberContactFlowCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1DisassociateQueueQuickConnectsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -10232,6 +10749,69 @@ const deserializeAws_restJson1ListPhoneNumbersCommandError = async ( } }; +export const deserializeAws_restJson1ListPhoneNumbersV2Command = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ListPhoneNumbersV2CommandError(output, context); + } + const contents: ListPhoneNumbersV2CommandOutput = { + $metadata: deserializeMetadata(output), + ListPhoneNumbersSummaryList: undefined, + NextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.ListPhoneNumbersSummaryList !== undefined && data.ListPhoneNumbersSummaryList !== null) { + contents.ListPhoneNumbersSummaryList = deserializeAws_restJson1ListPhoneNumbersSummaryList( + data.ListPhoneNumbersSummaryList, + context + ); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ListPhoneNumbersV2CommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1ListPromptsCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -11023,6 +11603,64 @@ const deserializeAws_restJson1ListUsersCommandError = async ( } }; +export const deserializeAws_restJson1ReleasePhoneNumberCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1ReleasePhoneNumberCommandError(output, context); + } + const contents: ReleasePhoneNumberCommandOutput = { + $metadata: deserializeMetadata(output), + }; + await collectBody(output.body, context); + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1ReleasePhoneNumberCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "IdempotencyException": + case "com.amazonaws.connect#IdempotencyException": + throw await deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceInUseException": + case "com.amazonaws.connect#ResourceInUseException": + throw await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1ResumeContactRecordingCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -11069,6 +11707,63 @@ const deserializeAws_restJson1ResumeContactRecordingCommandError = async ( } }; +export const deserializeAws_restJson1SearchAvailablePhoneNumbersCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError(output, context); + } + const contents: SearchAvailablePhoneNumbersCommandOutput = { + $metadata: deserializeMetadata(output), + AvailableNumbersList: undefined, + NextToken: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.AvailableNumbersList !== undefined && data.AvailableNumbersList !== null) { + contents.AvailableNumbersList = deserializeAws_restJson1AvailableNumbersList(data.AvailableNumbersList, context); + } + if (data.NextToken !== undefined && data.NextToken !== null) { + contents.NextToken = __expectString(data.NextToken); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1SearchAvailablePhoneNumbersCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1SearchVocabulariesCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -12364,6 +13059,72 @@ const deserializeAws_restJson1UpdateInstanceStorageConfigCommandError = async ( } }; +export const deserializeAws_restJson1UpdatePhoneNumberCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UpdatePhoneNumberCommandError(output, context); + } + const contents: UpdatePhoneNumberCommandOutput = { + $metadata: deserializeMetadata(output), + PhoneNumberArn: undefined, + PhoneNumberId: undefined, + }; + const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.PhoneNumberArn !== undefined && data.PhoneNumberArn !== null) { + contents.PhoneNumberArn = __expectString(data.PhoneNumberArn); + } + if (data.PhoneNumberId !== undefined && data.PhoneNumberId !== null) { + contents.PhoneNumberId = __expectString(data.PhoneNumberId); + } + return Promise.resolve(contents); +}; + +const deserializeAws_restJson1UpdatePhoneNumberCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + let response: __BaseException; + let errorCode = "UnknownError"; + errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connect#AccessDeniedException": + throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context); + case "IdempotencyException": + case "com.amazonaws.connect#IdempotencyException": + throw await deserializeAws_restJson1IdempotencyExceptionResponse(parsedOutput, context); + case "InternalServiceException": + case "com.amazonaws.connect#InternalServiceException": + throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.connect#InvalidParameterException": + throw await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context); + case "ResourceInUseException": + case "com.amazonaws.connect#ResourceInUseException": + throw await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connect#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connect#ThrottlingException": + throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + response = new __BaseException({ + name: parsedBody.code || parsedBody.Code || errorCode, + $fault: "client", + $metadata: deserializeMetadata(output), + }); + throw __decorateServiceException(response, parsedBody); + } +}; + export const deserializeAws_restJson1UpdateQueueHoursOfOperationCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -13979,6 +14740,20 @@ const serializeAws_restJson1PermissionsList = (input: string[], context: __Serde }); }; +const serializeAws_restJson1PhoneNumberCountryCodes = ( + input: (PhoneNumberCountryCode | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1PhoneNumberQuickConnectConfig = ( input: PhoneNumberQuickConnectConfig, context: __SerdeContext @@ -13988,6 +14763,17 @@ const serializeAws_restJson1PhoneNumberQuickConnectConfig = ( }; }; +const serializeAws_restJson1PhoneNumberTypes = (input: (PhoneNumberType | string)[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + if (entry === null) { + return null as any; + } + return entry; + }); +}; + const serializeAws_restJson1QueueQuickConnectConfig = ( input: QueueQuickConnectConfig, context: __SerdeContext @@ -14273,6 +15059,55 @@ const deserializeAws_restJson1AttributesList = (output: any, context: __SerdeCon return retVal; }; +const deserializeAws_restJson1AvailableNumbersList = ( + output: any, + context: __SerdeContext +): AvailableNumberSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1AvailableNumberSummary(entry, context); + }); + return retVal; +}; + +const deserializeAws_restJson1AvailableNumberSummary = ( + output: any, + context: __SerdeContext +): AvailableNumberSummary => { + return { + PhoneNumber: __expectString(output.PhoneNumber), + PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), + PhoneNumberType: __expectString(output.PhoneNumberType), + } as any; +}; + +const deserializeAws_restJson1ClaimedPhoneNumberSummary = ( + output: any, + context: __SerdeContext +): ClaimedPhoneNumberSummary => { + return { + PhoneNumber: __expectString(output.PhoneNumber), + PhoneNumberArn: __expectString(output.PhoneNumberArn), + PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), + PhoneNumberDescription: __expectString(output.PhoneNumberDescription), + PhoneNumberId: __expectString(output.PhoneNumberId), + PhoneNumberStatus: + output.PhoneNumberStatus !== undefined && output.PhoneNumberStatus !== null + ? deserializeAws_restJson1PhoneNumberStatus(output.PhoneNumberStatus, context) + : undefined, + PhoneNumberType: __expectString(output.PhoneNumberType), + Tags: + output.Tags !== undefined && output.Tags !== null + ? deserializeAws_restJson1TagMap(output.Tags, context) + : undefined, + TargetArn: __expectString(output.TargetArn), + } as any; +}; + const deserializeAws_restJson1Contact = (output: any, context: __SerdeContext): Contact => { return { AgentInfo: @@ -14966,6 +15801,35 @@ const deserializeAws_restJson1LexV2Bot = (output: any, context: __SerdeContext): } as any; }; +const deserializeAws_restJson1ListPhoneNumbersSummary = ( + output: any, + context: __SerdeContext +): ListPhoneNumbersSummary => { + return { + PhoneNumber: __expectString(output.PhoneNumber), + PhoneNumberArn: __expectString(output.PhoneNumberArn), + PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), + PhoneNumberId: __expectString(output.PhoneNumberId), + PhoneNumberType: __expectString(output.PhoneNumberType), + TargetArn: __expectString(output.TargetArn), + } as any; +}; + +const deserializeAws_restJson1ListPhoneNumbersSummaryList = ( + output: any, + context: __SerdeContext +): ListPhoneNumbersSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + if (entry === null) { + return null as any; + } + return deserializeAws_restJson1ListPhoneNumbersSummary(entry, context); + }); + return retVal; +}; + const deserializeAws_restJson1MediaConcurrencies = (output: any, context: __SerdeContext): MediaConcurrency[] => { const retVal = (output || []) .filter((e: any) => e != null) @@ -15026,6 +15890,13 @@ const deserializeAws_restJson1PhoneNumberQuickConnectConfig = ( } as any; }; +const deserializeAws_restJson1PhoneNumberStatus = (output: any, context: __SerdeContext): PhoneNumberStatus => { + return { + Message: __expectString(output.Message), + Status: __expectString(output.Status), + } as any; +}; + const deserializeAws_restJson1PhoneNumberSummary = (output: any, context: __SerdeContext): PhoneNumberSummary => { return { Arn: __expectString(output.Arn), diff --git a/codegen/sdk-codegen/aws-models/connect.json b/codegen/sdk-codegen/aws-models/connect.json index 81c0fcf5de6f..4671fc356199 100644 --- a/codegen/sdk-codegen/aws-models/connect.json +++ b/codegen/sdk-codegen/aws-models/connect.json @@ -330,6 +330,9 @@ { "target": "com.amazonaws.connect#AssociateLexBot" }, + { + "target": "com.amazonaws.connect#AssociatePhoneNumberContactFlow" + }, { "target": "com.amazonaws.connect#AssociateQueueQuickConnects" }, @@ -339,6 +342,9 @@ { "target": "com.amazonaws.connect#AssociateSecurityKey" }, + { + "target": "com.amazonaws.connect#ClaimPhoneNumber" + }, { "target": "com.amazonaws.connect#CreateAgentStatus" }, @@ -438,6 +444,9 @@ { "target": "com.amazonaws.connect#DescribeInstanceStorageConfig" }, + { + "target": "com.amazonaws.connect#DescribePhoneNumber" + }, { "target": "com.amazonaws.connect#DescribeQueue" }, @@ -477,6 +486,9 @@ { "target": "com.amazonaws.connect#DisassociateLexBot" }, + { + "target": "com.amazonaws.connect#DisassociatePhoneNumberContactFlow" + }, { "target": "com.amazonaws.connect#DisassociateQueueQuickConnects" }, @@ -543,6 +555,9 @@ { "target": "com.amazonaws.connect#ListPhoneNumbers" }, + { + "target": "com.amazonaws.connect#ListPhoneNumbersV2" + }, { "target": "com.amazonaws.connect#ListPrompts" }, @@ -582,9 +597,15 @@ { "target": "com.amazonaws.connect#ListUsers" }, + { + "target": "com.amazonaws.connect#ReleasePhoneNumber" + }, { "target": "com.amazonaws.connect#ResumeContactRecording" }, + { + "target": "com.amazonaws.connect#SearchAvailablePhoneNumbers" + }, { "target": "com.amazonaws.connect#SearchVocabularies" }, @@ -657,6 +678,9 @@ { "target": "com.amazonaws.connect#UpdateInstanceStorageConfig" }, + { + "target": "com.amazonaws.connect#UpdatePhoneNumber" + }, { "target": "com.amazonaws.connect#UpdateQueueHoursOfOperation" }, @@ -741,6 +765,9 @@ "input": { "target": "com.amazonaws.connect#AssociateApprovedOriginRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -798,6 +825,9 @@ "input": { "target": "com.amazonaws.connect#AssociateBotRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -997,6 +1027,9 @@ "input": { "target": "com.amazonaws.connect#AssociateLambdaFunctionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -1054,6 +1087,9 @@ "input": { "target": "com.amazonaws.connect#AssociateLexBotRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -1106,11 +1142,75 @@ } } }, + "com.amazonaws.connect#AssociatePhoneNumberContactFlow": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#AssociatePhoneNumberContactFlowRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Associates a contact flow with a phone number claimed to your Amazon Connect instance.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/phone-number/{PhoneNumberId}/contact-flow", + "code": 200 + } + } + }, + "com.amazonaws.connect#AssociatePhoneNumberContactFlowRequest": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the phone number.

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

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

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

The identifier of the contact flow.

", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.connect#AssociateQueueQuickConnects": { "type": "operation", "input": { "target": "com.amazonaws.connect#AssociateQueueQuickConnectsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -1173,6 +1273,9 @@ "input": { "target": "com.amazonaws.connect#AssociateRoutingProfileQueuesRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -1389,6 +1492,38 @@ "com.amazonaws.connect#AutoAccept": { "type": "boolean" }, + "com.amazonaws.connect#AvailableNumberSummary": { + "type": "structure", + "members": { + "PhoneNumber": { + "target": "com.amazonaws.connect#PhoneNumber", + "traits": { + "smithy.api#documentation": "

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

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

The ISO country code.

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

The type of phone number.

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

Information about available phone numbers.

" + } + }, + "com.amazonaws.connect#AvailableNumbersList": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#AvailableNumberSummary" + } + }, "com.amazonaws.connect#Boolean": { "type": "boolean" }, @@ -1524,6 +1659,160 @@ } } }, + "com.amazonaws.connect#ClaimPhoneNumber": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ClaimPhoneNumberRequest" + }, + "output": { + "target": "com.amazonaws.connect#ClaimPhoneNumberResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#IdempotencyException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Claims an available phone number to your Amazon Connect instance.

", + "smithy.api#http": { + "method": "POST", + "uri": "/phone-number/claim", + "code": 200 + } + } + }, + "com.amazonaws.connect#ClaimPhoneNumberRequest": { + "type": "structure", + "members": { + "TargetArn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

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

The phone number you want to claim. Phone numbers are formatted [+] [country code] [subscriber number including area code].

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

The description of the phone number.

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

The tags used to organize, track, or control access for this resource.

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

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.connect#ClaimPhoneNumberResponse": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

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

The Amazon Resource Name (ARN) of the phone number.

" + } + } + } + }, + "com.amazonaws.connect#ClaimedPhoneNumberSummary": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

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

The Amazon Resource Name (ARN) of the phone number.

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

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

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

The ISO country code.

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

The type of phone number.

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

The description of the phone number.

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

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

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

The tags used to organize, track, or control access for this resource.

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

The status of the phone number.

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

Information about a phone number that has been claimed to your Amazon Connect instance.

" + } + }, "com.amazonaws.connect#ClientToken": { "type": "string", "traits": { @@ -3770,6 +4059,9 @@ "input": { "target": "com.amazonaws.connect#DeleteContactFlowRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#AccessDeniedException" @@ -3887,6 +4179,9 @@ "input": { "target": "com.amazonaws.connect#DeleteHoursOfOperationRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -3939,6 +4234,9 @@ "input": { "target": "com.amazonaws.connect#DeleteInstanceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -3977,6 +4275,9 @@ "input": { "target": "com.amazonaws.connect#DeleteIntegrationAssociationRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -4026,6 +4327,9 @@ "input": { "target": "com.amazonaws.connect#DeleteQuickConnectRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -4078,6 +4382,9 @@ "input": { "target": "com.amazonaws.connect#DeleteSecurityProfileRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#AccessDeniedException" @@ -4136,6 +4443,9 @@ "input": { "target": "com.amazonaws.connect#DeleteUseCaseRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -4193,6 +4503,9 @@ "input": { "target": "com.amazonaws.connect#DeleteUserRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -4224,6 +4537,9 @@ "input": { "target": "com.amazonaws.connect#DeleteUserHierarchyGroupRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -4907,17 +5223,75 @@ } } }, - "com.amazonaws.connect#DescribeQueue": { + "com.amazonaws.connect#DescribePhoneNumber": { "type": "operation", "input": { - "target": "com.amazonaws.connect#DescribeQueueRequest" + "target": "com.amazonaws.connect#DescribePhoneNumberRequest" }, "output": { - "target": "com.amazonaws.connect#DescribeQueueResponse" + "target": "com.amazonaws.connect#DescribePhoneNumberResponse" }, "errors": [ { - "target": "com.amazonaws.connect#InternalServiceException" + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets details and status of a phone number that’s claimed to your Amazon Connect instance

", + "smithy.api#http": { + "method": "GET", + "uri": "/phone-number/{PhoneNumberId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#DescribePhoneNumberRequest": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.connect#DescribePhoneNumberResponse": { + "type": "structure", + "members": { + "ClaimedPhoneNumberSummary": { + "target": "com.amazonaws.connect#ClaimedPhoneNumberSummary", + "traits": { + "smithy.api#documentation": "

Information about a phone number that's been claimed to your Amazon Connect instance.\n

" + } + } + } + }, + "com.amazonaws.connect#DescribeQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DescribeQueueRequest" + }, + "output": { + "target": "com.amazonaws.connect#DescribeQueueResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#InternalServiceException" }, { "target": "com.amazonaws.connect#InvalidParameterException" @@ -5525,6 +5899,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateApprovedOriginRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5577,6 +5954,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateBotRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5627,6 +6007,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateInstanceStorageConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5687,6 +6070,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateLambdaFunctionRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5739,6 +6125,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateLexBotRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5794,11 +6183,69 @@ } } }, + "com.amazonaws.connect#DisassociatePhoneNumberContactFlow": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#DisassociatePhoneNumberContactFlowRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes the contact flow association from a phone number claimed to your Amazon Connect instance, if a contact flow association exists.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/phone-number/{PhoneNumberId}/contact-flow", + "code": 200 + } + } + }, + "com.amazonaws.connect#DisassociatePhoneNumberContactFlowRequest": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

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

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

", + "smithy.api#httpQuery": "instanceId", + "smithy.api#required": {} + } + } + } + }, "com.amazonaws.connect#DisassociateQueueQuickConnects": { "type": "operation", "input": { "target": "com.amazonaws.connect#DisassociateQueueQuickConnectsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5858,6 +6305,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateRoutingProfileQueuesRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -5917,6 +6367,9 @@ "input": { "target": "com.amazonaws.connect#DisassociateSecurityKeyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -7660,6 +8113,15 @@ "smithy.api#documentation": "

Configuration information of a Kinesis video stream.

" } }, + "com.amazonaws.connect#LargeNextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100000 + } + } + }, "com.amazonaws.connect#LexBot": { "type": "structure", "members": { @@ -9085,6 +9547,155 @@ } } }, + "com.amazonaws.connect#ListPhoneNumbersSummary": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

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

The Amazon Resource Name (ARN) of the phone number.

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

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

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

The ISO country code.

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

The type of phone number.

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

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

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

Information about phone numbers that have been claimed to your Amazon Connect instance.

" + } + }, + "com.amazonaws.connect#ListPhoneNumbersSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.connect#ListPhoneNumbersSummary" + } + }, + "com.amazonaws.connect#ListPhoneNumbersV2": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ListPhoneNumbersV2Request" + }, + "output": { + "target": "com.amazonaws.connect#ListPhoneNumbersV2Response" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists phone numbers claimed to your Amazon Connect instance.

\n

For more information about phone numbers, see Set Up Phone Numbers for Your\n Contact Center in the Amazon Connect Administrator Guide.

", + "smithy.api#http": { + "method": "POST", + "uri": "/phone-number/list", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "ListPhoneNumbersSummaryList", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.connect#ListPhoneNumbersV2Request": { + "type": "structure", + "members": { + "TargetArn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to. If TargetArn input is not provided, this API lists numbers claimed to all the Amazon Connect instances belonging to your account.

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

The maximum number of results to return per page.

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

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

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

The ISO country code.

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

The type of phone number.

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

The prefix of the phone number. If provided, it must contain + as part of the country code.

" + } + } + } + }, + "com.amazonaws.connect#ListPhoneNumbersV2Response": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.connect#LargeNextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

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

Information about phone numbers that have been claimed to your Amazon Connect instances.

" + } + } + } + }, "com.amazonaws.connect#ListPrompts": { "type": "operation", "input": { @@ -10451,7 +11062,10 @@ } }, "com.amazonaws.connect#PhoneNumber": { - "type": "string" + "type": "string", + "traits": { + "smithy.api#pattern": "^\\\\+[1-9]\\\\d{1,14}$" + } }, "com.amazonaws.connect#PhoneNumberCountryCode": { "type": "string", @@ -11420,12 +12034,28 @@ } } }, + "com.amazonaws.connect#PhoneNumberDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "^[\\W\\S_]*$" + } + }, "com.amazonaws.connect#PhoneNumberId": { "type": "string" }, - "com.amazonaws.connect#PhoneNumberQuickConnectConfig": { - "type": "structure", - "members": { + "com.amazonaws.connect#PhoneNumberPrefix": { + "type": "string", + "traits": { + "smithy.api#pattern": "^\\\\+?[0-9]{1,11}$" + } + }, + "com.amazonaws.connect#PhoneNumberQuickConnectConfig": { + "type": "structure", + "members": { "PhoneNumber": { "target": "com.amazonaws.connect#PhoneNumber", "traits": { @@ -11438,6 +12068,26 @@ "smithy.api#documentation": "

Contains information about a phone number for a quick connect.

" } }, + "com.amazonaws.connect#PhoneNumberStatus": { + "type": "structure", + "members": { + "Status": { + "target": "com.amazonaws.connect#PhoneNumberWorkflowStatus", + "traits": { + "smithy.api#documentation": "

The status.

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

The status message.

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

The status of the phone number.

" + } + }, "com.amazonaws.connect#PhoneNumberSummary": { "type": "structure", "members": { @@ -11509,6 +12159,35 @@ } } }, + "com.amazonaws.connect#PhoneNumberWorkflowMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^[\\W\\S_]*$" + } + }, + "com.amazonaws.connect#PhoneNumberWorkflowStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CLAIMED", + "name": "Claimed" + }, + { + "value": "IN_PROGRESS", + "name": "InProgress" + }, + { + "value": "FAILED", + "name": "Failed" + } + ] + } + }, "com.amazonaws.connect#PhoneType": { "type": "string", "traits": { @@ -12160,6 +12839,67 @@ } } }, + "com.amazonaws.connect#ReleasePhoneNumber": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#ReleasePhoneNumberRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#IdempotencyException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceInUseException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Releases a phone number previously claimed to an Amazon Connect instance.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/phone-number/{PhoneNumberId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#ReleasePhoneNumberRequest": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

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

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + } + } + }, "com.amazonaws.connect#ResourceConflictException": { "type": "structure", "members": { @@ -12571,6 +13311,105 @@ "smithy.api#documentation": "

Information about the Amazon Simple Storage Service (Amazon S3) storage type.

" } }, + "com.amazonaws.connect#SearchAvailablePhoneNumbers": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#SearchAvailablePhoneNumbersRequest" + }, + "output": { + "target": "com.amazonaws.connect#SearchAvailablePhoneNumbersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Searches for available phone numbers that you can claim to your Amazon Connect instance.

", + "smithy.api#http": { + "method": "POST", + "uri": "/phone-number/search-available", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "AvailableNumbersList", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.connect#SearchAvailablePhoneNumbersRequest": { + "type": "structure", + "members": { + "TargetArn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

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

The ISO country code.

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

The type of phone number.

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

The prefix of the phone number. If provided, it must contain + as part of the country code.

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

The maximum number of results to return per page.

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

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

" + } + } + } + }, + "com.amazonaws.connect#SearchAvailablePhoneNumbersResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.connect#LargeNextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

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

A list of available phone numbers that you can claim for your Amazon Connect instance.

" + } + } + } + }, "com.amazonaws.connect#SearchVocabularies": { "type": "operation", "input": { @@ -13694,6 +14533,9 @@ "input": { "target": "com.amazonaws.connect#TagResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -13712,7 +14554,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified tags to the specified resource.

\n

The supported resource types are users, routing profiles, queues, quick connects, contact\n flows, agent status, and hours of operation.

\n

For sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.

", + "smithy.api#documentation": "

Adds the specified tags to the specified resource.

\n

The supported resource types are users, routing profiles, queues, quick connects, contact\n flows, agent status, hours of operation, and phone number.

\n

For sample policies that use tags, see Amazon Connect Identity-Based\n Policy Examples in the Amazon Connect Administrator Guide.

", "smithy.api#http": { "method": "POST", "uri": "/tags/{resourceArn}", @@ -13847,6 +14689,9 @@ "input": { "target": "com.amazonaws.connect#UntagResourceRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -13899,6 +14744,9 @@ "input": { "target": "com.amazonaws.connect#UpdateAgentStatusRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -14092,6 +14940,9 @@ "input": { "target": "com.amazonaws.connect#UpdateContactFlowContentRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -14154,6 +15005,9 @@ "input": { "target": "com.amazonaws.connect#UpdateContactFlowMetadataRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -14379,6 +15233,9 @@ "input": { "target": "com.amazonaws.connect#UpdateContactFlowNameRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -14556,6 +15413,9 @@ "input": { "target": "com.amazonaws.connect#UpdateHoursOfOperationRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -14644,6 +15504,9 @@ "input": { "target": "com.amazonaws.connect#UpdateInstanceAttributeRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -14703,6 +15566,9 @@ "input": { "target": "com.amazonaws.connect#UpdateInstanceStorageConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -14764,11 +15630,98 @@ } } }, + "com.amazonaws.connect#UpdatePhoneNumber": { + "type": "operation", + "input": { + "target": "com.amazonaws.connect#UpdatePhoneNumberRequest" + }, + "output": { + "target": "com.amazonaws.connect#UpdatePhoneNumberResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connect#AccessDeniedException" + }, + { + "target": "com.amazonaws.connect#IdempotencyException" + }, + { + "target": "com.amazonaws.connect#InternalServiceException" + }, + { + "target": "com.amazonaws.connect#InvalidParameterException" + }, + { + "target": "com.amazonaws.connect#ResourceInUseException" + }, + { + "target": "com.amazonaws.connect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connect#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates your claimed phone number from its current Amazon Connect instance to another Amazon Connect instance in the same Region.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/phone-number/{PhoneNumberId}", + "code": 200 + } + } + }, + "com.amazonaws.connect#UpdatePhoneNumberRequest": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TargetArn": { + "target": "com.amazonaws.connect#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

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

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.connect#UpdatePhoneNumberResponse": { + "type": "structure", + "members": { + "PhoneNumberId": { + "target": "com.amazonaws.connect#PhoneNumberId", + "traits": { + "smithy.api#documentation": "

The identifier of the phone number.

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

The Amazon Resource Name (ARN) of the phone number.

" + } + } + } + }, "com.amazonaws.connect#UpdateQueueHoursOfOperation": { "type": "operation", "input": { "target": "com.amazonaws.connect#UpdateQueueHoursOfOperationRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -14828,6 +15781,9 @@ "input": { "target": "com.amazonaws.connect#UpdateQueueMaxContactsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -14887,6 +15843,9 @@ "input": { "target": "com.amazonaws.connect#UpdateQueueNameRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -14954,6 +15913,9 @@ "input": { "target": "com.amazonaws.connect#UpdateQueueOutboundCallerConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15013,6 +15975,9 @@ "input": { "target": "com.amazonaws.connect#UpdateQueueStatusRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15072,6 +16037,9 @@ "input": { "target": "com.amazonaws.connect#UpdateQuickConnectConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15140,6 +16108,9 @@ "input": { "target": "com.amazonaws.connect#UpdateQuickConnectNameRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15204,6 +16175,9 @@ "input": { "target": "com.amazonaws.connect#UpdateRoutingProfileConcurrencyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15263,6 +16237,9 @@ "input": { "target": "com.amazonaws.connect#UpdateRoutingProfileDefaultOutboundQueueRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15322,6 +16299,9 @@ "input": { "target": "com.amazonaws.connect#UpdateRoutingProfileNameRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -15389,6 +16369,9 @@ "input": { "target": "com.amazonaws.connect#UpdateRoutingProfileQueuesRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15448,6 +16431,9 @@ "input": { "target": "com.amazonaws.connect#UpdateSecurityProfileRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15512,6 +16498,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserHierarchyRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15543,6 +16532,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserHierarchyGroupNameRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#DuplicateResourceException" @@ -15632,6 +16624,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserHierarchyStructureRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15686,6 +16681,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserIdentityInfoRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15745,6 +16743,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserPhoneConfigRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15804,6 +16805,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserRoutingProfileRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException" @@ -15863,6 +16867,9 @@ "input": { "target": "com.amazonaws.connect#UpdateUserSecurityProfilesRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.connect#InternalServiceException"