From 45468500ccbecbbc773dfdc1e0d43a4c2a4f28e4 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 15 Nov 2024 19:12:00 +0000 Subject: [PATCH] feat(client-connectcampaignsv2): Added Amazon Connect Outbound Campaigns V2 SDK. --- clients/client-connectcampaignsv2/.gitignore | 9 + clients/client-connectcampaignsv2/LICENSE | 201 + clients/client-connectcampaignsv2/README.md | 461 ++ .../api-extractor.json | 4 + .../client-connectcampaignsv2/package.json | 101 + .../src/ConnectCampaignsV2.ts | 705 +++ .../src/ConnectCampaignsV2Client.ts | 457 ++ .../auth/httpAuthExtensionConfiguration.ts | 72 + .../src/auth/httpAuthSchemeProvider.ts | 140 + .../src/commands/CreateCampaignCommand.ts | 264 + ...leteCampaignChannelSubtypeConfigCommand.ts | 113 + .../src/commands/DeleteCampaignCommand.ts | 106 + ...eleteCampaignCommunicationLimitsCommand.ts | 116 + .../DeleteCampaignCommunicationTimeCommand.ts | 116 + .../DeleteConnectInstanceConfigCommand.ts | 116 + ...DeleteConnectInstanceIntegrationCommand.ts | 120 + .../DeleteInstanceOnboardingJobCommand.ts | 112 + .../src/commands/DescribeCampaignCommand.ts | 255 + .../commands/GetCampaignStateBatchCommand.ts | 121 + .../src/commands/GetCampaignStateCommand.ts | 111 + .../GetConnectInstanceConfigCommand.ts | 116 + .../GetInstanceOnboardingJobStatusCommand.ts | 117 + .../src/commands/ListCampaignsCommand.ts | 129 + .../ListConnectInstanceIntegrationsCommand.ts | 131 + .../commands/ListTagsForResourceCommand.ts | 113 + .../src/commands/PauseCampaignCommand.ts | 115 + .../PutConnectInstanceIntegrationCommand.ts | 126 + .../PutOutboundRequestBatchCommand.ts | 168 + .../src/commands/ResumeCampaignCommand.ts | 115 + .../src/commands/StartCampaignCommand.ts | 115 + .../StartInstanceOnboardingJobCommand.ts | 123 + .../src/commands/StopCampaignCommand.ts | 115 + .../src/commands/TagResourceCommand.ts | 112 + .../src/commands/UntagResourceCommand.ts | 112 + ...dateCampaignChannelSubtypeConfigCommand.ts | 159 + ...pdateCampaignCommunicationLimitsCommand.ts | 126 + .../UpdateCampaignCommunicationTimeCommand.ts | 186 + .../UpdateCampaignFlowAssociationCommand.ts | 116 + .../src/commands/UpdateCampaignNameCommand.ts | 110 + .../commands/UpdateCampaignScheduleCommand.ts | 117 + .../commands/UpdateCampaignSourceCommand.ts | 115 + .../src/commands/index.ts | 33 + .../src/endpoint/EndpointParameters.ts | 41 + .../src/endpoint/endpointResolver.ts | 26 + .../src/endpoint/ruleset.ts | 32 + .../src/extensionConfiguration.ts | 15 + .../client-connectcampaignsv2/src/index.ts | 17 + .../ConnectCampaignsV2ServiceException.ts | 24 + .../src/models/index.ts | 2 + .../src/models/models_0.ts | 2819 ++++++++++ .../src/pagination/Interfaces.ts | 11 + .../src/pagination/ListCampaignsPaginator.ts | 24 + ...istConnectInstanceIntegrationsPaginator.ts | 24 + .../src/pagination/index.ts | 4 + .../src/protocols/Aws_restJson1.ts | 2089 +++++++ .../src/runtimeConfig.browser.ts | 44 + .../src/runtimeConfig.native.ts | 18 + .../src/runtimeConfig.shared.ts | 38 + .../src/runtimeConfig.ts | 60 + .../src/runtimeExtensions.ts | 48 + .../tsconfig.cjs.json | 6 + .../tsconfig.es.json | 8 + .../client-connectcampaignsv2/tsconfig.json | 13 + .../tsconfig.types.json | 10 + .../aws-models/connectcampaignsv2.json | 4778 +++++++++++++++++ 65 files changed, 16520 insertions(+) create mode 100644 clients/client-connectcampaignsv2/.gitignore create mode 100644 clients/client-connectcampaignsv2/LICENSE create mode 100644 clients/client-connectcampaignsv2/README.md create mode 100644 clients/client-connectcampaignsv2/api-extractor.json create mode 100644 clients/client-connectcampaignsv2/package.json create mode 100644 clients/client-connectcampaignsv2/src/ConnectCampaignsV2.ts create mode 100644 clients/client-connectcampaignsv2/src/ConnectCampaignsV2Client.ts create mode 100644 clients/client-connectcampaignsv2/src/auth/httpAuthExtensionConfiguration.ts create mode 100644 clients/client-connectcampaignsv2/src/auth/httpAuthSchemeProvider.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/CreateCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteCampaignChannelSubtypeConfigCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationLimitsCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationTimeCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceConfigCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceIntegrationCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DeleteInstanceOnboardingJobCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/DescribeCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/GetCampaignStateBatchCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/GetCampaignStateCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/GetConnectInstanceConfigCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/GetInstanceOnboardingJobStatusCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/ListCampaignsCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/ListConnectInstanceIntegrationsCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/ListTagsForResourceCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/PauseCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/PutConnectInstanceIntegrationCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/PutOutboundRequestBatchCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/ResumeCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/StartCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/StartInstanceOnboardingJobCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/StopCampaignCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/TagResourceCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UntagResourceCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignChannelSubtypeConfigCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationLimitsCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationTimeCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignFlowAssociationCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignNameCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignScheduleCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/UpdateCampaignSourceCommand.ts create mode 100644 clients/client-connectcampaignsv2/src/commands/index.ts create mode 100644 clients/client-connectcampaignsv2/src/endpoint/EndpointParameters.ts create mode 100644 clients/client-connectcampaignsv2/src/endpoint/endpointResolver.ts create mode 100644 clients/client-connectcampaignsv2/src/endpoint/ruleset.ts create mode 100644 clients/client-connectcampaignsv2/src/extensionConfiguration.ts create mode 100644 clients/client-connectcampaignsv2/src/index.ts create mode 100644 clients/client-connectcampaignsv2/src/models/ConnectCampaignsV2ServiceException.ts create mode 100644 clients/client-connectcampaignsv2/src/models/index.ts create mode 100644 clients/client-connectcampaignsv2/src/models/models_0.ts create mode 100644 clients/client-connectcampaignsv2/src/pagination/Interfaces.ts create mode 100644 clients/client-connectcampaignsv2/src/pagination/ListCampaignsPaginator.ts create mode 100644 clients/client-connectcampaignsv2/src/pagination/ListConnectInstanceIntegrationsPaginator.ts create mode 100644 clients/client-connectcampaignsv2/src/pagination/index.ts create mode 100644 clients/client-connectcampaignsv2/src/protocols/Aws_restJson1.ts create mode 100644 clients/client-connectcampaignsv2/src/runtimeConfig.browser.ts create mode 100644 clients/client-connectcampaignsv2/src/runtimeConfig.native.ts create mode 100644 clients/client-connectcampaignsv2/src/runtimeConfig.shared.ts create mode 100644 clients/client-connectcampaignsv2/src/runtimeConfig.ts create mode 100644 clients/client-connectcampaignsv2/src/runtimeExtensions.ts create mode 100644 clients/client-connectcampaignsv2/tsconfig.cjs.json create mode 100644 clients/client-connectcampaignsv2/tsconfig.es.json create mode 100644 clients/client-connectcampaignsv2/tsconfig.json create mode 100644 clients/client-connectcampaignsv2/tsconfig.types.json create mode 100644 codegen/sdk-codegen/aws-models/connectcampaignsv2.json diff --git a/clients/client-connectcampaignsv2/.gitignore b/clients/client-connectcampaignsv2/.gitignore new file mode 100644 index 000000000000..54f14c9aef25 --- /dev/null +++ b/clients/client-connectcampaignsv2/.gitignore @@ -0,0 +1,9 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/dist-* +*.tsbuildinfo +*.tgz +*.log +package-lock.json diff --git a/clients/client-connectcampaignsv2/LICENSE b/clients/client-connectcampaignsv2/LICENSE new file mode 100644 index 000000000000..1349aa7c9923 --- /dev/null +++ b/clients/client-connectcampaignsv2/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-connectcampaignsv2/README.md b/clients/client-connectcampaignsv2/README.md new file mode 100644 index 000000000000..3140de273699 --- /dev/null +++ b/clients/client-connectcampaignsv2/README.md @@ -0,0 +1,461 @@ + + +# @aws-sdk/client-connectcampaignsv2 + +## Description + +AWS SDK for JavaScript ConnectCampaignsV2 Client for Node.js, Browser and React Native. + +Provide APIs to create and manage Amazon Connect Campaigns. + +## Installing + +To install this package, simply type add or install @aws-sdk/client-connectcampaignsv2 +using your favorite package manager: + +- `npm install @aws-sdk/client-connectcampaignsv2` +- `yarn add @aws-sdk/client-connectcampaignsv2` +- `pnpm add @aws-sdk/client-connectcampaignsv2` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `ConnectCampaignsV2Client` and +the commands you need, for example `ListCampaignsCommand`: + +```js +// ES5 example +const { ConnectCampaignsV2Client, ListCampaignsCommand } = require("@aws-sdk/client-connectcampaignsv2"); +``` + +```ts +// ES6+ example +import { ConnectCampaignsV2Client, ListCampaignsCommand } from "@aws-sdk/client-connectcampaignsv2"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new ConnectCampaignsV2Client({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListCampaignsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-connectcampaignsv2"; +const client = new AWS.ConnectCampaignsV2({ region: "REGION" }); + +// async/await. +try { + const data = await client.listCampaigns(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listCampaigns(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listCampaigns(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-connectcampaignsv2` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +
+ +CreateCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/CreateCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/CreateCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/CreateCampaignCommandOutput/) + +
+
+ +DeleteCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignCommandOutput/) + +
+
+ +DeleteCampaignChannelSubtypeConfig + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteCampaignChannelSubtypeConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignChannelSubtypeConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignChannelSubtypeConfigCommandOutput/) + +
+
+ +DeleteCampaignCommunicationLimits + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteCampaignCommunicationLimitsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignCommunicationLimitsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignCommunicationLimitsCommandOutput/) + +
+
+ +DeleteCampaignCommunicationTime + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteCampaignCommunicationTimeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignCommunicationTimeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteCampaignCommunicationTimeCommandOutput/) + +
+
+ +DeleteConnectInstanceConfig + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteConnectInstanceConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteConnectInstanceConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteConnectInstanceConfigCommandOutput/) + +
+
+ +DeleteConnectInstanceIntegration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteConnectInstanceIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteConnectInstanceIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteConnectInstanceIntegrationCommandOutput/) + +
+
+ +DeleteInstanceOnboardingJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DeleteInstanceOnboardingJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteInstanceOnboardingJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DeleteInstanceOnboardingJobCommandOutput/) + +
+
+ +DescribeCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/DescribeCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DescribeCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/DescribeCampaignCommandOutput/) + +
+
+ +GetCampaignState + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/GetCampaignStateCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetCampaignStateCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetCampaignStateCommandOutput/) + +
+
+ +GetCampaignStateBatch + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/GetCampaignStateBatchCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetCampaignStateBatchCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetCampaignStateBatchCommandOutput/) + +
+
+ +GetConnectInstanceConfig + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/GetConnectInstanceConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetConnectInstanceConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetConnectInstanceConfigCommandOutput/) + +
+
+ +GetInstanceOnboardingJobStatus + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/GetInstanceOnboardingJobStatusCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetInstanceOnboardingJobStatusCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/GetInstanceOnboardingJobStatusCommandOutput/) + +
+
+ +ListCampaigns + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/ListCampaignsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ListCampaignsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ListCampaignsCommandOutput/) + +
+
+ +ListConnectInstanceIntegrations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/ListConnectInstanceIntegrationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ListConnectInstanceIntegrationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ListConnectInstanceIntegrationsCommandOutput/) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ListTagsForResourceCommandOutput/) + +
+
+ +PauseCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/PauseCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PauseCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PauseCampaignCommandOutput/) + +
+
+ +PutConnectInstanceIntegration + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/PutConnectInstanceIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutConnectInstanceIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutConnectInstanceIntegrationCommandOutput/) + +
+
+ +PutOutboundRequestBatch + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/PutOutboundRequestBatchCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutOutboundRequestBatchCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/PutOutboundRequestBatchCommandOutput/) + +
+
+ +ResumeCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/ResumeCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ResumeCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/ResumeCampaignCommandOutput/) + +
+
+ +StartCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/StartCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/StartCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/StartCampaignCommandOutput/) + +
+
+ +StartInstanceOnboardingJob + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/StartInstanceOnboardingJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/StartInstanceOnboardingJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/StartInstanceOnboardingJobCommandOutput/) + +
+
+ +StopCampaign + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/StopCampaignCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/StopCampaignCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/StopCampaignCommandOutput/) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/TagResourceCommandOutput/) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UntagResourceCommandOutput/) + +
+
+ +UpdateCampaignChannelSubtypeConfig + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignChannelSubtypeConfigCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignChannelSubtypeConfigCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignChannelSubtypeConfigCommandOutput/) + +
+
+ +UpdateCampaignCommunicationLimits + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignCommunicationLimitsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignCommunicationLimitsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignCommunicationLimitsCommandOutput/) + +
+
+ +UpdateCampaignCommunicationTime + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignCommunicationTimeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignCommunicationTimeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignCommunicationTimeCommandOutput/) + +
+
+ +UpdateCampaignFlowAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignFlowAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignFlowAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignFlowAssociationCommandOutput/) + +
+
+ +UpdateCampaignName + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignNameCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignNameCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignNameCommandOutput/) + +
+
+ +UpdateCampaignSchedule + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignScheduleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignScheduleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignScheduleCommandOutput/) + +
+
+ +UpdateCampaignSource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connectcampaignsv2/command/UpdateCampaignSourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignSourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connectcampaignsv2/Interface/UpdateCampaignSourceCommandOutput/) + +
diff --git a/clients/client-connectcampaignsv2/api-extractor.json b/clients/client-connectcampaignsv2/api-extractor.json new file mode 100644 index 000000000000..d5bf5ffeee85 --- /dev/null +++ b/clients/client-connectcampaignsv2/api-extractor.json @@ -0,0 +1,4 @@ +{ + "extends": "../../api-extractor.json", + "mainEntryPointFilePath": "/dist-types/index.d.ts" +} diff --git a/clients/client-connectcampaignsv2/package.json b/clients/client-connectcampaignsv2/package.json new file mode 100644 index 000000000000..131d44d2ba35 --- /dev/null +++ b/clients/client-connectcampaignsv2/package.json @@ -0,0 +1,101 @@ +{ + "name": "@aws-sdk/client-connectcampaignsv2", + "description": "AWS SDK for JavaScript Connectcampaignsv2 Client for Node.js, Browser and React Native", + "version": "3.0.0", + "scripts": { + "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:es": "tsc -p tsconfig.es.json", + "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build", + "build:types": "tsc -p tsconfig.types.json", + "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", + "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0", + "extract:docs": "api-extractor run --local", + "generate:client": "node ../../scripts/generate-clients/single-service --solo connectcampaignsv2" + }, + "main": "./dist-cjs/index.js", + "types": "./dist-types/index.d.ts", + "module": "./dist-es/index.js", + "sideEffects": false, + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "*", + "@aws-sdk/client-sts": "*", + "@aws-sdk/core": "*", + "@aws-sdk/credential-provider-node": "*", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-user-agent": "*", + "@aws-sdk/region-config-resolver": "*", + "@aws-sdk/types": "*", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^3.0.11", + "@smithy/core": "^2.5.2", + "@smithy/fetch-http-handler": "^4.1.0", + "@smithy/hash-node": "^3.0.9", + "@smithy/invalid-dependency": "^3.0.9", + "@smithy/middleware-content-length": "^3.0.11", + "@smithy/middleware-endpoint": "^3.2.2", + "@smithy/middleware-retry": "^3.0.26", + "@smithy/middleware-serde": "^3.0.9", + "@smithy/middleware-stack": "^3.0.9", + "@smithy/node-config-provider": "^3.1.10", + "@smithy/node-http-handler": "^3.3.0", + "@smithy/protocol-http": "^4.1.6", + "@smithy/smithy-client": "^3.4.3", + "@smithy/types": "^3.7.0", + "@smithy/url-parser": "^3.0.9", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.26", + "@smithy/util-defaults-mode-node": "^3.0.26", + "@smithy/util-endpoints": "^2.1.5", + "@smithy/util-middleware": "^3.0.9", + "@smithy/util-retry": "^3.0.9", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "devDependencies": { + "@tsconfig/node16": "16.1.3", + "@types/node": "^16.18.96", + "concurrently": "7.0.0", + "downlevel-dts": "0.10.1", + "rimraf": "3.0.2", + "typescript": "~4.9.5" + }, + "engines": { + "node": ">=16.0.0" + }, + "typesVersions": { + "<4.0": { + "dist-types/*": [ + "dist-types/ts3.4/*" + ] + } + }, + "files": [ + "dist-*/**" + ], + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0", + "browser": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" + }, + "react-native": { + "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" + }, + "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-connectcampaignsv2", + "repository": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-js-v3.git", + "directory": "clients/client-connectcampaignsv2" + } +} diff --git a/clients/client-connectcampaignsv2/src/ConnectCampaignsV2.ts b/clients/client-connectcampaignsv2/src/ConnectCampaignsV2.ts new file mode 100644 index 000000000000..3056cba4640c --- /dev/null +++ b/clients/client-connectcampaignsv2/src/ConnectCampaignsV2.ts @@ -0,0 +1,705 @@ +// smithy-typescript generated code +import { createAggregatedClient } from "@smithy/smithy-client"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; + +import { + CreateCampaignCommand, + CreateCampaignCommandInput, + CreateCampaignCommandOutput, +} from "./commands/CreateCampaignCommand"; +import { + DeleteCampaignChannelSubtypeConfigCommand, + DeleteCampaignChannelSubtypeConfigCommandInput, + DeleteCampaignChannelSubtypeConfigCommandOutput, +} from "./commands/DeleteCampaignChannelSubtypeConfigCommand"; +import { + DeleteCampaignCommand, + DeleteCampaignCommandInput, + DeleteCampaignCommandOutput, +} from "./commands/DeleteCampaignCommand"; +import { + DeleteCampaignCommunicationLimitsCommand, + DeleteCampaignCommunicationLimitsCommandInput, + DeleteCampaignCommunicationLimitsCommandOutput, +} from "./commands/DeleteCampaignCommunicationLimitsCommand"; +import { + DeleteCampaignCommunicationTimeCommand, + DeleteCampaignCommunicationTimeCommandInput, + DeleteCampaignCommunicationTimeCommandOutput, +} from "./commands/DeleteCampaignCommunicationTimeCommand"; +import { + DeleteConnectInstanceConfigCommand, + DeleteConnectInstanceConfigCommandInput, + DeleteConnectInstanceConfigCommandOutput, +} from "./commands/DeleteConnectInstanceConfigCommand"; +import { + DeleteConnectInstanceIntegrationCommand, + DeleteConnectInstanceIntegrationCommandInput, + DeleteConnectInstanceIntegrationCommandOutput, +} from "./commands/DeleteConnectInstanceIntegrationCommand"; +import { + DeleteInstanceOnboardingJobCommand, + DeleteInstanceOnboardingJobCommandInput, + DeleteInstanceOnboardingJobCommandOutput, +} from "./commands/DeleteInstanceOnboardingJobCommand"; +import { + DescribeCampaignCommand, + DescribeCampaignCommandInput, + DescribeCampaignCommandOutput, +} from "./commands/DescribeCampaignCommand"; +import { + GetCampaignStateBatchCommand, + GetCampaignStateBatchCommandInput, + GetCampaignStateBatchCommandOutput, +} from "./commands/GetCampaignStateBatchCommand"; +import { + GetCampaignStateCommand, + GetCampaignStateCommandInput, + GetCampaignStateCommandOutput, +} from "./commands/GetCampaignStateCommand"; +import { + GetConnectInstanceConfigCommand, + GetConnectInstanceConfigCommandInput, + GetConnectInstanceConfigCommandOutput, +} from "./commands/GetConnectInstanceConfigCommand"; +import { + GetInstanceOnboardingJobStatusCommand, + GetInstanceOnboardingJobStatusCommandInput, + GetInstanceOnboardingJobStatusCommandOutput, +} from "./commands/GetInstanceOnboardingJobStatusCommand"; +import { + ListCampaignsCommand, + ListCampaignsCommandInput, + ListCampaignsCommandOutput, +} from "./commands/ListCampaignsCommand"; +import { + ListConnectInstanceIntegrationsCommand, + ListConnectInstanceIntegrationsCommandInput, + ListConnectInstanceIntegrationsCommandOutput, +} from "./commands/ListConnectInstanceIntegrationsCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { + PauseCampaignCommand, + PauseCampaignCommandInput, + PauseCampaignCommandOutput, +} from "./commands/PauseCampaignCommand"; +import { + PutConnectInstanceIntegrationCommand, + PutConnectInstanceIntegrationCommandInput, + PutConnectInstanceIntegrationCommandOutput, +} from "./commands/PutConnectInstanceIntegrationCommand"; +import { + PutOutboundRequestBatchCommand, + PutOutboundRequestBatchCommandInput, + PutOutboundRequestBatchCommandOutput, +} from "./commands/PutOutboundRequestBatchCommand"; +import { + ResumeCampaignCommand, + ResumeCampaignCommandInput, + ResumeCampaignCommandOutput, +} from "./commands/ResumeCampaignCommand"; +import { + StartCampaignCommand, + StartCampaignCommandInput, + StartCampaignCommandOutput, +} from "./commands/StartCampaignCommand"; +import { + StartInstanceOnboardingJobCommand, + StartInstanceOnboardingJobCommandInput, + StartInstanceOnboardingJobCommandOutput, +} from "./commands/StartInstanceOnboardingJobCommand"; +import { + StopCampaignCommand, + StopCampaignCommandInput, + StopCampaignCommandOutput, +} from "./commands/StopCampaignCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; +import { + UpdateCampaignChannelSubtypeConfigCommand, + UpdateCampaignChannelSubtypeConfigCommandInput, + UpdateCampaignChannelSubtypeConfigCommandOutput, +} from "./commands/UpdateCampaignChannelSubtypeConfigCommand"; +import { + UpdateCampaignCommunicationLimitsCommand, + UpdateCampaignCommunicationLimitsCommandInput, + UpdateCampaignCommunicationLimitsCommandOutput, +} from "./commands/UpdateCampaignCommunicationLimitsCommand"; +import { + UpdateCampaignCommunicationTimeCommand, + UpdateCampaignCommunicationTimeCommandInput, + UpdateCampaignCommunicationTimeCommandOutput, +} from "./commands/UpdateCampaignCommunicationTimeCommand"; +import { + UpdateCampaignFlowAssociationCommand, + UpdateCampaignFlowAssociationCommandInput, + UpdateCampaignFlowAssociationCommandOutput, +} from "./commands/UpdateCampaignFlowAssociationCommand"; +import { + UpdateCampaignNameCommand, + UpdateCampaignNameCommandInput, + UpdateCampaignNameCommandOutput, +} from "./commands/UpdateCampaignNameCommand"; +import { + UpdateCampaignScheduleCommand, + UpdateCampaignScheduleCommandInput, + UpdateCampaignScheduleCommandOutput, +} from "./commands/UpdateCampaignScheduleCommand"; +import { + UpdateCampaignSourceCommand, + UpdateCampaignSourceCommandInput, + UpdateCampaignSourceCommandOutput, +} from "./commands/UpdateCampaignSourceCommand"; +import { ConnectCampaignsV2Client, ConnectCampaignsV2ClientConfig } from "./ConnectCampaignsV2Client"; + +const commands = { + CreateCampaignCommand, + DeleteCampaignCommand, + DeleteCampaignChannelSubtypeConfigCommand, + DeleteCampaignCommunicationLimitsCommand, + DeleteCampaignCommunicationTimeCommand, + DeleteConnectInstanceConfigCommand, + DeleteConnectInstanceIntegrationCommand, + DeleteInstanceOnboardingJobCommand, + DescribeCampaignCommand, + GetCampaignStateCommand, + GetCampaignStateBatchCommand, + GetConnectInstanceConfigCommand, + GetInstanceOnboardingJobStatusCommand, + ListCampaignsCommand, + ListConnectInstanceIntegrationsCommand, + ListTagsForResourceCommand, + PauseCampaignCommand, + PutConnectInstanceIntegrationCommand, + PutOutboundRequestBatchCommand, + ResumeCampaignCommand, + StartCampaignCommand, + StartInstanceOnboardingJobCommand, + StopCampaignCommand, + TagResourceCommand, + UntagResourceCommand, + UpdateCampaignChannelSubtypeConfigCommand, + UpdateCampaignCommunicationLimitsCommand, + UpdateCampaignCommunicationTimeCommand, + UpdateCampaignFlowAssociationCommand, + UpdateCampaignNameCommand, + UpdateCampaignScheduleCommand, + UpdateCampaignSourceCommand, +}; + +export interface ConnectCampaignsV2 { + /** + * @see {@link CreateCampaignCommand} + */ + createCampaign( + args: CreateCampaignCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createCampaign(args: CreateCampaignCommandInput, cb: (err: any, data?: CreateCampaignCommandOutput) => void): void; + createCampaign( + args: CreateCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateCampaignCommandOutput) => void + ): void; + + /** + * @see {@link DeleteCampaignCommand} + */ + deleteCampaign( + args: DeleteCampaignCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteCampaign(args: DeleteCampaignCommandInput, cb: (err: any, data?: DeleteCampaignCommandOutput) => void): void; + deleteCampaign( + args: DeleteCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteCampaignCommandOutput) => void + ): void; + + /** + * @see {@link DeleteCampaignChannelSubtypeConfigCommand} + */ + deleteCampaignChannelSubtypeConfig( + args: DeleteCampaignChannelSubtypeConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteCampaignChannelSubtypeConfig( + args: DeleteCampaignChannelSubtypeConfigCommandInput, + cb: (err: any, data?: DeleteCampaignChannelSubtypeConfigCommandOutput) => void + ): void; + deleteCampaignChannelSubtypeConfig( + args: DeleteCampaignChannelSubtypeConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteCampaignChannelSubtypeConfigCommandOutput) => void + ): void; + + /** + * @see {@link DeleteCampaignCommunicationLimitsCommand} + */ + deleteCampaignCommunicationLimits( + args: DeleteCampaignCommunicationLimitsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteCampaignCommunicationLimits( + args: DeleteCampaignCommunicationLimitsCommandInput, + cb: (err: any, data?: DeleteCampaignCommunicationLimitsCommandOutput) => void + ): void; + deleteCampaignCommunicationLimits( + args: DeleteCampaignCommunicationLimitsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteCampaignCommunicationLimitsCommandOutput) => void + ): void; + + /** + * @see {@link DeleteCampaignCommunicationTimeCommand} + */ + deleteCampaignCommunicationTime( + args: DeleteCampaignCommunicationTimeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteCampaignCommunicationTime( + args: DeleteCampaignCommunicationTimeCommandInput, + cb: (err: any, data?: DeleteCampaignCommunicationTimeCommandOutput) => void + ): void; + deleteCampaignCommunicationTime( + args: DeleteCampaignCommunicationTimeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteCampaignCommunicationTimeCommandOutput) => void + ): void; + + /** + * @see {@link DeleteConnectInstanceConfigCommand} + */ + deleteConnectInstanceConfig( + args: DeleteConnectInstanceConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteConnectInstanceConfig( + args: DeleteConnectInstanceConfigCommandInput, + cb: (err: any, data?: DeleteConnectInstanceConfigCommandOutput) => void + ): void; + deleteConnectInstanceConfig( + args: DeleteConnectInstanceConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteConnectInstanceConfigCommandOutput) => void + ): void; + + /** + * @see {@link DeleteConnectInstanceIntegrationCommand} + */ + deleteConnectInstanceIntegration( + args: DeleteConnectInstanceIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteConnectInstanceIntegration( + args: DeleteConnectInstanceIntegrationCommandInput, + cb: (err: any, data?: DeleteConnectInstanceIntegrationCommandOutput) => void + ): void; + deleteConnectInstanceIntegration( + args: DeleteConnectInstanceIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteConnectInstanceIntegrationCommandOutput) => void + ): void; + + /** + * @see {@link DeleteInstanceOnboardingJobCommand} + */ + deleteInstanceOnboardingJob( + args: DeleteInstanceOnboardingJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteInstanceOnboardingJob( + args: DeleteInstanceOnboardingJobCommandInput, + cb: (err: any, data?: DeleteInstanceOnboardingJobCommandOutput) => void + ): void; + deleteInstanceOnboardingJob( + args: DeleteInstanceOnboardingJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteInstanceOnboardingJobCommandOutput) => void + ): void; + + /** + * @see {@link DescribeCampaignCommand} + */ + describeCampaign( + args: DescribeCampaignCommandInput, + options?: __HttpHandlerOptions + ): Promise; + describeCampaign( + args: DescribeCampaignCommandInput, + cb: (err: any, data?: DescribeCampaignCommandOutput) => void + ): void; + describeCampaign( + args: DescribeCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DescribeCampaignCommandOutput) => void + ): void; + + /** + * @see {@link GetCampaignStateCommand} + */ + getCampaignState( + args: GetCampaignStateCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getCampaignState( + args: GetCampaignStateCommandInput, + cb: (err: any, data?: GetCampaignStateCommandOutput) => void + ): void; + getCampaignState( + args: GetCampaignStateCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetCampaignStateCommandOutput) => void + ): void; + + /** + * @see {@link GetCampaignStateBatchCommand} + */ + getCampaignStateBatch( + args: GetCampaignStateBatchCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getCampaignStateBatch( + args: GetCampaignStateBatchCommandInput, + cb: (err: any, data?: GetCampaignStateBatchCommandOutput) => void + ): void; + getCampaignStateBatch( + args: GetCampaignStateBatchCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetCampaignStateBatchCommandOutput) => void + ): void; + + /** + * @see {@link GetConnectInstanceConfigCommand} + */ + getConnectInstanceConfig( + args: GetConnectInstanceConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getConnectInstanceConfig( + args: GetConnectInstanceConfigCommandInput, + cb: (err: any, data?: GetConnectInstanceConfigCommandOutput) => void + ): void; + getConnectInstanceConfig( + args: GetConnectInstanceConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetConnectInstanceConfigCommandOutput) => void + ): void; + + /** + * @see {@link GetInstanceOnboardingJobStatusCommand} + */ + getInstanceOnboardingJobStatus( + args: GetInstanceOnboardingJobStatusCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getInstanceOnboardingJobStatus( + args: GetInstanceOnboardingJobStatusCommandInput, + cb: (err: any, data?: GetInstanceOnboardingJobStatusCommandOutput) => void + ): void; + getInstanceOnboardingJobStatus( + args: GetInstanceOnboardingJobStatusCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetInstanceOnboardingJobStatusCommandOutput) => void + ): void; + + /** + * @see {@link ListCampaignsCommand} + */ + listCampaigns(): Promise; + listCampaigns(args: ListCampaignsCommandInput, options?: __HttpHandlerOptions): Promise; + listCampaigns(args: ListCampaignsCommandInput, cb: (err: any, data?: ListCampaignsCommandOutput) => void): void; + listCampaigns( + args: ListCampaignsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListCampaignsCommandOutput) => void + ): void; + + /** + * @see {@link ListConnectInstanceIntegrationsCommand} + */ + listConnectInstanceIntegrations( + args: ListConnectInstanceIntegrationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listConnectInstanceIntegrations( + args: ListConnectInstanceIntegrationsCommandInput, + cb: (err: any, data?: ListConnectInstanceIntegrationsCommandOutput) => void + ): void; + listConnectInstanceIntegrations( + args: ListConnectInstanceIntegrationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListConnectInstanceIntegrationsCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link PauseCampaignCommand} + */ + pauseCampaign(args: PauseCampaignCommandInput, options?: __HttpHandlerOptions): Promise; + pauseCampaign(args: PauseCampaignCommandInput, cb: (err: any, data?: PauseCampaignCommandOutput) => void): void; + pauseCampaign( + args: PauseCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PauseCampaignCommandOutput) => void + ): void; + + /** + * @see {@link PutConnectInstanceIntegrationCommand} + */ + putConnectInstanceIntegration( + args: PutConnectInstanceIntegrationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putConnectInstanceIntegration( + args: PutConnectInstanceIntegrationCommandInput, + cb: (err: any, data?: PutConnectInstanceIntegrationCommandOutput) => void + ): void; + putConnectInstanceIntegration( + args: PutConnectInstanceIntegrationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutConnectInstanceIntegrationCommandOutput) => void + ): void; + + /** + * @see {@link PutOutboundRequestBatchCommand} + */ + putOutboundRequestBatch( + args: PutOutboundRequestBatchCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putOutboundRequestBatch( + args: PutOutboundRequestBatchCommandInput, + cb: (err: any, data?: PutOutboundRequestBatchCommandOutput) => void + ): void; + putOutboundRequestBatch( + args: PutOutboundRequestBatchCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutOutboundRequestBatchCommandOutput) => void + ): void; + + /** + * @see {@link ResumeCampaignCommand} + */ + resumeCampaign( + args: ResumeCampaignCommandInput, + options?: __HttpHandlerOptions + ): Promise; + resumeCampaign(args: ResumeCampaignCommandInput, cb: (err: any, data?: ResumeCampaignCommandOutput) => void): void; + resumeCampaign( + args: ResumeCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ResumeCampaignCommandOutput) => void + ): void; + + /** + * @see {@link StartCampaignCommand} + */ + startCampaign(args: StartCampaignCommandInput, options?: __HttpHandlerOptions): Promise; + startCampaign(args: StartCampaignCommandInput, cb: (err: any, data?: StartCampaignCommandOutput) => void): void; + startCampaign( + args: StartCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartCampaignCommandOutput) => void + ): void; + + /** + * @see {@link StartInstanceOnboardingJobCommand} + */ + startInstanceOnboardingJob( + args: StartInstanceOnboardingJobCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startInstanceOnboardingJob( + args: StartInstanceOnboardingJobCommandInput, + cb: (err: any, data?: StartInstanceOnboardingJobCommandOutput) => void + ): void; + startInstanceOnboardingJob( + args: StartInstanceOnboardingJobCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartInstanceOnboardingJobCommandOutput) => void + ): void; + + /** + * @see {@link StopCampaignCommand} + */ + stopCampaign(args: StopCampaignCommandInput, options?: __HttpHandlerOptions): Promise; + stopCampaign(args: StopCampaignCommandInput, cb: (err: any, data?: StopCampaignCommandOutput) => void): void; + stopCampaign( + args: StopCampaignCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StopCampaignCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignChannelSubtypeConfigCommand} + */ + updateCampaignChannelSubtypeConfig( + args: UpdateCampaignChannelSubtypeConfigCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignChannelSubtypeConfig( + args: UpdateCampaignChannelSubtypeConfigCommandInput, + cb: (err: any, data?: UpdateCampaignChannelSubtypeConfigCommandOutput) => void + ): void; + updateCampaignChannelSubtypeConfig( + args: UpdateCampaignChannelSubtypeConfigCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignChannelSubtypeConfigCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignCommunicationLimitsCommand} + */ + updateCampaignCommunicationLimits( + args: UpdateCampaignCommunicationLimitsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignCommunicationLimits( + args: UpdateCampaignCommunicationLimitsCommandInput, + cb: (err: any, data?: UpdateCampaignCommunicationLimitsCommandOutput) => void + ): void; + updateCampaignCommunicationLimits( + args: UpdateCampaignCommunicationLimitsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignCommunicationLimitsCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignCommunicationTimeCommand} + */ + updateCampaignCommunicationTime( + args: UpdateCampaignCommunicationTimeCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignCommunicationTime( + args: UpdateCampaignCommunicationTimeCommandInput, + cb: (err: any, data?: UpdateCampaignCommunicationTimeCommandOutput) => void + ): void; + updateCampaignCommunicationTime( + args: UpdateCampaignCommunicationTimeCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignCommunicationTimeCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignFlowAssociationCommand} + */ + updateCampaignFlowAssociation( + args: UpdateCampaignFlowAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignFlowAssociation( + args: UpdateCampaignFlowAssociationCommandInput, + cb: (err: any, data?: UpdateCampaignFlowAssociationCommandOutput) => void + ): void; + updateCampaignFlowAssociation( + args: UpdateCampaignFlowAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignFlowAssociationCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignNameCommand} + */ + updateCampaignName( + args: UpdateCampaignNameCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignName( + args: UpdateCampaignNameCommandInput, + cb: (err: any, data?: UpdateCampaignNameCommandOutput) => void + ): void; + updateCampaignName( + args: UpdateCampaignNameCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignNameCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignScheduleCommand} + */ + updateCampaignSchedule( + args: UpdateCampaignScheduleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignSchedule( + args: UpdateCampaignScheduleCommandInput, + cb: (err: any, data?: UpdateCampaignScheduleCommandOutput) => void + ): void; + updateCampaignSchedule( + args: UpdateCampaignScheduleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignScheduleCommandOutput) => void + ): void; + + /** + * @see {@link UpdateCampaignSourceCommand} + */ + updateCampaignSource( + args: UpdateCampaignSourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + updateCampaignSource( + args: UpdateCampaignSourceCommandInput, + cb: (err: any, data?: UpdateCampaignSourceCommandOutput) => void + ): void; + updateCampaignSource( + args: UpdateCampaignSourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateCampaignSourceCommandOutput) => void + ): void; +} + +/** + * Provide APIs to create and manage Amazon Connect Campaigns. + * @public + */ +export class ConnectCampaignsV2 extends ConnectCampaignsV2Client implements ConnectCampaignsV2 {} +createAggregatedClient(commands, ConnectCampaignsV2); diff --git a/clients/client-connectcampaignsv2/src/ConnectCampaignsV2Client.ts b/clients/client-connectcampaignsv2/src/ConnectCampaignsV2Client.ts new file mode 100644 index 000000000000..6f19a1d8179f --- /dev/null +++ b/clients/client-connectcampaignsv2/src/ConnectCampaignsV2Client.ts @@ -0,0 +1,457 @@ +// smithy-typescript generated code +import { + getHostHeaderPlugin, + HostHeaderInputConfig, + HostHeaderResolvedConfig, + resolveHostHeaderConfig, +} from "@aws-sdk/middleware-host-header"; +import { getLoggerPlugin } from "@aws-sdk/middleware-logger"; +import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection"; +import { + getUserAgentPlugin, + resolveUserAgentConfig, + UserAgentInputConfig, + UserAgentResolvedConfig, +} from "@aws-sdk/middleware-user-agent"; +import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { + DefaultIdentityProviderConfig, + getHttpAuthSchemeEndpointRuleSetPlugin, + getHttpSigningPlugin, +} from "@smithy/core"; +import { getContentLengthPlugin } from "@smithy/middleware-content-length"; +import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; +import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http"; +import { + Client as __Client, + DefaultsMode as __DefaultsMode, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration, +} from "@smithy/smithy-client"; +import { + AwsCredentialIdentityProvider, + BodyLengthCalculator as __BodyLengthCalculator, + CheckOptionalClientConfig as __CheckOptionalClientConfig, + ChecksumConstructor as __ChecksumConstructor, + Decoder as __Decoder, + Encoder as __Encoder, + EndpointV2 as __EndpointV2, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Logger as __Logger, + Provider as __Provider, + Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser, + UserAgent as __UserAgent, +} from "@smithy/types"; + +import { + defaultConnectCampaignsV2HttpAuthSchemeParametersProvider, + HttpAuthSchemeInputConfig, + HttpAuthSchemeResolvedConfig, + resolveHttpAuthSchemeConfig, +} from "./auth/httpAuthSchemeProvider"; +import { CreateCampaignCommandInput, CreateCampaignCommandOutput } from "./commands/CreateCampaignCommand"; +import { + DeleteCampaignChannelSubtypeConfigCommandInput, + DeleteCampaignChannelSubtypeConfigCommandOutput, +} from "./commands/DeleteCampaignChannelSubtypeConfigCommand"; +import { DeleteCampaignCommandInput, DeleteCampaignCommandOutput } from "./commands/DeleteCampaignCommand"; +import { + DeleteCampaignCommunicationLimitsCommandInput, + DeleteCampaignCommunicationLimitsCommandOutput, +} from "./commands/DeleteCampaignCommunicationLimitsCommand"; +import { + DeleteCampaignCommunicationTimeCommandInput, + DeleteCampaignCommunicationTimeCommandOutput, +} from "./commands/DeleteCampaignCommunicationTimeCommand"; +import { + DeleteConnectInstanceConfigCommandInput, + DeleteConnectInstanceConfigCommandOutput, +} from "./commands/DeleteConnectInstanceConfigCommand"; +import { + DeleteConnectInstanceIntegrationCommandInput, + DeleteConnectInstanceIntegrationCommandOutput, +} from "./commands/DeleteConnectInstanceIntegrationCommand"; +import { + DeleteInstanceOnboardingJobCommandInput, + DeleteInstanceOnboardingJobCommandOutput, +} from "./commands/DeleteInstanceOnboardingJobCommand"; +import { DescribeCampaignCommandInput, DescribeCampaignCommandOutput } from "./commands/DescribeCampaignCommand"; +import { + GetCampaignStateBatchCommandInput, + GetCampaignStateBatchCommandOutput, +} from "./commands/GetCampaignStateBatchCommand"; +import { GetCampaignStateCommandInput, GetCampaignStateCommandOutput } from "./commands/GetCampaignStateCommand"; +import { + GetConnectInstanceConfigCommandInput, + GetConnectInstanceConfigCommandOutput, +} from "./commands/GetConnectInstanceConfigCommand"; +import { + GetInstanceOnboardingJobStatusCommandInput, + GetInstanceOnboardingJobStatusCommandOutput, +} from "./commands/GetInstanceOnboardingJobStatusCommand"; +import { ListCampaignsCommandInput, ListCampaignsCommandOutput } from "./commands/ListCampaignsCommand"; +import { + ListConnectInstanceIntegrationsCommandInput, + ListConnectInstanceIntegrationsCommandOutput, +} from "./commands/ListConnectInstanceIntegrationsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { PauseCampaignCommandInput, PauseCampaignCommandOutput } from "./commands/PauseCampaignCommand"; +import { + PutConnectInstanceIntegrationCommandInput, + PutConnectInstanceIntegrationCommandOutput, +} from "./commands/PutConnectInstanceIntegrationCommand"; +import { + PutOutboundRequestBatchCommandInput, + PutOutboundRequestBatchCommandOutput, +} from "./commands/PutOutboundRequestBatchCommand"; +import { ResumeCampaignCommandInput, ResumeCampaignCommandOutput } from "./commands/ResumeCampaignCommand"; +import { StartCampaignCommandInput, StartCampaignCommandOutput } from "./commands/StartCampaignCommand"; +import { + StartInstanceOnboardingJobCommandInput, + StartInstanceOnboardingJobCommandOutput, +} from "./commands/StartInstanceOnboardingJobCommand"; +import { StopCampaignCommandInput, StopCampaignCommandOutput } from "./commands/StopCampaignCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { + UpdateCampaignChannelSubtypeConfigCommandInput, + UpdateCampaignChannelSubtypeConfigCommandOutput, +} from "./commands/UpdateCampaignChannelSubtypeConfigCommand"; +import { + UpdateCampaignCommunicationLimitsCommandInput, + UpdateCampaignCommunicationLimitsCommandOutput, +} from "./commands/UpdateCampaignCommunicationLimitsCommand"; +import { + UpdateCampaignCommunicationTimeCommandInput, + UpdateCampaignCommunicationTimeCommandOutput, +} from "./commands/UpdateCampaignCommunicationTimeCommand"; +import { + UpdateCampaignFlowAssociationCommandInput, + UpdateCampaignFlowAssociationCommandOutput, +} from "./commands/UpdateCampaignFlowAssociationCommand"; +import { UpdateCampaignNameCommandInput, UpdateCampaignNameCommandOutput } from "./commands/UpdateCampaignNameCommand"; +import { + UpdateCampaignScheduleCommandInput, + UpdateCampaignScheduleCommandOutput, +} from "./commands/UpdateCampaignScheduleCommand"; +import { + UpdateCampaignSourceCommandInput, + UpdateCampaignSourceCommandOutput, +} from "./commands/UpdateCampaignSourceCommand"; +import { + ClientInputEndpointParameters, + ClientResolvedEndpointParameters, + EndpointParameters, + resolveClientEndpointParameters, +} from "./endpoint/EndpointParameters"; +import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; +import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; + +export { __Client }; + +/** + * @public + */ +export type ServiceInputTypes = + | CreateCampaignCommandInput + | DeleteCampaignChannelSubtypeConfigCommandInput + | DeleteCampaignCommandInput + | DeleteCampaignCommunicationLimitsCommandInput + | DeleteCampaignCommunicationTimeCommandInput + | DeleteConnectInstanceConfigCommandInput + | DeleteConnectInstanceIntegrationCommandInput + | DeleteInstanceOnboardingJobCommandInput + | DescribeCampaignCommandInput + | GetCampaignStateBatchCommandInput + | GetCampaignStateCommandInput + | GetConnectInstanceConfigCommandInput + | GetInstanceOnboardingJobStatusCommandInput + | ListCampaignsCommandInput + | ListConnectInstanceIntegrationsCommandInput + | ListTagsForResourceCommandInput + | PauseCampaignCommandInput + | PutConnectInstanceIntegrationCommandInput + | PutOutboundRequestBatchCommandInput + | ResumeCampaignCommandInput + | StartCampaignCommandInput + | StartInstanceOnboardingJobCommandInput + | StopCampaignCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput + | UpdateCampaignChannelSubtypeConfigCommandInput + | UpdateCampaignCommunicationLimitsCommandInput + | UpdateCampaignCommunicationTimeCommandInput + | UpdateCampaignFlowAssociationCommandInput + | UpdateCampaignNameCommandInput + | UpdateCampaignScheduleCommandInput + | UpdateCampaignSourceCommandInput; + +/** + * @public + */ +export type ServiceOutputTypes = + | CreateCampaignCommandOutput + | DeleteCampaignChannelSubtypeConfigCommandOutput + | DeleteCampaignCommandOutput + | DeleteCampaignCommunicationLimitsCommandOutput + | DeleteCampaignCommunicationTimeCommandOutput + | DeleteConnectInstanceConfigCommandOutput + | DeleteConnectInstanceIntegrationCommandOutput + | DeleteInstanceOnboardingJobCommandOutput + | DescribeCampaignCommandOutput + | GetCampaignStateBatchCommandOutput + | GetCampaignStateCommandOutput + | GetConnectInstanceConfigCommandOutput + | GetInstanceOnboardingJobStatusCommandOutput + | ListCampaignsCommandOutput + | ListConnectInstanceIntegrationsCommandOutput + | ListTagsForResourceCommandOutput + | PauseCampaignCommandOutput + | PutConnectInstanceIntegrationCommandOutput + | PutOutboundRequestBatchCommandOutput + | ResumeCampaignCommandOutput + | StartCampaignCommandOutput + | StartInstanceOnboardingJobCommandOutput + | StopCampaignCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput + | UpdateCampaignChannelSubtypeConfigCommandOutput + | UpdateCampaignCommunicationLimitsCommandOutput + | UpdateCampaignCommunicationTimeCommandOutput + | UpdateCampaignFlowAssociationCommandOutput + | UpdateCampaignNameCommandOutput + | UpdateCampaignScheduleCommandOutput + | UpdateCampaignSourceCommandOutput; + +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandlerUserInput; + + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + + /** + * The runtime environment. + * @internal + */ + runtime?: string; + + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __Provider; + + /** + * Enables FIPS compatible endpoints. + */ + useFipsEndpoint?: boolean | __Provider; + + /** + * The AWS region to which this client will send requests + */ + region?: string | __Provider; + + /** + * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header + * @internal + */ + defaultUserAgentProvider?: Provider<__UserAgent>; + + /** + * Default credentials provider; Not available in browser runtime. + * @deprecated + * @internal + */ + credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider; + + /** + * Value for how many times a request will be made at most in case of retry. + */ + maxAttempts?: number | __Provider; + + /** + * Specifies which retry algorithm to use. + * @see https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-util-retry/Enum/RETRY_MODES/ + * + */ + retryMode?: string | __Provider; + + /** + * Optional logger for logging debug/info/warn/error. + */ + logger?: __Logger; + + /** + * Optional extensions + */ + extensions?: RuntimeExtension[]; + + /** + * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. + */ + defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>; +} + +/** + * @public + */ +export type ConnectCampaignsV2ClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & + ClientDefaults & + UserAgentInputConfig & + RetryInputConfig & + RegionInputConfig & + HostHeaderInputConfig & + EndpointInputConfig & + HttpAuthSchemeInputConfig & + ClientInputEndpointParameters; +/** + * @public + * + * The configuration interface of ConnectCampaignsV2Client class constructor that set the region, credentials and other options. + */ +export interface ConnectCampaignsV2ClientConfig extends ConnectCampaignsV2ClientConfigType {} + +/** + * @public + */ +export type ConnectCampaignsV2ClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & + Required & + RuntimeExtensionsConfig & + UserAgentResolvedConfig & + RetryResolvedConfig & + RegionResolvedConfig & + HostHeaderResolvedConfig & + EndpointResolvedConfig & + HttpAuthSchemeResolvedConfig & + ClientResolvedEndpointParameters; +/** + * @public + * + * The resolved configuration interface of ConnectCampaignsV2Client class. This is resolved and normalized from the {@link ConnectCampaignsV2ClientConfig | constructor configuration interface}. + */ +export interface ConnectCampaignsV2ClientResolvedConfig extends ConnectCampaignsV2ClientResolvedConfigType {} + +/** + * Provide APIs to create and manage Amazon Connect Campaigns. + * @public + */ +export class ConnectCampaignsV2Client extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + ConnectCampaignsV2ClientResolvedConfig +> { + /** + * The resolved configuration of ConnectCampaignsV2Client class. This is resolved and normalized from the {@link ConnectCampaignsV2ClientConfig | constructor configuration interface}. + */ + readonly config: ConnectCampaignsV2ClientResolvedConfig; + + constructor(...[configuration]: __CheckOptionalClientConfig) { + const _config_0 = __getRuntimeConfig(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = resolveUserAgentConfig(_config_1); + const _config_3 = resolveRetryConfig(_config_2); + const _config_4 = resolveRegionConfig(_config_3); + const _config_5 = resolveHostHeaderConfig(_config_4); + const _config_6 = resolveEndpointConfig(_config_5); + const _config_7 = resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use( + getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: defaultConnectCampaignsV2HttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config: ConnectCampaignsV2ClientResolvedConfig) => + new DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + }) + ); + this.middlewareStack.use(getHttpSigningPlugin(this.config)); + } + + /** + * Destroy underlying resources, like sockets. It's usually not necessary to do this. + * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed. + * Otherwise, sockets might stay open for quite a long time before the server terminates them. + */ + destroy(): void { + super.destroy(); + } +} diff --git a/clients/client-connectcampaignsv2/src/auth/httpAuthExtensionConfiguration.ts b/clients/client-connectcampaignsv2/src/auth/httpAuthExtensionConfiguration.ts new file mode 100644 index 000000000000..1013ccc55740 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/auth/httpAuthExtensionConfiguration.ts @@ -0,0 +1,72 @@ +// smithy-typescript generated code +import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types"; + +import { ConnectCampaignsV2HttpAuthSchemeProvider } from "./httpAuthSchemeProvider"; + +/** + * @internal + */ +export interface HttpAuthExtensionConfiguration { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void; + httpAuthSchemes(): HttpAuthScheme[]; + setHttpAuthSchemeProvider(httpAuthSchemeProvider: ConnectCampaignsV2HttpAuthSchemeProvider): void; + httpAuthSchemeProvider(): ConnectCampaignsV2HttpAuthSchemeProvider; + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void; + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined; +} + +/** + * @internal + */ +export type HttpAuthRuntimeConfig = Partial<{ + httpAuthSchemes: HttpAuthScheme[]; + httpAuthSchemeProvider: ConnectCampaignsV2HttpAuthSchemeProvider; + credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider; +}>; + +/** + * @internal + */ +export const getHttpAuthExtensionConfiguration = ( + runtimeConfig: HttpAuthRuntimeConfig +): HttpAuthExtensionConfiguration => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes!; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider!; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes(): HttpAuthScheme[] { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider: ConnectCampaignsV2HttpAuthSchemeProvider): void { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider(): ConnectCampaignsV2HttpAuthSchemeProvider { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void { + _credentials = credentials; + }, + credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined { + return _credentials; + }, + }; +}; + +/** + * @internal + */ +export const resolveHttpAuthRuntimeConfig = (config: HttpAuthExtensionConfiguration): HttpAuthRuntimeConfig => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; diff --git a/clients/client-connectcampaignsv2/src/auth/httpAuthSchemeProvider.ts b/clients/client-connectcampaignsv2/src/auth/httpAuthSchemeProvider.ts new file mode 100644 index 000000000000..152cc2ec70c5 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/auth/httpAuthSchemeProvider.ts @@ -0,0 +1,140 @@ +// smithy-typescript generated code +import { + AwsSdkSigV4AuthInputConfig, + AwsSdkSigV4AuthResolvedConfig, + AwsSdkSigV4PreviouslyResolved, + resolveAwsSdkSigV4Config, +} from "@aws-sdk/core"; +import { + HandlerExecutionContext, + HttpAuthOption, + HttpAuthScheme, + HttpAuthSchemeParameters, + HttpAuthSchemeParametersProvider, + HttpAuthSchemeProvider, +} from "@smithy/types"; +import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware"; + +import { ConnectCampaignsV2ClientConfig, ConnectCampaignsV2ClientResolvedConfig } from "../ConnectCampaignsV2Client"; + +/** + * @internal + */ +export interface ConnectCampaignsV2HttpAuthSchemeParameters extends HttpAuthSchemeParameters { + region?: string; +} + +/** + * @internal + */ +export interface ConnectCampaignsV2HttpAuthSchemeParametersProvider + extends HttpAuthSchemeParametersProvider< + ConnectCampaignsV2ClientResolvedConfig, + HandlerExecutionContext, + ConnectCampaignsV2HttpAuthSchemeParameters, + object + > {} + +/** + * @internal + */ +export const defaultConnectCampaignsV2HttpAuthSchemeParametersProvider = async ( + config: ConnectCampaignsV2ClientResolvedConfig, + context: HandlerExecutionContext, + input: object +): Promise => { + return { + operation: getSmithyContext(context).operation as string, + region: + (await normalizeProvider(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; + +function createAwsAuthSigv4HttpAuthOption(authParameters: ConnectCampaignsV2HttpAuthSchemeParameters): HttpAuthOption { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "connect-campaigns", + region: authParameters.region, + }, + propertiesExtractor: (config: Partial, context) => ({ + /** + * @internal + */ + signingProperties: { + config, + context, + }, + }), + }; +} + +/** + * @internal + */ +export interface ConnectCampaignsV2HttpAuthSchemeProvider + extends HttpAuthSchemeProvider {} + +/** + * @internal + */ +export const defaultConnectCampaignsV2HttpAuthSchemeProvider: ConnectCampaignsV2HttpAuthSchemeProvider = ( + authParameters +) => { + const options: HttpAuthOption[] = []; + switch (authParameters.operation) { + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; + +/** + * @internal + */ +export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig { + /** + * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + httpAuthSchemes?: HttpAuthScheme[]; + + /** + * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + httpAuthSchemeProvider?: ConnectCampaignsV2HttpAuthSchemeProvider; +} + +/** + * @internal + */ +export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig { + /** + * Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme. + * @internal + */ + readonly httpAuthSchemes: HttpAuthScheme[]; + + /** + * Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use. + * @internal + */ + readonly httpAuthSchemeProvider: ConnectCampaignsV2HttpAuthSchemeProvider; +} + +/** + * @internal + */ +export const resolveHttpAuthSchemeConfig = ( + config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved +): T & HttpAuthSchemeResolvedConfig => { + const config_0 = resolveAwsSdkSigV4Config(config); + return { + ...config_0, + } as T & HttpAuthSchemeResolvedConfig; +}; diff --git a/clients/client-connectcampaignsv2/src/commands/CreateCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/CreateCampaignCommand.ts new file mode 100644 index 000000000000..ff8e85c2f93b --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/CreateCampaignCommand.ts @@ -0,0 +1,264 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + CreateCampaignRequest, + CreateCampaignRequestFilterSensitiveLog, + CreateCampaignResponse, +} from "../models/models_0"; +import { de_CreateCampaignCommand, se_CreateCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateCampaignCommand}. + */ +export interface CreateCampaignCommandInput extends CreateCampaignRequest {} +/** + * @public + * + * The output of {@link CreateCampaignCommand}. + */ +export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __MetadataBearer {} + +/** + * Creates a campaign for the specified Amazon Connect account. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, CreateCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, CreateCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // CreateCampaignRequest + * name: "STRING_VALUE", // required + * connectInstanceId: "STRING_VALUE", // required + * channelSubtypeConfig: { // ChannelSubtypeConfig + * telephony: { // TelephonyChannelSubtypeConfig + * capacity: Number("double"), + * connectQueueId: "STRING_VALUE", + * outboundMode: { // TelephonyOutboundMode Union: only one key present + * progressive: { // ProgressiveConfig + * bandwidthAllocation: Number("double"), // required + * }, + * predictive: { // PredictiveConfig + * bandwidthAllocation: Number("double"), // required + * }, + * agentless: {}, + * }, + * defaultOutboundConfig: { // TelephonyOutboundConfig + * connectContactFlowId: "STRING_VALUE", // required + * connectSourcePhoneNumber: "STRING_VALUE", + * answerMachineDetectionConfig: { // AnswerMachineDetectionConfig + * enableAnswerMachineDetection: true || false, // required + * awaitAnswerMachinePrompt: true || false, + * }, + * }, + * }, + * sms: { // SmsChannelSubtypeConfig + * capacity: Number("double"), + * outboundMode: { // SmsOutboundMode Union: only one key present + * agentless: {}, + * }, + * defaultOutboundConfig: { // SmsOutboundConfig + * connectSourcePhoneNumberArn: "STRING_VALUE", // required + * wisdomTemplateArn: "STRING_VALUE", // required + * }, + * }, + * email: { // EmailChannelSubtypeConfig + * capacity: Number("double"), + * outboundMode: { // EmailOutboundMode Union: only one key present + * agentless: {}, + * }, + * defaultOutboundConfig: { // EmailOutboundConfig + * connectSourceEmailAddress: "STRING_VALUE", // required + * sourceEmailAddressDisplayName: "STRING_VALUE", + * wisdomTemplateArn: "STRING_VALUE", // required + * }, + * }, + * }, + * source: { // Source Union: only one key present + * customerProfilesSegmentArn: "STRING_VALUE", + * }, + * connectCampaignFlowArn: "STRING_VALUE", + * schedule: { // Schedule + * startTime: new Date("TIMESTAMP"), // required + * endTime: new Date("TIMESTAMP"), // required + * refreshFrequency: "STRING_VALUE", + * }, + * communicationTimeConfig: { // CommunicationTimeConfig + * localTimeZoneConfig: { // LocalTimeZoneConfig + * defaultTimeZone: "STRING_VALUE", + * localTimeZoneDetection: [ // LocalTimeZoneDetection + * "STRING_VALUE", + * ], + * }, + * telephony: { // TimeWindow + * openHours: { // OpenHours Union: only one key present + * dailyHours: { // DailyHours + * "": [ // TimeRangeList + * { // TimeRange + * startTime: "STRING_VALUE", // required + * endTime: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * restrictedPeriods: { // RestrictedPeriods Union: only one key present + * restrictedPeriodList: [ // RestrictedPeriodList + * { // RestrictedPeriod + * name: "STRING_VALUE", + * startDate: "STRING_VALUE", // required + * endDate: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * sms: { + * openHours: {// Union: only one key present + * dailyHours: { + * "": [ + * { + * startTime: "STRING_VALUE", // required + * endTime: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * restrictedPeriods: {// Union: only one key present + * restrictedPeriodList: [ + * { + * name: "STRING_VALUE", + * startDate: "STRING_VALUE", // required + * endDate: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * email: { + * openHours: {// Union: only one key present + * dailyHours: { + * "": [ + * { + * startTime: "STRING_VALUE", // required + * endTime: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * restrictedPeriods: {// Union: only one key present + * restrictedPeriodList: [ + * { + * name: "STRING_VALUE", + * startDate: "STRING_VALUE", // required + * endDate: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * }, + * communicationLimitsOverride: { // CommunicationLimitsConfig + * allChannelSubtypes: { // CommunicationLimits Union: only one key present + * communicationLimitsList: [ // CommunicationLimitList + * { // CommunicationLimit + * maxCountPerRecipient: Number("int"), // required + * frequency: Number("int"), // required + * unit: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * tags: { // TagMap + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateCampaignCommand(input); + * const response = await client.send(command); + * // { // CreateCampaignResponse + * // id: "STRING_VALUE", + * // arn: "STRING_VALUE", + * // tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param CreateCampaignCommandInput - {@link CreateCampaignCommandInput} + * @returns {@link CreateCampaignCommandOutput} + * @see {@link CreateCampaignCommandInput} for command's `input` shape. + * @see {@link CreateCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ServiceQuotaExceededException} (client fault) + * Request would cause a service quota to be exceeded. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class CreateCampaignCommand extends $Command + .classBuilder< + CreateCampaignCommandInput, + CreateCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "CreateCampaign", {}) + .n("ConnectCampaignsV2Client", "CreateCampaignCommand") + .f(CreateCampaignRequestFilterSensitiveLog, void 0) + .ser(se_CreateCampaignCommand) + .de(de_CreateCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: CreateCampaignRequest; + output: CreateCampaignResponse; + }; + sdk: { + input: CreateCampaignCommandInput; + output: CreateCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteCampaignChannelSubtypeConfigCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignChannelSubtypeConfigCommand.ts new file mode 100644 index 000000000000..79c083e06f94 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignChannelSubtypeConfigCommand.ts @@ -0,0 +1,113 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteCampaignChannelSubtypeConfigRequest } from "../models/models_0"; +import { + de_DeleteCampaignChannelSubtypeConfigCommand, + se_DeleteCampaignChannelSubtypeConfigCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteCampaignChannelSubtypeConfigCommand}. + */ +export interface DeleteCampaignChannelSubtypeConfigCommandInput extends DeleteCampaignChannelSubtypeConfigRequest {} +/** + * @public + * + * The output of {@link DeleteCampaignChannelSubtypeConfigCommand}. + */ +export interface DeleteCampaignChannelSubtypeConfigCommandOutput extends __MetadataBearer {} + +/** + * Deletes the channel subtype config of a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteCampaignChannelSubtypeConfigCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteCampaignChannelSubtypeConfigCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteCampaignChannelSubtypeConfigRequest + * id: "STRING_VALUE", // required + * channelSubtype: "STRING_VALUE", // required + * }; + * const command = new DeleteCampaignChannelSubtypeConfigCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteCampaignChannelSubtypeConfigCommandInput - {@link DeleteCampaignChannelSubtypeConfigCommandInput} + * @returns {@link DeleteCampaignChannelSubtypeConfigCommandOutput} + * @see {@link DeleteCampaignChannelSubtypeConfigCommandInput} for command's `input` shape. + * @see {@link DeleteCampaignChannelSubtypeConfigCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteCampaignChannelSubtypeConfigCommand extends $Command + .classBuilder< + DeleteCampaignChannelSubtypeConfigCommandInput, + DeleteCampaignChannelSubtypeConfigCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteCampaignChannelSubtypeConfig", {}) + .n("ConnectCampaignsV2Client", "DeleteCampaignChannelSubtypeConfigCommand") + .f(void 0, void 0) + .ser(se_DeleteCampaignChannelSubtypeConfigCommand) + .de(de_DeleteCampaignChannelSubtypeConfigCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteCampaignChannelSubtypeConfigRequest; + output: {}; + }; + sdk: { + input: DeleteCampaignChannelSubtypeConfigCommandInput; + output: DeleteCampaignChannelSubtypeConfigCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommand.ts new file mode 100644 index 000000000000..f07ec85fe6d9 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommand.ts @@ -0,0 +1,106 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteCampaignRequest } from "../models/models_0"; +import { de_DeleteCampaignCommand, se_DeleteCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteCampaignCommand}. + */ +export interface DeleteCampaignCommandInput extends DeleteCampaignRequest {} +/** + * @public + * + * The output of {@link DeleteCampaignCommand}. + */ +export interface DeleteCampaignCommandOutput extends __MetadataBearer {} + +/** + * Deletes a campaign from the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteCampaignRequest + * id: "STRING_VALUE", // required + * }; + * const command = new DeleteCampaignCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteCampaignCommandInput - {@link DeleteCampaignCommandInput} + * @returns {@link DeleteCampaignCommandOutput} + * @see {@link DeleteCampaignCommandInput} for command's `input` shape. + * @see {@link DeleteCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteCampaignCommand extends $Command + .classBuilder< + DeleteCampaignCommandInput, + DeleteCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteCampaign", {}) + .n("ConnectCampaignsV2Client", "DeleteCampaignCommand") + .f(void 0, void 0) + .ser(se_DeleteCampaignCommand) + .de(de_DeleteCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteCampaignRequest; + output: {}; + }; + sdk: { + input: DeleteCampaignCommandInput; + output: DeleteCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationLimitsCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationLimitsCommand.ts new file mode 100644 index 000000000000..e640567afca3 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationLimitsCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteCampaignCommunicationLimitsRequest } from "../models/models_0"; +import { + de_DeleteCampaignCommunicationLimitsCommand, + se_DeleteCampaignCommunicationLimitsCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteCampaignCommunicationLimitsCommand}. + */ +export interface DeleteCampaignCommunicationLimitsCommandInput extends DeleteCampaignCommunicationLimitsRequest {} +/** + * @public + * + * The output of {@link DeleteCampaignCommunicationLimitsCommand}. + */ +export interface DeleteCampaignCommunicationLimitsCommandOutput extends __MetadataBearer {} + +/** + * Deletes the communication limits config for a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteCampaignCommunicationLimitsCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteCampaignCommunicationLimitsCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteCampaignCommunicationLimitsRequest + * id: "STRING_VALUE", // required + * config: "STRING_VALUE", // required + * }; + * const command = new DeleteCampaignCommunicationLimitsCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteCampaignCommunicationLimitsCommandInput - {@link DeleteCampaignCommunicationLimitsCommandInput} + * @returns {@link DeleteCampaignCommunicationLimitsCommandOutput} + * @see {@link DeleteCampaignCommunicationLimitsCommandInput} for command's `input` shape. + * @see {@link DeleteCampaignCommunicationLimitsCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteCampaignCommunicationLimitsCommand extends $Command + .classBuilder< + DeleteCampaignCommunicationLimitsCommandInput, + DeleteCampaignCommunicationLimitsCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteCampaignCommunicationLimits", {}) + .n("ConnectCampaignsV2Client", "DeleteCampaignCommunicationLimitsCommand") + .f(void 0, void 0) + .ser(se_DeleteCampaignCommunicationLimitsCommand) + .de(de_DeleteCampaignCommunicationLimitsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteCampaignCommunicationLimitsRequest; + output: {}; + }; + sdk: { + input: DeleteCampaignCommunicationLimitsCommandInput; + output: DeleteCampaignCommunicationLimitsCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationTimeCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationTimeCommand.ts new file mode 100644 index 000000000000..bf014c7d97c2 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteCampaignCommunicationTimeCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteCampaignCommunicationTimeRequest } from "../models/models_0"; +import { + de_DeleteCampaignCommunicationTimeCommand, + se_DeleteCampaignCommunicationTimeCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteCampaignCommunicationTimeCommand}. + */ +export interface DeleteCampaignCommunicationTimeCommandInput extends DeleteCampaignCommunicationTimeRequest {} +/** + * @public + * + * The output of {@link DeleteCampaignCommunicationTimeCommand}. + */ +export interface DeleteCampaignCommunicationTimeCommandOutput extends __MetadataBearer {} + +/** + * Deletes the communication time config for a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteCampaignCommunicationTimeCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteCampaignCommunicationTimeCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteCampaignCommunicationTimeRequest + * id: "STRING_VALUE", // required + * config: "STRING_VALUE", // required + * }; + * const command = new DeleteCampaignCommunicationTimeCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteCampaignCommunicationTimeCommandInput - {@link DeleteCampaignCommunicationTimeCommandInput} + * @returns {@link DeleteCampaignCommunicationTimeCommandOutput} + * @see {@link DeleteCampaignCommunicationTimeCommandInput} for command's `input` shape. + * @see {@link DeleteCampaignCommunicationTimeCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteCampaignCommunicationTimeCommand extends $Command + .classBuilder< + DeleteCampaignCommunicationTimeCommandInput, + DeleteCampaignCommunicationTimeCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteCampaignCommunicationTime", {}) + .n("ConnectCampaignsV2Client", "DeleteCampaignCommunicationTimeCommand") + .f(void 0, void 0) + .ser(se_DeleteCampaignCommunicationTimeCommand) + .de(de_DeleteCampaignCommunicationTimeCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteCampaignCommunicationTimeRequest; + output: {}; + }; + sdk: { + input: DeleteCampaignCommunicationTimeCommandInput; + output: DeleteCampaignCommunicationTimeCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceConfigCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceConfigCommand.ts new file mode 100644 index 000000000000..228bf4871c09 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceConfigCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteConnectInstanceConfigRequest } from "../models/models_0"; +import { + de_DeleteConnectInstanceConfigCommand, + se_DeleteConnectInstanceConfigCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteConnectInstanceConfigCommand}. + */ +export interface DeleteConnectInstanceConfigCommandInput extends DeleteConnectInstanceConfigRequest {} +/** + * @public + * + * The output of {@link DeleteConnectInstanceConfigCommand}. + */ +export interface DeleteConnectInstanceConfigCommandOutput extends __MetadataBearer {} + +/** + * Deletes a connect instance config from the specified AWS account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteConnectInstanceConfigCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteConnectInstanceConfigCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteConnectInstanceConfigRequest + * connectInstanceId: "STRING_VALUE", // required + * campaignDeletionPolicy: "STRING_VALUE", + * }; + * const command = new DeleteConnectInstanceConfigCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteConnectInstanceConfigCommandInput - {@link DeleteConnectInstanceConfigCommandInput} + * @returns {@link DeleteConnectInstanceConfigCommandOutput} + * @see {@link DeleteConnectInstanceConfigCommandInput} for command's `input` shape. + * @see {@link DeleteConnectInstanceConfigCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidStateException} (client fault) + * The request could not be processed because of conflict in the current state. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteConnectInstanceConfigCommand extends $Command + .classBuilder< + DeleteConnectInstanceConfigCommandInput, + DeleteConnectInstanceConfigCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteConnectInstanceConfig", {}) + .n("ConnectCampaignsV2Client", "DeleteConnectInstanceConfigCommand") + .f(void 0, void 0) + .ser(se_DeleteConnectInstanceConfigCommand) + .de(de_DeleteConnectInstanceConfigCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteConnectInstanceConfigRequest; + output: {}; + }; + sdk: { + input: DeleteConnectInstanceConfigCommandInput; + output: DeleteConnectInstanceConfigCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceIntegrationCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceIntegrationCommand.ts new file mode 100644 index 000000000000..7377d32e0d26 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteConnectInstanceIntegrationCommand.ts @@ -0,0 +1,120 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteConnectInstanceIntegrationRequest } from "../models/models_0"; +import { + de_DeleteConnectInstanceIntegrationCommand, + se_DeleteConnectInstanceIntegrationCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteConnectInstanceIntegrationCommand}. + */ +export interface DeleteConnectInstanceIntegrationCommandInput extends DeleteConnectInstanceIntegrationRequest {} +/** + * @public + * + * The output of {@link DeleteConnectInstanceIntegrationCommand}. + */ +export interface DeleteConnectInstanceIntegrationCommandOutput extends __MetadataBearer {} + +/** + * Delete the integration for the specified Amazon Connect instance. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteConnectInstanceIntegrationCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteConnectInstanceIntegrationCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteConnectInstanceIntegrationRequest + * connectInstanceId: "STRING_VALUE", // required + * integrationIdentifier: { // IntegrationIdentifier Union: only one key present + * customerProfiles: { // CustomerProfilesIntegrationIdentifier + * domainArn: "STRING_VALUE", // required + * }, + * qConnect: { // QConnectIntegrationIdentifier + * knowledgeBaseArn: "STRING_VALUE", // required + * }, + * }, + * }; + * const command = new DeleteConnectInstanceIntegrationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteConnectInstanceIntegrationCommandInput - {@link DeleteConnectInstanceIntegrationCommandInput} + * @returns {@link DeleteConnectInstanceIntegrationCommandOutput} + * @see {@link DeleteConnectInstanceIntegrationCommandInput} for command's `input` shape. + * @see {@link DeleteConnectInstanceIntegrationCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteConnectInstanceIntegrationCommand extends $Command + .classBuilder< + DeleteConnectInstanceIntegrationCommandInput, + DeleteConnectInstanceIntegrationCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteConnectInstanceIntegration", {}) + .n("ConnectCampaignsV2Client", "DeleteConnectInstanceIntegrationCommand") + .f(void 0, void 0) + .ser(se_DeleteConnectInstanceIntegrationCommand) + .de(de_DeleteConnectInstanceIntegrationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteConnectInstanceIntegrationRequest; + output: {}; + }; + sdk: { + input: DeleteConnectInstanceIntegrationCommandInput; + output: DeleteConnectInstanceIntegrationCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DeleteInstanceOnboardingJobCommand.ts b/clients/client-connectcampaignsv2/src/commands/DeleteInstanceOnboardingJobCommand.ts new file mode 100644 index 000000000000..dc486e8d8f6f --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DeleteInstanceOnboardingJobCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteInstanceOnboardingJobRequest } from "../models/models_0"; +import { + de_DeleteInstanceOnboardingJobCommand, + se_DeleteInstanceOnboardingJobCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteInstanceOnboardingJobCommand}. + */ +export interface DeleteInstanceOnboardingJobCommandInput extends DeleteInstanceOnboardingJobRequest {} +/** + * @public + * + * The output of {@link DeleteInstanceOnboardingJobCommand}. + */ +export interface DeleteInstanceOnboardingJobCommandOutput extends __MetadataBearer {} + +/** + * Delete the Connect Campaigns onboarding job for the specified Amazon Connect instance. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DeleteInstanceOnboardingJobCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DeleteInstanceOnboardingJobCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DeleteInstanceOnboardingJobRequest + * connectInstanceId: "STRING_VALUE", // required + * }; + * const command = new DeleteInstanceOnboardingJobCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteInstanceOnboardingJobCommandInput - {@link DeleteInstanceOnboardingJobCommandInput} + * @returns {@link DeleteInstanceOnboardingJobCommandOutput} + * @see {@link DeleteInstanceOnboardingJobCommandInput} for command's `input` shape. + * @see {@link DeleteInstanceOnboardingJobCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidStateException} (client fault) + * The request could not be processed because of conflict in the current state. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DeleteInstanceOnboardingJobCommand extends $Command + .classBuilder< + DeleteInstanceOnboardingJobCommandInput, + DeleteInstanceOnboardingJobCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DeleteInstanceOnboardingJob", {}) + .n("ConnectCampaignsV2Client", "DeleteInstanceOnboardingJobCommand") + .f(void 0, void 0) + .ser(se_DeleteInstanceOnboardingJobCommand) + .de(de_DeleteInstanceOnboardingJobCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteInstanceOnboardingJobRequest; + output: {}; + }; + sdk: { + input: DeleteInstanceOnboardingJobCommandInput; + output: DeleteInstanceOnboardingJobCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/DescribeCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/DescribeCampaignCommand.ts new file mode 100644 index 000000000000..8a5b7de27f31 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/DescribeCampaignCommand.ts @@ -0,0 +1,255 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + DescribeCampaignRequest, + DescribeCampaignResponse, + DescribeCampaignResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_DescribeCampaignCommand, se_DescribeCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DescribeCampaignCommand}. + */ +export interface DescribeCampaignCommandInput extends DescribeCampaignRequest {} +/** + * @public + * + * The output of {@link DescribeCampaignCommand}. + */ +export interface DescribeCampaignCommandOutput extends DescribeCampaignResponse, __MetadataBearer {} + +/** + * Describes the specific campaign. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, DescribeCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, DescribeCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // DescribeCampaignRequest + * id: "STRING_VALUE", // required + * }; + * const command = new DescribeCampaignCommand(input); + * const response = await client.send(command); + * // { // DescribeCampaignResponse + * // campaign: { // Campaign + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // connectInstanceId: "STRING_VALUE", // required + * // channelSubtypeConfig: { // ChannelSubtypeConfig + * // telephony: { // TelephonyChannelSubtypeConfig + * // capacity: Number("double"), + * // connectQueueId: "STRING_VALUE", + * // outboundMode: { // TelephonyOutboundMode Union: only one key present + * // progressive: { // ProgressiveConfig + * // bandwidthAllocation: Number("double"), // required + * // }, + * // predictive: { // PredictiveConfig + * // bandwidthAllocation: Number("double"), // required + * // }, + * // agentless: {}, + * // }, + * // defaultOutboundConfig: { // TelephonyOutboundConfig + * // connectContactFlowId: "STRING_VALUE", // required + * // connectSourcePhoneNumber: "STRING_VALUE", + * // answerMachineDetectionConfig: { // AnswerMachineDetectionConfig + * // enableAnswerMachineDetection: true || false, // required + * // awaitAnswerMachinePrompt: true || false, + * // }, + * // }, + * // }, + * // sms: { // SmsChannelSubtypeConfig + * // capacity: Number("double"), + * // outboundMode: { // SmsOutboundMode Union: only one key present + * // agentless: {}, + * // }, + * // defaultOutboundConfig: { // SmsOutboundConfig + * // connectSourcePhoneNumberArn: "STRING_VALUE", // required + * // wisdomTemplateArn: "STRING_VALUE", // required + * // }, + * // }, + * // email: { // EmailChannelSubtypeConfig + * // capacity: Number("double"), + * // outboundMode: { // EmailOutboundMode Union: only one key present + * // agentless: {}, + * // }, + * // defaultOutboundConfig: { // EmailOutboundConfig + * // connectSourceEmailAddress: "STRING_VALUE", // required + * // sourceEmailAddressDisplayName: "STRING_VALUE", + * // wisdomTemplateArn: "STRING_VALUE", // required + * // }, + * // }, + * // }, + * // source: { // Source Union: only one key present + * // customerProfilesSegmentArn: "STRING_VALUE", + * // }, + * // connectCampaignFlowArn: "STRING_VALUE", + * // schedule: { // Schedule + * // startTime: new Date("TIMESTAMP"), // required + * // endTime: new Date("TIMESTAMP"), // required + * // refreshFrequency: "STRING_VALUE", + * // }, + * // communicationTimeConfig: { // CommunicationTimeConfig + * // localTimeZoneConfig: { // LocalTimeZoneConfig + * // defaultTimeZone: "STRING_VALUE", + * // localTimeZoneDetection: [ // LocalTimeZoneDetection + * // "STRING_VALUE", + * // ], + * // }, + * // telephony: { // TimeWindow + * // openHours: { // OpenHours Union: only one key present + * // dailyHours: { // DailyHours + * // "": [ // TimeRangeList + * // { // TimeRange + * // startTime: "STRING_VALUE", // required + * // endTime: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // restrictedPeriods: { // RestrictedPeriods Union: only one key present + * // restrictedPeriodList: [ // RestrictedPeriodList + * // { // RestrictedPeriod + * // name: "STRING_VALUE", + * // startDate: "STRING_VALUE", // required + * // endDate: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // sms: { + * // openHours: {// Union: only one key present + * // dailyHours: { + * // "": [ + * // { + * // startTime: "STRING_VALUE", // required + * // endTime: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // restrictedPeriods: {// Union: only one key present + * // restrictedPeriodList: [ + * // { + * // name: "STRING_VALUE", + * // startDate: "STRING_VALUE", // required + * // endDate: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // email: { + * // openHours: {// Union: only one key present + * // dailyHours: { + * // "": [ + * // { + * // startTime: "STRING_VALUE", // required + * // endTime: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // restrictedPeriods: {// Union: only one key present + * // restrictedPeriodList: [ + * // { + * // name: "STRING_VALUE", + * // startDate: "STRING_VALUE", // required + * // endDate: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // }, + * // communicationLimitsOverride: { // CommunicationLimitsConfig + * // allChannelSubtypes: { // CommunicationLimits Union: only one key present + * // communicationLimitsList: [ // CommunicationLimitList + * // { // CommunicationLimit + * // maxCountPerRecipient: Number("int"), // required + * // frequency: Number("int"), // required + * // unit: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // }, + * // tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param DescribeCampaignCommandInput - {@link DescribeCampaignCommandInput} + * @returns {@link DescribeCampaignCommandOutput} + * @see {@link DescribeCampaignCommandInput} for command's `input` shape. + * @see {@link DescribeCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class DescribeCampaignCommand extends $Command + .classBuilder< + DescribeCampaignCommandInput, + DescribeCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "DescribeCampaign", {}) + .n("ConnectCampaignsV2Client", "DescribeCampaignCommand") + .f(void 0, DescribeCampaignResponseFilterSensitiveLog) + .ser(se_DescribeCampaignCommand) + .de(de_DescribeCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DescribeCampaignRequest; + output: DescribeCampaignResponse; + }; + sdk: { + input: DescribeCampaignCommandInput; + output: DescribeCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/GetCampaignStateBatchCommand.ts b/clients/client-connectcampaignsv2/src/commands/GetCampaignStateBatchCommand.ts new file mode 100644 index 000000000000..f388ea076214 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/GetCampaignStateBatchCommand.ts @@ -0,0 +1,121 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetCampaignStateBatchRequest, GetCampaignStateBatchResponse } from "../models/models_0"; +import { de_GetCampaignStateBatchCommand, se_GetCampaignStateBatchCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetCampaignStateBatchCommand}. + */ +export interface GetCampaignStateBatchCommandInput extends GetCampaignStateBatchRequest {} +/** + * @public + * + * The output of {@link GetCampaignStateBatchCommand}. + */ +export interface GetCampaignStateBatchCommandOutput extends GetCampaignStateBatchResponse, __MetadataBearer {} + +/** + * Get state of campaigns for the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, GetCampaignStateBatchCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, GetCampaignStateBatchCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // GetCampaignStateBatchRequest + * campaignIds: [ // CampaignIdList // required + * "STRING_VALUE", + * ], + * }; + * const command = new GetCampaignStateBatchCommand(input); + * const response = await client.send(command); + * // { // GetCampaignStateBatchResponse + * // successfulRequests: [ // SuccessfulCampaignStateResponseList + * // { // SuccessfulCampaignStateResponse + * // campaignId: "STRING_VALUE", + * // state: "STRING_VALUE", + * // }, + * // ], + * // failedRequests: [ // FailedCampaignStateResponseList + * // { // FailedCampaignStateResponse + * // campaignId: "STRING_VALUE", + * // failureCode: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param GetCampaignStateBatchCommandInput - {@link GetCampaignStateBatchCommandInput} + * @returns {@link GetCampaignStateBatchCommandOutput} + * @see {@link GetCampaignStateBatchCommandInput} for command's `input` shape. + * @see {@link GetCampaignStateBatchCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class GetCampaignStateBatchCommand extends $Command + .classBuilder< + GetCampaignStateBatchCommandInput, + GetCampaignStateBatchCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "GetCampaignStateBatch", {}) + .n("ConnectCampaignsV2Client", "GetCampaignStateBatchCommand") + .f(void 0, void 0) + .ser(se_GetCampaignStateBatchCommand) + .de(de_GetCampaignStateBatchCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetCampaignStateBatchRequest; + output: GetCampaignStateBatchResponse; + }; + sdk: { + input: GetCampaignStateBatchCommandInput; + output: GetCampaignStateBatchCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/GetCampaignStateCommand.ts b/clients/client-connectcampaignsv2/src/commands/GetCampaignStateCommand.ts new file mode 100644 index 000000000000..c8ab6977aab9 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/GetCampaignStateCommand.ts @@ -0,0 +1,111 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetCampaignStateRequest, GetCampaignStateResponse } from "../models/models_0"; +import { de_GetCampaignStateCommand, se_GetCampaignStateCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetCampaignStateCommand}. + */ +export interface GetCampaignStateCommandInput extends GetCampaignStateRequest {} +/** + * @public + * + * The output of {@link GetCampaignStateCommand}. + */ +export interface GetCampaignStateCommandOutput extends GetCampaignStateResponse, __MetadataBearer {} + +/** + * Get state of a campaign for the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, GetCampaignStateCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, GetCampaignStateCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // GetCampaignStateRequest + * id: "STRING_VALUE", // required + * }; + * const command = new GetCampaignStateCommand(input); + * const response = await client.send(command); + * // { // GetCampaignStateResponse + * // state: "STRING_VALUE", + * // }; + * + * ``` + * + * @param GetCampaignStateCommandInput - {@link GetCampaignStateCommandInput} + * @returns {@link GetCampaignStateCommandOutput} + * @see {@link GetCampaignStateCommandInput} for command's `input` shape. + * @see {@link GetCampaignStateCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class GetCampaignStateCommand extends $Command + .classBuilder< + GetCampaignStateCommandInput, + GetCampaignStateCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "GetCampaignState", {}) + .n("ConnectCampaignsV2Client", "GetCampaignStateCommand") + .f(void 0, void 0) + .ser(se_GetCampaignStateCommand) + .de(de_GetCampaignStateCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetCampaignStateRequest; + output: GetCampaignStateResponse; + }; + sdk: { + input: GetCampaignStateCommandInput; + output: GetCampaignStateCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/GetConnectInstanceConfigCommand.ts b/clients/client-connectcampaignsv2/src/commands/GetConnectInstanceConfigCommand.ts new file mode 100644 index 000000000000..c9ccec5e51d3 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/GetConnectInstanceConfigCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetConnectInstanceConfigRequest, GetConnectInstanceConfigResponse } from "../models/models_0"; +import { de_GetConnectInstanceConfigCommand, se_GetConnectInstanceConfigCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetConnectInstanceConfigCommand}. + */ +export interface GetConnectInstanceConfigCommandInput extends GetConnectInstanceConfigRequest {} +/** + * @public + * + * The output of {@link GetConnectInstanceConfigCommand}. + */ +export interface GetConnectInstanceConfigCommandOutput extends GetConnectInstanceConfigResponse, __MetadataBearer {} + +/** + * Get the specific Connect instance config. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, GetConnectInstanceConfigCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, GetConnectInstanceConfigCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // GetConnectInstanceConfigRequest + * connectInstanceId: "STRING_VALUE", // required + * }; + * const command = new GetConnectInstanceConfigCommand(input); + * const response = await client.send(command); + * // { // GetConnectInstanceConfigResponse + * // connectInstanceConfig: { // InstanceConfig + * // connectInstanceId: "STRING_VALUE", // required + * // serviceLinkedRoleArn: "STRING_VALUE", // required + * // encryptionConfig: { // EncryptionConfig + * // enabled: true || false, // required + * // encryptionType: "STRING_VALUE", + * // keyArn: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetConnectInstanceConfigCommandInput - {@link GetConnectInstanceConfigCommandInput} + * @returns {@link GetConnectInstanceConfigCommandOutput} + * @see {@link GetConnectInstanceConfigCommandInput} for command's `input` shape. + * @see {@link GetConnectInstanceConfigCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class GetConnectInstanceConfigCommand extends $Command + .classBuilder< + GetConnectInstanceConfigCommandInput, + GetConnectInstanceConfigCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "GetConnectInstanceConfig", {}) + .n("ConnectCampaignsV2Client", "GetConnectInstanceConfigCommand") + .f(void 0, void 0) + .ser(se_GetConnectInstanceConfigCommand) + .de(de_GetConnectInstanceConfigCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetConnectInstanceConfigRequest; + output: GetConnectInstanceConfigResponse; + }; + sdk: { + input: GetConnectInstanceConfigCommandInput; + output: GetConnectInstanceConfigCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/GetInstanceOnboardingJobStatusCommand.ts b/clients/client-connectcampaignsv2/src/commands/GetInstanceOnboardingJobStatusCommand.ts new file mode 100644 index 000000000000..c85548d730f2 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/GetInstanceOnboardingJobStatusCommand.ts @@ -0,0 +1,117 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetInstanceOnboardingJobStatusRequest, GetInstanceOnboardingJobStatusResponse } from "../models/models_0"; +import { + de_GetInstanceOnboardingJobStatusCommand, + se_GetInstanceOnboardingJobStatusCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetInstanceOnboardingJobStatusCommand}. + */ +export interface GetInstanceOnboardingJobStatusCommandInput extends GetInstanceOnboardingJobStatusRequest {} +/** + * @public + * + * The output of {@link GetInstanceOnboardingJobStatusCommand}. + */ +export interface GetInstanceOnboardingJobStatusCommandOutput + extends GetInstanceOnboardingJobStatusResponse, + __MetadataBearer {} + +/** + * Get the specific instance onboarding job status. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, GetInstanceOnboardingJobStatusCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, GetInstanceOnboardingJobStatusCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // GetInstanceOnboardingJobStatusRequest + * connectInstanceId: "STRING_VALUE", // required + * }; + * const command = new GetInstanceOnboardingJobStatusCommand(input); + * const response = await client.send(command); + * // { // GetInstanceOnboardingJobStatusResponse + * // connectInstanceOnboardingJobStatus: { // InstanceOnboardingJobStatus + * // connectInstanceId: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // failureCode: "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param GetInstanceOnboardingJobStatusCommandInput - {@link GetInstanceOnboardingJobStatusCommandInput} + * @returns {@link GetInstanceOnboardingJobStatusCommandOutput} + * @see {@link GetInstanceOnboardingJobStatusCommandInput} for command's `input` shape. + * @see {@link GetInstanceOnboardingJobStatusCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class GetInstanceOnboardingJobStatusCommand extends $Command + .classBuilder< + GetInstanceOnboardingJobStatusCommandInput, + GetInstanceOnboardingJobStatusCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "GetInstanceOnboardingJobStatus", {}) + .n("ConnectCampaignsV2Client", "GetInstanceOnboardingJobStatusCommand") + .f(void 0, void 0) + .ser(se_GetInstanceOnboardingJobStatusCommand) + .de(de_GetInstanceOnboardingJobStatusCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetInstanceOnboardingJobStatusRequest; + output: GetInstanceOnboardingJobStatusResponse; + }; + sdk: { + input: GetInstanceOnboardingJobStatusCommandInput; + output: GetInstanceOnboardingJobStatusCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/ListCampaignsCommand.ts b/clients/client-connectcampaignsv2/src/commands/ListCampaignsCommand.ts new file mode 100644 index 000000000000..999a2e7ce34a --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/ListCampaignsCommand.ts @@ -0,0 +1,129 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListCampaignsRequest, ListCampaignsResponse } from "../models/models_0"; +import { de_ListCampaignsCommand, se_ListCampaignsCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListCampaignsCommand}. + */ +export interface ListCampaignsCommandInput extends ListCampaignsRequest {} +/** + * @public + * + * The output of {@link ListCampaignsCommand}. + */ +export interface ListCampaignsCommandOutput extends ListCampaignsResponse, __MetadataBearer {} + +/** + * Provides summary information about the campaigns under the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, ListCampaignsCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, ListCampaignsCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // ListCampaignsRequest + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * filters: { // CampaignFilters + * instanceIdFilter: { // InstanceIdFilter + * value: "STRING_VALUE", // required + * operator: "STRING_VALUE", // required + * }, + * }, + * }; + * const command = new ListCampaignsCommand(input); + * const response = await client.send(command); + * // { // ListCampaignsResponse + * // nextToken: "STRING_VALUE", + * // campaignSummaryList: [ // CampaignSummaryList + * // { // CampaignSummary + * // id: "STRING_VALUE", // required + * // arn: "STRING_VALUE", // required + * // name: "STRING_VALUE", // required + * // connectInstanceId: "STRING_VALUE", // required + * // channelSubtypes: [ // ChannelSubtypeList // required + * // "STRING_VALUE", + * // ], + * // schedule: { // Schedule + * // startTime: new Date("TIMESTAMP"), // required + * // endTime: new Date("TIMESTAMP"), // required + * // refreshFrequency: "STRING_VALUE", + * // }, + * // connectCampaignFlowArn: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListCampaignsCommandInput - {@link ListCampaignsCommandInput} + * @returns {@link ListCampaignsCommandOutput} + * @see {@link ListCampaignsCommandInput} for command's `input` shape. + * @see {@link ListCampaignsCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class ListCampaignsCommand extends $Command + .classBuilder< + ListCampaignsCommandInput, + ListCampaignsCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "ListCampaigns", {}) + .n("ConnectCampaignsV2Client", "ListCampaignsCommand") + .f(void 0, void 0) + .ser(se_ListCampaignsCommand) + .de(de_ListCampaignsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListCampaignsRequest; + output: ListCampaignsResponse; + }; + sdk: { + input: ListCampaignsCommandInput; + output: ListCampaignsCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/ListConnectInstanceIntegrationsCommand.ts b/clients/client-connectcampaignsv2/src/commands/ListConnectInstanceIntegrationsCommand.ts new file mode 100644 index 000000000000..d1a5848bac8e --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/ListConnectInstanceIntegrationsCommand.ts @@ -0,0 +1,131 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListConnectInstanceIntegrationsRequest, ListConnectInstanceIntegrationsResponse } from "../models/models_0"; +import { + de_ListConnectInstanceIntegrationsCommand, + se_ListConnectInstanceIntegrationsCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListConnectInstanceIntegrationsCommand}. + */ +export interface ListConnectInstanceIntegrationsCommandInput extends ListConnectInstanceIntegrationsRequest {} +/** + * @public + * + * The output of {@link ListConnectInstanceIntegrationsCommand}. + */ +export interface ListConnectInstanceIntegrationsCommandOutput + extends ListConnectInstanceIntegrationsResponse, + __MetadataBearer {} + +/** + * Provides summary information about the integration under the specified Connect instance. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, ListConnectInstanceIntegrationsCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, ListConnectInstanceIntegrationsCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // ListConnectInstanceIntegrationsRequest + * connectInstanceId: "STRING_VALUE", // required + * maxResults: Number("int"), + * nextToken: "STRING_VALUE", + * }; + * const command = new ListConnectInstanceIntegrationsCommand(input); + * const response = await client.send(command); + * // { // ListConnectInstanceIntegrationsResponse + * // nextToken: "STRING_VALUE", + * // integrationSummaryList: [ // IntegrationSummaryList + * // { // IntegrationSummary Union: only one key present + * // customerProfiles: { // CustomerProfilesIntegrationSummary + * // domainArn: "STRING_VALUE", // required + * // objectTypeNames: { // ObjectTypeNamesMap // required + * // "": "STRING_VALUE", + * // }, + * // }, + * // qConnect: { // QConnectIntegrationSummary + * // knowledgeBaseArn: "STRING_VALUE", // required + * // }, + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListConnectInstanceIntegrationsCommandInput - {@link ListConnectInstanceIntegrationsCommandInput} + * @returns {@link ListConnectInstanceIntegrationsCommandOutput} + * @see {@link ListConnectInstanceIntegrationsCommandInput} for command's `input` shape. + * @see {@link ListConnectInstanceIntegrationsCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class ListConnectInstanceIntegrationsCommand extends $Command + .classBuilder< + ListConnectInstanceIntegrationsCommandInput, + ListConnectInstanceIntegrationsCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "ListConnectInstanceIntegrations", {}) + .n("ConnectCampaignsV2Client", "ListConnectInstanceIntegrationsCommand") + .f(void 0, void 0) + .ser(se_ListConnectInstanceIntegrationsCommand) + .de(de_ListConnectInstanceIntegrationsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListConnectInstanceIntegrationsRequest; + output: ListConnectInstanceIntegrationsResponse; + }; + sdk: { + input: ListConnectInstanceIntegrationsCommandInput; + output: ListConnectInstanceIntegrationsCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/ListTagsForResourceCommand.ts b/clients/client-connectcampaignsv2/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..7e2d01eaafd4 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,113 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + * List tags for a resource. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, ListTagsForResourceCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, ListTagsForResourceCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // ListTagsForResourceRequest + * arn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // tags: { // TagMap + * // "": "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class ListTagsForResourceCommand extends $Command + .classBuilder< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "ListTagsForResource", {}) + .n("ConnectCampaignsV2Client", "ListTagsForResourceCommand") + .f(void 0, void 0) + .ser(se_ListTagsForResourceCommand) + .de(de_ListTagsForResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ListTagsForResourceRequest; + output: ListTagsForResourceResponse; + }; + sdk: { + input: ListTagsForResourceCommandInput; + output: ListTagsForResourceCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/PauseCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/PauseCampaignCommand.ts new file mode 100644 index 000000000000..a37db97392ed --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/PauseCampaignCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { PauseCampaignRequest } from "../models/models_0"; +import { de_PauseCampaignCommand, se_PauseCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PauseCampaignCommand}. + */ +export interface PauseCampaignCommandInput extends PauseCampaignRequest {} +/** + * @public + * + * The output of {@link PauseCampaignCommand}. + */ +export interface PauseCampaignCommandOutput extends __MetadataBearer {} + +/** + * Pauses a campaign for the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, PauseCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, PauseCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // PauseCampaignRequest + * id: "STRING_VALUE", // required + * }; + * const command = new PauseCampaignCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param PauseCampaignCommandInput - {@link PauseCampaignCommandInput} + * @returns {@link PauseCampaignCommandOutput} + * @see {@link PauseCampaignCommandInput} for command's `input` shape. + * @see {@link PauseCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class PauseCampaignCommand extends $Command + .classBuilder< + PauseCampaignCommandInput, + PauseCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "PauseCampaign", {}) + .n("ConnectCampaignsV2Client", "PauseCampaignCommand") + .f(void 0, void 0) + .ser(se_PauseCampaignCommand) + .de(de_PauseCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PauseCampaignRequest; + output: {}; + }; + sdk: { + input: PauseCampaignCommandInput; + output: PauseCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/PutConnectInstanceIntegrationCommand.ts b/clients/client-connectcampaignsv2/src/commands/PutConnectInstanceIntegrationCommand.ts new file mode 100644 index 000000000000..329873c0261f --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/PutConnectInstanceIntegrationCommand.ts @@ -0,0 +1,126 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { PutConnectInstanceIntegrationRequest } from "../models/models_0"; +import { + de_PutConnectInstanceIntegrationCommand, + se_PutConnectInstanceIntegrationCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutConnectInstanceIntegrationCommand}. + */ +export interface PutConnectInstanceIntegrationCommandInput extends PutConnectInstanceIntegrationRequest {} +/** + * @public + * + * The output of {@link PutConnectInstanceIntegrationCommand}. + */ +export interface PutConnectInstanceIntegrationCommandOutput extends __MetadataBearer {} + +/** + * Put or update the integration for the specified Amazon Connect instance. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, PutConnectInstanceIntegrationCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, PutConnectInstanceIntegrationCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // PutConnectInstanceIntegrationRequest + * connectInstanceId: "STRING_VALUE", // required + * integrationConfig: { // IntegrationConfig Union: only one key present + * customerProfiles: { // CustomerProfilesIntegrationConfig + * domainArn: "STRING_VALUE", // required + * objectTypeNames: { // ObjectTypeNamesMap // required + * "": "STRING_VALUE", + * }, + * }, + * qConnect: { // QConnectIntegrationConfig + * knowledgeBaseArn: "STRING_VALUE", // required + * }, + * }, + * }; + * const command = new PutConnectInstanceIntegrationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param PutConnectInstanceIntegrationCommandInput - {@link PutConnectInstanceIntegrationCommandInput} + * @returns {@link PutConnectInstanceIntegrationCommandOutput} + * @see {@link PutConnectInstanceIntegrationCommandInput} for command's `input` shape. + * @see {@link PutConnectInstanceIntegrationCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class PutConnectInstanceIntegrationCommand extends $Command + .classBuilder< + PutConnectInstanceIntegrationCommandInput, + PutConnectInstanceIntegrationCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "PutConnectInstanceIntegration", {}) + .n("ConnectCampaignsV2Client", "PutConnectInstanceIntegrationCommand") + .f(void 0, void 0) + .ser(se_PutConnectInstanceIntegrationCommand) + .de(de_PutConnectInstanceIntegrationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutConnectInstanceIntegrationRequest; + output: {}; + }; + sdk: { + input: PutConnectInstanceIntegrationCommandInput; + output: PutConnectInstanceIntegrationCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/PutOutboundRequestBatchCommand.ts b/clients/client-connectcampaignsv2/src/commands/PutOutboundRequestBatchCommand.ts new file mode 100644 index 000000000000..68fab94520e4 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/PutOutboundRequestBatchCommand.ts @@ -0,0 +1,168 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + PutOutboundRequestBatchRequest, + PutOutboundRequestBatchRequestFilterSensitiveLog, + PutOutboundRequestBatchResponse, +} from "../models/models_0"; +import { de_PutOutboundRequestBatchCommand, se_PutOutboundRequestBatchCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutOutboundRequestBatchCommand}. + */ +export interface PutOutboundRequestBatchCommandInput extends PutOutboundRequestBatchRequest {} +/** + * @public + * + * The output of {@link PutOutboundRequestBatchCommand}. + */ +export interface PutOutboundRequestBatchCommandOutput extends PutOutboundRequestBatchResponse, __MetadataBearer {} + +/** + * Creates outbound requests for the specified campaign Amazon Connect account. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, PutOutboundRequestBatchCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, PutOutboundRequestBatchCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // PutOutboundRequestBatchRequest + * id: "STRING_VALUE", // required + * outboundRequests: [ // OutboundRequestList // required + * { // OutboundRequest + * clientToken: "STRING_VALUE", // required + * expirationTime: new Date("TIMESTAMP"), // required + * channelSubtypeParameters: { // ChannelSubtypeParameters Union: only one key present + * telephony: { // TelephonyChannelSubtypeParameters + * destinationPhoneNumber: "STRING_VALUE", // required + * attributes: { // Attributes // required + * "": "STRING_VALUE", + * }, + * connectSourcePhoneNumber: "STRING_VALUE", + * answerMachineDetectionConfig: { // AnswerMachineDetectionConfig + * enableAnswerMachineDetection: true || false, // required + * awaitAnswerMachinePrompt: true || false, + * }, + * }, + * sms: { // SmsChannelSubtypeParameters + * destinationPhoneNumber: "STRING_VALUE", // required + * connectSourcePhoneNumberArn: "STRING_VALUE", + * templateArn: "STRING_VALUE", + * templateParameters: { // required + * "": "STRING_VALUE", + * }, + * }, + * email: { // EmailChannelSubtypeParameters + * destinationEmailAddress: "STRING_VALUE", // required + * connectSourceEmailAddress: "STRING_VALUE", + * templateArn: "STRING_VALUE", + * templateParameters: { // required + * "": "STRING_VALUE", + * }, + * }, + * }, + * }, + * ], + * }; + * const command = new PutOutboundRequestBatchCommand(input); + * const response = await client.send(command); + * // { // PutOutboundRequestBatchResponse + * // successfulRequests: [ // SuccessfulRequestList + * // { // SuccessfulRequest + * // clientToken: "STRING_VALUE", + * // id: "STRING_VALUE", + * // }, + * // ], + * // failedRequests: [ // FailedRequestList + * // { // FailedRequest + * // clientToken: "STRING_VALUE", + * // id: "STRING_VALUE", + * // failureCode: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param PutOutboundRequestBatchCommandInput - {@link PutOutboundRequestBatchCommandInput} + * @returns {@link PutOutboundRequestBatchCommandOutput} + * @see {@link PutOutboundRequestBatchCommandInput} for command's `input` shape. + * @see {@link PutOutboundRequestBatchCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class PutOutboundRequestBatchCommand extends $Command + .classBuilder< + PutOutboundRequestBatchCommandInput, + PutOutboundRequestBatchCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "PutOutboundRequestBatch", {}) + .n("ConnectCampaignsV2Client", "PutOutboundRequestBatchCommand") + .f(PutOutboundRequestBatchRequestFilterSensitiveLog, void 0) + .ser(se_PutOutboundRequestBatchCommand) + .de(de_PutOutboundRequestBatchCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutOutboundRequestBatchRequest; + output: PutOutboundRequestBatchResponse; + }; + sdk: { + input: PutOutboundRequestBatchCommandInput; + output: PutOutboundRequestBatchCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/ResumeCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/ResumeCampaignCommand.ts new file mode 100644 index 000000000000..ed86c6e3963a --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/ResumeCampaignCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ResumeCampaignRequest } from "../models/models_0"; +import { de_ResumeCampaignCommand, se_ResumeCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ResumeCampaignCommand}. + */ +export interface ResumeCampaignCommandInput extends ResumeCampaignRequest {} +/** + * @public + * + * The output of {@link ResumeCampaignCommand}. + */ +export interface ResumeCampaignCommandOutput extends __MetadataBearer {} + +/** + * Stops a campaign for the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, ResumeCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, ResumeCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // ResumeCampaignRequest + * id: "STRING_VALUE", // required + * }; + * const command = new ResumeCampaignCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param ResumeCampaignCommandInput - {@link ResumeCampaignCommandInput} + * @returns {@link ResumeCampaignCommandOutput} + * @see {@link ResumeCampaignCommandInput} for command's `input` shape. + * @see {@link ResumeCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class ResumeCampaignCommand extends $Command + .classBuilder< + ResumeCampaignCommandInput, + ResumeCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "ResumeCampaign", {}) + .n("ConnectCampaignsV2Client", "ResumeCampaignCommand") + .f(void 0, void 0) + .ser(se_ResumeCampaignCommand) + .de(de_ResumeCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: ResumeCampaignRequest; + output: {}; + }; + sdk: { + input: ResumeCampaignCommandInput; + output: ResumeCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/StartCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/StartCampaignCommand.ts new file mode 100644 index 000000000000..e2bed24490ee --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/StartCampaignCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { StartCampaignRequest } from "../models/models_0"; +import { de_StartCampaignCommand, se_StartCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link StartCampaignCommand}. + */ +export interface StartCampaignCommandInput extends StartCampaignRequest {} +/** + * @public + * + * The output of {@link StartCampaignCommand}. + */ +export interface StartCampaignCommandOutput extends __MetadataBearer {} + +/** + * Starts a campaign for the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, StartCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, StartCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // StartCampaignRequest + * id: "STRING_VALUE", // required + * }; + * const command = new StartCampaignCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param StartCampaignCommandInput - {@link StartCampaignCommandInput} + * @returns {@link StartCampaignCommandOutput} + * @see {@link StartCampaignCommandInput} for command's `input` shape. + * @see {@link StartCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class StartCampaignCommand extends $Command + .classBuilder< + StartCampaignCommandInput, + StartCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "StartCampaign", {}) + .n("ConnectCampaignsV2Client", "StartCampaignCommand") + .f(void 0, void 0) + .ser(se_StartCampaignCommand) + .de(de_StartCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: StartCampaignRequest; + output: {}; + }; + sdk: { + input: StartCampaignCommandInput; + output: StartCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/StartInstanceOnboardingJobCommand.ts b/clients/client-connectcampaignsv2/src/commands/StartInstanceOnboardingJobCommand.ts new file mode 100644 index 000000000000..a7e3b863a256 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/StartInstanceOnboardingJobCommand.ts @@ -0,0 +1,123 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { StartInstanceOnboardingJobRequest, StartInstanceOnboardingJobResponse } from "../models/models_0"; +import { de_StartInstanceOnboardingJobCommand, se_StartInstanceOnboardingJobCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link StartInstanceOnboardingJobCommand}. + */ +export interface StartInstanceOnboardingJobCommandInput extends StartInstanceOnboardingJobRequest {} +/** + * @public + * + * The output of {@link StartInstanceOnboardingJobCommand}. + */ +export interface StartInstanceOnboardingJobCommandOutput extends StartInstanceOnboardingJobResponse, __MetadataBearer {} + +/** + * Onboard the specific Amazon Connect instance to Connect Campaigns. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, StartInstanceOnboardingJobCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, StartInstanceOnboardingJobCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // StartInstanceOnboardingJobRequest + * connectInstanceId: "STRING_VALUE", // required + * encryptionConfig: { // EncryptionConfig + * enabled: true || false, // required + * encryptionType: "STRING_VALUE", + * keyArn: "STRING_VALUE", + * }, + * }; + * const command = new StartInstanceOnboardingJobCommand(input); + * const response = await client.send(command); + * // { // StartInstanceOnboardingJobResponse + * // connectInstanceOnboardingJobStatus: { // InstanceOnboardingJobStatus + * // connectInstanceId: "STRING_VALUE", // required + * // status: "STRING_VALUE", // required + * // failureCode: "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param StartInstanceOnboardingJobCommandInput - {@link StartInstanceOnboardingJobCommandInput} + * @returns {@link StartInstanceOnboardingJobCommandOutput} + * @see {@link StartInstanceOnboardingJobCommandInput} for command's `input` shape. + * @see {@link StartInstanceOnboardingJobCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class StartInstanceOnboardingJobCommand extends $Command + .classBuilder< + StartInstanceOnboardingJobCommandInput, + StartInstanceOnboardingJobCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "StartInstanceOnboardingJob", {}) + .n("ConnectCampaignsV2Client", "StartInstanceOnboardingJobCommand") + .f(void 0, void 0) + .ser(se_StartInstanceOnboardingJobCommand) + .de(de_StartInstanceOnboardingJobCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: StartInstanceOnboardingJobRequest; + output: StartInstanceOnboardingJobResponse; + }; + sdk: { + input: StartInstanceOnboardingJobCommandInput; + output: StartInstanceOnboardingJobCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/StopCampaignCommand.ts b/clients/client-connectcampaignsv2/src/commands/StopCampaignCommand.ts new file mode 100644 index 000000000000..1cd885e481de --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/StopCampaignCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { StopCampaignRequest } from "../models/models_0"; +import { de_StopCampaignCommand, se_StopCampaignCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link StopCampaignCommand}. + */ +export interface StopCampaignCommandInput extends StopCampaignRequest {} +/** + * @public + * + * The output of {@link StopCampaignCommand}. + */ +export interface StopCampaignCommandOutput extends __MetadataBearer {} + +/** + * Stops a campaign for the specified Amazon Connect account. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, StopCampaignCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, StopCampaignCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // StopCampaignRequest + * id: "STRING_VALUE", // required + * }; + * const command = new StopCampaignCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param StopCampaignCommandInput - {@link StopCampaignCommandInput} + * @returns {@link StopCampaignCommandOutput} + * @see {@link StopCampaignCommandInput} for command's `input` shape. + * @see {@link StopCampaignCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class StopCampaignCommand extends $Command + .classBuilder< + StopCampaignCommandInput, + StopCampaignCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "StopCampaign", {}) + .n("ConnectCampaignsV2Client", "StopCampaignCommand") + .f(void 0, void 0) + .ser(se_StopCampaignCommand) + .de(de_StopCampaignCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: StopCampaignRequest; + output: {}; + }; + sdk: { + input: StopCampaignCommandInput; + output: StopCampaignCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/TagResourceCommand.ts b/clients/client-connectcampaignsv2/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..beecfc347a37 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/TagResourceCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { TagResourceRequest } from "../models/models_0"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends __MetadataBearer {} + +/** + * Tag a resource. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, TagResourceCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, TagResourceCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // TagResourceRequest + * arn: "STRING_VALUE", // required + * tags: { // TagMap // required + * "": "STRING_VALUE", + * }, + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class TagResourceCommand extends $Command + .classBuilder< + TagResourceCommandInput, + TagResourceCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "TagResource", {}) + .n("ConnectCampaignsV2Client", "TagResourceCommand") + .f(void 0, void 0) + .ser(se_TagResourceCommand) + .de(de_TagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: TagResourceRequest; + output: {}; + }; + sdk: { + input: TagResourceCommandInput; + output: TagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UntagResourceCommand.ts b/clients/client-connectcampaignsv2/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..f9d5f4955fc1 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UntagResourceCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UntagResourceRequest } from "../models/models_0"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends __MetadataBearer {} + +/** + * Untag a resource. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UntagResourceCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UntagResourceCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UntagResourceRequest + * arn: "STRING_VALUE", // required + * tagKeys: [ // TagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ThrottlingException} (client fault) + * The request was denied due to request throttling. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UntagResourceCommand extends $Command + .classBuilder< + UntagResourceCommandInput, + UntagResourceCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UntagResource", {}) + .n("ConnectCampaignsV2Client", "UntagResourceCommand") + .f(void 0, void 0) + .ser(se_UntagResourceCommand) + .de(de_UntagResourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UntagResourceRequest; + output: {}; + }; + sdk: { + input: UntagResourceCommandInput; + output: UntagResourceCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignChannelSubtypeConfigCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignChannelSubtypeConfigCommand.ts new file mode 100644 index 000000000000..69f24723ed49 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignChannelSubtypeConfigCommand.ts @@ -0,0 +1,159 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { + UpdateCampaignChannelSubtypeConfigRequest, + UpdateCampaignChannelSubtypeConfigRequestFilterSensitiveLog, +} from "../models/models_0"; +import { + de_UpdateCampaignChannelSubtypeConfigCommand, + se_UpdateCampaignChannelSubtypeConfigCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignChannelSubtypeConfigCommand}. + */ +export interface UpdateCampaignChannelSubtypeConfigCommandInput extends UpdateCampaignChannelSubtypeConfigRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignChannelSubtypeConfigCommand}. + */ +export interface UpdateCampaignChannelSubtypeConfigCommandOutput extends __MetadataBearer {} + +/** + * Updates the channel subtype config of a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignChannelSubtypeConfigCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignChannelSubtypeConfigCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignChannelSubtypeConfigRequest + * id: "STRING_VALUE", // required + * channelSubtypeConfig: { // ChannelSubtypeConfig + * telephony: { // TelephonyChannelSubtypeConfig + * capacity: Number("double"), + * connectQueueId: "STRING_VALUE", + * outboundMode: { // TelephonyOutboundMode Union: only one key present + * progressive: { // ProgressiveConfig + * bandwidthAllocation: Number("double"), // required + * }, + * predictive: { // PredictiveConfig + * bandwidthAllocation: Number("double"), // required + * }, + * agentless: {}, + * }, + * defaultOutboundConfig: { // TelephonyOutboundConfig + * connectContactFlowId: "STRING_VALUE", // required + * connectSourcePhoneNumber: "STRING_VALUE", + * answerMachineDetectionConfig: { // AnswerMachineDetectionConfig + * enableAnswerMachineDetection: true || false, // required + * awaitAnswerMachinePrompt: true || false, + * }, + * }, + * }, + * sms: { // SmsChannelSubtypeConfig + * capacity: Number("double"), + * outboundMode: { // SmsOutboundMode Union: only one key present + * agentless: {}, + * }, + * defaultOutboundConfig: { // SmsOutboundConfig + * connectSourcePhoneNumberArn: "STRING_VALUE", // required + * wisdomTemplateArn: "STRING_VALUE", // required + * }, + * }, + * email: { // EmailChannelSubtypeConfig + * capacity: Number("double"), + * outboundMode: { // EmailOutboundMode Union: only one key present + * agentless: {}, + * }, + * defaultOutboundConfig: { // EmailOutboundConfig + * connectSourceEmailAddress: "STRING_VALUE", // required + * sourceEmailAddressDisplayName: "STRING_VALUE", + * wisdomTemplateArn: "STRING_VALUE", // required + * }, + * }, + * }, + * }; + * const command = new UpdateCampaignChannelSubtypeConfigCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignChannelSubtypeConfigCommandInput - {@link UpdateCampaignChannelSubtypeConfigCommandInput} + * @returns {@link UpdateCampaignChannelSubtypeConfigCommandOutput} + * @see {@link UpdateCampaignChannelSubtypeConfigCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignChannelSubtypeConfigCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignChannelSubtypeConfigCommand extends $Command + .classBuilder< + UpdateCampaignChannelSubtypeConfigCommandInput, + UpdateCampaignChannelSubtypeConfigCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignChannelSubtypeConfig", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignChannelSubtypeConfigCommand") + .f(UpdateCampaignChannelSubtypeConfigRequestFilterSensitiveLog, void 0) + .ser(se_UpdateCampaignChannelSubtypeConfigCommand) + .de(de_UpdateCampaignChannelSubtypeConfigCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignChannelSubtypeConfigRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignChannelSubtypeConfigCommandInput; + output: UpdateCampaignChannelSubtypeConfigCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationLimitsCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationLimitsCommand.ts new file mode 100644 index 000000000000..1ecf5f07e401 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationLimitsCommand.ts @@ -0,0 +1,126 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateCampaignCommunicationLimitsRequest } from "../models/models_0"; +import { + de_UpdateCampaignCommunicationLimitsCommand, + se_UpdateCampaignCommunicationLimitsCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignCommunicationLimitsCommand}. + */ +export interface UpdateCampaignCommunicationLimitsCommandInput extends UpdateCampaignCommunicationLimitsRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignCommunicationLimitsCommand}. + */ +export interface UpdateCampaignCommunicationLimitsCommandOutput extends __MetadataBearer {} + +/** + * Updates the communication limits config for a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignCommunicationLimitsCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignCommunicationLimitsCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignCommunicationLimitsRequest + * id: "STRING_VALUE", // required + * communicationLimitsOverride: { // CommunicationLimitsConfig + * allChannelSubtypes: { // CommunicationLimits Union: only one key present + * communicationLimitsList: [ // CommunicationLimitList + * { // CommunicationLimit + * maxCountPerRecipient: Number("int"), // required + * frequency: Number("int"), // required + * unit: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * }; + * const command = new UpdateCampaignCommunicationLimitsCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignCommunicationLimitsCommandInput - {@link UpdateCampaignCommunicationLimitsCommandInput} + * @returns {@link UpdateCampaignCommunicationLimitsCommandOutput} + * @see {@link UpdateCampaignCommunicationLimitsCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignCommunicationLimitsCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignCommunicationLimitsCommand extends $Command + .classBuilder< + UpdateCampaignCommunicationLimitsCommandInput, + UpdateCampaignCommunicationLimitsCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignCommunicationLimits", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignCommunicationLimitsCommand") + .f(void 0, void 0) + .ser(se_UpdateCampaignCommunicationLimitsCommand) + .de(de_UpdateCampaignCommunicationLimitsCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignCommunicationLimitsRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignCommunicationLimitsCommandInput; + output: UpdateCampaignCommunicationLimitsCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationTimeCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationTimeCommand.ts new file mode 100644 index 000000000000..a97aa100c95e --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignCommunicationTimeCommand.ts @@ -0,0 +1,186 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateCampaignCommunicationTimeRequest } from "../models/models_0"; +import { + de_UpdateCampaignCommunicationTimeCommand, + se_UpdateCampaignCommunicationTimeCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignCommunicationTimeCommand}. + */ +export interface UpdateCampaignCommunicationTimeCommandInput extends UpdateCampaignCommunicationTimeRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignCommunicationTimeCommand}. + */ +export interface UpdateCampaignCommunicationTimeCommandOutput extends __MetadataBearer {} + +/** + * Updates the communication time config for a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignCommunicationTimeCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignCommunicationTimeCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignCommunicationTimeRequest + * id: "STRING_VALUE", // required + * communicationTimeConfig: { // CommunicationTimeConfig + * localTimeZoneConfig: { // LocalTimeZoneConfig + * defaultTimeZone: "STRING_VALUE", + * localTimeZoneDetection: [ // LocalTimeZoneDetection + * "STRING_VALUE", + * ], + * }, + * telephony: { // TimeWindow + * openHours: { // OpenHours Union: only one key present + * dailyHours: { // DailyHours + * "": [ // TimeRangeList + * { // TimeRange + * startTime: "STRING_VALUE", // required + * endTime: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * restrictedPeriods: { // RestrictedPeriods Union: only one key present + * restrictedPeriodList: [ // RestrictedPeriodList + * { // RestrictedPeriod + * name: "STRING_VALUE", + * startDate: "STRING_VALUE", // required + * endDate: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * sms: { + * openHours: {// Union: only one key present + * dailyHours: { + * "": [ + * { + * startTime: "STRING_VALUE", // required + * endTime: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * restrictedPeriods: {// Union: only one key present + * restrictedPeriodList: [ + * { + * name: "STRING_VALUE", + * startDate: "STRING_VALUE", // required + * endDate: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * email: { + * openHours: {// Union: only one key present + * dailyHours: { + * "": [ + * { + * startTime: "STRING_VALUE", // required + * endTime: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * restrictedPeriods: {// Union: only one key present + * restrictedPeriodList: [ + * { + * name: "STRING_VALUE", + * startDate: "STRING_VALUE", // required + * endDate: "STRING_VALUE", // required + * }, + * ], + * }, + * }, + * }, + * }; + * const command = new UpdateCampaignCommunicationTimeCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignCommunicationTimeCommandInput - {@link UpdateCampaignCommunicationTimeCommandInput} + * @returns {@link UpdateCampaignCommunicationTimeCommandOutput} + * @see {@link UpdateCampaignCommunicationTimeCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignCommunicationTimeCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignCommunicationTimeCommand extends $Command + .classBuilder< + UpdateCampaignCommunicationTimeCommandInput, + UpdateCampaignCommunicationTimeCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignCommunicationTime", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignCommunicationTimeCommand") + .f(void 0, void 0) + .ser(se_UpdateCampaignCommunicationTimeCommand) + .de(de_UpdateCampaignCommunicationTimeCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignCommunicationTimeRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignCommunicationTimeCommandInput; + output: UpdateCampaignCommunicationTimeCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignFlowAssociationCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignFlowAssociationCommand.ts new file mode 100644 index 000000000000..d67d2a8995a1 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignFlowAssociationCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateCampaignFlowAssociationRequest } from "../models/models_0"; +import { + de_UpdateCampaignFlowAssociationCommand, + se_UpdateCampaignFlowAssociationCommand, +} from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignFlowAssociationCommand}. + */ +export interface UpdateCampaignFlowAssociationCommandInput extends UpdateCampaignFlowAssociationRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignFlowAssociationCommand}. + */ +export interface UpdateCampaignFlowAssociationCommandOutput extends __MetadataBearer {} + +/** + * Updates the campaign flow associated with a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignFlowAssociationCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignFlowAssociationCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignFlowAssociationRequest + * id: "STRING_VALUE", // required + * connectCampaignFlowArn: "STRING_VALUE", // required + * }; + * const command = new UpdateCampaignFlowAssociationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignFlowAssociationCommandInput - {@link UpdateCampaignFlowAssociationCommandInput} + * @returns {@link UpdateCampaignFlowAssociationCommandOutput} + * @see {@link UpdateCampaignFlowAssociationCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignFlowAssociationCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignFlowAssociationCommand extends $Command + .classBuilder< + UpdateCampaignFlowAssociationCommandInput, + UpdateCampaignFlowAssociationCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignFlowAssociation", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignFlowAssociationCommand") + .f(void 0, void 0) + .ser(se_UpdateCampaignFlowAssociationCommand) + .de(de_UpdateCampaignFlowAssociationCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignFlowAssociationRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignFlowAssociationCommandInput; + output: UpdateCampaignFlowAssociationCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignNameCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignNameCommand.ts new file mode 100644 index 000000000000..82301d4d8b09 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignNameCommand.ts @@ -0,0 +1,110 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateCampaignNameRequest } from "../models/models_0"; +import { de_UpdateCampaignNameCommand, se_UpdateCampaignNameCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignNameCommand}. + */ +export interface UpdateCampaignNameCommandInput extends UpdateCampaignNameRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignNameCommand}. + */ +export interface UpdateCampaignNameCommandOutput extends __MetadataBearer {} + +/** + * Updates the name of a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignNameCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignNameCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignNameRequest + * id: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * }; + * const command = new UpdateCampaignNameCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignNameCommandInput - {@link UpdateCampaignNameCommandInput} + * @returns {@link UpdateCampaignNameCommandOutput} + * @see {@link UpdateCampaignNameCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignNameCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignNameCommand extends $Command + .classBuilder< + UpdateCampaignNameCommandInput, + UpdateCampaignNameCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignName", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignNameCommand") + .f(void 0, void 0) + .ser(se_UpdateCampaignNameCommand) + .de(de_UpdateCampaignNameCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignNameRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignNameCommandInput; + output: UpdateCampaignNameCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignScheduleCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignScheduleCommand.ts new file mode 100644 index 000000000000..af1eea953509 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignScheduleCommand.ts @@ -0,0 +1,117 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateCampaignScheduleRequest } from "../models/models_0"; +import { de_UpdateCampaignScheduleCommand, se_UpdateCampaignScheduleCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignScheduleCommand}. + */ +export interface UpdateCampaignScheduleCommandInput extends UpdateCampaignScheduleRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignScheduleCommand}. + */ +export interface UpdateCampaignScheduleCommandOutput extends __MetadataBearer {} + +/** + * Updates the schedule for a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignScheduleCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignScheduleCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignScheduleRequest + * id: "STRING_VALUE", // required + * schedule: { // Schedule + * startTime: new Date("TIMESTAMP"), // required + * endTime: new Date("TIMESTAMP"), // required + * refreshFrequency: "STRING_VALUE", + * }, + * }; + * const command = new UpdateCampaignScheduleCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignScheduleCommandInput - {@link UpdateCampaignScheduleCommandInput} + * @returns {@link UpdateCampaignScheduleCommandOutput} + * @see {@link UpdateCampaignScheduleCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignScheduleCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignScheduleCommand extends $Command + .classBuilder< + UpdateCampaignScheduleCommandInput, + UpdateCampaignScheduleCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignSchedule", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignScheduleCommand") + .f(void 0, void 0) + .ser(se_UpdateCampaignScheduleCommand) + .de(de_UpdateCampaignScheduleCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignScheduleRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignScheduleCommandInput; + output: UpdateCampaignScheduleCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/UpdateCampaignSourceCommand.ts b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignSourceCommand.ts new file mode 100644 index 000000000000..15cf8b6efce4 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/UpdateCampaignSourceCommand.ts @@ -0,0 +1,115 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ConnectCampaignsV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { UpdateCampaignSourceRequest } from "../models/models_0"; +import { de_UpdateCampaignSourceCommand, se_UpdateCampaignSourceCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link UpdateCampaignSourceCommand}. + */ +export interface UpdateCampaignSourceCommandInput extends UpdateCampaignSourceRequest {} +/** + * @public + * + * The output of {@link UpdateCampaignSourceCommand}. + */ +export interface UpdateCampaignSourceCommandOutput extends __MetadataBearer {} + +/** + * Updates the campaign source with a campaign. This API is idempotent. + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ConnectCampaignsV2Client, UpdateCampaignSourceCommand } from "@aws-sdk/client-connectcampaignsv2"; // ES Modules import + * // const { ConnectCampaignsV2Client, UpdateCampaignSourceCommand } = require("@aws-sdk/client-connectcampaignsv2"); // CommonJS import + * const client = new ConnectCampaignsV2Client(config); + * const input = { // UpdateCampaignSourceRequest + * id: "STRING_VALUE", // required + * source: { // Source Union: only one key present + * customerProfilesSegmentArn: "STRING_VALUE", + * }, + * }; + * const command = new UpdateCampaignSourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UpdateCampaignSourceCommandInput - {@link UpdateCampaignSourceCommandInput} + * @returns {@link UpdateCampaignSourceCommandOutput} + * @see {@link UpdateCampaignSourceCommandInput} for command's `input` shape. + * @see {@link UpdateCampaignSourceCommandOutput} for command's `response` shape. + * @see {@link ConnectCampaignsV2ClientResolvedConfig | config} for ConnectCampaignsV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + * You do not have sufficient access to perform this action. + * + * @throws {@link ConflictException} (client fault) + * The request could not be processed because of conflict in the current state of the resource. + * + * @throws {@link InternalServerException} (server fault) + * Request processing failed because of an error or failure with the service. + * + * @throws {@link InvalidCampaignStateException} (client fault) + * The request could not be processed because of conflict in the current state of the campaign. + * + * @throws {@link ResourceNotFoundException} (client fault) + * The specified resource was not found. + * + * @throws {@link ValidationException} (client fault) + * The input fails to satisfy the constraints specified by an AWS service. + * + * @throws {@link ConnectCampaignsV2ServiceException} + *

