Skip to content

Commit 43f9444

Browse files
author
awstools
committed
feat(client-connect): Amazon Connect provides enhanced search capabilities 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.
1 parent 31ce1e9 commit 43f9444

21 files changed

+1586
-281
lines changed

clients/client-connect/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,22 @@ SearchAvailablePhoneNumbers
15881588

15891589
[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/)
15901590

1591+
</details>
1592+
<details>
1593+
<summary>
1594+
SearchContactFlowModules
1595+
</summary>
1596+
1597+
[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/)
1598+
1599+
</details>
1600+
<details>
1601+
<summary>
1602+
SearchContactFlows
1603+
</summary>
1604+
1605+
[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/)
1606+
15911607
</details>
15921608
<details>
15931609
<summary>

clients/client-connect/src/Connect.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,16 @@ import {
802802
SearchAvailablePhoneNumbersCommandInput,
803803
SearchAvailablePhoneNumbersCommandOutput,
804804
} from "./commands/SearchAvailablePhoneNumbersCommand";
805+
import {
806+
SearchContactFlowModulesCommand,
807+
SearchContactFlowModulesCommandInput,
808+
SearchContactFlowModulesCommandOutput,
809+
} from "./commands/SearchContactFlowModulesCommand";
810+
import {
811+
SearchContactFlowsCommand,
812+
SearchContactFlowsCommandInput,
813+
SearchContactFlowsCommandOutput,
814+
} from "./commands/SearchContactFlowsCommand";
805815
import {
806816
SearchContactsCommand,
807817
SearchContactsCommandInput,
@@ -1337,6 +1347,8 @@ const commands = {
13371347
ResumeContactCommand,
13381348
ResumeContactRecordingCommand,
13391349
SearchAvailablePhoneNumbersCommand,
1350+
SearchContactFlowModulesCommand,
1351+
SearchContactFlowsCommand,
13401352
SearchContactsCommand,
13411353
SearchHoursOfOperationsCommand,
13421354
SearchPredefinedAttributesCommand,
@@ -4118,6 +4130,40 @@ export interface Connect {
41184130
cb: (err: any, data?: SearchAvailablePhoneNumbersCommandOutput) => void
41194131
): void;
41204132

4133+
/**
4134+
* @see {@link SearchContactFlowModulesCommand}
4135+
*/
4136+
searchContactFlowModules(
4137+
args: SearchContactFlowModulesCommandInput,
4138+
options?: __HttpHandlerOptions
4139+
): Promise<SearchContactFlowModulesCommandOutput>;
4140+
searchContactFlowModules(
4141+
args: SearchContactFlowModulesCommandInput,
4142+
cb: (err: any, data?: SearchContactFlowModulesCommandOutput) => void
4143+
): void;
4144+
searchContactFlowModules(
4145+
args: SearchContactFlowModulesCommandInput,
4146+
options: __HttpHandlerOptions,
4147+
cb: (err: any, data?: SearchContactFlowModulesCommandOutput) => void
4148+
): void;
4149+
4150+
/**
4151+
* @see {@link SearchContactFlowsCommand}
4152+
*/
4153+
searchContactFlows(
4154+
args: SearchContactFlowsCommandInput,
4155+
options?: __HttpHandlerOptions
4156+
): Promise<SearchContactFlowsCommandOutput>;
4157+
searchContactFlows(
4158+
args: SearchContactFlowsCommandInput,
4159+
cb: (err: any, data?: SearchContactFlowsCommandOutput) => void
4160+
): void;
4161+
searchContactFlows(
4162+
args: SearchContactFlowsCommandInput,
4163+
options: __HttpHandlerOptions,
4164+
cb: (err: any, data?: SearchContactFlowsCommandOutput) => void
4165+
): void;
4166+
41214167
/**
41224168
* @see {@link SearchContactsCommand}
41234169
*/

clients/client-connect/src/ConnectClient.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ import {
513513
SearchAvailablePhoneNumbersCommandInput,
514514
SearchAvailablePhoneNumbersCommandOutput,
515515
} from "./commands/SearchAvailablePhoneNumbersCommand";
516+
import {
517+
SearchContactFlowModulesCommandInput,
518+
SearchContactFlowModulesCommandOutput,
519+
} from "./commands/SearchContactFlowModulesCommand";
520+
import { SearchContactFlowsCommandInput, SearchContactFlowsCommandOutput } from "./commands/SearchContactFlowsCommand";
516521
import { SearchContactsCommandInput, SearchContactsCommandOutput } from "./commands/SearchContactsCommand";
517522
import {
518523
SearchHoursOfOperationsCommandInput,
@@ -929,6 +934,8 @@ export type ServiceInputTypes =
929934
| ResumeContactCommandInput
930935
| ResumeContactRecordingCommandInput
931936
| SearchAvailablePhoneNumbersCommandInput
937+
| SearchContactFlowModulesCommandInput
938+
| SearchContactFlowsCommandInput
932939
| SearchContactsCommandInput
933940
| SearchHoursOfOperationsCommandInput
934941
| SearchPredefinedAttributesCommandInput
@@ -1182,6 +1189,8 @@ export type ServiceOutputTypes =
11821189
| ResumeContactCommandOutput
11831190
| ResumeContactRecordingCommandOutput
11841191
| SearchAvailablePhoneNumbersCommandOutput
1192+
| SearchContactFlowModulesCommandOutput
1193+
| SearchContactFlowsCommandOutput
11851194
| SearchContactsCommandOutput
11861195
| SearchHoursOfOperationsCommandOutput
11871196
| SearchPredefinedAttributesCommandOutput

clients/client-connect/src/commands/CreateContactFlowCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export interface CreateContactFlowCommandOutput extends CreateContactFlowRespons
4242
* Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER", // required
4343
* Description: "STRING_VALUE",
4444
* Content: "STRING_VALUE", // required
45+
* Status: "PUBLISHED" || "SAVED",
4546
* Tags: { // TagMap
4647
* "<keys>": "STRING_VALUE",
4748
* },

clients/client-connect/src/commands/DescribeContactFlowCommand.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ export interface DescribeContactFlowCommandOutput extends DescribeContactFlowRes
3030
* <p>Describes the specified flow.</p>
3131
* <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
3232
* Flow language</a>.</p>
33+
* <p>Use the <code>$SAVED</code> alias in the request to describe the <code>SAVED</code> content
34+
* of a Flow. For example, <code>arn:aws:.../contact-flow/\{id\}:$SAVED</code>. Once a contact flow is
35+
* published, <code>$SAVED</code> needs to be supplied to view saved content that has not been
36+
* published.</p>
37+
* <p>In the response, <b>Status</b> indicates the flow status as either
38+
* <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate
39+
* validation on the content. <code>SAVED</code> does not initiate validation of the content.
40+
* <code>SAVED</code> | <code>PUBLISHED</code>
41+
* </p>
3342
* @example
3443
* Use a bare-bones client and the command you need to make an API call.
3544
* ```javascript
@@ -49,6 +58,7 @@ export interface DescribeContactFlowCommandOutput extends DescribeContactFlowRes
4958
* // Name: "STRING_VALUE",
5059
* // Type: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
5160
* // State: "ACTIVE" || "ARCHIVED",
61+
* // Status: "PUBLISHED" || "SAVED",
5262
* // Description: "STRING_VALUE",
5363
* // Content: "STRING_VALUE",
5464
* // Tags: { // TagMap

clients/client-connect/src/commands/DescribeContactFlowModuleCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export interface DescribeContactFlowModuleCommandOutput extends DescribeContactF
2828

2929
/**
3030
* <p>Describes the specified flow module.</p>
31+
* <p>Use the <code>$SAVED</code> alias in the request to describe the <code>SAVED</code> content
32+
* of a Flow. For example, <code>arn:aws:.../contact-flow/\{id\}:$SAVED</code>. Once a contact flow is
33+
* published, <code>$SAVED</code> needs to be supplied to view saved content that has not been
34+
* published.</p>
3135
* @example
3236
* Use a bare-bones client and the command you need to make an API call.
3337
* ```javascript

clients/client-connect/src/commands/ListContactFlowsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export interface ListContactFlowsCommandOutput extends ListContactFlowsResponse,
5656
* // Name: "STRING_VALUE",
5757
* // ContactFlowType: "CONTACT_FLOW" || "CUSTOMER_QUEUE" || "CUSTOMER_HOLD" || "CUSTOMER_WHISPER" || "AGENT_HOLD" || "AGENT_WHISPER" || "OUTBOUND_WHISPER" || "AGENT_TRANSFER" || "QUEUE_TRANSFER",
5858
* // ContactFlowState: "ACTIVE" || "ARCHIVED",
59+
* // ContactFlowStatus: "PUBLISHED" || "SAVED",
5960
* // },
6061
* // ],
6162
* // NextToken: "STRING_VALUE",

clients/client-connect/src/commands/ReplicateInstanceCommand.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ReplicateInstanceRequest, ReplicateInstanceRequestFilterSensitiveLog } from "../models/models_1";
10-
import { ReplicateInstanceResponse } from "../models/models_2";
9+
import {
10+
ReplicateInstanceRequest,
11+
ReplicateInstanceRequestFilterSensitiveLog,
12+
ReplicateInstanceResponse,
13+
} from "../models/models_2";
1114
import { de_ReplicateInstanceCommand, se_ReplicateInstanceCommand } from "../protocols/Aws_restJson1";
1215

1316
/**
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { SearchContactFlowModulesRequest, SearchContactFlowModulesResponse } from "../models/models_2";
10+
import { de_SearchContactFlowModulesCommand, se_SearchContactFlowModulesCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link SearchContactFlowModulesCommand}.
20+
*/
21+
export interface SearchContactFlowModulesCommandInput extends SearchContactFlowModulesRequest {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link SearchContactFlowModulesCommand}.
26+
*/
27+
export interface SearchContactFlowModulesCommandOutput extends SearchContactFlowModulesResponse, __MetadataBearer {}
28+
29+
/**
30+
* <p>Searches the flow modules in an Amazon Connect instance, with optional filtering.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { ConnectClient, SearchContactFlowModulesCommand } from "@aws-sdk/client-connect"; // ES Modules import
35+
* // const { ConnectClient, SearchContactFlowModulesCommand } = require("@aws-sdk/client-connect"); // CommonJS import
36+
* const client = new ConnectClient(config);
37+
* const input = { // SearchContactFlowModulesRequest
38+
* InstanceId: "STRING_VALUE", // required
39+
* NextToken: "STRING_VALUE",
40+
* MaxResults: Number("int"),
41+
* SearchFilter: { // ContactFlowModuleSearchFilter
42+
* TagFilter: { // ControlPlaneTagFilter
43+
* OrConditions: [ // TagOrConditionList
44+
* [ // TagAndConditionList
45+
* { // TagCondition
46+
* TagKey: "STRING_VALUE",
47+
* TagValue: "STRING_VALUE",
48+
* },
49+
* ],
50+
* ],
51+
* AndConditions: [
52+
* {
53+
* TagKey: "STRING_VALUE",
54+
* TagValue: "STRING_VALUE",
55+
* },
56+
* ],
57+
* TagCondition: "<TagCondition>",
58+
* },
59+
* },
60+
* SearchCriteria: { // ContactFlowModuleSearchCriteria
61+
* OrConditions: [ // ContactFlowModuleSearchConditionList
62+
* {
63+
* OrConditions: [
64+
* "<ContactFlowModuleSearchCriteria>",
65+
* ],
66+
* AndConditions: [
67+
* "<ContactFlowModuleSearchCriteria>",
68+
* ],
69+
* StringCondition: { // StringCondition
70+
* FieldName: "STRING_VALUE",
71+
* Value: "STRING_VALUE",
72+
* ComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
73+
* },
74+
* },
75+
* ],
76+
* AndConditions: [
77+
* "<ContactFlowModuleSearchCriteria>",
78+
* ],
79+
* StringCondition: {
80+
* FieldName: "STRING_VALUE",
81+
* Value: "STRING_VALUE",
82+
* ComparisonType: "STARTS_WITH" || "CONTAINS" || "EXACT",
83+
* },
84+
* },
85+
* };
86+
* const command = new SearchContactFlowModulesCommand(input);
87+
* const response = await client.send(command);
88+
* // { // SearchContactFlowModulesResponse
89+
* // ContactFlowModules: [ // ContactFlowModuleSearchSummaryList
90+
* // { // ContactFlowModule
91+
* // Arn: "STRING_VALUE",
92+
* // Id: "STRING_VALUE",
93+
* // Name: "STRING_VALUE",
94+
* // Content: "STRING_VALUE",
95+
* // Description: "STRING_VALUE",
96+
* // State: "ACTIVE" || "ARCHIVED",
97+
* // Status: "PUBLISHED" || "SAVED",
98+
* // Tags: { // TagMap
99+
* // "<keys>": "STRING_VALUE",
100+
* // },
101+
* // },
102+
* // ],
103+
* // NextToken: "STRING_VALUE",
104+
* // ApproximateTotalCount: Number("long"),
105+
* // };
106+
*
107+
* ```
108+
*
109+
* @param SearchContactFlowModulesCommandInput - {@link SearchContactFlowModulesCommandInput}
110+
* @returns {@link SearchContactFlowModulesCommandOutput}
111+
* @see {@link SearchContactFlowModulesCommandInput} for command's `input` shape.
112+
* @see {@link SearchContactFlowModulesCommandOutput} for command's `response` shape.
113+
* @see {@link ConnectClientResolvedConfig | config} for ConnectClient's `config` shape.
114+
*
115+
* @throws {@link InternalServiceException} (server fault)
116+
* <p>Request processing failed because of an error or failure with the service.</p>
117+
*
118+
* @throws {@link InvalidParameterException} (client fault)
119+
* <p>One or more of the specified parameters are not valid.</p>
120+
*
121+
* @throws {@link InvalidRequestException} (client fault)
122+
* <p>The request is not valid.</p>
123+
*
124+
* @throws {@link ResourceNotFoundException} (client fault)
125+
* <p>The specified resource was not found.</p>
126+
*
127+
* @throws {@link ThrottlingException} (client fault)
128+
* <p>The throttling limit has been exceeded.</p>
129+
*
130+
* @throws {@link ConnectServiceException}
131+
* <p>Base exception class for all service exceptions from Connect service.</p>
132+
*
133+
* @public
134+
*/
135+
export class SearchContactFlowModulesCommand extends $Command
136+
.classBuilder<
137+
SearchContactFlowModulesCommandInput,
138+
SearchContactFlowModulesCommandOutput,
139+
ConnectClientResolvedConfig,
140+
ServiceInputTypes,
141+
ServiceOutputTypes
142+
>()
143+
.ep({
144+
...commonParams,
145+
})
146+
.m(function (this: any, Command: any, cs: any, config: ConnectClientResolvedConfig, o: any) {
147+
return [
148+
getSerdePlugin(config, this.serialize, this.deserialize),
149+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
150+
];
151+
})
152+
.s("AmazonConnectService", "SearchContactFlowModules", {})
153+
.n("ConnectClient", "SearchContactFlowModulesCommand")
154+
.f(void 0, void 0)
155+
.ser(se_SearchContactFlowModulesCommand)
156+
.de(de_SearchContactFlowModulesCommand)
157+
.build() {}

0 commit comments

Comments
 (0)