Skip to content

Commit

Permalink
feat(client-connect): Amazon Connect provides enhanced search capabil…
Browse files Browse the repository at this point in the history
…ities for flows & flow modules on the Connect admin website and programmatically using APIs. You can search for flows and flow modules by name, description, type, status, and tags, to filter and identify a specific flow in your Connect instances.
  • Loading branch information
awstools committed May 14, 2024
1 parent 31ce1e9 commit 43f9444
Show file tree
Hide file tree
Showing 21 changed files with 1,586 additions and 281 deletions.
16 changes: 16 additions & 0 deletions clients/client-connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,22 @@ SearchAvailablePhoneNumbers

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/SearchAvailablePhoneNumbersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/SearchAvailablePhoneNumbersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/SearchAvailablePhoneNumbersCommandOutput/)

</details>
<details>
<summary>
SearchContactFlowModules
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/SearchContactFlowModulesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/SearchContactFlowModulesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/SearchContactFlowModulesCommandOutput/)

</details>
<details>
<summary>
SearchContactFlows
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/connect/command/SearchContactFlowsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/SearchContactFlowsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-connect/Interface/SearchContactFlowsCommandOutput/)

</details>
<details>
<summary>
Expand Down
46 changes: 46 additions & 0 deletions clients/client-connect/src/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,16 @@ import {
SearchAvailablePhoneNumbersCommandInput,
SearchAvailablePhoneNumbersCommandOutput,
} from "./commands/SearchAvailablePhoneNumbersCommand";
import {
SearchContactFlowModulesCommand,
SearchContactFlowModulesCommandInput,
SearchContactFlowModulesCommandOutput,
} from "./commands/SearchContactFlowModulesCommand";
import {
SearchContactFlowsCommand,
SearchContactFlowsCommandInput,
SearchContactFlowsCommandOutput,
} from "./commands/SearchContactFlowsCommand";
import {
SearchContactsCommand,
SearchContactsCommandInput,
Expand Down Expand Up @@ -1337,6 +1347,8 @@ const commands = {
ResumeContactCommand,
ResumeContactRecordingCommand,
SearchAvailablePhoneNumbersCommand,
SearchContactFlowModulesCommand,
SearchContactFlowsCommand,
SearchContactsCommand,
SearchHoursOfOperationsCommand,
SearchPredefinedAttributesCommand,
Expand Down Expand Up @@ -4118,6 +4130,40 @@ export interface Connect {
cb: (err: any, data?: SearchAvailablePhoneNumbersCommandOutput) => void
): void;

/**
* @see {@link SearchContactFlowModulesCommand}
*/
searchContactFlowModules(
args: SearchContactFlowModulesCommandInput,
options?: __HttpHandlerOptions
): Promise<SearchContactFlowModulesCommandOutput>;
searchContactFlowModules(
args: SearchContactFlowModulesCommandInput,
cb: (err: any, data?: SearchContactFlowModulesCommandOutput) => void
): void;
searchContactFlowModules(
args: SearchContactFlowModulesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: SearchContactFlowModulesCommandOutput) => void
): void;

/**
* @see {@link SearchContactFlowsCommand}
*/
searchContactFlows(
args: SearchContactFlowsCommandInput,
options?: __HttpHandlerOptions
): Promise<SearchContactFlowsCommandOutput>;
searchContactFlows(
args: SearchContactFlowsCommandInput,
cb: (err: any, data?: SearchContactFlowsCommandOutput) => void
): void;
searchContactFlows(
args: SearchContactFlowsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: SearchContactFlowsCommandOutput) => void
): void;