Base exception class for all service exceptions from ConnectCampaignsV2 service.

+ * + * @public + */ +export class UpdateCampaignSourceCommand extends $Command + .classBuilder< + UpdateCampaignSourceCommandInput, + UpdateCampaignSourceCommandOutput, + ConnectCampaignsV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: ConnectCampaignsV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("AmazonConnectCampaignServiceV2", "UpdateCampaignSource", {}) + .n("ConnectCampaignsV2Client", "UpdateCampaignSourceCommand") + .f(void 0, void 0) + .ser(se_UpdateCampaignSourceCommand) + .de(de_UpdateCampaignSourceCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: UpdateCampaignSourceRequest; + output: {}; + }; + sdk: { + input: UpdateCampaignSourceCommandInput; + output: UpdateCampaignSourceCommandOutput; + }; + }; +} diff --git a/clients/client-connectcampaignsv2/src/commands/index.ts b/clients/client-connectcampaignsv2/src/commands/index.ts new file mode 100644 index 000000000000..157dbb049505 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/commands/index.ts @@ -0,0 +1,33 @@ +// smithy-typescript generated code +export * from "./CreateCampaignCommand"; +export * from "./DeleteCampaignChannelSubtypeConfigCommand"; +export * from "./DeleteCampaignCommand"; +export * from "./DeleteCampaignCommunicationLimitsCommand"; +export * from "./DeleteCampaignCommunicationTimeCommand"; +export * from "./DeleteConnectInstanceConfigCommand"; +export * from "./DeleteConnectInstanceIntegrationCommand"; +export * from "./DeleteInstanceOnboardingJobCommand"; +export * from "./DescribeCampaignCommand"; +export * from "./GetCampaignStateBatchCommand"; +export * from "./GetCampaignStateCommand"; +export * from "./GetConnectInstanceConfigCommand"; +export * from "./GetInstanceOnboardingJobStatusCommand"; +export * from "./ListCampaignsCommand"; +export * from "./ListConnectInstanceIntegrationsCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./PauseCampaignCommand"; +export * from "./PutConnectInstanceIntegrationCommand"; +export * from "./PutOutboundRequestBatchCommand"; +export * from "./ResumeCampaignCommand"; +export * from "./StartCampaignCommand"; +export * from "./StartInstanceOnboardingJobCommand"; +export * from "./StopCampaignCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; +export * from "./UpdateCampaignChannelSubtypeConfigCommand"; +export * from "./UpdateCampaignCommunicationLimitsCommand"; +export * from "./UpdateCampaignCommunicationTimeCommand"; +export * from "./UpdateCampaignFlowAssociationCommand"; +export * from "./UpdateCampaignNameCommand"; +export * from "./UpdateCampaignScheduleCommand"; +export * from "./UpdateCampaignSourceCommand"; diff --git a/clients/client-connectcampaignsv2/src/endpoint/EndpointParameters.ts b/clients/client-connectcampaignsv2/src/endpoint/EndpointParameters.ts new file mode 100644 index 000000000000..eedf03d60853 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/endpoint/EndpointParameters.ts @@ -0,0 +1,41 @@ +// smithy-typescript generated code +import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types"; + +/** + * @public + */ +export interface ClientInputEndpointParameters { + region?: string | Provider; + useDualstackEndpoint?: boolean | Provider; + useFipsEndpoint?: boolean | Provider; + endpoint?: string | Provider | Endpoint | Provider | EndpointV2 | Provider; +} + +export type ClientResolvedEndpointParameters = ClientInputEndpointParameters & { + defaultSigningName: string; +}; + +export const resolveClientEndpointParameters = ( + options: T & ClientInputEndpointParameters +): T & ClientResolvedEndpointParameters => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "connect-campaigns", + }; +}; + +export const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +} as const; + +export interface EndpointParameters extends __EndpointParameters { + Region?: string; + UseDualStack?: boolean; + UseFIPS?: boolean; + Endpoint?: string; +} diff --git a/clients/client-connectcampaignsv2/src/endpoint/endpointResolver.ts b/clients/client-connectcampaignsv2/src/endpoint/endpointResolver.ts new file mode 100644 index 000000000000..ccee107f30d6 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/endpoint/endpointResolver.ts @@ -0,0 +1,26 @@ +// smithy-typescript generated code +import { awsEndpointFunctions } from "@aws-sdk/util-endpoints"; +import { EndpointV2, Logger } from "@smithy/types"; +import { customEndpointFunctions, EndpointCache, EndpointParams, resolveEndpoint } from "@smithy/util-endpoints"; + +import { EndpointParameters } from "./EndpointParameters"; +import { ruleSet } from "./ruleset"; + +const cache = new EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], +}); + +export const defaultEndpointResolver = ( + endpointParams: EndpointParameters, + context: { logger?: Logger } = {} +): EndpointV2 => { + return cache.get(endpointParams as EndpointParams, () => + resolveEndpoint(ruleSet, { + endpointParams: endpointParams as EndpointParams, + logger: context.logger, + }) + ); +}; + +customEndpointFunctions.aws = awsEndpointFunctions; diff --git a/clients/client-connectcampaignsv2/src/endpoint/ruleset.ts b/clients/client-connectcampaignsv2/src/endpoint/ruleset.ts new file mode 100644 index 000000000000..35cfa2b9efc9 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/endpoint/ruleset.ts @@ -0,0 +1,32 @@ +// @ts-nocheck +// generated code, do not edit +import { RuleSetObject } from "@smithy/types"; + +/* This file is compressed. Log this object + or see "smithy.rules#endpointRuleSet" + in codegen/sdk-codegen/aws-models/connectcampaignsv2.json */ + +const s="required", +t="fn", +u="argv", +v="ref"; +const a=true, +b="isSet", +c="booleanEquals", +d="error", +e="endpoint", +f="tree", +g="PartitionResult", +h={[s]:false,"type":"String"}, +i={[s]:true,"default":false,"type":"Boolean"}, +j={[v]:"Endpoint"}, +k={[t]:c,[u]:[{[v]:"UseFIPS"},true]}, +l={[t]:c,[u]:[{[v]:"UseDualStack"},true]}, +m={}, +n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]}, +o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]}, +p=[k], +q=[l], +r=[{[v]:"Region"}]; +const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{rules:[{endpoint:{url:"https://connect-campaigns-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]}; +export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-connectcampaignsv2/src/extensionConfiguration.ts b/clients/client-connectcampaignsv2/src/extensionConfiguration.ts new file mode 100644 index 000000000000..c6768d206f32 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/extensionConfiguration.ts @@ -0,0 +1,15 @@ +// smithy-typescript generated code +import { AwsRegionExtensionConfiguration } from "@aws-sdk/types"; +import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http"; +import { DefaultExtensionConfiguration } from "@smithy/types"; + +import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration"; + +/** + * @internal + */ +export interface ConnectCampaignsV2ExtensionConfiguration + extends HttpHandlerExtensionConfiguration, + DefaultExtensionConfiguration, + AwsRegionExtensionConfiguration, + HttpAuthExtensionConfiguration {} diff --git a/clients/client-connectcampaignsv2/src/index.ts b/clients/client-connectcampaignsv2/src/index.ts new file mode 100644 index 000000000000..c01a07628043 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/index.ts @@ -0,0 +1,17 @@ +// smithy-typescript generated code +/* eslint-disable */ +/** + * Provide APIs to create and manage Amazon Connect Campaigns. + * + * @packageDocumentation + */ +export * from "./ConnectCampaignsV2Client"; +export * from "./ConnectCampaignsV2"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export type { RuntimeExtension } from "./runtimeExtensions"; +export type { ConnectCampaignsV2ExtensionConfiguration } from "./extensionConfiguration"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; + +export { ConnectCampaignsV2ServiceException } from "./models/ConnectCampaignsV2ServiceException"; diff --git a/clients/client-connectcampaignsv2/src/models/ConnectCampaignsV2ServiceException.ts b/clients/client-connectcampaignsv2/src/models/ConnectCampaignsV2ServiceException.ts new file mode 100644 index 000000000000..94e353a4d966 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/models/ConnectCampaignsV2ServiceException.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { + ServiceException as __ServiceException, + ServiceExceptionOptions as __ServiceExceptionOptions, +} from "@smithy/smithy-client"; + +export type { __ServiceExceptionOptions }; + +export { __ServiceException }; + +/** + * @public + * + * Base exception class for all service exceptions from ConnectCampaignsV2 service. + */ +export class ConnectCampaignsV2ServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions) { + super(options); + Object.setPrototypeOf(this, ConnectCampaignsV2ServiceException.prototype); + } +} diff --git a/clients/client-connectcampaignsv2/src/models/index.ts b/clients/client-connectcampaignsv2/src/models/index.ts new file mode 100644 index 000000000000..9eaceb12865f --- /dev/null +++ b/clients/client-connectcampaignsv2/src/models/index.ts @@ -0,0 +1,2 @@ +// smithy-typescript generated code +export * from "./models_0"; diff --git a/clients/client-connectcampaignsv2/src/models/models_0.ts b/clients/client-connectcampaignsv2/src/models/models_0.ts new file mode 100644 index 000000000000..42350fbfb556 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/models/models_0.ts @@ -0,0 +1,2819 @@ +// smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; + +import { ConnectCampaignsV2ServiceException as __BaseException } from "./ConnectCampaignsV2ServiceException"; + +/** + * You do not have sufficient access to perform this action. + * @public + */ +export class AccessDeniedException extends __BaseException { + readonly name: "AccessDeniedException" = "AccessDeniedException"; + readonly $fault: "client" = "client"; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * Agentless config + * @public + */ +export interface AgentlessConfig {} + +/** + * The request could not be processed because of conflict in the current state of the resource. + * @public + */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * Default Email Outbound config + * @public + */ +export interface EmailOutboundConfig { + /** + * Source/Destination Email address used for Email messages + * @public + */ + connectSourceEmailAddress: string | undefined; + + /** + * Display name for Email Address + * @public + */ + sourceEmailAddressDisplayName?: string | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + wisdomTemplateArn: string | undefined; +} + +/** + * Email Outbound Mode + * @public + */ +export type EmailOutboundMode = EmailOutboundMode.AgentlessMember | EmailOutboundMode.$UnknownMember; + +/** + * @public + */ +export namespace EmailOutboundMode { + /** + * Agentless config + * @public + */ + export interface AgentlessMember { + agentless: AgentlessConfig; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + agentless?: never; + $unknown: [string, any]; + } + + export interface Visitor { + agentless: (value: AgentlessConfig) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: EmailOutboundMode, visitor: Visitor): T => { + if (value.agentless !== undefined) return visitor.agentless(value.agentless); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * Email Channel Subtype config + * @public + */ +export interface EmailChannelSubtypeConfig { + /** + * Allocates outbound capacity for the specific channel subtype of this campaign between multiple active campaigns + * @public + */ + capacity?: number | undefined; + + /** + * Email Outbound Mode + * @public + */ + outboundMode: EmailOutboundMode | undefined; + + /** + * Default Email Outbound config + * @public + */ + defaultOutboundConfig: EmailOutboundConfig | undefined; +} + +/** + * Default SMS Outbound config + * @public + */ +export interface SmsOutboundConfig { + /** + * Amazon Resource Names(ARN) + * @public + */ + connectSourcePhoneNumberArn: string | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + wisdomTemplateArn: string | undefined; +} + +/** + * SMS Outbound Mode + * @public + */ +export type SmsOutboundMode = SmsOutboundMode.AgentlessMember | SmsOutboundMode.$UnknownMember; + +/** + * @public + */ +export namespace SmsOutboundMode { + /** + * Agentless config + * @public + */ + export interface AgentlessMember { + agentless: AgentlessConfig; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + agentless?: never; + $unknown: [string, any]; + } + + export interface Visitor { + agentless: (value: AgentlessConfig) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: SmsOutboundMode, visitor: Visitor): T => { + if (value.agentless !== undefined) return visitor.agentless(value.agentless); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * SMS Channel Subtype config + * @public + */ +export interface SmsChannelSubtypeConfig { + /** + * Allocates outbound capacity for the specific channel subtype of this campaign between multiple active campaigns + * @public + */ + capacity?: number | undefined; + + /** + * SMS Outbound Mode + * @public + */ + outboundMode: SmsOutboundMode | undefined; + + /** + * Default SMS Outbound config + * @public + */ + defaultOutboundConfig: SmsOutboundConfig | undefined; +} + +/** + * Answering Machine Detection config + * @public + */ +export interface AnswerMachineDetectionConfig { + /** + * Enable or disable answering machine detection + * @public + */ + enableAnswerMachineDetection: boolean | undefined; + + /** + * Enable or disable await answer machine prompt + * @public + */ + awaitAnswerMachinePrompt?: boolean | undefined; +} + +/** + * Default Telephony Outbound config + * @public + */ +export interface TelephonyOutboundConfig { + /** + * The identifier of the contact flow for the outbound call. + * @public + */ + connectContactFlowId: string | undefined; + + /** + * The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue. + * @public + */ + connectSourcePhoneNumber?: string | undefined; + + /** + * Answering Machine Detection config + * @public + */ + answerMachineDetectionConfig?: AnswerMachineDetectionConfig | undefined; +} + +/** + * Predictive config + * @public + */ +export interface PredictiveConfig { + /** + * The bandwidth allocation of a queue resource. + * @public + */ + bandwidthAllocation: number | undefined; +} + +/** + * Progressive config + * @public + */ +export interface ProgressiveConfig { + /** + * The bandwidth allocation of a queue resource. + * @public + */ + bandwidthAllocation: number | undefined; +} + +/** + * Telephony Outbound Mode + * @public + */ +export type TelephonyOutboundMode = + | TelephonyOutboundMode.AgentlessMember + | TelephonyOutboundMode.PredictiveMember + | TelephonyOutboundMode.ProgressiveMember + | TelephonyOutboundMode.$UnknownMember; + +/** + * @public + */ +export namespace TelephonyOutboundMode { + /** + * Progressive config + * @public + */ + export interface ProgressiveMember { + progressive: ProgressiveConfig; + predictive?: never; + agentless?: never; + $unknown?: never; + } + + /** + * Predictive config + * @public + */ + export interface PredictiveMember { + progressive?: never; + predictive: PredictiveConfig; + agentless?: never; + $unknown?: never; + } + + /** + * Agentless config + * @public + */ + export interface AgentlessMember { + progressive?: never; + predictive?: never; + agentless: AgentlessConfig; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + progressive?: never; + predictive?: never; + agentless?: never; + $unknown: [string, any]; + } + + export interface Visitor { + progressive: (value: ProgressiveConfig) => T; + predictive: (value: PredictiveConfig) => T; + agentless: (value: AgentlessConfig) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: TelephonyOutboundMode, visitor: Visitor): T => { + if (value.progressive !== undefined) return visitor.progressive(value.progressive); + if (value.predictive !== undefined) return visitor.predictive(value.predictive); + if (value.agentless !== undefined) return visitor.agentless(value.agentless); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * Telephony Channel Subtype config + * @public + */ +export interface TelephonyChannelSubtypeConfig { + /** + * Allocates outbound capacity for the specific channel subtype of this campaign between multiple active campaigns + * @public + */ + capacity?: number | undefined; + + /** + * The queue for the call. If you specify a queue, the phone displayed for caller ID is the phone number specified in the queue. If you do not specify a queue, the queue defined in the contact flow is used. If you do not specify a queue, you must specify a source phone number. + * @public + */ + connectQueueId?: string | undefined; + + /** + * Telephony Outbound Mode + * @public + */ + outboundMode: TelephonyOutboundMode | undefined; + + /** + * Default Telephony Outbound config + * @public + */ + defaultOutboundConfig: TelephonyOutboundConfig | undefined; +} + +/** + * Campaign Channel Subtype config + * @public + */ +export interface ChannelSubtypeConfig { + /** + * Telephony Channel Subtype config + * @public + */ + telephony?: TelephonyChannelSubtypeConfig | undefined; + + /** + * SMS Channel Subtype config + * @public + */ + sms?: SmsChannelSubtypeConfig | undefined; + + /** + * Email Channel Subtype config + * @public + */ + email?: EmailChannelSubtypeConfig | undefined; +} + +/** + * @public + * @enum + */ +export const CommunicationLimitTimeUnit = { + DAY: "DAY", +} as const; + +/** + * @public + */ +export type CommunicationLimitTimeUnit = (typeof CommunicationLimitTimeUnit)[keyof typeof CommunicationLimitTimeUnit]; + +/** + * Communication Limit + * @public + */ +export interface CommunicationLimit { + /** + * Maximum number of contacts allowed for a given target within the given frequency. + * @public + */ + maxCountPerRecipient: number | undefined; + + /** + * The number of days to consider with regards to this limit. + * @public + */ + frequency: number | undefined; + + /** + * The communication limit time unit. + * @public + */ + unit: CommunicationLimitTimeUnit | undefined; +} + +/** + * Communication limits + * @public + */ +export type CommunicationLimits = + | CommunicationLimits.CommunicationLimitsListMember + | CommunicationLimits.$UnknownMember; + +/** + * @public + */ +export namespace CommunicationLimits { + /** + * List of communication limit + * @public + */ + export interface CommunicationLimitsListMember { + communicationLimitsList: CommunicationLimit[]; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + communicationLimitsList?: never; + $unknown: [string, any]; + } + + export interface Visitor { + communicationLimitsList: (value: CommunicationLimit[]) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: CommunicationLimits, visitor: Visitor): T => { + if (value.communicationLimitsList !== undefined) + return visitor.communicationLimitsList(value.communicationLimitsList); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * Communication limits config + * @public + */ +export interface CommunicationLimitsConfig { + /** + * Communication limits + * @public + */ + allChannelSubtypes?: CommunicationLimits | undefined; +} + +/** + * @public + * @enum + */ +export const DayOfWeek = { + FRIDAY: "FRIDAY", + MONDAY: "MONDAY", + SATURDAY: "SATURDAY", + SUNDAY: "SUNDAY", + THURSDAY: "THURSDAY", + TUESDAY: "TUESDAY", + WEDNESDAY: "WEDNESDAY", +} as const; + +/** + * @public + */ +export type DayOfWeek = (typeof DayOfWeek)[keyof typeof DayOfWeek]; + +/** + * Time range in 24 hour format + * @public + */ +export interface TimeRange { + /** + * Time in ISO 8601 format, e.g. T23:11 + * @public + */ + startTime: string | undefined; + + /** + * Time in ISO 8601 format, e.g. T23:11 + * @public + */ + endTime: string | undefined; +} + +/** + * Open Hours config + * @public + */ +export type OpenHours = OpenHours.DailyHoursMember | OpenHours.$UnknownMember; + +/** + * @public + */ +export namespace OpenHours { + /** + * Daily Hours map + * @public + */ + export interface DailyHoursMember { + dailyHours: Partial>; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + dailyHours?: never; + $unknown: [string, any]; + } + + export interface Visitor { + dailyHours: (value: Partial>) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: OpenHours, visitor: Visitor): T => { + if (value.dailyHours !== undefined) return visitor.dailyHours(value.dailyHours); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * Restricted period + * @public + */ +export interface RestrictedPeriod { + /** + * The name of a restricted period. + * @public + */ + name?: string | undefined; + + /** + * Date in ISO 8601 format, e.g. 2024-01-01 + * @public + */ + startDate: string | undefined; + + /** + * Date in ISO 8601 format, e.g. 2024-01-01 + * @public + */ + endDate: string | undefined; +} + +/** + * Restricted period config + * @public + */ +export type RestrictedPeriods = RestrictedPeriods.RestrictedPeriodListMember | RestrictedPeriods.$UnknownMember; + +/** + * @public + */ +export namespace RestrictedPeriods { + /** + * List of restricted period + * @public + */ + export interface RestrictedPeriodListMember { + restrictedPeriodList: RestrictedPeriod[]; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + restrictedPeriodList?: never; + $unknown: [string, any]; + } + + export interface Visitor { + restrictedPeriodList: (value: RestrictedPeriod[]) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: RestrictedPeriods, visitor: Visitor): T => { + if (value.restrictedPeriodList !== undefined) return visitor.restrictedPeriodList(value.restrictedPeriodList); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * Time window config + * @public + */ +export interface TimeWindow { + /** + * Open Hours config + * @public + */ + openHours: OpenHours | undefined; + + /** + * Restricted period config + * @public + */ + restrictedPeriods?: RestrictedPeriods | undefined; +} + +/** + * @public + * @enum + */ +export const LocalTimeZoneDetectionType = { + AREA_CODE: "AREA_CODE", + ZIP_CODE: "ZIP_CODE", +} as const; + +/** + * @public + */ +export type LocalTimeZoneDetectionType = (typeof LocalTimeZoneDetectionType)[keyof typeof LocalTimeZoneDetectionType]; + +/** + * Local time zone config + * @public + */ +export interface LocalTimeZoneConfig { + /** + * Time Zone Id in the IANA format + * @public + */ + defaultTimeZone?: string | undefined; + + /** + * Local TimeZone Detection method list + * @public + */ + localTimeZoneDetection?: LocalTimeZoneDetectionType[] | undefined; +} + +/** + * Campaign communication time config + * @public + */ +export interface CommunicationTimeConfig { + /** + * Local time zone config + * @public + */ + localTimeZoneConfig: LocalTimeZoneConfig | undefined; + + /** + * Time window config + * @public + */ + telephony?: TimeWindow | undefined; + + /** + * Time window config + * @public + */ + sms?: TimeWindow | undefined; + + /** + * Time window config + * @public + */ + email?: TimeWindow | undefined; +} + +/** + * Campaign schedule + * @public + */ +export interface Schedule { + /** + * Timestamp with no UTC offset or timezone + * @public + */ + startTime: Date | undefined; + + /** + * Timestamp with no UTC offset or timezone + * @public + */ + endTime: Date | undefined; + + /** + * Time duration in ISO 8601 format + * @public + */ + refreshFrequency?: string | undefined; +} + +/** + * Source of the campaign + * @public + */ +export type Source = Source.CustomerProfilesSegmentArnMember | Source.$UnknownMember; + +/** + * @public + */ +export namespace Source { + /** + * Amazon Resource Names(ARN) + * @public + */ + export interface CustomerProfilesSegmentArnMember { + customerProfilesSegmentArn: string; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + customerProfilesSegmentArn?: never; + $unknown: [string, any]; + } + + export interface Visitor { + customerProfilesSegmentArn: (value: string) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: Source, visitor: Visitor): T => { + if (value.customerProfilesSegmentArn !== undefined) + return visitor.customerProfilesSegmentArn(value.customerProfilesSegmentArn); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * The request for CreateCampaign API. + * @public + */ +export interface CreateCampaignRequest { + /** + * The name of an Amazon Connect Campaign name. + * @public + */ + name: string | undefined; + + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Campaign Channel Subtype config + * @public + */ + channelSubtypeConfig: ChannelSubtypeConfig | undefined; + + /** + * Source of the campaign + * @public + */ + source?: Source | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + connectCampaignFlowArn?: string | undefined; + + /** + * Campaign schedule + * @public + */ + schedule?: Schedule | undefined; + + /** + * Campaign communication time config + * @public + */ + communicationTimeConfig?: CommunicationTimeConfig | undefined; + + /** + * Communication limits config + * @public + */ + communicationLimitsOverride?: CommunicationLimitsConfig | undefined; + + /** + * Tag map with key and value. + * @public + */ + tags?: Record | undefined; +} + +/** + * The response for Create Campaign API + * @public + */ +export interface CreateCampaignResponse { + /** + * Identifier representing a Campaign + * @public + */ + id?: string | undefined; + + /** + * The resource name of an Amazon Connect campaign. + * @public + */ + arn?: string | undefined; + + /** + * Tag map with key and value. + * @public + */ + tags?: Record | undefined; +} + +/** + * Request processing failed because of an error or failure with the service. + * @public + */ +export class InternalServerException extends __BaseException { + readonly name: "InternalServerException" = "InternalServerException"; + readonly $fault: "server" = "server"; + $retryable = {}; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * The specified resource was not found. + * @public + */ +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * Request would cause a service quota to be exceeded. + * @public + */ +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * The request was denied due to request throttling. + * @public + */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + $retryable = {}; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * The input fails to satisfy the constraints specified by an AWS service. + * @public + */ +export class ValidationException extends __BaseException { + readonly name: "ValidationException" = "ValidationException"; + readonly $fault: "client" = "client"; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * The request for DeleteCampaign API. + * @public + */ +export interface DeleteCampaignRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * @public + * @enum + */ +export const ChannelSubtype = { + EMAIL: "EMAIL", + SMS: "SMS", + TELEPHONY: "TELEPHONY", +} as const; + +/** + * @public + */ +export type ChannelSubtype = (typeof ChannelSubtype)[keyof typeof ChannelSubtype]; + +/** + * The request for DeleteCampaignChannelSubtypeConfig API. + * @public + */ +export interface DeleteCampaignChannelSubtypeConfigRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * The type of campaign channel subtype. + * @public + */ + channelSubtype: ChannelSubtype | undefined; +} + +/** + * @public + * @enum + */ +export const CommunicationLimitsConfigType = { + ALL_CHANNEL_SUBTYPES: "ALL_CHANNEL_SUBTYPES", +} as const; + +/** + * @public + */ +export type CommunicationLimitsConfigType = + (typeof CommunicationLimitsConfigType)[keyof typeof CommunicationLimitsConfigType]; + +/** + * The request for DeleteCampaignCommunicationLimits API. + * @public + */ +export interface DeleteCampaignCommunicationLimitsRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * The type of campaign communication limits config. + * @public + */ + config: CommunicationLimitsConfigType | undefined; +} + +/** + * @public + * @enum + */ +export const CampaignState = { + /** + * Campaign is in completed state + */ + COMPLETED: "Completed", + /** + * Campaign is in failed state + */ + FAILED: "Failed", + /** + * Campaign is in initialized state + */ + INITIALIZED: "Initialized", + /** + * Campaign is in paused state + */ + PAUSED: "Paused", + /** + * Campaign is in running state + */ + RUNNING: "Running", + /** + * Campaign is in stopped state + */ + STOPPED: "Stopped", +} as const; + +/** + * @public + */ +export type CampaignState = (typeof CampaignState)[keyof typeof CampaignState]; + +/** + * The request could not be processed because of conflict in the current state of the campaign. + * @public + */ +export class InvalidCampaignStateException extends __BaseException { + readonly name: "InvalidCampaignStateException" = "InvalidCampaignStateException"; + readonly $fault: "client" = "client"; + /** + * State of a campaign + * @public + */ + state: CampaignState | undefined; + + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidCampaignStateException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidCampaignStateException.prototype); + this.state = opts.state; + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * @public + * @enum + */ +export const CommunicationTimeConfigType = { + EMAIL: "EMAIL", + SMS: "SMS", + TELEPHONY: "TELEPHONY", +} as const; + +/** + * @public + */ +export type CommunicationTimeConfigType = + (typeof CommunicationTimeConfigType)[keyof typeof CommunicationTimeConfigType]; + +/** + * The request for DeleteCampaignCommunicationTime API. + * @public + */ +export interface DeleteCampaignCommunicationTimeRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * The type of campaign communication time config + * @public + */ + config: CommunicationTimeConfigType | undefined; +} + +/** + * @public + * @enum + */ +export const CampaignDeletionPolicy = { + DELETE_ALL: "DELETE_ALL", + RETAIN_ALL: "RETAIN_ALL", +} as const; + +/** + * @public + */ +export type CampaignDeletionPolicy = (typeof CampaignDeletionPolicy)[keyof typeof CampaignDeletionPolicy]; + +/** + * The request for DeleteConnectInstanceConfig API. + * @public + */ +export interface DeleteConnectInstanceConfigRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Enumeration of the policies to enact on existing campaigns during instance config deletion + * @public + */ + campaignDeletionPolicy?: CampaignDeletionPolicy | undefined; +} + +/** + * The request could not be processed because of conflict in the current state. + * @public + */ +export class InvalidStateException extends __BaseException { + readonly name: "InvalidStateException" = "InvalidStateException"; + readonly $fault: "client" = "client"; + /** + * A header that defines the error encountered while processing the request. + * @public + */ + xAmzErrorType?: string | undefined; + + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidStateException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidStateException.prototype); + this.xAmzErrorType = opts.xAmzErrorType; + } +} + +/** + * Customer Profiles integration identifier + * @public + */ +export interface CustomerProfilesIntegrationIdentifier { + /** + * Amazon Resource Names(ARN) + * @public + */ + domainArn: string | undefined; +} + +/** + * Q Connect integration identifier + * @public + */ +export interface QConnectIntegrationIdentifier { + /** + * Amazon Resource Names(ARN) + * @public + */ + knowledgeBaseArn: string | undefined; +} + +/** + * Integration identifier for Connect instance + * @public + */ +export type IntegrationIdentifier = + | IntegrationIdentifier.CustomerProfilesMember + | IntegrationIdentifier.QConnectMember + | IntegrationIdentifier.$UnknownMember; + +/** + * @public + */ +export namespace IntegrationIdentifier { + /** + * Customer Profiles integration identifier + * @public + */ + export interface CustomerProfilesMember { + customerProfiles: CustomerProfilesIntegrationIdentifier; + qConnect?: never; + $unknown?: never; + } + + /** + * Q Connect integration identifier + * @public + */ + export interface QConnectMember { + customerProfiles?: never; + qConnect: QConnectIntegrationIdentifier; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + customerProfiles?: never; + qConnect?: never; + $unknown: [string, any]; + } + + export interface Visitor { + customerProfiles: (value: CustomerProfilesIntegrationIdentifier) => T; + qConnect: (value: QConnectIntegrationIdentifier) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: IntegrationIdentifier, visitor: Visitor): T => { + if (value.customerProfiles !== undefined) return visitor.customerProfiles(value.customerProfiles); + if (value.qConnect !== undefined) return visitor.qConnect(value.qConnect); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * The request for DeleteConnectInstanceIntegration API. + * @public + */ +export interface DeleteConnectInstanceIntegrationRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Integration identifier for Connect instance + * @public + */ + integrationIdentifier: IntegrationIdentifier | undefined; +} + +/** + * The request for DeleteInstanceOnboardingJob API. + * @public + */ +export interface DeleteInstanceOnboardingJobRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; +} + +/** + * The request for DescribeCampaign API. + * @public + */ +export interface DescribeCampaignRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * An Amazon Connect campaign. + * @public + */ +export interface Campaign { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * The resource name of an Amazon Connect campaign. + * @public + */ + arn: string | undefined; + + /** + * The name of an Amazon Connect Campaign name. + * @public + */ + name: string | undefined; + + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Campaign Channel Subtype config + * @public + */ + channelSubtypeConfig: ChannelSubtypeConfig | undefined; + + /** + * Source of the campaign + * @public + */ + source?: Source | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + connectCampaignFlowArn?: string | undefined; + + /** + * Campaign schedule + * @public + */ + schedule?: Schedule | undefined; + + /** + * Campaign communication time config + * @public + */ + communicationTimeConfig?: CommunicationTimeConfig | undefined; + + /** + * Communication limits config + * @public + */ + communicationLimitsOverride?: CommunicationLimitsConfig | undefined; + + /** + * Tag map with key and value. + * @public + */ + tags?: Record | undefined; +} + +/** + * The response for DescribeCampaign API. + * @public + */ +export interface DescribeCampaignResponse { + /** + * An Amazon Connect campaign. + * @public + */ + campaign?: Campaign | undefined; +} + +/** + * The request for GetCampaignState API. + * @public + */ +export interface GetCampaignStateRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * The response for GetCampaignState API. + * @public + */ +export interface GetCampaignStateResponse { + /** + * State of a campaign + * @public + */ + state?: CampaignState | undefined; +} + +/** + * The request for GetCampaignStateBatch API. + * @public + */ +export interface GetCampaignStateBatchRequest { + /** + * List of CampaignId + * @public + */ + campaignIds: string[] | undefined; +} + +/** + * @public + * @enum + */ +export const GetCampaignStateBatchFailureCode = { + /** + * The specified resource was not found + */ + RESOURCE_NOT_FOUND: "ResourceNotFound", + /** + * Unexpected error during processing of request + */ + UNKNOWN_ERROR: "UnknownError", +} as const; + +/** + * @public + */ +export type GetCampaignStateBatchFailureCode = + (typeof GetCampaignStateBatchFailureCode)[keyof typeof GetCampaignStateBatchFailureCode]; + +/** + * Failed response of campaign state + * @public + */ +export interface FailedCampaignStateResponse { + /** + * Identifier representing a Campaign + * @public + */ + campaignId?: string | undefined; + + /** + * A predefined code indicating the error that caused the failure in getting state of campaigns + * @public + */ + failureCode?: GetCampaignStateBatchFailureCode | undefined; +} + +/** + * Successful response of campaign state + * @public + */ +export interface SuccessfulCampaignStateResponse { + /** + * Identifier representing a Campaign + * @public + */ + campaignId?: string | undefined; + + /** + * State of a campaign + * @public + */ + state?: CampaignState | undefined; +} + +/** + * The response for GetCampaignStateBatch API. + * @public + */ +export interface GetCampaignStateBatchResponse { + /** + * List of successful response of campaign state + * @public + */ + successfulRequests?: SuccessfulCampaignStateResponse[] | undefined; + + /** + * List of failed requests of campaign state + * @public + */ + failedRequests?: FailedCampaignStateResponse[] | undefined; +} + +/** + * The request for GetConnectInstanceConfig API. + * @public + */ +export interface GetConnectInstanceConfigRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; +} + +/** + * @public + * @enum + */ +export const EncryptionType = { + KMS: "KMS", +} as const; + +/** + * @public + */ +export type EncryptionType = (typeof EncryptionType)[keyof typeof EncryptionType]; + +/** + * Encryption config for Connect Instance. Note that sensitive data will always be encrypted. + * If disabled, service will perform encryption with its own key. + * If enabled, a KMS key id needs to be provided and KMS charges will apply. + * KMS is only type supported + * @public + */ +export interface EncryptionConfig { + /** + * Boolean to indicate if custom encryption has been enabled. + * @public + */ + enabled: boolean | undefined; + + /** + * Server-side encryption type. + * @public + */ + encryptionType?: EncryptionType | undefined; + + /** + * KMS key id/arn for encryption config. + * @public + */ + keyArn?: string | undefined; +} + +/** + * Instance config object + * @public + */ +export interface InstanceConfig { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Service linked role arn + * @public + */ + serviceLinkedRoleArn: string | undefined; + + /** + * Encryption config for Connect Instance. Note that sensitive data will always be encrypted. + * If disabled, service will perform encryption with its own key. + * If enabled, a KMS key id needs to be provided and KMS charges will apply. + * KMS is only type supported + * @public + */ + encryptionConfig: EncryptionConfig | undefined; +} + +/** + * The response for GetConnectInstanceConfig API. + * @public + */ +export interface GetConnectInstanceConfigResponse { + /** + * Instance config object + * @public + */ + connectInstanceConfig?: InstanceConfig | undefined; +} + +/** + * The request for GetInstanceOnboardingJobStatus API. + * @public + */ +export interface GetInstanceOnboardingJobStatusRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; +} + +/** + * @public + * @enum + */ +export const InstanceOnboardingJobFailureCode = { + EVENT_BRIDGE_ACCESS_DENIED: "EVENT_BRIDGE_ACCESS_DENIED", + EVENT_BRIDGE_MANAGED_RULE_LIMIT_EXCEEDED: "EVENT_BRIDGE_MANAGED_RULE_LIMIT_EXCEEDED", + IAM_ACCESS_DENIED: "IAM_ACCESS_DENIED", + INTERNAL_FAILURE: "INTERNAL_FAILURE", + KMS_ACCESS_DENIED: "KMS_ACCESS_DENIED", + KMS_KEY_NOT_FOUND: "KMS_KEY_NOT_FOUND", +} as const; + +/** + * @public + */ +export type InstanceOnboardingJobFailureCode = + (typeof InstanceOnboardingJobFailureCode)[keyof typeof InstanceOnboardingJobFailureCode]; + +/** + * @public + * @enum + */ +export const InstanceOnboardingJobStatusCode = { + FAILED: "FAILED", + IN_PROGRESS: "IN_PROGRESS", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type InstanceOnboardingJobStatusCode = + (typeof InstanceOnboardingJobStatusCode)[keyof typeof InstanceOnboardingJobStatusCode]; + +/** + * Instance onboarding job status object + * @public + */ +export interface InstanceOnboardingJobStatus { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Enumeration of the possible states for instance onboarding job + * @public + */ + status: InstanceOnboardingJobStatusCode | undefined; + + /** + * Enumeration of the possible failure codes for instance onboarding job + * @public + */ + failureCode?: InstanceOnboardingJobFailureCode | undefined; +} + +/** + * The response for GetInstanceOnboardingJobStatus API. + * @public + */ +export interface GetInstanceOnboardingJobStatusResponse { + /** + * Instance onboarding job status object + * @public + */ + connectInstanceOnboardingJobStatus?: InstanceOnboardingJobStatus | undefined; +} + +/** + * @public + * @enum + */ +export const InstanceIdFilterOperator = { + /** + * Equals operator + */ + EQ: "Eq", +} as const; + +/** + * @public + */ +export type InstanceIdFilterOperator = (typeof InstanceIdFilterOperator)[keyof typeof InstanceIdFilterOperator]; + +/** + * Connect instance identifier filter + * @public + */ +export interface InstanceIdFilter { + /** + * Amazon Connect Instance Id + * @public + */ + value: string | undefined; + + /** + * Operators for Connect instance identifier filter + * @public + */ + operator: InstanceIdFilterOperator | undefined; +} + +/** + * Filter model by type + * @public + */ +export interface CampaignFilters { + /** + * Connect instance identifier filter + * @public + */ + instanceIdFilter?: InstanceIdFilter | undefined; +} + +/** + * The request for ListCampaigns API. + * @public + */ +export interface ListCampaignsRequest { + /** + * The maximum number of results to return per page. + * @public + */ + maxResults?: number | undefined; + + /** + * The token for the next set of results. + * @public + */ + nextToken?: string | undefined; + + /** + * Filter model by type + * @public + */ + filters?: CampaignFilters | undefined; +} + +/** + * An Amazon Connect campaign summary. + * @public + */ +export interface CampaignSummary { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * The resource name of an Amazon Connect campaign. + * @public + */ + arn: string | undefined; + + /** + * The name of an Amazon Connect Campaign name. + * @public + */ + name: string | undefined; + + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Channel subtype list + * @public + */ + channelSubtypes: ChannelSubtype[] | undefined; + + /** + * Campaign schedule + * @public + */ + schedule?: Schedule | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + connectCampaignFlowArn?: string | undefined; +} + +/** + * The response for ListCampaigns API. + * @public + */ +export interface ListCampaignsResponse { + /** + * The token for the next set of results. + * @public + */ + nextToken?: string | undefined; + + /** + * A list of Amazon Connect campaigns. + * @public + */ + campaignSummaryList?: CampaignSummary[] | undefined; +} + +/** + * The request for ListConnectInstanceIntegrations API. + * @public + */ +export interface ListConnectInstanceIntegrationsRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * The maximum number of results to return per page. + * @public + */ + maxResults?: number | undefined; + + /** + * The token for the next set of results. + * @public + */ + nextToken?: string | undefined; +} + +/** + * @public + * @enum + */ +export const EventType = { + CAMPAIGN_EMAIL: "Campaign-Email", + CAMPAIGN_ORCHESTRATION: "Campaign-Orchestration", + CAMPAIGN_SMS: "Campaign-SMS", + CAMPAIGN_TELEPHONY: "Campaign-Telephony", +} as const; + +/** + * @public + */ +export type EventType = (typeof EventType)[keyof typeof EventType]; + +/** + * Customer Profiles integration summary + * @public + */ +export interface CustomerProfilesIntegrationSummary { + /** + * Amazon Resource Names(ARN) + * @public + */ + domainArn: string | undefined; + + /** + * Object type names map. + * @public + */ + objectTypeNames: Partial> | undefined; +} + +/** + * Q Connect integration summary + * @public + */ +export interface QConnectIntegrationSummary { + /** + * Amazon Resource Names(ARN) + * @public + */ + knowledgeBaseArn: string | undefined; +} + +/** + * Integration summary for Connect instance. + * @public + */ +export type IntegrationSummary = + | IntegrationSummary.CustomerProfilesMember + | IntegrationSummary.QConnectMember + | IntegrationSummary.$UnknownMember; + +/** + * @public + */ +export namespace IntegrationSummary { + /** + * Customer Profiles integration summary + * @public + */ + export interface CustomerProfilesMember { + customerProfiles: CustomerProfilesIntegrationSummary; + qConnect?: never; + $unknown?: never; + } + + /** + * Q Connect integration summary + * @public + */ + export interface QConnectMember { + customerProfiles?: never; + qConnect: QConnectIntegrationSummary; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + customerProfiles?: never; + qConnect?: never; + $unknown: [string, any]; + } + + export interface Visitor { + customerProfiles: (value: CustomerProfilesIntegrationSummary) => T; + qConnect: (value: QConnectIntegrationSummary) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: IntegrationSummary, visitor: Visitor): T => { + if (value.customerProfiles !== undefined) return visitor.customerProfiles(value.customerProfiles); + if (value.qConnect !== undefined) return visitor.qConnect(value.qConnect); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * The response for ListConnectInstanceIntegrations API. + * @public + */ +export interface ListConnectInstanceIntegrationsResponse { + /** + * The token for the next set of results. + * @public + */ + nextToken?: string | undefined; + + /** + * A list of Amazon Connect Instance Integrations. + * @public + */ + integrationSummaryList?: IntegrationSummary[] | undefined; +} + +/** + * The request for ListTagsForResource API. + * @public + */ +export interface ListTagsForResourceRequest { + /** + * Amazon Resource Names(ARN) + * @public + */ + arn: string | undefined; +} + +/** + * The request for ListTagsForResource API. + * @public + */ +export interface ListTagsForResourceResponse { + /** + * Tag map with key and value. + * @public + */ + tags?: Record | undefined; +} + +/** + * The request for PauseCampaign API. + * @public + */ +export interface PauseCampaignRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * Customer Profiles integration config + * @public + */ +export interface CustomerProfilesIntegrationConfig { + /** + * Amazon Resource Names(ARN) + * @public + */ + domainArn: string | undefined; + + /** + * Object type names map. + * @public + */ + objectTypeNames: Partial> | undefined; +} + +/** + * Q Connect integration config + * @public + */ +export interface QConnectIntegrationConfig { + /** + * Amazon Resource Names(ARN) + * @public + */ + knowledgeBaseArn: string | undefined; +} + +/** + * Integration config for Connect Instance + * @public + */ +export type IntegrationConfig = + | IntegrationConfig.CustomerProfilesMember + | IntegrationConfig.QConnectMember + | IntegrationConfig.$UnknownMember; + +/** + * @public + */ +export namespace IntegrationConfig { + /** + * Customer Profiles integration config + * @public + */ + export interface CustomerProfilesMember { + customerProfiles: CustomerProfilesIntegrationConfig; + qConnect?: never; + $unknown?: never; + } + + /** + * Q Connect integration config + * @public + */ + export interface QConnectMember { + customerProfiles?: never; + qConnect: QConnectIntegrationConfig; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + customerProfiles?: never; + qConnect?: never; + $unknown: [string, any]; + } + + export interface Visitor { + customerProfiles: (value: CustomerProfilesIntegrationConfig) => T; + qConnect: (value: QConnectIntegrationConfig) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: IntegrationConfig, visitor: Visitor): T => { + if (value.customerProfiles !== undefined) return visitor.customerProfiles(value.customerProfiles); + if (value.qConnect !== undefined) return visitor.qConnect(value.qConnect); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * The request for PutConnectInstanceIntegration API. + * @public + */ +export interface PutConnectInstanceIntegrationRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Integration config for Connect Instance + * @public + */ + integrationConfig: IntegrationConfig | undefined; +} + +/** + * Parameters for the Email Channel Subtype + * @public + */ +export interface EmailChannelSubtypeParameters { + /** + * Source/Destination Email address used for Email messages + * @public + */ + destinationEmailAddress: string | undefined; + + /** + * Source/Destination Email address used for Email messages + * @public + */ + connectSourceEmailAddress?: string | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + templateArn?: string | undefined; + + /** + * A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. + * @public + */ + templateParameters: Record | undefined; +} + +/** + * Parameters for the SMS Channel Subtype + * @public + */ +export interface SmsChannelSubtypeParameters { + /** + * The phone number of the customer, in E.164 format. + * @public + */ + destinationPhoneNumber: string | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + connectSourcePhoneNumberArn?: string | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + templateArn?: string | undefined; + + /** + * A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. + * @public + */ + templateParameters: Record | undefined; +} + +/** + * Parameters for the Telephony Channel Subtype + * @public + */ +export interface TelephonyChannelSubtypeParameters { + /** + * The phone number of the customer, in E.164 format. + * @public + */ + destinationPhoneNumber: string | undefined; + + /** + * A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes. + * @public + */ + attributes: Record | undefined; + + /** + * The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue. + * @public + */ + connectSourcePhoneNumber?: string | undefined; + + /** + * Answering Machine Detection config + * @public + */ + answerMachineDetectionConfig?: AnswerMachineDetectionConfig | undefined; +} + +/** + * ChannelSubtypeParameters for an outbound request + * @public + */ +export type ChannelSubtypeParameters = + | ChannelSubtypeParameters.EmailMember + | ChannelSubtypeParameters.SmsMember + | ChannelSubtypeParameters.TelephonyMember + | ChannelSubtypeParameters.$UnknownMember; + +/** + * @public + */ +export namespace ChannelSubtypeParameters { + /** + * Parameters for the Telephony Channel Subtype + * @public + */ + export interface TelephonyMember { + telephony: TelephonyChannelSubtypeParameters; + sms?: never; + email?: never; + $unknown?: never; + } + + /** + * Parameters for the SMS Channel Subtype + * @public + */ + export interface SmsMember { + telephony?: never; + sms: SmsChannelSubtypeParameters; + email?: never; + $unknown?: never; + } + + /** + * Parameters for the Email Channel Subtype + * @public + */ + export interface EmailMember { + telephony?: never; + sms?: never; + email: EmailChannelSubtypeParameters; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + telephony?: never; + sms?: never; + email?: never; + $unknown: [string, any]; + } + + export interface Visitor { + telephony: (value: TelephonyChannelSubtypeParameters) => T; + sms: (value: SmsChannelSubtypeParameters) => T; + email: (value: EmailChannelSubtypeParameters) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ChannelSubtypeParameters, visitor: Visitor): T => { + if (value.telephony !== undefined) return visitor.telephony(value.telephony); + if (value.sms !== undefined) return visitor.sms(value.sms); + if (value.email !== undefined) return visitor.email(value.email); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * An outbound request for a campaign. + * @public + */ +export interface OutboundRequest { + /** + * Client provided parameter used for idempotency. Its value must be unique for each request. + * @public + */ + clientToken: string | undefined; + + /** + * Timestamp with no UTC offset or timezone + * @public + */ + expirationTime: Date | undefined; + + /** + * ChannelSubtypeParameters for an outbound request + * @public + */ + channelSubtypeParameters: ChannelSubtypeParameters | undefined; +} + +/** + * The request for PutOutboundRequestBatch API. + * @public + */ +export interface PutOutboundRequestBatchRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * A list of outbound requests. + * @public + */ + outboundRequests: OutboundRequest[] | undefined; +} + +/** + * @public + * @enum + */ +export const FailureCode = { + /** + * Request throttled due to large number of pending dial requests + */ + BUFFER_LIMIT_EXCEEDED: "BufferLimitExceeded", + /** + * The request failed to satisfy the constraints specified by the service + */ + INVALID_INPUT: "InvalidInput", + /** + * The request was throttled due to excessive usage + */ + REQUEST_THROTTLED: "RequestThrottled", + /** + * Unexpected error during processing of request + */ + UNKNOWN_ERROR: "UnknownError", +} as const; + +/** + * @public + */ +export type FailureCode = (typeof FailureCode)[keyof typeof FailureCode]; + +/** + * A failed request identified by the unique client token. + * @public + */ +export interface FailedRequest { + /** + * Client provided parameter used for idempotency. Its value must be unique for each request. + * @public + */ + clientToken?: string | undefined; + + /** + * Identifier representing a Dial request + * @public + */ + id?: string | undefined; + + /** + * A predefined code indicating the error that caused the failure. + * @public + */ + failureCode?: FailureCode | undefined; +} + +/** + * A successful request identified by the unique client token. + * @public + */ +export interface SuccessfulRequest { + /** + * Client provided parameter used for idempotency. Its value must be unique for each request. + * @public + */ + clientToken?: string | undefined; + + /** + * Identifier representing a Dial request + * @public + */ + id?: string | undefined; +} + +/** + * The response for PutOutboundRequestBatch API. + * @public + */ +export interface PutOutboundRequestBatchResponse { + /** + * A list of successful requests identified by the unique client token. + * @public + */ + successfulRequests?: SuccessfulRequest[] | undefined; + + /** + * A list of failed requests. + * @public + */ + failedRequests?: FailedRequest[] | undefined; +} + +/** + * The request for ResumeCampaign API. + * @public + */ +export interface ResumeCampaignRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * The request for StartCampaign API. + * @public + */ +export interface StartCampaignRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * The request for StartInstanceOnboardingJob API. + * @public + */ +export interface StartInstanceOnboardingJobRequest { + /** + * Amazon Connect Instance Id + * @public + */ + connectInstanceId: string | undefined; + + /** + * Encryption config for Connect Instance. Note that sensitive data will always be encrypted. + * If disabled, service will perform encryption with its own key. + * If enabled, a KMS key id needs to be provided and KMS charges will apply. + * KMS is only type supported + * @public + */ + encryptionConfig: EncryptionConfig | undefined; +} + +/** + * The response for StartInstanceOnboardingJob API. + * @public + */ +export interface StartInstanceOnboardingJobResponse { + /** + * Instance onboarding job status object + * @public + */ + connectInstanceOnboardingJobStatus?: InstanceOnboardingJobStatus | undefined; +} + +/** + * The request for StopCampaign API. + * @public + */ +export interface StopCampaignRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; +} + +/** + * The request for TagResource API. + * @public + */ +export interface TagResourceRequest { + /** + * Amazon Resource Names(ARN) + * @public + */ + arn: string | undefined; + + /** + * Tag map with key and value. + * @public + */ + tags: Record | undefined; +} + +/** + * The request for UntagResource API. + * @public + */ +export interface UntagResourceRequest { + /** + * Amazon Resource Names(ARN) + * @public + */ + arn: string | undefined; + + /** + * List of tag keys. + * @public + */ + tagKeys: string[] | undefined; +} + +/** + * The request for UpdateCampaignChannelSubtypeConfig API. + * @public + */ +export interface UpdateCampaignChannelSubtypeConfigRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * Campaign Channel Subtype config + * @public + */ + channelSubtypeConfig: ChannelSubtypeConfig | undefined; +} + +/** + * The request for UpdateCampaignCommunicationLimits API. + * @public + */ +export interface UpdateCampaignCommunicationLimitsRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * Communication limits config + * @public + */ + communicationLimitsOverride: CommunicationLimitsConfig | undefined; +} + +/** + * The request for UpdateCampaignCommunicationTime API. + * @public + */ +export interface UpdateCampaignCommunicationTimeRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * Campaign communication time config + * @public + */ + communicationTimeConfig: CommunicationTimeConfig | undefined; +} + +/** + * The request for UpdateCampaignFlowAssociation API. + * @public + */ +export interface UpdateCampaignFlowAssociationRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * Amazon Resource Names(ARN) + * @public + */ + connectCampaignFlowArn: string | undefined; +} + +/** + * The request for UpdateCampaignName API. + * @public + */ +export interface UpdateCampaignNameRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * The name of an Amazon Connect Campaign name. + * @public + */ + name: string | undefined; +} + +/** + * The request for UpdateCampaignSchedule API. + * @public + */ +export interface UpdateCampaignScheduleRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * Campaign schedule + * @public + */ + schedule: Schedule | undefined; +} + +/** + * The request for UpdateCampaignSource API. + * @public + */ +export interface UpdateCampaignSourceRequest { + /** + * Identifier representing a Campaign + * @public + */ + id: string | undefined; + + /** + * Source of the campaign + * @public + */ + source: Source | undefined; +} + +/** + * @internal + */ +export const EmailOutboundConfigFilterSensitiveLog = (obj: EmailOutboundConfig): any => ({ + ...obj, + ...(obj.connectSourceEmailAddress && { connectSourceEmailAddress: SENSITIVE_STRING }), + ...(obj.sourceEmailAddressDisplayName && { sourceEmailAddressDisplayName: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const EmailChannelSubtypeConfigFilterSensitiveLog = (obj: EmailChannelSubtypeConfig): any => ({ + ...obj, + ...(obj.outboundMode && { outboundMode: obj.outboundMode }), + ...(obj.defaultOutboundConfig && { + defaultOutboundConfig: EmailOutboundConfigFilterSensitiveLog(obj.defaultOutboundConfig), + }), +}); + +/** + * @internal + */ +export const ChannelSubtypeConfigFilterSensitiveLog = (obj: ChannelSubtypeConfig): any => ({ + ...obj, + ...(obj.telephony && { telephony: obj.telephony }), + ...(obj.sms && { sms: obj.sms }), + ...(obj.email && { email: EmailChannelSubtypeConfigFilterSensitiveLog(obj.email) }), +}); + +/** + * @internal + */ +export const CreateCampaignRequestFilterSensitiveLog = (obj: CreateCampaignRequest): any => ({ + ...obj, + ...(obj.channelSubtypeConfig && { + channelSubtypeConfig: ChannelSubtypeConfigFilterSensitiveLog(obj.channelSubtypeConfig), + }), + ...(obj.source && { source: obj.source }), + ...(obj.communicationTimeConfig && { communicationTimeConfig: obj.communicationTimeConfig }), + ...(obj.communicationLimitsOverride && { communicationLimitsOverride: obj.communicationLimitsOverride }), +}); + +/** + * @internal + */ +export const CampaignFilterSensitiveLog = (obj: Campaign): any => ({ + ...obj, + ...(obj.channelSubtypeConfig && { + channelSubtypeConfig: ChannelSubtypeConfigFilterSensitiveLog(obj.channelSubtypeConfig), + }), + ...(obj.source && { source: obj.source }), + ...(obj.communicationTimeConfig && { communicationTimeConfig: obj.communicationTimeConfig }), + ...(obj.communicationLimitsOverride && { communicationLimitsOverride: obj.communicationLimitsOverride }), +}); + +/** + * @internal + */ +export const DescribeCampaignResponseFilterSensitiveLog = (obj: DescribeCampaignResponse): any => ({ + ...obj, + ...(obj.campaign && { campaign: CampaignFilterSensitiveLog(obj.campaign) }), +}); + +/** + * @internal + */ +export const EmailChannelSubtypeParametersFilterSensitiveLog = (obj: EmailChannelSubtypeParameters): any => ({ + ...obj, + ...(obj.destinationEmailAddress && { destinationEmailAddress: SENSITIVE_STRING }), + ...(obj.connectSourceEmailAddress && { connectSourceEmailAddress: SENSITIVE_STRING }), + ...(obj.templateParameters && { templateParameters: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const SmsChannelSubtypeParametersFilterSensitiveLog = (obj: SmsChannelSubtypeParameters): any => ({ + ...obj, + ...(obj.destinationPhoneNumber && { destinationPhoneNumber: SENSITIVE_STRING }), + ...(obj.templateParameters && { templateParameters: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const TelephonyChannelSubtypeParametersFilterSensitiveLog = (obj: TelephonyChannelSubtypeParameters): any => ({ + ...obj, + ...(obj.destinationPhoneNumber && { destinationPhoneNumber: SENSITIVE_STRING }), + ...(obj.attributes && { attributes: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const ChannelSubtypeParametersFilterSensitiveLog = (obj: ChannelSubtypeParameters): any => { + if (obj.telephony !== undefined) + return { telephony: TelephonyChannelSubtypeParametersFilterSensitiveLog(obj.telephony) }; + if (obj.sms !== undefined) return { sms: SmsChannelSubtypeParametersFilterSensitiveLog(obj.sms) }; + if (obj.email !== undefined) return { email: EmailChannelSubtypeParametersFilterSensitiveLog(obj.email) }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const OutboundRequestFilterSensitiveLog = (obj: OutboundRequest): any => ({ + ...obj, + ...(obj.channelSubtypeParameters && { + channelSubtypeParameters: ChannelSubtypeParametersFilterSensitiveLog(obj.channelSubtypeParameters), + }), +}); + +/** + * @internal + */ +export const PutOutboundRequestBatchRequestFilterSensitiveLog = (obj: PutOutboundRequestBatchRequest): any => ({ + ...obj, + ...(obj.outboundRequests && { + outboundRequests: obj.outboundRequests.map((item) => OutboundRequestFilterSensitiveLog(item)), + }), +}); + +/** + * @internal + */ +export const UpdateCampaignChannelSubtypeConfigRequestFilterSensitiveLog = ( + obj: UpdateCampaignChannelSubtypeConfigRequest +): any => ({ + ...obj, + ...(obj.channelSubtypeConfig && { + channelSubtypeConfig: ChannelSubtypeConfigFilterSensitiveLog(obj.channelSubtypeConfig), + }), +}); diff --git a/clients/client-connectcampaignsv2/src/pagination/Interfaces.ts b/clients/client-connectcampaignsv2/src/pagination/Interfaces.ts new file mode 100644 index 000000000000..1d1eda734a1d --- /dev/null +++ b/clients/client-connectcampaignsv2/src/pagination/Interfaces.ts @@ -0,0 +1,11 @@ +// smithy-typescript generated code +import { PaginationConfiguration } from "@smithy/types"; + +import { ConnectCampaignsV2Client } from "../ConnectCampaignsV2Client"; + +/** + * @public + */ +export interface ConnectCampaignsV2PaginationConfiguration extends PaginationConfiguration { + client: ConnectCampaignsV2Client; +} diff --git a/clients/client-connectcampaignsv2/src/pagination/ListCampaignsPaginator.ts b/clients/client-connectcampaignsv2/src/pagination/ListCampaignsPaginator.ts new file mode 100644 index 000000000000..a1fbbdae4b95 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/pagination/ListCampaignsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListCampaignsCommand, + ListCampaignsCommandInput, + ListCampaignsCommandOutput, +} from "../commands/ListCampaignsCommand"; +import { ConnectCampaignsV2Client } from "../ConnectCampaignsV2Client"; +import { ConnectCampaignsV2PaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListCampaigns: ( + config: ConnectCampaignsV2PaginationConfiguration, + input: ListCampaignsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + ConnectCampaignsV2PaginationConfiguration, + ListCampaignsCommandInput, + ListCampaignsCommandOutput +>(ConnectCampaignsV2Client, ListCampaignsCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-connectcampaignsv2/src/pagination/ListConnectInstanceIntegrationsPaginator.ts b/clients/client-connectcampaignsv2/src/pagination/ListConnectInstanceIntegrationsPaginator.ts new file mode 100644 index 000000000000..495167d52507 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/pagination/ListConnectInstanceIntegrationsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListConnectInstanceIntegrationsCommand, + ListConnectInstanceIntegrationsCommandInput, + ListConnectInstanceIntegrationsCommandOutput, +} from "../commands/ListConnectInstanceIntegrationsCommand"; +import { ConnectCampaignsV2Client } from "../ConnectCampaignsV2Client"; +import { ConnectCampaignsV2PaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListConnectInstanceIntegrations: ( + config: ConnectCampaignsV2PaginationConfiguration, + input: ListConnectInstanceIntegrationsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + ConnectCampaignsV2PaginationConfiguration, + ListConnectInstanceIntegrationsCommandInput, + ListConnectInstanceIntegrationsCommandOutput +>(ConnectCampaignsV2Client, ListConnectInstanceIntegrationsCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-connectcampaignsv2/src/pagination/index.ts b/clients/client-connectcampaignsv2/src/pagination/index.ts new file mode 100644 index 000000000000..dd1b10f3829b --- /dev/null +++ b/clients/client-connectcampaignsv2/src/pagination/index.ts @@ -0,0 +1,4 @@ +// smithy-typescript generated code +export * from "./Interfaces"; +export * from "./ListCampaignsPaginator"; +export * from "./ListConnectInstanceIntegrationsPaginator"; diff --git a/clients/client-connectcampaignsv2/src/protocols/Aws_restJson1.ts b/clients/client-connectcampaignsv2/src/protocols/Aws_restJson1.ts new file mode 100644 index 000000000000..95b6ac1153a8 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/protocols/Aws_restJson1.ts @@ -0,0 +1,2089 @@ +// smithy-typescript generated code +import { + awsExpectUnion as __expectUnion, + loadRestJsonErrorCode, + parseJsonBody as parseBody, + parseJsonErrorBody as parseErrorBody, +} from "@aws-sdk/core"; +import { requestBuilder as rb } from "@smithy/core"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectNonNull as __expectNonNull, + expectObject as __expectObject, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + limitedParseDouble as __limitedParseDouble, + map, + parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, + resolvedPath as __resolvedPath, + serializeDateTime as __serializeDateTime, + serializeFloat as __serializeFloat, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { CreateCampaignCommandInput, CreateCampaignCommandOutput } from "../commands/CreateCampaignCommand"; +import { + DeleteCampaignChannelSubtypeConfigCommandInput, + DeleteCampaignChannelSubtypeConfigCommandOutput, +} from "../commands/DeleteCampaignChannelSubtypeConfigCommand"; +import { DeleteCampaignCommandInput, DeleteCampaignCommandOutput } from "../commands/DeleteCampaignCommand"; +import { + DeleteCampaignCommunicationLimitsCommandInput, + DeleteCampaignCommunicationLimitsCommandOutput, +} from "../commands/DeleteCampaignCommunicationLimitsCommand"; +import { + DeleteCampaignCommunicationTimeCommandInput, + DeleteCampaignCommunicationTimeCommandOutput, +} from "../commands/DeleteCampaignCommunicationTimeCommand"; +import { + DeleteConnectInstanceConfigCommandInput, + DeleteConnectInstanceConfigCommandOutput, +} from "../commands/DeleteConnectInstanceConfigCommand"; +import { + DeleteConnectInstanceIntegrationCommandInput, + DeleteConnectInstanceIntegrationCommandOutput, +} from "../commands/DeleteConnectInstanceIntegrationCommand"; +import { + DeleteInstanceOnboardingJobCommandInput, + DeleteInstanceOnboardingJobCommandOutput, +} from "../commands/DeleteInstanceOnboardingJobCommand"; +import { DescribeCampaignCommandInput, DescribeCampaignCommandOutput } from "../commands/DescribeCampaignCommand"; +import { + GetCampaignStateBatchCommandInput, + GetCampaignStateBatchCommandOutput, +} from "../commands/GetCampaignStateBatchCommand"; +import { GetCampaignStateCommandInput, GetCampaignStateCommandOutput } from "../commands/GetCampaignStateCommand"; +import { + GetConnectInstanceConfigCommandInput, + GetConnectInstanceConfigCommandOutput, +} from "../commands/GetConnectInstanceConfigCommand"; +import { + GetInstanceOnboardingJobStatusCommandInput, + GetInstanceOnboardingJobStatusCommandOutput, +} from "../commands/GetInstanceOnboardingJobStatusCommand"; +import { ListCampaignsCommandInput, ListCampaignsCommandOutput } from "../commands/ListCampaignsCommand"; +import { + ListConnectInstanceIntegrationsCommandInput, + ListConnectInstanceIntegrationsCommandOutput, +} from "../commands/ListConnectInstanceIntegrationsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { PauseCampaignCommandInput, PauseCampaignCommandOutput } from "../commands/PauseCampaignCommand"; +import { + PutConnectInstanceIntegrationCommandInput, + PutConnectInstanceIntegrationCommandOutput, +} from "../commands/PutConnectInstanceIntegrationCommand"; +import { + PutOutboundRequestBatchCommandInput, + PutOutboundRequestBatchCommandOutput, +} from "../commands/PutOutboundRequestBatchCommand"; +import { ResumeCampaignCommandInput, ResumeCampaignCommandOutput } from "../commands/ResumeCampaignCommand"; +import { StartCampaignCommandInput, StartCampaignCommandOutput } from "../commands/StartCampaignCommand"; +import { + StartInstanceOnboardingJobCommandInput, + StartInstanceOnboardingJobCommandOutput, +} from "../commands/StartInstanceOnboardingJobCommand"; +import { StopCampaignCommandInput, StopCampaignCommandOutput } from "../commands/StopCampaignCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + UpdateCampaignChannelSubtypeConfigCommandInput, + UpdateCampaignChannelSubtypeConfigCommandOutput, +} from "../commands/UpdateCampaignChannelSubtypeConfigCommand"; +import { + UpdateCampaignCommunicationLimitsCommandInput, + UpdateCampaignCommunicationLimitsCommandOutput, +} from "../commands/UpdateCampaignCommunicationLimitsCommand"; +import { + UpdateCampaignCommunicationTimeCommandInput, + UpdateCampaignCommunicationTimeCommandOutput, +} from "../commands/UpdateCampaignCommunicationTimeCommand"; +import { + UpdateCampaignFlowAssociationCommandInput, + UpdateCampaignFlowAssociationCommandOutput, +} from "../commands/UpdateCampaignFlowAssociationCommand"; +import { UpdateCampaignNameCommandInput, UpdateCampaignNameCommandOutput } from "../commands/UpdateCampaignNameCommand"; +import { + UpdateCampaignScheduleCommandInput, + UpdateCampaignScheduleCommandOutput, +} from "../commands/UpdateCampaignScheduleCommand"; +import { + UpdateCampaignSourceCommandInput, + UpdateCampaignSourceCommandOutput, +} from "../commands/UpdateCampaignSourceCommand"; +import { ConnectCampaignsV2ServiceException as __BaseException } from "../models/ConnectCampaignsV2ServiceException"; +import { + AccessDeniedException, + AgentlessConfig, + AnswerMachineDetectionConfig, + Campaign, + CampaignFilters, + CampaignSummary, + ChannelSubtypeConfig, + ChannelSubtypeParameters, + CommunicationLimit, + CommunicationLimits, + CommunicationLimitsConfig, + CommunicationTimeConfig, + ConflictException, + CustomerProfilesIntegrationConfig, + CustomerProfilesIntegrationIdentifier, + DayOfWeek, + EmailChannelSubtypeConfig, + EmailChannelSubtypeParameters, + EmailOutboundConfig, + EmailOutboundMode, + EncryptionConfig, + EventType, + InstanceIdFilter, + IntegrationConfig, + IntegrationIdentifier, + InternalServerException, + InvalidCampaignStateException, + InvalidStateException, + LocalTimeZoneConfig, + LocalTimeZoneDetectionType, + OpenHours, + OutboundRequest, + PredictiveConfig, + ProgressiveConfig, + QConnectIntegrationConfig, + QConnectIntegrationIdentifier, + ResourceNotFoundException, + RestrictedPeriod, + RestrictedPeriods, + Schedule, + ServiceQuotaExceededException, + SmsChannelSubtypeConfig, + SmsChannelSubtypeParameters, + SmsOutboundConfig, + SmsOutboundMode, + Source, + TelephonyChannelSubtypeConfig, + TelephonyChannelSubtypeParameters, + TelephonyOutboundConfig, + TelephonyOutboundMode, + ThrottlingException, + TimeRange, + TimeWindow, + ValidationException, +} from "../models/models_0"; + +/** + * serializeAws_restJson1CreateCampaignCommand + */ +export const se_CreateCampaignCommand = async ( + input: CreateCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns"); + let body: any; + body = JSON.stringify( + take(input, { + channelSubtypeConfig: (_) => se_ChannelSubtypeConfig(_, context), + communicationLimitsOverride: (_) => _json(_), + communicationTimeConfig: (_) => _json(_), + connectCampaignFlowArn: [], + connectInstanceId: [], + name: [], + schedule: (_) => se_Schedule(_, context), + source: (_) => _json(_), + tags: (_) => _json(_), + }) + ); + b.m("PUT").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteCampaignCommand + */ +export const se_DeleteCampaignCommand = async ( + input: DeleteCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("DELETE").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteCampaignChannelSubtypeConfigCommand + */ +export const se_DeleteCampaignChannelSubtypeConfigCommand = async ( + input: DeleteCampaignChannelSubtypeConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/channel-subtype-config"); + b.p("id", () => input.id!, "{id}", false); + const query: any = map({ + [_cS]: [, __expectNonNull(input[_cS]!, `channelSubtype`)], + }); + let body: any; + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteCampaignCommunicationLimitsCommand + */ +export const se_DeleteCampaignCommunicationLimitsCommand = async ( + input: DeleteCampaignCommunicationLimitsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/communication-limits"); + b.p("id", () => input.id!, "{id}", false); + const query: any = map({ + [_c]: [, __expectNonNull(input[_c]!, `config`)], + }); + let body: any; + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteCampaignCommunicationTimeCommand + */ +export const se_DeleteCampaignCommunicationTimeCommand = async ( + input: DeleteCampaignCommunicationTimeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/communication-time"); + b.p("id", () => input.id!, "{id}", false); + const query: any = map({ + [_c]: [, __expectNonNull(input[_c]!, `config`)], + }); + let body: any; + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteConnectInstanceConfigCommand + */ +export const se_DeleteConnectInstanceConfigCommand = async ( + input: DeleteConnectInstanceConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/connect-instance/{connectInstanceId}/config"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + const query: any = map({ + [_cDP]: [, input[_cDP]!], + }); + let body: any; + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteConnectInstanceIntegrationCommand + */ +export const se_DeleteConnectInstanceIntegrationCommand = async ( + input: DeleteConnectInstanceIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/connect-instance/{connectInstanceId}/integrations/delete"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + let body: any; + body = JSON.stringify( + take(input, { + integrationIdentifier: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DeleteInstanceOnboardingJobCommand + */ +export const se_DeleteInstanceOnboardingJobCommand = async ( + input: DeleteInstanceOnboardingJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/connect-instance/{connectInstanceId}/onboarding"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + let body: any; + b.m("DELETE").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1DescribeCampaignCommand + */ +export const se_DescribeCampaignCommand = async ( + input: DescribeCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetCampaignStateCommand + */ +export const se_GetCampaignStateCommand = async ( + input: GetCampaignStateCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/state"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetCampaignStateBatchCommand + */ +export const se_GetCampaignStateBatchCommand = async ( + input: GetCampaignStateBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns-state"); + let body: any; + body = JSON.stringify( + take(input, { + campaignIds: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetConnectInstanceConfigCommand + */ +export const se_GetConnectInstanceConfigCommand = async ( + input: GetConnectInstanceConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/connect-instance/{connectInstanceId}/config"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1GetInstanceOnboardingJobStatusCommand + */ +export const se_GetInstanceOnboardingJobStatusCommand = async ( + input: GetInstanceOnboardingJobStatusCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/connect-instance/{connectInstanceId}/onboarding"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1ListCampaignsCommand + */ +export const se_ListCampaignsCommand = async ( + input: ListCampaignsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns-summary"); + let body: any; + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1ListConnectInstanceIntegrationsCommand + */ +export const se_ListConnectInstanceIntegrationsCommand = async ( + input: ListConnectInstanceIntegrationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/connect-instance/{connectInstanceId}/integrations"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + const query: any = map({ + [_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()], + [_nT]: [, input[_nT]!], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/tags/{arn}"); + b.p("arn", () => input.arn!, "{arn}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1PauseCampaignCommand + */ +export const se_PauseCampaignCommand = async ( + input: PauseCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/pause"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1PutConnectInstanceIntegrationCommand + */ +export const se_PutConnectInstanceIntegrationCommand = async ( + input: PutConnectInstanceIntegrationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/connect-instance/{connectInstanceId}/integrations"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + let body: any; + body = JSON.stringify( + take(input, { + integrationConfig: (_) => _json(_), + }) + ); + b.m("PUT").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1PutOutboundRequestBatchCommand + */ +export const se_PutOutboundRequestBatchCommand = async ( + input: PutOutboundRequestBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/outbound-requests"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + outboundRequests: (_) => se_OutboundRequestList(_, context), + }) + ); + b.m("PUT").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1ResumeCampaignCommand + */ +export const se_ResumeCampaignCommand = async ( + input: ResumeCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/resume"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1StartCampaignCommand + */ +export const se_StartCampaignCommand = async ( + input: StartCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/start"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1StartInstanceOnboardingJobCommand + */ +export const se_StartInstanceOnboardingJobCommand = async ( + input: StartInstanceOnboardingJobCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/connect-instance/{connectInstanceId}/onboarding"); + b.p("connectInstanceId", () => input.connectInstanceId!, "{connectInstanceId}", false); + let body: any; + body = JSON.stringify( + take(input, { + encryptionConfig: (_) => _json(_), + }) + ); + b.m("PUT").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1StopCampaignCommand + */ +export const se_StopCampaignCommand = async ( + input: StopCampaignCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/campaigns/{id}/stop"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/tags/{arn}"); + b.p("arn", () => input.arn!, "{arn}", false); + let body: any; + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/v2/tags/{arn}"); + b.p("arn", () => input.arn!, "{arn}", false); + const query: any = map({ + [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK]! || []], + }); + let body: any; + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignChannelSubtypeConfigCommand + */ +export const se_UpdateCampaignChannelSubtypeConfigCommand = async ( + input: UpdateCampaignChannelSubtypeConfigCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/channel-subtype-config"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + channelSubtypeConfig: (_) => se_ChannelSubtypeConfig(_, context), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignCommunicationLimitsCommand + */ +export const se_UpdateCampaignCommunicationLimitsCommand = async ( + input: UpdateCampaignCommunicationLimitsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/communication-limits"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + communicationLimitsOverride: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignCommunicationTimeCommand + */ +export const se_UpdateCampaignCommunicationTimeCommand = async ( + input: UpdateCampaignCommunicationTimeCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/communication-time"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + communicationTimeConfig: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignFlowAssociationCommand + */ +export const se_UpdateCampaignFlowAssociationCommand = async ( + input: UpdateCampaignFlowAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/flow"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + connectCampaignFlowArn: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignNameCommand + */ +export const se_UpdateCampaignNameCommand = async ( + input: UpdateCampaignNameCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/name"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + name: [], + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignScheduleCommand + */ +export const se_UpdateCampaignScheduleCommand = async ( + input: UpdateCampaignScheduleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/schedule"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + schedule: (_) => se_Schedule(_, context), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * serializeAws_restJson1UpdateCampaignSourceCommand + */ +export const se_UpdateCampaignSourceCommand = async ( + input: UpdateCampaignSourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/v2/campaigns/{id}/source"); + b.p("id", () => input.id!, "{id}", false); + let body: any; + body = JSON.stringify( + take(input, { + source: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + +/** + * deserializeAws_restJson1CreateCampaignCommand + */ +export const de_CreateCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + arn: __expectString, + id: __expectString, + tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteCampaignCommand + */ +export const de_DeleteCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteCampaignChannelSubtypeConfigCommand + */ +export const de_DeleteCampaignChannelSubtypeConfigCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteCampaignCommunicationLimitsCommand + */ +export const de_DeleteCampaignCommunicationLimitsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteCampaignCommunicationTimeCommand + */ +export const de_DeleteCampaignCommunicationTimeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteConnectInstanceConfigCommand + */ +export const de_DeleteConnectInstanceConfigCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteConnectInstanceIntegrationCommand + */ +export const de_DeleteConnectInstanceIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DeleteInstanceOnboardingJobCommand + */ +export const de_DeleteInstanceOnboardingJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1DescribeCampaignCommand + */ +export const de_DescribeCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + campaign: (_) => de_Campaign(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetCampaignStateCommand + */ +export const de_GetCampaignStateCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + state: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetCampaignStateBatchCommand + */ +export const de_GetCampaignStateBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + failedRequests: _json, + successfulRequests: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetConnectInstanceConfigCommand + */ +export const de_GetConnectInstanceConfigCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + connectInstanceConfig: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1GetInstanceOnboardingJobStatusCommand + */ +export const de_GetInstanceOnboardingJobStatusCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + connectInstanceOnboardingJobStatus: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListCampaignsCommand + */ +export const de_ListCampaignsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + campaignSummaryList: (_) => de_CampaignSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListConnectInstanceIntegrationsCommand + */ +export const de_ListConnectInstanceIntegrationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + integrationSummaryList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1PauseCampaignCommand + */ +export const de_PauseCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1PutConnectInstanceIntegrationCommand + */ +export const de_PutConnectInstanceIntegrationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1PutOutboundRequestBatchCommand + */ +export const de_PutOutboundRequestBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + failedRequests: _json, + successfulRequests: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1ResumeCampaignCommand + */ +export const de_ResumeCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1StartCampaignCommand + */ +export const de_StartCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1StartInstanceOnboardingJobCommand + */ +export const de_StartInstanceOnboardingJobCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + connectInstanceOnboardingJobStatus: _json, + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1StopCampaignCommand + */ +export const de_StopCampaignCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignChannelSubtypeConfigCommand + */ +export const de_UpdateCampaignChannelSubtypeConfigCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignCommunicationLimitsCommand + */ +export const de_UpdateCampaignCommunicationLimitsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignCommunicationTimeCommand + */ +export const de_UpdateCampaignCommunicationTimeCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignFlowAssociationCommand + */ +export const de_UpdateCampaignFlowAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignNameCommand + */ +export const de_UpdateCampaignNameCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignScheduleCommand + */ +export const de_UpdateCampaignScheduleCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserializeAws_restJson1UpdateCampaignSourceCommand + */ +export const de_UpdateCampaignSourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + +/** + * deserialize_Aws_restJson1CommandError + */ +const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.connectcampaignsv2#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.connectcampaignsv2#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.connectcampaignsv2#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.connectcampaignsv2#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.connectcampaignsv2#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.connectcampaignsv2#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.connectcampaignsv2#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + case "InvalidCampaignStateException": + case "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException": + throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context); + case "InvalidStateException": + case "com.amazonaws.connectcampaignsv2#InvalidStateException": + throw await de_InvalidStateExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }) as never; + } +}; + +const throwDefaultError = withBaseException(__BaseException); +/** + * deserializeAws_restJson1AccessDeniedExceptionRes + */ +const de_AccessDeniedExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1InternalServerExceptionRes + */ +const de_InternalServerExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1InvalidCampaignStateExceptionRes + */ +const de_InvalidCampaignStateExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + state: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidCampaignStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1InvalidStateExceptionRes + */ +const de_InvalidStateExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ServiceQuotaExceededExceptionRes + */ +const de_ServiceQuotaExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ServiceQuotaExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +/** + * deserializeAws_restJson1ValidationExceptionRes + */ +const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({ + [_xAET]: [, parsedOutput.headers[_xae]], + }); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ValidationException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + +// se_AgentlessConfig omitted. + +// se_AnswerMachineDetectionConfig omitted. + +// se_Attributes omitted. + +// se_CampaignFilters omitted. + +// se_CampaignIdList omitted. + +/** + * serializeAws_restJson1ChannelSubtypeConfig + */ +const se_ChannelSubtypeConfig = (input: ChannelSubtypeConfig, context: __SerdeContext): any => { + return take(input, { + email: (_) => se_EmailChannelSubtypeConfig(_, context), + sms: (_) => se_SmsChannelSubtypeConfig(_, context), + telephony: (_) => se_TelephonyChannelSubtypeConfig(_, context), + }); +}; + +// se_ChannelSubtypeParameters omitted. + +// se_CommunicationLimit omitted. + +// se_CommunicationLimitList omitted. + +// se_CommunicationLimits omitted. + +// se_CommunicationLimitsConfig omitted. + +// se_CommunicationTimeConfig omitted. + +// se_CustomerProfilesIntegrationConfig omitted. + +// se_CustomerProfilesIntegrationIdentifier omitted. + +// se_DailyHours omitted. + +/** + * serializeAws_restJson1EmailChannelSubtypeConfig + */ +const se_EmailChannelSubtypeConfig = (input: EmailChannelSubtypeConfig, context: __SerdeContext): any => { + return take(input, { + capacity: __serializeFloat, + defaultOutboundConfig: _json, + outboundMode: _json, + }); +}; + +// se_EmailChannelSubtypeParameters omitted. + +// se_EmailOutboundConfig omitted. + +// se_EmailOutboundMode omitted. + +// se_EncryptionConfig omitted. + +// se_InstanceIdFilter omitted. + +// se_IntegrationConfig omitted. + +// se_IntegrationIdentifier omitted. + +// se_LocalTimeZoneConfig omitted. + +// se_LocalTimeZoneDetection omitted. + +// se_ObjectTypeNamesMap omitted. + +// se_OpenHours omitted. + +/** + * serializeAws_restJson1OutboundRequest + */ +const se_OutboundRequest = (input: OutboundRequest, context: __SerdeContext): any => { + return take(input, { + channelSubtypeParameters: _json, + clientToken: [], + expirationTime: __serializeDateTime, + }); +}; + +/** + * serializeAws_restJson1OutboundRequestList + */ +const se_OutboundRequestList = (input: OutboundRequest[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_OutboundRequest(entry, context); + }); +}; + +/** + * serializeAws_restJson1PredictiveConfig + */ +const se_PredictiveConfig = (input: PredictiveConfig, context: __SerdeContext): any => { + return take(input, { + bandwidthAllocation: __serializeFloat, + }); +}; + +/** + * serializeAws_restJson1ProgressiveConfig + */ +const se_ProgressiveConfig = (input: ProgressiveConfig, context: __SerdeContext): any => { + return take(input, { + bandwidthAllocation: __serializeFloat, + }); +}; + +// se_QConnectIntegrationConfig omitted. + +// se_QConnectIntegrationIdentifier omitted. + +// se_RestrictedPeriod omitted. + +// se_RestrictedPeriodList omitted. + +// se_RestrictedPeriods omitted. + +/** + * serializeAws_restJson1Schedule + */ +const se_Schedule = (input: Schedule, context: __SerdeContext): any => { + return take(input, { + endTime: __serializeDateTime, + refreshFrequency: [], + startTime: __serializeDateTime, + }); +}; + +/** + * serializeAws_restJson1SmsChannelSubtypeConfig + */ +const se_SmsChannelSubtypeConfig = (input: SmsChannelSubtypeConfig, context: __SerdeContext): any => { + return take(input, { + capacity: __serializeFloat, + defaultOutboundConfig: _json, + outboundMode: _json, + }); +}; + +// se_SmsChannelSubtypeParameters omitted. + +// se_SmsOutboundConfig omitted. + +// se_SmsOutboundMode omitted. + +// se_Source omitted. + +// se_TagMap omitted. + +/** + * serializeAws_restJson1TelephonyChannelSubtypeConfig + */ +const se_TelephonyChannelSubtypeConfig = (input: TelephonyChannelSubtypeConfig, context: __SerdeContext): any => { + return take(input, { + capacity: __serializeFloat, + connectQueueId: [], + defaultOutboundConfig: _json, + outboundMode: (_) => se_TelephonyOutboundMode(_, context), + }); +}; + +// se_TelephonyChannelSubtypeParameters omitted. + +// se_TelephonyOutboundConfig omitted. + +/** + * serializeAws_restJson1TelephonyOutboundMode + */ +const se_TelephonyOutboundMode = (input: TelephonyOutboundMode, context: __SerdeContext): any => { + return TelephonyOutboundMode.visit(input, { + agentless: (value) => ({ agentless: _json(value) }), + predictive: (value) => ({ predictive: se_PredictiveConfig(value, context) }), + progressive: (value) => ({ progressive: se_ProgressiveConfig(value, context) }), + _: (name, value) => ({ name: value } as any), + }); +}; + +// se_TimeRange omitted. + +// se_TimeRangeList omitted. + +// se_TimeWindow omitted. + +// de_AgentlessConfig omitted. + +// de_AnswerMachineDetectionConfig omitted. + +/** + * deserializeAws_restJson1Campaign + */ +const de_Campaign = (output: any, context: __SerdeContext): Campaign => { + return take(output, { + arn: __expectString, + channelSubtypeConfig: (_: any) => de_ChannelSubtypeConfig(_, context), + communicationLimitsOverride: _json, + communicationTimeConfig: _json, + connectCampaignFlowArn: __expectString, + connectInstanceId: __expectString, + id: __expectString, + name: __expectString, + schedule: (_: any) => de_Schedule(_, context), + source: (_: any) => _json(__expectUnion(_)), + tags: _json, + }) as any; +}; + +/** + * deserializeAws_restJson1CampaignSummary + */ +const de_CampaignSummary = (output: any, context: __SerdeContext): CampaignSummary => { + return take(output, { + arn: __expectString, + channelSubtypes: _json, + connectCampaignFlowArn: __expectString, + connectInstanceId: __expectString, + id: __expectString, + name: __expectString, + schedule: (_: any) => de_Schedule(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1CampaignSummaryList + */ +const de_CampaignSummaryList = (output: any, context: __SerdeContext): CampaignSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_CampaignSummary(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1ChannelSubtypeConfig + */ +const de_ChannelSubtypeConfig = (output: any, context: __SerdeContext): ChannelSubtypeConfig => { + return take(output, { + email: (_: any) => de_EmailChannelSubtypeConfig(_, context), + sms: (_: any) => de_SmsChannelSubtypeConfig(_, context), + telephony: (_: any) => de_TelephonyChannelSubtypeConfig(_, context), + }) as any; +}; + +// de_ChannelSubtypeList omitted. + +// de_CommunicationLimit omitted. + +// de_CommunicationLimitList omitted. + +// de_CommunicationLimits omitted. + +// de_CommunicationLimitsConfig omitted. + +// de_CommunicationTimeConfig omitted. + +// de_CustomerProfilesIntegrationSummary omitted. + +// de_DailyHours omitted. + +/** + * deserializeAws_restJson1EmailChannelSubtypeConfig + */ +const de_EmailChannelSubtypeConfig = (output: any, context: __SerdeContext): EmailChannelSubtypeConfig => { + return take(output, { + capacity: __limitedParseDouble, + defaultOutboundConfig: _json, + outboundMode: (_: any) => _json(__expectUnion(_)), + }) as any; +}; + +// de_EmailOutboundConfig omitted. + +// de_EmailOutboundMode omitted. + +// de_EncryptionConfig omitted. + +// de_FailedCampaignStateResponse omitted. + +// de_FailedCampaignStateResponseList omitted. + +// de_FailedRequest omitted. + +// de_FailedRequestList omitted. + +// de_InstanceConfig omitted. + +// de_InstanceOnboardingJobStatus omitted. + +// de_IntegrationSummary omitted. + +// de_IntegrationSummaryList omitted. + +// de_LocalTimeZoneConfig omitted. + +// de_LocalTimeZoneDetection omitted. + +// de_ObjectTypeNamesMap omitted. + +// de_OpenHours omitted. + +/** + * deserializeAws_restJson1PredictiveConfig + */ +const de_PredictiveConfig = (output: any, context: __SerdeContext): PredictiveConfig => { + return take(output, { + bandwidthAllocation: __limitedParseDouble, + }) as any; +}; + +/** + * deserializeAws_restJson1ProgressiveConfig + */ +const de_ProgressiveConfig = (output: any, context: __SerdeContext): ProgressiveConfig => { + return take(output, { + bandwidthAllocation: __limitedParseDouble, + }) as any; +}; + +// de_QConnectIntegrationSummary omitted. + +// de_RestrictedPeriod omitted. + +// de_RestrictedPeriodList omitted. + +// de_RestrictedPeriods omitted. + +/** + * deserializeAws_restJson1Schedule + */ +const de_Schedule = (output: any, context: __SerdeContext): Schedule => { + return take(output, { + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + refreshFrequency: __expectString, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; +}; + +/** + * deserializeAws_restJson1SmsChannelSubtypeConfig + */ +const de_SmsChannelSubtypeConfig = (output: any, context: __SerdeContext): SmsChannelSubtypeConfig => { + return take(output, { + capacity: __limitedParseDouble, + defaultOutboundConfig: _json, + outboundMode: (_: any) => _json(__expectUnion(_)), + }) as any; +}; + +// de_SmsOutboundConfig omitted. + +// de_SmsOutboundMode omitted. + +// de_Source omitted. + +// de_SuccessfulCampaignStateResponse omitted. + +// de_SuccessfulCampaignStateResponseList omitted. + +// de_SuccessfulRequest omitted. + +// de_SuccessfulRequestList omitted. + +// de_TagMap omitted. + +/** + * deserializeAws_restJson1TelephonyChannelSubtypeConfig + */ +const de_TelephonyChannelSubtypeConfig = (output: any, context: __SerdeContext): TelephonyChannelSubtypeConfig => { + return take(output, { + capacity: __limitedParseDouble, + connectQueueId: __expectString, + defaultOutboundConfig: _json, + outboundMode: (_: any) => de_TelephonyOutboundMode(__expectUnion(_), context), + }) as any; +}; + +// de_TelephonyOutboundConfig omitted. + +/** + * deserializeAws_restJson1TelephonyOutboundMode + */ +const de_TelephonyOutboundMode = (output: any, context: __SerdeContext): TelephonyOutboundMode => { + if (output.agentless != null) { + return { + agentless: _json(output.agentless), + }; + } + if (output.predictive != null) { + return { + predictive: de_PredictiveConfig(output.predictive, context), + }; + } + if (output.progressive != null) { + return { + progressive: de_ProgressiveConfig(output.progressive, context), + }; + } + return { $unknown: Object.entries(output)[0] }; +}; + +// de_TimeRange omitted. + +// de_TimeRangeList omitted. + +// de_TimeWindow omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const _c = "config"; +const _cDP = "campaignDeletionPolicy"; +const _cS = "channelSubtype"; +const _mR = "maxResults"; +const _nT = "nextToken"; +const _tK = "tagKeys"; +const _xAET = "xAmzErrorType"; +const _xae = "x-amzn-errortype"; diff --git a/clients/client-connectcampaignsv2/src/runtimeConfig.browser.ts b/clients/client-connectcampaignsv2/src/runtimeConfig.browser.ts new file mode 100644 index 000000000000..c22dc11442b4 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/runtimeConfig.browser.ts @@ -0,0 +1,44 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser"; +import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; +import { invalidProvider } from "@smithy/invalid-dependency"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; +import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { ConnectCampaignsV2ClientConfig } from "./ConnectCampaignsV2Client"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ConnectCampaignsV2ClientConfig) => { + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "browser", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: + config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))), + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, + region: config?.region ?? invalidProvider("Region is missing"), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE), + sha256: config?.sha256 ?? Sha256, + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)), + useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)), + }; +}; diff --git a/clients/client-connectcampaignsv2/src/runtimeConfig.native.ts b/clients/client-connectcampaignsv2/src/runtimeConfig.native.ts new file mode 100644 index 000000000000..283655b7e9c0 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/runtimeConfig.native.ts @@ -0,0 +1,18 @@ +// smithy-typescript generated code +import { Sha256 } from "@aws-crypto/sha256-js"; + +import { ConnectCampaignsV2ClientConfig } from "./ConnectCampaignsV2Client"; +import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ConnectCampaignsV2ClientConfig) => { + const browserDefaults = getBrowserRuntimeConfig(config); + return { + ...browserDefaults, + ...config, + runtime: "react-native", + sha256: config?.sha256 ?? Sha256, + }; +}; diff --git a/clients/client-connectcampaignsv2/src/runtimeConfig.shared.ts b/clients/client-connectcampaignsv2/src/runtimeConfig.shared.ts new file mode 100644 index 000000000000..5262ce7d2c4b --- /dev/null +++ b/clients/client-connectcampaignsv2/src/runtimeConfig.shared.ts @@ -0,0 +1,38 @@ +// smithy-typescript generated code +import { AwsSdkSigV4Signer } from "@aws-sdk/core"; +import { NoOpLogger } from "@smithy/smithy-client"; +import { IdentityProviderConfig } from "@smithy/types"; +import { parseUrl } from "@smithy/url-parser"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; +import { fromUtf8, toUtf8 } from "@smithy/util-utf8"; + +import { defaultConnectCampaignsV2HttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider"; +import { ConnectCampaignsV2ClientConfig } from "./ConnectCampaignsV2Client"; +import { defaultEndpointResolver } from "./endpoint/endpointResolver"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ConnectCampaignsV2ClientConfig) => { + return { + apiVersion: "2024-04-23", + base64Decoder: config?.base64Decoder ?? fromBase64, + base64Encoder: config?.base64Encoder ?? toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultConnectCampaignsV2HttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc: IdentityProviderConfig) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new NoOpLogger(), + serviceId: config?.serviceId ?? "ConnectCampaignsV2", + urlParser: config?.urlParser ?? parseUrl, + utf8Decoder: config?.utf8Decoder ?? fromUtf8, + utf8Encoder: config?.utf8Encoder ?? toUtf8, + }; +}; diff --git a/clients/client-connectcampaignsv2/src/runtimeConfig.ts b/clients/client-connectcampaignsv2/src/runtimeConfig.ts new file mode 100644 index 000000000000..29d5fec601c0 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/runtimeConfig.ts @@ -0,0 +1,60 @@ +// smithy-typescript generated code +// @ts-ignore: package.json will be imported from dist folders +import packageInfo from "../package.json"; // eslint-disable-line + +import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core"; +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node"; +import { + NODE_REGION_CONFIG_FILE_OPTIONS, + NODE_REGION_CONFIG_OPTIONS, + NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, + NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, +} from "@smithy/config-resolver"; +import { Hash } from "@smithy/hash-node"; +import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; +import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; +import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler"; +import { calculateBodyLength } from "@smithy/util-body-length-node"; +import { DEFAULT_RETRY_MODE } from "@smithy/util-retry"; +import { ConnectCampaignsV2ClientConfig } from "./ConnectCampaignsV2Client"; +import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared"; +import { loadConfigsForDefaultMode } from "@smithy/smithy-client"; +import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node"; +import { emitWarningIfUnsupportedVersion } from "@smithy/smithy-client"; + +/** + * @internal + */ +export const getRuntimeConfig = (config: ConnectCampaignsV2ClientConfig) => { + emitWarningIfUnsupportedVersion(process.version); + const defaultsMode = resolveDefaultsModeConfig(config); + const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode); + const clientSharedValues = getSharedRuntimeConfig(config); + awsCheckVersion(process.version); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider, + defaultUserAgentProvider: + config?.defaultUserAgentProvider ?? + createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: + config?.retryMode ?? + loadNodeConfig({ + ...NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS), + }; +}; diff --git a/clients/client-connectcampaignsv2/src/runtimeExtensions.ts b/clients/client-connectcampaignsv2/src/runtimeExtensions.ts new file mode 100644 index 000000000000..61a1e6314e88 --- /dev/null +++ b/clients/client-connectcampaignsv2/src/runtimeExtensions.ts @@ -0,0 +1,48 @@ +// smithy-typescript generated code +import { + getAwsRegionExtensionConfiguration, + resolveAwsRegionExtensionConfiguration, +} from "@aws-sdk/region-config-resolver"; +import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http"; +import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client"; + +import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration"; +import { ConnectCampaignsV2ExtensionConfiguration } from "./extensionConfiguration"; + +/** + * @public + */ +export interface RuntimeExtension { + configure(extensionConfiguration: ConnectCampaignsV2ExtensionConfiguration): void; +} + +/** + * @public + */ +export interface RuntimeExtensionsConfig { + extensions: RuntimeExtension[]; +} + +const asPartial = >(t: T) => t; + +/** + * @internal + */ +export const resolveRuntimeExtensions = (runtimeConfig: any, extensions: RuntimeExtension[]) => { + const extensionConfiguration: ConnectCampaignsV2ExtensionConfiguration = { + ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)), + ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)), + ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)), + }; + + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + + return { + ...runtimeConfig, + ...resolveAwsRegionExtensionConfiguration(extensionConfiguration), + ...resolveDefaultRuntimeConfig(extensionConfiguration), + ...resolveHttpHandlerRuntimeConfig(extensionConfiguration), + ...resolveHttpAuthRuntimeConfig(extensionConfiguration), + }; +}; diff --git a/clients/client-connectcampaignsv2/tsconfig.cjs.json b/clients/client-connectcampaignsv2/tsconfig.cjs.json new file mode 100644 index 000000000000..3567d85ba846 --- /dev/null +++ b/clients/client-connectcampaignsv2/tsconfig.cjs.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "outDir": "dist-cjs" + } +} diff --git a/clients/client-connectcampaignsv2/tsconfig.es.json b/clients/client-connectcampaignsv2/tsconfig.es.json new file mode 100644 index 000000000000..809f57bde65e --- /dev/null +++ b/clients/client-connectcampaignsv2/tsconfig.es.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "lib": ["dom"], + "module": "esnext", + "outDir": "dist-es" + } +} diff --git a/clients/client-connectcampaignsv2/tsconfig.json b/clients/client-connectcampaignsv2/tsconfig.json new file mode 100644 index 000000000000..e7f5ec56b742 --- /dev/null +++ b/clients/client-connectcampaignsv2/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/node16/tsconfig.json", + "compilerOptions": { + "downlevelIteration": true, + "importHelpers": true, + "incremental": true, + "removeComments": true, + "resolveJsonModule": true, + "rootDir": "src", + "useUnknownInCatchVariables": false + }, + "exclude": ["test/"] +} diff --git a/clients/client-connectcampaignsv2/tsconfig.types.json b/clients/client-connectcampaignsv2/tsconfig.types.json new file mode 100644 index 000000000000..4c3dfa7b3d25 --- /dev/null +++ b/clients/client-connectcampaignsv2/tsconfig.types.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "removeComments": false, + "declaration": true, + "declarationDir": "dist-types", + "emitDeclarationOnly": true + }, + "exclude": ["test/**/*", "dist-types/**/*"] +} diff --git a/codegen/sdk-codegen/aws-models/connectcampaignsv2.json b/codegen/sdk-codegen/aws-models/connectcampaignsv2.json new file mode 100644 index 000000000000..8ecace0e0f10 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/connectcampaignsv2.json @@ -0,0 +1,4778 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.connectcampaignsv2#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "You do not have sufficient access to perform this action.", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.connectcampaignsv2#AgentlessConfig": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "Agentless config" + } + }, + "com.amazonaws.connectcampaignsv2#AmazonConnectCampaignServiceV2": { + "type": "service", + "version": "2024-04-23", + "operations": [ + { + "target": "com.amazonaws.connectcampaignsv2#CreateCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignChannelSubtypeConfig" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationLimits" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationTime" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceConfig" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceIntegration" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DeleteInstanceOnboardingJob" + }, + { + "target": "com.amazonaws.connectcampaignsv2#DescribeCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignState" + }, + { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignStateBatch" + }, + { + "target": "com.amazonaws.connectcampaignsv2#GetConnectInstanceConfig" + }, + { + "target": "com.amazonaws.connectcampaignsv2#GetInstanceOnboardingJobStatus" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ListCampaigns" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ListConnectInstanceIntegrations" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ListTagsForResource" + }, + { + "target": "com.amazonaws.connectcampaignsv2#PauseCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#PutConnectInstanceIntegration" + }, + { + "target": "com.amazonaws.connectcampaignsv2#PutOutboundRequestBatch" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResumeCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#StartCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#StartInstanceOnboardingJob" + }, + { + "target": "com.amazonaws.connectcampaignsv2#StopCampaign" + }, + { + "target": "com.amazonaws.connectcampaignsv2#TagResource" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UntagResource" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignChannelSubtypeConfig" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationLimits" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationTime" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignFlowAssociation" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignName" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignSchedule" + }, + { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignSource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "ConnectCampaignsV2", + "arnNamespace": "connect-campaigns", + "cloudTrailEventSource": "connect-campaigns.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "connect-campaigns" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": { + "origin": "*", + "additionalAllowedHeaders": [ + "*", + "Authorization", + "Date", + "X-Amz-Date", + "X-Amz-Security-Token", + "X-Amz-Target", + "content-type", + "x-amz-content-sha256", + "x-amz-user-agent", + "x-amzn-platform-id", + "x-amzn-trace-id" + ], + "additionalExposedHeaders": [ + "x-amzn-errortype", + "x-amzn-requestid", + "x-amzn-errormessage", + "x-amzn-trace-id", + "x-amz-apigw-id", + "date" + ], + "maxAge": 86400 + }, + "smithy.api#documentation": "Provide APIs to create and manage Amazon Connect Campaigns.", + "smithy.api#title": "AmazonConnectCampaignServiceV2", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://connect-campaigns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://connect-campaigns-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://connect-campaigns.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://connect-campaigns.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } + ], + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ], + "type": "tree" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://connect-campaigns.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.connectcampaignsv2#AnswerMachineDetectionConfig": { + "type": "structure", + "members": { + "enableAnswerMachineDetection": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Enable or disable answering machine detection", + "smithy.api#required": {} + } + }, + "awaitAnswerMachinePrompt": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#default": null, + "smithy.api#documentation": "Enable or disable await answer machine prompt" + } + } + }, + "traits": { + "smithy.api#documentation": "Answering Machine Detection config" + } + }, + "com.amazonaws.connectcampaignsv2#Arn": { + "type": "string", + "traits": { + "smithy.api#documentation": "Amazon Resource Names(ARN)", + "smithy.api#length": { + "min": 20, + "max": 500 + }, + "smithy.api#pattern": "^arn:[a-zA-Z0-9-]+:[a-zA-Z0-9-]+:[a-z]{2}-[a-z]+-\\d{1,2}:[a-zA-Z0-9-]+:[^:]+(?:/[^:]+)*(?:/[^:]+)?(?:\\:[^:]+)?$" + } + }, + "com.amazonaws.connectcampaignsv2#AttributeName": { + "type": "string", + "traits": { + "smithy.api#documentation": "The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.", + "smithy.api#length": { + "min": 0, + "max": 32767 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\-_]+$" + } + }, + "com.amazonaws.connectcampaignsv2#AttributeValue": { + "type": "string", + "traits": { + "smithy.api#documentation": "The value of the attribute.", + "smithy.api#length": { + "min": 0, + "max": 32767 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.connectcampaignsv2#Attributes": { + "type": "map", + "key": { + "target": "com.amazonaws.connectcampaignsv2#AttributeName" + }, + "value": { + "target": "com.amazonaws.connectcampaignsv2#AttributeValue" + }, + "traits": { + "smithy.api#documentation": "A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.connectcampaignsv2#BandwidthAllocation": { + "type": "double", + "traits": { + "smithy.api#documentation": "The bandwidth allocation of a queue resource.", + "smithy.api#range": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.connectcampaignsv2#Campaign": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.connectcampaignsv2#CampaignArn", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.connectcampaignsv2#CampaignName", + "traits": { + "smithy.api#required": {} + } + }, + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#required": {} + } + }, + "channelSubtypeConfig": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtypeConfig", + "traits": { + "smithy.api#required": {} + } + }, + "source": { + "target": "com.amazonaws.connectcampaignsv2#Source" + }, + "connectCampaignFlowArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + }, + "schedule": { + "target": "com.amazonaws.connectcampaignsv2#Schedule" + }, + "communicationTimeConfig": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationTimeConfig" + }, + "communicationLimitsOverride": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimitsConfig" + }, + "tags": { + "target": "com.amazonaws.connectcampaignsv2#TagMap" + } + }, + "traits": { + "smithy.api#documentation": "An Amazon Connect campaign." + } + }, + "com.amazonaws.connectcampaignsv2#CampaignArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "The resource name of an Amazon Connect campaign.", + "smithy.api#length": { + "min": 20, + "max": 500 + } + } + }, + "com.amazonaws.connectcampaignsv2#CampaignDeletionPolicy": { + "type": "string", + "traits": { + "smithy.api#documentation": "Enumeration of the policies to enact on existing campaigns during instance config deletion", + "smithy.api#enum": [ + { + "value": "RETAIN_ALL", + "name": "RETAIN_ALL" + }, + { + "value": "DELETE_ALL", + "name": "DELETE_ALL" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#CampaignFilters": { + "type": "structure", + "members": { + "instanceIdFilter": { + "target": "com.amazonaws.connectcampaignsv2#InstanceIdFilter" + } + }, + "traits": { + "smithy.api#documentation": "Filter model by type" + } + }, + "com.amazonaws.connectcampaignsv2#CampaignId": { + "type": "string", + "traits": { + "smithy.api#documentation": "Identifier representing a Campaign", + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\-:/]*$" + } + }, + "com.amazonaws.connectcampaignsv2#CampaignIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId" + }, + "traits": { + "smithy.api#documentation": "List of CampaignId" + } + }, + "com.amazonaws.connectcampaignsv2#CampaignName": { + "type": "string", + "traits": { + "smithy.api#documentation": "The name of an Amazon Connect Campaign name.", + "smithy.api#length": { + "min": 1, + "max": 127 + } + } + }, + "com.amazonaws.connectcampaignsv2#CampaignState": { + "type": "string", + "traits": { + "smithy.api#documentation": "State of a campaign", + "smithy.api#enum": [ + { + "value": "Initialized", + "name": "INITIALIZED", + "documentation": "Campaign is in initialized state" + }, + { + "value": "Running", + "name": "RUNNING", + "documentation": "Campaign is in running state" + }, + { + "value": "Paused", + "name": "PAUSED", + "documentation": "Campaign is in paused state" + }, + { + "value": "Stopped", + "name": "STOPPED", + "documentation": "Campaign is in stopped state" + }, + { + "value": "Failed", + "name": "FAILED", + "documentation": "Campaign is in failed state" + }, + { + "value": "Completed", + "name": "COMPLETED", + "documentation": "Campaign is in completed state" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#CampaignSummary": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#required": {} + } + }, + "arn": { + "target": "com.amazonaws.connectcampaignsv2#CampaignArn", + "traits": { + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.connectcampaignsv2#CampaignName", + "traits": { + "smithy.api#required": {} + } + }, + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#required": {} + } + }, + "channelSubtypes": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtypeList", + "traits": { + "smithy.api#required": {} + } + }, + "schedule": { + "target": "com.amazonaws.connectcampaignsv2#Schedule" + }, + "connectCampaignFlowArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + } + }, + "traits": { + "smithy.api#documentation": "An Amazon Connect campaign summary." + } + }, + "com.amazonaws.connectcampaignsv2#CampaignSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#CampaignSummary" + }, + "traits": { + "smithy.api#documentation": "A list of Amazon Connect campaigns." + } + }, + "com.amazonaws.connectcampaignsv2#Capacity": { + "type": "double", + "traits": { + "smithy.api#documentation": "Allocates outbound capacity for the specific channel subtype of this campaign between multiple active campaigns", + "smithy.api#range": { + "min": 0.01, + "max": 1 + } + } + }, + "com.amazonaws.connectcampaignsv2#ChannelSubtype": { + "type": "string", + "traits": { + "smithy.api#documentation": "The type of campaign channel subtype.", + "smithy.api#enum": [ + { + "value": "TELEPHONY", + "name": "TELEPHONY" + }, + { + "value": "SMS", + "name": "SMS" + }, + { + "value": "EMAIL", + "name": "EMAIL" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#ChannelSubtypeConfig": { + "type": "structure", + "members": { + "telephony": { + "target": "com.amazonaws.connectcampaignsv2#TelephonyChannelSubtypeConfig" + }, + "sms": { + "target": "com.amazonaws.connectcampaignsv2#SmsChannelSubtypeConfig" + }, + "email": { + "target": "com.amazonaws.connectcampaignsv2#EmailChannelSubtypeConfig" + } + }, + "traits": { + "smithy.api#documentation": "Campaign Channel Subtype config" + } + }, + "com.amazonaws.connectcampaignsv2#ChannelSubtypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtype" + }, + "traits": { + "smithy.api#documentation": "Channel subtype list", + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.connectcampaignsv2#ChannelSubtypeParameters": { + "type": "union", + "members": { + "telephony": { + "target": "com.amazonaws.connectcampaignsv2#TelephonyChannelSubtypeParameters" + }, + "sms": { + "target": "com.amazonaws.connectcampaignsv2#SmsChannelSubtypeParameters" + }, + "email": { + "target": "com.amazonaws.connectcampaignsv2#EmailChannelSubtypeParameters" + } + }, + "traits": { + "smithy.api#documentation": "ChannelSubtypeParameters for an outbound request" + } + }, + "com.amazonaws.connectcampaignsv2#ClientToken": { + "type": "string", + "traits": { + "smithy.api#documentation": "Client provided parameter used for idempotency. Its value must be unique for each request.", + "smithy.api#length": { + "min": 0, + "max": 200 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-.]*$" + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationLimit": { + "type": "structure", + "members": { + "maxCountPerRecipient": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "Maximum number of contacts allowed for a given target within the given frequency.", + "smithy.api#range": { + "min": 1 + }, + "smithy.api#required": {} + } + }, + "frequency": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "The number of days to consider with regards to this limit.", + "smithy.api#range": { + "min": 1, + "max": 30 + }, + "smithy.api#required": {} + } + }, + "unit": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimitTimeUnit", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Communication Limit" + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationLimitList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimit" + }, + "traits": { + "smithy.api#documentation": "List of communication limit", + "smithy.api#length": { + "max": 2 + } + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationLimitTimeUnit": { + "type": "string", + "traits": { + "smithy.api#documentation": "The communication limit time unit.", + "smithy.api#enum": [ + { + "value": "DAY", + "name": "DAY" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationLimits": { + "type": "union", + "members": { + "communicationLimitsList": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimitList" + } + }, + "traits": { + "smithy.api#documentation": "Communication limits" + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationLimitsConfig": { + "type": "structure", + "members": { + "allChannelSubtypes": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimits" + } + }, + "traits": { + "smithy.api#documentation": "Communication limits config" + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationLimitsConfigType": { + "type": "string", + "traits": { + "smithy.api#documentation": "The type of campaign communication limits config.", + "smithy.api#enum": [ + { + "value": "ALL_CHANNEL_SUBTYPES", + "name": "ALL_CHANNEL_SUBTYPES" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationTimeConfig": { + "type": "structure", + "members": { + "localTimeZoneConfig": { + "target": "com.amazonaws.connectcampaignsv2#LocalTimeZoneConfig", + "traits": { + "smithy.api#required": {} + } + }, + "telephony": { + "target": "com.amazonaws.connectcampaignsv2#TimeWindow" + }, + "sms": { + "target": "com.amazonaws.connectcampaignsv2#TimeWindow" + }, + "email": { + "target": "com.amazonaws.connectcampaignsv2#TimeWindow" + } + }, + "traits": { + "smithy.api#documentation": "Campaign communication time config" + } + }, + "com.amazonaws.connectcampaignsv2#CommunicationTimeConfigType": { + "type": "string", + "traits": { + "smithy.api#documentation": "The type of campaign communication time config", + "smithy.api#enum": [ + { + "value": "TELEPHONY", + "name": "TELEPHONY" + }, + { + "value": "SMS", + "name": "SMS" + }, + { + "value": "EMAIL", + "name": "EMAIL" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "The request could not be processed because of conflict in the current state of the resource.", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.connectcampaignsv2#ContactFlowId": { + "type": "string", + "traits": { + "smithy.api#documentation": "The identifier of the contact flow for the outbound call.", + "smithy.api#length": { + "max": 500 + } + } + }, + "com.amazonaws.connectcampaignsv2#CreateCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#CreateCampaignRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#CreateCampaignResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a campaign for the specified Amazon Connect account. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#CreateCampaignRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.connectcampaignsv2#CampaignName", + "traits": { + "smithy.api#required": {} + } + }, + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#required": {} + } + }, + "channelSubtypeConfig": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtypeConfig", + "traits": { + "smithy.api#required": {} + } + }, + "source": { + "target": "com.amazonaws.connectcampaignsv2#Source" + }, + "connectCampaignFlowArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + }, + "schedule": { + "target": "com.amazonaws.connectcampaignsv2#Schedule" + }, + "communicationTimeConfig": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationTimeConfig" + }, + "communicationLimitsOverride": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimitsConfig" + }, + "tags": { + "target": "com.amazonaws.connectcampaignsv2#TagMap" + } + }, + "traits": { + "smithy.api#documentation": "The request for CreateCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#CreateCampaignResponse": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId" + }, + "arn": { + "target": "com.amazonaws.connectcampaignsv2#CampaignArn" + }, + "tags": { + "target": "com.amazonaws.connectcampaignsv2#TagMap" + } + }, + "traits": { + "smithy.api#documentation": "The response for Create Campaign API", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#CustomerProfilesIntegrationConfig": { + "type": "structure", + "members": { + "domainArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + }, + "objectTypeNames": { + "target": "com.amazonaws.connectcampaignsv2#ObjectTypeNamesMap", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Customer Profiles integration config" + } + }, + "com.amazonaws.connectcampaignsv2#CustomerProfilesIntegrationIdentifier": { + "type": "structure", + "members": { + "domainArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Customer Profiles integration identifier" + } + }, + "com.amazonaws.connectcampaignsv2#CustomerProfilesIntegrationSummary": { + "type": "structure", + "members": { + "domainArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + }, + "objectTypeNames": { + "target": "com.amazonaws.connectcampaignsv2#ObjectTypeNamesMap", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Customer Profiles integration summary" + } + }, + "com.amazonaws.connectcampaignsv2#DailyHours": { + "type": "map", + "key": { + "target": "com.amazonaws.connectcampaignsv2#DayOfWeek" + }, + "value": { + "target": "com.amazonaws.connectcampaignsv2#TimeRangeList" + }, + "traits": { + "smithy.api#documentation": "Daily Hours map" + } + }, + "com.amazonaws.connectcampaignsv2#DayOfWeek": { + "type": "string", + "traits": { + "smithy.api#documentation": "Day of week enum", + "smithy.api#enum": [ + { + "value": "MONDAY", + "name": "MONDAY" + }, + { + "value": "TUESDAY", + "name": "TUESDAY" + }, + { + "value": "WEDNESDAY", + "name": "WEDNESDAY" + }, + { + "value": "THURSDAY", + "name": "THURSDAY" + }, + { + "value": "FRIDAY", + "name": "FRIDAY" + }, + { + "value": "SATURDAY", + "name": "SATURDAY" + }, + { + "value": "SUNDAY", + "name": "SUNDAY" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a campaign from the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignChannelSubtypeConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignChannelSubtypeConfigRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the channel subtype config of a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/channel-subtype-config", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignChannelSubtypeConfigRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "channelSubtype": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtype", + "traits": { + "smithy.api#httpQuery": "channelSubtype", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteCampaignChannelSubtypeConfig API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationLimits": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationLimitsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the communication limits config for a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/communication-limits", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationLimitsRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "config": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimitsConfigType", + "traits": { + "smithy.api#httpQuery": "config", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteCampaignCommunicationLimits API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationTime": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationTimeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes the communication time config for a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/communication-time", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignCommunicationTimeRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "config": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationTimeConfigType", + "traits": { + "smithy.api#httpQuery": "config", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteCampaignCommunicationTime API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteCampaignRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceConfigRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes a connect instance config from the specified AWS account.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/config", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceConfigRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "campaignDeletionPolicy": { + "target": "com.amazonaws.connectcampaignsv2#CampaignDeletionPolicy", + "traits": { + "smithy.api#httpQuery": "campaignDeletionPolicy" + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteConnectInstanceConfig API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceIntegrationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Delete the integration for the specified Amazon Connect instance.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/integrations/delete", + "method": "POST" + } + } + }, + "com.amazonaws.connectcampaignsv2#DeleteConnectInstanceIntegrationRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "integrationIdentifier": { + "target": "com.amazonaws.connectcampaignsv2#IntegrationIdentifier", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteConnectInstanceIntegration API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteInstanceOnboardingJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DeleteInstanceOnboardingJobRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Delete the Connect Campaigns onboarding job for the specified Amazon Connect instance.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/onboarding", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#DeleteInstanceOnboardingJobRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DeleteInstanceOnboardingJob API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DescribeCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#DescribeCampaignRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#DescribeCampaignResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Describes the specific campaign.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.connectcampaignsv2#DescribeCampaignRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for DescribeCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#DescribeCampaignResponse": { + "type": "structure", + "members": { + "campaign": { + "target": "com.amazonaws.connectcampaignsv2#Campaign" + } + }, + "traits": { + "smithy.api#documentation": "The response for DescribeCampaign API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#DestinationPhoneNumber": { + "type": "string", + "traits": { + "smithy.api#documentation": "The phone number of the customer, in E.164 format.", + "smithy.api#length": { + "min": 0, + "max": 20 + }, + "smithy.api#pattern": "^[\\d\\-+]*$", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.connectcampaignsv2#DialRequestId": { + "type": "string", + "traits": { + "smithy.api#documentation": "Identifier representing a Dial request", + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-.]*$" + } + }, + "com.amazonaws.connectcampaignsv2#EmailAddress": { + "type": "string", + "traits": { + "smithy.api#documentation": "Source/Destination Email address used for Email messages", + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "[^\\s@]+@[^\\s@]+\\.[^\\s@]+", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.connectcampaignsv2#EmailChannelSubtypeConfig": { + "type": "structure", + "members": { + "capacity": { + "target": "com.amazonaws.connectcampaignsv2#Capacity" + }, + "outboundMode": { + "target": "com.amazonaws.connectcampaignsv2#EmailOutboundMode", + "traits": { + "smithy.api#required": {} + } + }, + "defaultOutboundConfig": { + "target": "com.amazonaws.connectcampaignsv2#EmailOutboundConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Email Channel Subtype config" + } + }, + "com.amazonaws.connectcampaignsv2#EmailChannelSubtypeParameters": { + "type": "structure", + "members": { + "destinationEmailAddress": { + "target": "com.amazonaws.connectcampaignsv2#EmailAddress", + "traits": { + "smithy.api#required": {} + } + }, + "connectSourceEmailAddress": { + "target": "com.amazonaws.connectcampaignsv2#EmailAddress" + }, + "templateArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + }, + "templateParameters": { + "target": "com.amazonaws.connectcampaignsv2#Attributes", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Parameters for the Email Channel Subtype" + } + }, + "com.amazonaws.connectcampaignsv2#EmailDisplayName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Display name for Email Address", + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.connectcampaignsv2#EmailOutboundConfig": { + "type": "structure", + "members": { + "connectSourceEmailAddress": { + "target": "com.amazonaws.connectcampaignsv2#EmailAddress", + "traits": { + "smithy.api#required": {} + } + }, + "sourceEmailAddressDisplayName": { + "target": "com.amazonaws.connectcampaignsv2#EmailDisplayName" + }, + "wisdomTemplateArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Default Email Outbound config" + } + }, + "com.amazonaws.connectcampaignsv2#EmailOutboundMode": { + "type": "union", + "members": { + "agentless": { + "target": "com.amazonaws.connectcampaignsv2#AgentlessConfig" + } + }, + "traits": { + "smithy.api#documentation": "Email Outbound Mode" + } + }, + "com.amazonaws.connectcampaignsv2#Enabled": { + "type": "boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "Boolean to indicate if custom encryption has been enabled." + } + }, + "com.amazonaws.connectcampaignsv2#EncryptionConfig": { + "type": "structure", + "members": { + "enabled": { + "target": "com.amazonaws.connectcampaignsv2#Enabled", + "traits": { + "smithy.api#default": false, + "smithy.api#required": {} + } + }, + "encryptionType": { + "target": "com.amazonaws.connectcampaignsv2#EncryptionType" + }, + "keyArn": { + "target": "com.amazonaws.connectcampaignsv2#EncryptionKey" + } + }, + "traits": { + "smithy.api#documentation": "Encryption config for Connect Instance. Note that sensitive data will always be encrypted.\nIf disabled, service will perform encryption with its own key.\nIf enabled, a KMS key id needs to be provided and KMS charges will apply.\nKMS is only type supported" + } + }, + "com.amazonaws.connectcampaignsv2#EncryptionKey": { + "type": "string", + "traits": { + "smithy.api#documentation": "KMS key id/arn for encryption config.", + "smithy.api#length": { + "max": 500 + } + } + }, + "com.amazonaws.connectcampaignsv2#EncryptionType": { + "type": "string", + "traits": { + "smithy.api#documentation": "Server-side encryption type.", + "smithy.api#enum": [ + { + "name": "KMS", + "value": "KMS" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#EventType": { + "type": "string", + "traits": { + "smithy.api#documentation": "Enumeration of Customer Profiles event type", + "smithy.api#enum": [ + { + "value": "Campaign-Email", + "name": "CAMPAIGN_EMAIL" + }, + { + "value": "Campaign-SMS", + "name": "CAMPAIGN_SMS" + }, + { + "value": "Campaign-Telephony", + "name": "CAMPAIGN_TELEPHONY" + }, + { + "value": "Campaign-Orchestration", + "name": "CAMPAIGN_ORCHESTRATION" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#FailedCampaignStateResponse": { + "type": "structure", + "members": { + "campaignId": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId" + }, + "failureCode": { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignStateBatchFailureCode" + } + }, + "traits": { + "smithy.api#documentation": "Failed response of campaign state" + } + }, + "com.amazonaws.connectcampaignsv2#FailedCampaignStateResponseList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#FailedCampaignStateResponse" + }, + "traits": { + "smithy.api#documentation": "List of failed requests of campaign state", + "smithy.api#length": { + "min": 0, + "max": 25 + } + } + }, + "com.amazonaws.connectcampaignsv2#FailedRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.connectcampaignsv2#ClientToken" + }, + "id": { + "target": "com.amazonaws.connectcampaignsv2#DialRequestId" + }, + "failureCode": { + "target": "com.amazonaws.connectcampaignsv2#FailureCode" + } + }, + "traits": { + "smithy.api#documentation": "A failed request identified by the unique client token." + } + }, + "com.amazonaws.connectcampaignsv2#FailedRequestList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#FailedRequest" + }, + "traits": { + "smithy.api#documentation": "A list of failed requests.", + "smithy.api#length": { + "min": 0, + "max": 25 + } + } + }, + "com.amazonaws.connectcampaignsv2#FailureCode": { + "type": "string", + "traits": { + "smithy.api#documentation": "A predefined code indicating the error that caused the failure.", + "smithy.api#enum": [ + { + "value": "InvalidInput", + "name": "INVALID_INPUT", + "documentation": "The request failed to satisfy the constraints specified by the service" + }, + { + "value": "RequestThrottled", + "name": "REQUEST_THROTTLED", + "documentation": "The request was throttled due to excessive usage" + }, + { + "value": "UnknownError", + "name": "UNKNOWN_ERROR", + "documentation": "Unexpected error during processing of request" + }, + { + "value": "BufferLimitExceeded", + "name": "BUFFER_LIMIT_EXCEEDED", + "documentation": "Request throttled due to large number of pending dial requests" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignState": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignStateRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignStateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get state of a campaign for the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/state", + "method": "GET" + } + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignStateBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignStateBatchRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#GetCampaignStateBatchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get state of campaigns for the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns-state", + "method": "POST" + } + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignStateBatchFailureCode": { + "type": "string", + "traits": { + "smithy.api#documentation": "A predefined code indicating the error that caused the failure in getting state of campaigns", + "smithy.api#enum": [ + { + "value": "ResourceNotFound", + "name": "RESOURCE_NOT_FOUND", + "documentation": "The specified resource was not found" + }, + { + "value": "UnknownError", + "name": "UNKNOWN_ERROR", + "documentation": "Unexpected error during processing of request" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignStateBatchRequest": { + "type": "structure", + "members": { + "campaignIds": { + "target": "com.amazonaws.connectcampaignsv2#CampaignIdList", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + }, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for GetCampaignStateBatch API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignStateBatchResponse": { + "type": "structure", + "members": { + "successfulRequests": { + "target": "com.amazonaws.connectcampaignsv2#SuccessfulCampaignStateResponseList" + }, + "failedRequests": { + "target": "com.amazonaws.connectcampaignsv2#FailedCampaignStateResponseList" + } + }, + "traits": { + "smithy.api#documentation": "The response for GetCampaignStateBatch API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignStateRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for GetCampaignState API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetCampaignStateResponse": { + "type": "structure", + "members": { + "state": { + "target": "com.amazonaws.connectcampaignsv2#CampaignState" + } + }, + "traits": { + "smithy.api#documentation": "The response for GetCampaignState API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetConnectInstanceConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#GetConnectInstanceConfigRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#GetConnectInstanceConfigResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get the specific Connect instance config.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/config", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetConnectInstanceConfigRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for GetConnectInstanceConfig API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetConnectInstanceConfigResponse": { + "type": "structure", + "members": { + "connectInstanceConfig": { + "target": "com.amazonaws.connectcampaignsv2#InstanceConfig" + } + }, + "traits": { + "smithy.api#documentation": "The response for GetConnectInstanceConfig API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetInstanceOnboardingJobStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#GetInstanceOnboardingJobStatusRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#GetInstanceOnboardingJobStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Get the specific instance onboarding job status.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/onboarding", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetInstanceOnboardingJobStatusRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for GetInstanceOnboardingJobStatus API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#GetInstanceOnboardingJobStatusResponse": { + "type": "structure", + "members": { + "connectInstanceOnboardingJobStatus": { + "target": "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobStatus" + } + }, + "traits": { + "smithy.api#documentation": "The response for GetInstanceOnboardingJobStatus API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#InstanceConfig": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#required": {} + } + }, + "serviceLinkedRoleArn": { + "target": "com.amazonaws.connectcampaignsv2#ServiceLinkedRoleArn", + "traits": { + "smithy.api#required": {} + } + }, + "encryptionConfig": { + "target": "com.amazonaws.connectcampaignsv2#EncryptionConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Instance config object" + } + }, + "com.amazonaws.connectcampaignsv2#InstanceId": { + "type": "string", + "traits": { + "smithy.api#documentation": "Amazon Connect Instance Id", + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-.]*$" + } + }, + "com.amazonaws.connectcampaignsv2#InstanceIdFilter": { + "type": "structure", + "members": { + "value": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#required": {} + } + }, + "operator": { + "target": "com.amazonaws.connectcampaignsv2#InstanceIdFilterOperator", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Connect instance identifier filter" + } + }, + "com.amazonaws.connectcampaignsv2#InstanceIdFilterOperator": { + "type": "string", + "traits": { + "smithy.api#documentation": "Operators for Connect instance identifier filter", + "smithy.api#enum": [ + { + "name": "EQ", + "value": "Eq", + "documentation": "Equals operator" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobFailureCode": { + "type": "string", + "traits": { + "smithy.api#documentation": "Enumeration of the possible failure codes for instance onboarding job", + "smithy.api#enum": [ + { + "value": "EVENT_BRIDGE_ACCESS_DENIED", + "name": "EVENT_BRIDGE_ACCESS_DENIED" + }, + { + "value": "EVENT_BRIDGE_MANAGED_RULE_LIMIT_EXCEEDED", + "name": "EVENT_BRIDGE_MANAGED_RULE_LIMIT_EXCEEDED" + }, + { + "value": "IAM_ACCESS_DENIED", + "name": "IAM_ACCESS_DENIED" + }, + { + "value": "KMS_ACCESS_DENIED", + "name": "KMS_ACCESS_DENIED" + }, + { + "value": "KMS_KEY_NOT_FOUND", + "name": "KMS_KEY_NOT_FOUND" + }, + { + "value": "INTERNAL_FAILURE", + "name": "INTERNAL_FAILURE" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobStatus": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobStatusCode", + "traits": { + "smithy.api#required": {} + } + }, + "failureCode": { + "target": "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobFailureCode" + } + }, + "traits": { + "smithy.api#documentation": "Instance onboarding job status object" + } + }, + "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobStatusCode": { + "type": "string", + "traits": { + "smithy.api#documentation": "Enumeration of the possible states for instance onboarding job", + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#IntegrationConfig": { + "type": "union", + "members": { + "customerProfiles": { + "target": "com.amazonaws.connectcampaignsv2#CustomerProfilesIntegrationConfig" + }, + "qConnect": { + "target": "com.amazonaws.connectcampaignsv2#QConnectIntegrationConfig" + } + }, + "traits": { + "smithy.api#documentation": "Integration config for Connect Instance" + } + }, + "com.amazonaws.connectcampaignsv2#IntegrationIdentifier": { + "type": "union", + "members": { + "customerProfiles": { + "target": "com.amazonaws.connectcampaignsv2#CustomerProfilesIntegrationIdentifier" + }, + "qConnect": { + "target": "com.amazonaws.connectcampaignsv2#QConnectIntegrationIdentifier" + } + }, + "traits": { + "smithy.api#documentation": "Integration identifier for Connect instance" + } + }, + "com.amazonaws.connectcampaignsv2#IntegrationSummary": { + "type": "union", + "members": { + "customerProfiles": { + "target": "com.amazonaws.connectcampaignsv2#CustomerProfilesIntegrationSummary" + }, + "qConnect": { + "target": "com.amazonaws.connectcampaignsv2#QConnectIntegrationSummary" + } + }, + "traits": { + "smithy.api#documentation": "Integration summary for Connect instance." + } + }, + "com.amazonaws.connectcampaignsv2#IntegrationSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#IntegrationSummary" + }, + "traits": { + "smithy.api#documentation": "A list of Amazon Connect Instance Integrations." + } + }, + "com.amazonaws.connectcampaignsv2#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "Request processing failed because of an error or failure with the service.", + "smithy.api#error": "server", + "smithy.api#httpError": 500, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException": { + "type": "structure", + "members": { + "state": { + "target": "com.amazonaws.connectcampaignsv2#CampaignState", + "traits": { + "smithy.api#required": {} + } + }, + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "The request could not be processed because of conflict in the current state of the campaign.", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.connectcampaignsv2#InvalidStateException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "The request could not be processed because of conflict in the current state.", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.connectcampaignsv2#Iso8601Date": { + "type": "string", + "traits": { + "smithy.api#documentation": "Date in ISO 8601 format, e.g. 2024-01-01", + "smithy.api#pattern": "^\\d{4}-\\d{2}-\\d{2}$" + } + }, + "com.amazonaws.connectcampaignsv2#Iso8601Duration": { + "type": "string", + "traits": { + "smithy.api#documentation": "Time duration in ISO 8601 format", + "smithy.api#length": { + "min": 0, + "max": 50 + }, + "smithy.api#pattern": "^P(?:([-+]?[0-9]+)D)?(T(?:([-+]?[0-9]+)H)?(?:([-+]?[0-9]+)M)?(?:([-+]?[0-9]+)(?:[.,]([0-9]{0,9}))?S)?)?$" + } + }, + "com.amazonaws.connectcampaignsv2#Iso8601Time": { + "type": "string", + "traits": { + "smithy.api#documentation": "Time in ISO 8601 format, e.g. T23:11", + "smithy.api#pattern": "^T\\d{2}:\\d{2}$" + } + }, + "com.amazonaws.connectcampaignsv2#ListCampaigns": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#ListCampaignsRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#ListCampaignsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Provides summary information about the campaigns under the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns-summary", + "method": "POST" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "campaignSummaryList" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListCampaignsRequest": { + "type": "structure", + "members": { + "maxResults": { + "target": "com.amazonaws.connectcampaignsv2#MaxResults" + }, + "nextToken": { + "target": "com.amazonaws.connectcampaignsv2#NextToken" + }, + "filters": { + "target": "com.amazonaws.connectcampaignsv2#CampaignFilters" + } + }, + "traits": { + "smithy.api#documentation": "The request for ListCampaigns API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListCampaignsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.connectcampaignsv2#NextToken" + }, + "campaignSummaryList": { + "target": "com.amazonaws.connectcampaignsv2#CampaignSummaryList" + } + }, + "traits": { + "smithy.api#documentation": "The response for ListCampaigns API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListConnectInstanceIntegrations": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#ListConnectInstanceIntegrationsRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#ListConnectInstanceIntegrationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Provides summary information about the integration under the specified Connect instance.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/integrations", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "integrationSummaryList" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListConnectInstanceIntegrationsRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "maxResults": { + "target": "com.amazonaws.connectcampaignsv2#MaxResults", + "traits": { + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.connectcampaignsv2#NextToken", + "traits": { + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "The request for ListConnectInstanceIntegrations API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListConnectInstanceIntegrationsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.connectcampaignsv2#NextToken" + }, + "integrationSummaryList": { + "target": "com.amazonaws.connectcampaignsv2#IntegrationSummaryList" + } + }, + "traits": { + "smithy.api#documentation": "The response for ListConnectInstanceIntegrations API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "List tags for a resource.", + "smithy.api#http": { + "uri": "/v2/tags/{arn}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for ListTagsForResource API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.connectcampaignsv2#TagMap" + } + }, + "traits": { + "smithy.api#documentation": "The request for ListTagsForResource API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#LocalTimeZoneConfig": { + "type": "structure", + "members": { + "defaultTimeZone": { + "target": "com.amazonaws.connectcampaignsv2#TimeZone" + }, + "localTimeZoneDetection": { + "target": "com.amazonaws.connectcampaignsv2#LocalTimeZoneDetection" + } + }, + "traits": { + "smithy.api#documentation": "Local time zone config" + } + }, + "com.amazonaws.connectcampaignsv2#LocalTimeZoneDetection": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#LocalTimeZoneDetectionType" + }, + "traits": { + "smithy.api#documentation": "Local TimeZone Detection method list", + "smithy.api#uniqueItems": {} + } + }, + "com.amazonaws.connectcampaignsv2#LocalTimeZoneDetectionType": { + "type": "string", + "traits": { + "smithy.api#documentation": "Local TimeZone Detection method.", + "smithy.api#enum": [ + { + "value": "ZIP_CODE", + "name": "ZIP_CODE" + }, + { + "value": "AREA_CODE", + "name": "AREA_CODE" + } + ] + } + }, + "com.amazonaws.connectcampaignsv2#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#documentation": "The maximum number of results to return per page.", + "smithy.api#range": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.connectcampaignsv2#NextToken": { + "type": "string", + "traits": { + "smithy.api#documentation": "The token for the next set of results.", + "smithy.api#length": { + "max": 1000 + } + } + }, + "com.amazonaws.connectcampaignsv2#ObjectTypeName": { + "type": "string", + "traits": { + "smithy.api#documentation": "Object type name", + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.connectcampaignsv2#ObjectTypeNamesMap": { + "type": "map", + "key": { + "target": "com.amazonaws.connectcampaignsv2#EventType" + }, + "value": { + "target": "com.amazonaws.connectcampaignsv2#ObjectTypeName" + }, + "traits": { + "smithy.api#documentation": "Object type names map." + } + }, + "com.amazonaws.connectcampaignsv2#OpenHours": { + "type": "union", + "members": { + "dailyHours": { + "target": "com.amazonaws.connectcampaignsv2#DailyHours" + } + }, + "traits": { + "smithy.api#documentation": "Open Hours config" + } + }, + "com.amazonaws.connectcampaignsv2#OutboundRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.connectcampaignsv2#ClientToken", + "traits": { + "smithy.api#required": {} + } + }, + "expirationTime": { + "target": "com.amazonaws.connectcampaignsv2#TimeStamp", + "traits": { + "smithy.api#required": {} + } + }, + "channelSubtypeParameters": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtypeParameters", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "An outbound request for a campaign." + } + }, + "com.amazonaws.connectcampaignsv2#OutboundRequestList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#OutboundRequest" + }, + "traits": { + "smithy.api#documentation": "A list of outbound requests.", + "smithy.api#length": { + "min": 1, + "max": 25 + } + } + }, + "com.amazonaws.connectcampaignsv2#PauseCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#PauseCampaignRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Pauses a campaign for the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/pause", + "method": "POST" + } + } + }, + "com.amazonaws.connectcampaignsv2#PauseCampaignRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for PauseCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#PredictiveConfig": { + "type": "structure", + "members": { + "bandwidthAllocation": { + "target": "com.amazonaws.connectcampaignsv2#BandwidthAllocation", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Predictive config" + } + }, + "com.amazonaws.connectcampaignsv2#ProgressiveConfig": { + "type": "structure", + "members": { + "bandwidthAllocation": { + "target": "com.amazonaws.connectcampaignsv2#BandwidthAllocation", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Progressive config" + } + }, + "com.amazonaws.connectcampaignsv2#PutConnectInstanceIntegration": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#PutConnectInstanceIntegrationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Put or update the integration for the specified Amazon Connect instance.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/integrations", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#PutConnectInstanceIntegrationRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "integrationConfig": { + "target": "com.amazonaws.connectcampaignsv2#IntegrationConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for PutConnectInstanceIntegration API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#PutOutboundRequestBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#PutOutboundRequestBatchRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#PutOutboundRequestBatchResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates outbound requests for the specified campaign Amazon Connect account. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/outbound-requests", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#PutOutboundRequestBatchRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "outboundRequests": { + "target": "com.amazonaws.connectcampaignsv2#OutboundRequestList", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for PutOutboundRequestBatch API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#PutOutboundRequestBatchResponse": { + "type": "structure", + "members": { + "successfulRequests": { + "target": "com.amazonaws.connectcampaignsv2#SuccessfulRequestList" + }, + "failedRequests": { + "target": "com.amazonaws.connectcampaignsv2#FailedRequestList" + } + }, + "traits": { + "smithy.api#documentation": "The response for PutOutboundRequestBatch API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#QConnectIntegrationConfig": { + "type": "structure", + "members": { + "knowledgeBaseArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Q Connect integration config" + } + }, + "com.amazonaws.connectcampaignsv2#QConnectIntegrationIdentifier": { + "type": "structure", + "members": { + "knowledgeBaseArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Q Connect integration identifier" + } + }, + "com.amazonaws.connectcampaignsv2#QConnectIntegrationSummary": { + "type": "structure", + "members": { + "knowledgeBaseArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Q Connect integration summary" + } + }, + "com.amazonaws.connectcampaignsv2#QueueId": { + "type": "string", + "traits": { + "smithy.api#documentation": "The queue for the call. If you specify a queue, the phone displayed for caller ID is the phone number specified in the queue. If you do not specify a queue, the queue defined in the contact flow is used. If you do not specify a queue, you must specify a source phone number.", + "smithy.api#length": { + "max": 500 + } + } + }, + "com.amazonaws.connectcampaignsv2#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "The specified resource was not found.", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.connectcampaignsv2#RestrictedPeriod": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.connectcampaignsv2#RestrictedPeriodName" + }, + "startDate": { + "target": "com.amazonaws.connectcampaignsv2#Iso8601Date", + "traits": { + "smithy.api#required": {} + } + }, + "endDate": { + "target": "com.amazonaws.connectcampaignsv2#Iso8601Date", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Restricted period" + } + }, + "com.amazonaws.connectcampaignsv2#RestrictedPeriodList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#RestrictedPeriod" + }, + "traits": { + "smithy.api#documentation": "List of restricted period" + } + }, + "com.amazonaws.connectcampaignsv2#RestrictedPeriodName": { + "type": "string", + "traits": { + "smithy.api#documentation": "The name of a restricted period.", + "smithy.api#length": { + "min": 1, + "max": 127 + } + } + }, + "com.amazonaws.connectcampaignsv2#RestrictedPeriods": { + "type": "union", + "members": { + "restrictedPeriodList": { + "target": "com.amazonaws.connectcampaignsv2#RestrictedPeriodList" + } + }, + "traits": { + "smithy.api#documentation": "Restricted period config" + } + }, + "com.amazonaws.connectcampaignsv2#ResumeCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#ResumeCampaignRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Stops a campaign for the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/resume", + "method": "POST" + } + } + }, + "com.amazonaws.connectcampaignsv2#ResumeCampaignRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for ResumeCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#Schedule": { + "type": "structure", + "members": { + "startTime": { + "target": "com.amazonaws.connectcampaignsv2#TimeStamp", + "traits": { + "smithy.api#required": {} + } + }, + "endTime": { + "target": "com.amazonaws.connectcampaignsv2#TimeStamp", + "traits": { + "smithy.api#required": {} + } + }, + "refreshFrequency": { + "target": "com.amazonaws.connectcampaignsv2#Iso8601Duration" + } + }, + "traits": { + "smithy.api#documentation": "Campaign schedule" + } + }, + "com.amazonaws.connectcampaignsv2#ServiceLinkedRoleArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "Service linked role arn", + "smithy.api#length": { + "max": 256 + } + } + }, + "com.amazonaws.connectcampaignsv2#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "Request would cause a service quota to be exceeded.", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.connectcampaignsv2#SmsChannelSubtypeConfig": { + "type": "structure", + "members": { + "capacity": { + "target": "com.amazonaws.connectcampaignsv2#Capacity" + }, + "outboundMode": { + "target": "com.amazonaws.connectcampaignsv2#SmsOutboundMode", + "traits": { + "smithy.api#required": {} + } + }, + "defaultOutboundConfig": { + "target": "com.amazonaws.connectcampaignsv2#SmsOutboundConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "SMS Channel Subtype config" + } + }, + "com.amazonaws.connectcampaignsv2#SmsChannelSubtypeParameters": { + "type": "structure", + "members": { + "destinationPhoneNumber": { + "target": "com.amazonaws.connectcampaignsv2#DestinationPhoneNumber", + "traits": { + "smithy.api#required": {} + } + }, + "connectSourcePhoneNumberArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + }, + "templateArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + }, + "templateParameters": { + "target": "com.amazonaws.connectcampaignsv2#Attributes", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Parameters for the SMS Channel Subtype" + } + }, + "com.amazonaws.connectcampaignsv2#SmsOutboundConfig": { + "type": "structure", + "members": { + "connectSourcePhoneNumberArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + }, + "wisdomTemplateArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Default SMS Outbound config" + } + }, + "com.amazonaws.connectcampaignsv2#SmsOutboundMode": { + "type": "union", + "members": { + "agentless": { + "target": "com.amazonaws.connectcampaignsv2#AgentlessConfig" + } + }, + "traits": { + "smithy.api#documentation": "SMS Outbound Mode" + } + }, + "com.amazonaws.connectcampaignsv2#Source": { + "type": "union", + "members": { + "customerProfilesSegmentArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn" + } + }, + "traits": { + "smithy.api#documentation": "Source of the campaign" + } + }, + "com.amazonaws.connectcampaignsv2#SourcePhoneNumber": { + "type": "string", + "traits": { + "smithy.api#documentation": "The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.", + "smithy.api#length": { + "max": 100 + } + } + }, + "com.amazonaws.connectcampaignsv2#StartCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#StartCampaignRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Starts a campaign for the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/start", + "method": "POST" + } + } + }, + "com.amazonaws.connectcampaignsv2#StartCampaignRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for StartCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#StartInstanceOnboardingJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#StartInstanceOnboardingJobRequest" + }, + "output": { + "target": "com.amazonaws.connectcampaignsv2#StartInstanceOnboardingJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Onboard the specific Amazon Connect instance to Connect Campaigns.", + "smithy.api#http": { + "uri": "/v2/connect-instance/{connectInstanceId}/onboarding", + "method": "PUT" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#StartInstanceOnboardingJobRequest": { + "type": "structure", + "members": { + "connectInstanceId": { + "target": "com.amazonaws.connectcampaignsv2#InstanceId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "encryptionConfig": { + "target": "com.amazonaws.connectcampaignsv2#EncryptionConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for StartInstanceOnboardingJob API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#StartInstanceOnboardingJobResponse": { + "type": "structure", + "members": { + "connectInstanceOnboardingJobStatus": { + "target": "com.amazonaws.connectcampaignsv2#InstanceOnboardingJobStatus" + } + }, + "traits": { + "smithy.api#documentation": "The response for StartInstanceOnboardingJob API.", + "smithy.api#output": {} + } + }, + "com.amazonaws.connectcampaignsv2#StopCampaign": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#StopCampaignRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Stops a campaign for the specified Amazon Connect account.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/stop", + "method": "POST" + } + } + }, + "com.amazonaws.connectcampaignsv2#StopCampaignRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for StopCampaign API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#SuccessfulCampaignStateResponse": { + "type": "structure", + "members": { + "campaignId": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId" + }, + "state": { + "target": "com.amazonaws.connectcampaignsv2#CampaignState" + } + }, + "traits": { + "smithy.api#documentation": "Successful response of campaign state" + } + }, + "com.amazonaws.connectcampaignsv2#SuccessfulCampaignStateResponseList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#SuccessfulCampaignStateResponse" + }, + "traits": { + "smithy.api#documentation": "List of successful response of campaign state", + "smithy.api#length": { + "min": 0, + "max": 25 + } + } + }, + "com.amazonaws.connectcampaignsv2#SuccessfulRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.connectcampaignsv2#ClientToken" + }, + "id": { + "target": "com.amazonaws.connectcampaignsv2#DialRequestId" + } + }, + "traits": { + "smithy.api#documentation": "A successful request identified by the unique client token." + } + }, + "com.amazonaws.connectcampaignsv2#SuccessfulRequestList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#SuccessfulRequest" + }, + "traits": { + "smithy.api#documentation": "A list of successful requests identified by the unique client token.", + "smithy.api#length": { + "min": 0, + "max": 25 + } + } + }, + "com.amazonaws.connectcampaignsv2#TagKey": { + "type": "string", + "traits": { + "smithy.api#documentation": "The key of tag.", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.connectcampaignsv2#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#TagKey" + }, + "traits": { + "smithy.api#documentation": "List of tag keys.", + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.connectcampaignsv2#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.connectcampaignsv2#TagKey" + }, + "value": { + "target": "com.amazonaws.connectcampaignsv2#TagValue" + }, + "traits": { + "smithy.api#documentation": "Tag map with key and value." + } + }, + "com.amazonaws.connectcampaignsv2#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#TagResourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Tag a resource.", + "smithy.api#http": { + "uri": "/v2/tags/{arn}", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#TagResourceRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.connectcampaignsv2#TagMap", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for TagResource API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#TagValue": { + "type": "string", + "traits": { + "smithy.api#documentation": "The value of tag.", + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.connectcampaignsv2#TelephonyChannelSubtypeConfig": { + "type": "structure", + "members": { + "capacity": { + "target": "com.amazonaws.connectcampaignsv2#Capacity" + }, + "connectQueueId": { + "target": "com.amazonaws.connectcampaignsv2#QueueId" + }, + "outboundMode": { + "target": "com.amazonaws.connectcampaignsv2#TelephonyOutboundMode", + "traits": { + "smithy.api#required": {} + } + }, + "defaultOutboundConfig": { + "target": "com.amazonaws.connectcampaignsv2#TelephonyOutboundConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Telephony Channel Subtype config" + } + }, + "com.amazonaws.connectcampaignsv2#TelephonyChannelSubtypeParameters": { + "type": "structure", + "members": { + "destinationPhoneNumber": { + "target": "com.amazonaws.connectcampaignsv2#DestinationPhoneNumber", + "traits": { + "smithy.api#required": {} + } + }, + "attributes": { + "target": "com.amazonaws.connectcampaignsv2#Attributes", + "traits": { + "smithy.api#required": {} + } + }, + "connectSourcePhoneNumber": { + "target": "com.amazonaws.connectcampaignsv2#SourcePhoneNumber" + }, + "answerMachineDetectionConfig": { + "target": "com.amazonaws.connectcampaignsv2#AnswerMachineDetectionConfig" + } + }, + "traits": { + "smithy.api#documentation": "Parameters for the Telephony Channel Subtype" + } + }, + "com.amazonaws.connectcampaignsv2#TelephonyOutboundConfig": { + "type": "structure", + "members": { + "connectContactFlowId": { + "target": "com.amazonaws.connectcampaignsv2#ContactFlowId", + "traits": { + "smithy.api#required": {} + } + }, + "connectSourcePhoneNumber": { + "target": "com.amazonaws.connectcampaignsv2#SourcePhoneNumber" + }, + "answerMachineDetectionConfig": { + "target": "com.amazonaws.connectcampaignsv2#AnswerMachineDetectionConfig" + } + }, + "traits": { + "smithy.api#documentation": "Default Telephony Outbound config" + } + }, + "com.amazonaws.connectcampaignsv2#TelephonyOutboundMode": { + "type": "union", + "members": { + "progressive": { + "target": "com.amazonaws.connectcampaignsv2#ProgressiveConfig" + }, + "predictive": { + "target": "com.amazonaws.connectcampaignsv2#PredictiveConfig" + }, + "agentless": { + "target": "com.amazonaws.connectcampaignsv2#AgentlessConfig" + } + }, + "traits": { + "smithy.api#documentation": "Telephony Outbound Mode" + } + }, + "com.amazonaws.connectcampaignsv2#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "The request was denied due to request throttling.", + "smithy.api#error": "client", + "smithy.api#httpError": 429, + "smithy.api#retryable": {} + } + }, + "com.amazonaws.connectcampaignsv2#TimeRange": { + "type": "structure", + "members": { + "startTime": { + "target": "com.amazonaws.connectcampaignsv2#Iso8601Time", + "traits": { + "smithy.api#required": {} + } + }, + "endTime": { + "target": "com.amazonaws.connectcampaignsv2#Iso8601Time", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "Time range in 24 hour format" + } + }, + "com.amazonaws.connectcampaignsv2#TimeRangeList": { + "type": "list", + "member": { + "target": "com.amazonaws.connectcampaignsv2#TimeRange" + }, + "traits": { + "smithy.api#documentation": "List of time range" + } + }, + "com.amazonaws.connectcampaignsv2#TimeStamp": { + "type": "timestamp", + "traits": { + "smithy.api#documentation": "Timestamp with no UTC offset or timezone", + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.connectcampaignsv2#TimeWindow": { + "type": "structure", + "members": { + "openHours": { + "target": "com.amazonaws.connectcampaignsv2#OpenHours", + "traits": { + "smithy.api#required": {} + } + }, + "restrictedPeriods": { + "target": "com.amazonaws.connectcampaignsv2#RestrictedPeriods" + } + }, + "traits": { + "smithy.api#documentation": "Time window config" + } + }, + "com.amazonaws.connectcampaignsv2#TimeZone": { + "type": "string", + "traits": { + "smithy.api#documentation": "Time Zone Id in the IANA format", + "smithy.api#length": { + "min": 0, + "max": 50 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_\\-/]*$" + } + }, + "com.amazonaws.connectcampaignsv2#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UntagResourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ThrottlingException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Untag a resource.", + "smithy.api#http": { + "uri": "/v2/tags/{arn}", + "method": "DELETE" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UntagResourceRequest": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.connectcampaignsv2#TagKeyList", + "traits": { + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UntagResource API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignChannelSubtypeConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignChannelSubtypeConfigRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the channel subtype config of a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/channel-subtype-config", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignChannelSubtypeConfigRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "channelSubtypeConfig": { + "target": "com.amazonaws.connectcampaignsv2#ChannelSubtypeConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignChannelSubtypeConfig API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationLimits": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationLimitsRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the communication limits config for a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/communication-limits", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationLimitsRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "communicationLimitsOverride": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationLimitsConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignCommunicationLimits API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationTime": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationTimeRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the communication time config for a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/communication-time", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignCommunicationTimeRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "communicationTimeConfig": { + "target": "com.amazonaws.connectcampaignsv2#CommunicationTimeConfig", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignCommunicationTime API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignFlowAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignFlowAssociationRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the campaign flow associated with a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/flow", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignFlowAssociationRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "connectCampaignFlowArn": { + "target": "com.amazonaws.connectcampaignsv2#Arn", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignFlowAssociation API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignName": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignNameRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the name of a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/name", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignNameRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.connectcampaignsv2#CampaignName", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignName API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignSchedule": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignScheduleRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the schedule for a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/schedule", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignScheduleRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "schedule": { + "target": "com.amazonaws.connectcampaignsv2#Schedule", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignSchedule API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignSource": { + "type": "operation", + "input": { + "target": "com.amazonaws.connectcampaignsv2#UpdateCampaignSourceRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.connectcampaignsv2#AccessDeniedException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ConflictException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InternalServerException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#InvalidCampaignStateException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.connectcampaignsv2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Updates the campaign source with a campaign. This API is idempotent.", + "smithy.api#http": { + "uri": "/v2/campaigns/{id}/source", + "method": "POST" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.connectcampaignsv2#UpdateCampaignSourceRequest": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.connectcampaignsv2#CampaignId", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "source": { + "target": "com.amazonaws.connectcampaignsv2#Source", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The request for UpdateCampaignSource API.", + "smithy.api#input": {} + } + }, + "com.amazonaws.connectcampaignsv2#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "xAmzErrorType": { + "target": "com.amazonaws.connectcampaignsv2#XAmazonErrorType", + "traits": { + "smithy.api#httpHeader": "x-amzn-ErrorType" + } + } + }, + "traits": { + "smithy.api#documentation": "The input fails to satisfy the constraints specified by an AWS service.", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.connectcampaignsv2#XAmazonErrorType": { + "type": "string", + "traits": { + "smithy.api#documentation": "A header that defines the error encountered while processing the request." + } + } + } +}