/**
* @see {@link SearchContactsCommand}
*/
Expand Down
9 changes: 9 additions & 0 deletions clients/client-connect/src/ConnectClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ import {
SearchAvailablePhoneNumbersCommandInput,
SearchAvailablePhoneNumbersCommandOutput,
} from "./commands/SearchAvailablePhoneNumbersCommand";
import {
SearchContactFlowModulesCommandInput,
SearchContactFlowModulesCommandOutput,
} from "./commands/SearchContactFlowModulesCommand";
import { SearchContactFlowsCommandInput, SearchContactFlowsCommandOutput } from "./commands/SearchContactFlowsCommand";
import { SearchContactsCommandInput, SearchContactsCommandOutput } from "./commands/SearchContactsCommand";
import {
SearchHoursOfOperationsCommandInput,
Expand Down Expand Up @@ -929,6 +934,8 @@ export type ServiceInputTypes =
| ResumeContactCommandInput
| ResumeContactRecordingCommandInput
| SearchAvailablePhoneNumbersCommandInput
| SearchContactFlowModulesCommandInput
| SearchContactFlowsCommandInput
| SearchContactsCommandInput
| SearchHoursOfOperationsCommandInput
| SearchPredefinedAttributesCommandInput
Expand Down Expand Up @@ -1182,6 +1189,8 @@ export type ServiceOutputTypes =
| ResumeContactCommandOutput
| ResumeContactRecordingCommandOutput
| SearchAvailablePhoneNumbersCommandOutput
| SearchContactFlowModulesCommandOutput
| SearchContactFlowsCommandOutput
| SearchContactsCommandOutput
| SearchHoursOfOperationsCommandOutput
| SearchPredefinedAttributesCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export interface CreateContactFlowCommandOutput extends CreateContactFlowRespons
* Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER", // required
* Description: "STRING_VALUE",
* Content: "STRING_VALUE", // required
* Status: "PUBLISHED" || "SAVED",
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
Expand Down
10 changes: 10 additions & 0 deletions clients/client-connect/src/commands/DescribeContactFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ export interface DescribeContactFlowCommandOutput extends DescribeContactFlowRes
* <p>Describes the specified flow.</p>
* <p>You can also create and update flows using the <a href="https://docs.aws.amazon.com/connect/latest/APIReference/flow-language.html">Amazon Connect
* Flow language</a>.</p>
* <p>Use the <code>$SAVED</code> alias in the request to describe the <code>SAVED</code> content
* of a Flow. For example, <code>arn:aws:.../contact-flow/\{id\}:$SAVED</code>. Once a contact flow is
* published, <code>$SAVED</code> needs to be supplied to view saved content that has not been
* published.</p>
* <p>In the response, <b>Status</b> indicates the flow status as either
* <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate
* validation on the content. <code>SAVED</code> does not initiate validation of the content.
* <code>SAVED</code> | <code>PUBLISHED</code>
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -49,6 +58,7 @@ export interface DescribeContactFlowCommandOutput extends DescribeContactFlowRes
* // Name: "STRING_VALUE",
* // Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* // State: "ACTIVE" || "ARCHIVED",
* // Status: "PUBLISHED" || "SAVED",
* // Description: "STRING_VALUE",
* // Content: "STRING_VALUE",
* // Tags: { // TagMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export interface DescribeContactFlowModuleCommandOutput extends DescribeContactF

/**
* <p>Describes the specified flow module.</p>
* <p>Use the <code>$SAVED</code> alias in the request to describe the <code>SAVED</code> content
* of a Flow. For example, <code>arn:aws:.../contact-flow/\{id\}:$SAVED</code>. Once a contact flow is
* published, <code>$SAVED</code> needs to be supplied to view saved content that has not been
* published.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface ListContactFlowsCommandOutput extends ListContactFlowsResponse,
* // Name: "STRING_VALUE",
* // ContactFlowType: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
* // ContactFlowState: "ACTIVE" || "ARCHIVED",
* // ContactFlowStatus: "PUBLISHED" || "SAVED",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { ReplicateInstanceRequest, ReplicateInstanceRequestFilterSensitiveLog } from "../models/models_1";
import { ReplicateInstanceResponse } from "../models/models_2";
import {
ReplicateInstanceRequest,
ReplicateInstanceRequestFilterSensitiveLog,
ReplicateInstanceResponse,
} from "../models/models_2";
import { de_ReplicateInstanceCommand, se_ReplicateInstanceCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
157 changes: 157 additions & 0 deletions clients/client-connect/src/commands/SearchContactFlowModulesCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
// 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 { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { SearchContactFlowModulesRequest, SearchContactFlowModulesResponse } from "../models/models_2";
import { de_SearchContactFlowModulesCommand, se_SearchContactFlowModulesCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link SearchContactFlowModulesCommand}.
*/
export interface SearchContactFlowModulesCommandInput extends SearchContactFlowModulesRequest {}
/**
* @public
*
* The output of {@link SearchContactFlowModulesCommand}.
*/
export interface SearchContactFlowModulesCommandOutput extends SearchContactFlowModulesResponse, __MetadataBearer {}

/**
* <p>Searches the flow modules in an Amazon Connect instance, with optional filtering.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ConnectClient, SearchContactFlowModulesCommand } from "@aws-sdk/client-connect"; // ES Modules import
* // const { ConnectClient, SearchContactFlowModulesCommand } = require("@aws-sdk/client-connect"); // CommonJS import
* const client = new ConnectClient(config);
* const input = { // SearchContactFlowModulesRequest
* InstanceId: "STRING_VALUE", // required
* NextToken: "STRING_VALUE",
* MaxResults: Number("int"),
* SearchFilter: { // ContactFlowModuleSearchFilter
* TagFilter: { // ControlPlaneTagFilter
* OrConditions: [ // TagOrConditionList
* [ // TagAndConditionList
* { // TagCondition
* TagKey: "STRING_VALUE",
* TagValue: "STRING_VALUE",
* },
* ],
* ],
* AndConditions: [
* {
* TagKey: "STRING_VALUE",
* TagValue: "STRING_VALUE",
* },
* ],
* TagCondition: "<TagCondition>",
* },
* },
* SearchCriteria: { // ContactFlowModuleSearchCriteria
* OrConditions: [ // ContactFlowModuleSearchConditionList
* {
* OrConditions: [
* "<ContactFlowModuleSearchCriteria>",
* ],
* AndConditions: [
* "<ContactFlowModuleSearchCriteria>",
* ],
* StringCondition: { // StringCondition
* FieldName: "STRING_VALUE",
* Value: "STRING_VALUE",
* ComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
* },
* },
* ],
* AndConditions: [
* "<ContactFlowModuleSearchCriteria>",
* ],
* StringCondition: {
* FieldName: "STRING_VALUE",
* Value: "STRING_VALUE",
* ComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
* },
* },
* };
* const command = new SearchContactFlowModulesCommand(input);
* const response = await client.send(command);
* // { // SearchContactFlowModulesResponse
* // ContactFlowModules: [ // ContactFlowModuleSearchSummaryList
* // { // ContactFlowModule
* // Arn: "STRING_VALUE",
* // Id: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // Content: "STRING_VALUE",
* // Description: "STRING_VALUE",
* // State: "ACTIVE" || "ARCHIVED",
* // Status: "PUBLISHED" || "SAVED",
* // Tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // },
* // ],
* // NextToken: "STRING_VALUE",
* // ApproximateTotalCount: Number("long"),
* // };
*
* ```
*
* @param SearchContactFlowModulesCommandInput - {@link SearchContactFlowModulesCommandInput}
* @returns {@link SearchContactFlowModulesCommandOutput}
* @see {@link SearchContactFlowModulesCommandInput} for command's `input` shape.
* @see {@link SearchContactFlowModulesCommandOutput} for command's `response` shape.
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
*
* @throws {@link InternalServiceException} (server fault)
* <p>Request processing failed because of an error or failure with the service.</p>
*
* @throws {@link InvalidParameterException} (client fault)
* <p>One or more of the specified parameters are not valid.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is not valid.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The throttling limit has been exceeded.</p>
*
* @throws {@link ConnectServiceException}
* <p>Base exception class for all service exceptions from Connect service.</p>
*
* @public
*/
export class SearchContactFlowModulesCommand extends $Command
.classBuilder<
SearchContactFlowModulesCommandInput,
SearchContactFlowModulesCommandOutput,
ConnectClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonConnectService", "SearchContactFlowModules", {})
.n("ConnectClient", "SearchContactFlowModulesCommand")
.f(void 0, void 0)
.ser(se_SearchContactFlowModulesCommand)
.de(de_SearchContactFlowModulesCommand)
.build() {}
Loading

0 comments on commit 43f9444

Please sign in to comment.