Skip to content

Commit b77d985

Browse files
author
awstools
committedJun 22, 2023
feat(client-chime-sdk-identity): AppInstanceBots can be configured to be invoked or not using the Target or the CHIME.mentions attribute for ChannelMessages
1 parent 71c4f39 commit b77d985

10 files changed

+286
-137
lines changed
 

‎clients/client-chime-sdk-identity/src/commands/CreateAppInstanceBotCommand.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ export interface CreateAppInstanceBotCommandOutput extends CreateAppInstanceBotR
6161
* ],
6262
* Configuration: { // Configuration
6363
* Lex: { // LexConfiguration
64-
* RespondsTo: "STANDARD_MESSAGES", // required
64+
* RespondsTo: "STANDARD_MESSAGES",
65+
* InvokedBy: { // InvokedBy
66+
* StandardMessages: "AUTO" || "ALL" || "MENTIONS" || "NONE", // required
67+
* TargetedMessages: "ALL" || "NONE", // required
68+
* },
6569
* LexBotAliasArn: "STRING_VALUE", // required
6670
* LocaleId: "STRING_VALUE", // required
6771
* WelcomeIntent: "STRING_VALUE",

‎clients/client-chime-sdk-identity/src/commands/DeregisterAppInstanceUserEndpointCommand.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@s
1414
import { SerdeContext as __SerdeContext } from "@smithy/types";
1515

1616
import { ChimeSDKIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKIdentityClient";
17-
import {
18-
DeregisterAppInstanceUserEndpointRequest,
19-
DeregisterAppInstanceUserEndpointRequestFilterSensitiveLog,
20-
} from "../models/models_0";
17+
import { DeregisterAppInstanceUserEndpointRequest } from "../models/models_0";
2118
import {
2219
de_DeregisterAppInstanceUserEndpointCommand,
2320
se_DeregisterAppInstanceUserEndpointCommand,
@@ -135,7 +132,7 @@ export class DeregisterAppInstanceUserEndpointCommand extends $Command<
135132
logger,
136133
clientName,
137134
commandName,
138-
inputFilterSensitiveLog: DeregisterAppInstanceUserEndpointRequestFilterSensitiveLog,
135+
inputFilterSensitiveLog: (_: any) => _,
139136
outputFilterSensitiveLog: (_: any) => _,
140137
};
141138
const { requestHandler } = configuration;

‎clients/client-chime-sdk-identity/src/commands/DescribeAppInstanceBotCommand.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ export interface DescribeAppInstanceBotCommandOutput extends DescribeAppInstance
5858
* // Name: "STRING_VALUE",
5959
* // Configuration: { // Configuration
6060
* // Lex: { // LexConfiguration
61-
* // RespondsTo: "STANDARD_MESSAGES", // required
61+
* // RespondsTo: "STANDARD_MESSAGES",
62+
* // InvokedBy: { // InvokedBy
63+
* // StandardMessages: "AUTO" || "ALL" || "MENTIONS" || "NONE", // required
64+
* // TargetedMessages: "ALL" || "NONE", // required
65+
* // },
6266
* // LexBotAliasArn: "STRING_VALUE", // required
6367
* // LocaleId: "STRING_VALUE", // required
6468
* // WelcomeIntent: "STRING_VALUE",

‎clients/client-chime-sdk-identity/src/commands/DescribeAppInstanceUserEndpointCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { SerdeContext as __SerdeContext } from "@smithy/types";
1616
import { ChimeSDKIdentityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKIdentityClient";
1717
import {
1818
DescribeAppInstanceUserEndpointRequest,
19-
DescribeAppInstanceUserEndpointRequestFilterSensitiveLog,
2019
DescribeAppInstanceUserEndpointResponse,
2120
DescribeAppInstanceUserEndpointResponseFilterSensitiveLog,
2221
} from "../models/models_0";
@@ -158,7 +157,7 @@ export class DescribeAppInstanceUserEndpointCommand extends $Command<
158157
logger,
159158
clientName,
160159
commandName,
161-
inputFilterSensitiveLog: DescribeAppInstanceUserEndpointRequestFilterSensitiveLog,
160+
inputFilterSensitiveLog: (_: any) => _,
162161
outputFilterSensitiveLog: DescribeAppInstanceUserEndpointResponseFilterSensitiveLog,
163162
};
164163
const { requestHandler } = configuration;

‎clients/client-chime-sdk-identity/src/commands/RegisterAppInstanceUserEndpointCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
RegisterAppInstanceUserEndpointRequest,
1919
RegisterAppInstanceUserEndpointRequestFilterSensitiveLog,
2020
RegisterAppInstanceUserEndpointResponse,
21-
RegisterAppInstanceUserEndpointResponseFilterSensitiveLog,
2221
} from "../models/models_0";
2322
import {
2423
de_RegisterAppInstanceUserEndpointCommand,
@@ -158,7 +157,7 @@ export class RegisterAppInstanceUserEndpointCommand extends $Command<
158157
clientName,
159158
commandName,
160159
inputFilterSensitiveLog: RegisterAppInstanceUserEndpointRequestFilterSensitiveLog,
161-
outputFilterSensitiveLog: RegisterAppInstanceUserEndpointResponseFilterSensitiveLog,
160+
outputFilterSensitiveLog: (_: any) => _,
162161
};
163162
const { requestHandler } = configuration;
164163
return stack.resolve(

‎clients/client-chime-sdk-identity/src/commands/UpdateAppInstanceBotCommand.ts

+12
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ export interface UpdateAppInstanceBotCommandOutput extends UpdateAppInstanceBotR
5151
* AppInstanceBotArn: "STRING_VALUE", // required
5252
* Name: "STRING_VALUE", // required
5353
* Metadata: "STRING_VALUE", // required
54+
* Configuration: { // Configuration
55+
* Lex: { // LexConfiguration
56+
* RespondsTo: "STANDARD_MESSAGES",
57+
* InvokedBy: { // InvokedBy
58+
* StandardMessages: "AUTO" || "ALL" || "MENTIONS" || "NONE", // required
59+
* TargetedMessages: "ALL" || "NONE", // required
60+
* },
61+
* LexBotAliasArn: "STRING_VALUE", // required
62+
* LocaleId: "STRING_VALUE", // required
63+
* WelcomeIntent: "STRING_VALUE",
64+
* },
65+
* },
5466
* };
5567
* const command = new UpdateAppInstanceBotCommand(input);
5668
* const response = await client.send(command);

‎clients/client-chime-sdk-identity/src/commands/UpdateAppInstanceUserEndpointCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
UpdateAppInstanceUserEndpointRequest,
1919
UpdateAppInstanceUserEndpointRequestFilterSensitiveLog,
2020
UpdateAppInstanceUserEndpointResponse,
21-
UpdateAppInstanceUserEndpointResponseFilterSensitiveLog,
2221
} from "../models/models_0";
2322
import {
2423
de_UpdateAppInstanceUserEndpointCommand,
@@ -149,7 +148,7 @@ export class UpdateAppInstanceUserEndpointCommand extends $Command<
149148
clientName,
150149
commandName,
151150
inputFilterSensitiveLog: UpdateAppInstanceUserEndpointRequestFilterSensitiveLog,
152-
outputFilterSensitiveLog: UpdateAppInstanceUserEndpointResponseFilterSensitiveLog,
151+
outputFilterSensitiveLog: (_: any) => _,
153152
};
154153
const { requestHandler } = configuration;
155154
return stack.resolve(

‎clients/client-chime-sdk-identity/src/models/models_0.ts

+93-52
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,83 @@ export interface AppInstanceAdminSummary {
9797
Admin?: Identity;
9898
}
9999

100+
/**
101+
* @public
102+
* @enum
103+
*/
104+
export const StandardMessages = {
105+
ALL: "ALL",
106+
AUTO: "AUTO",
107+
MENTIONS: "MENTIONS",
108+
NONE: "NONE",
109+
} as const;
110+
111+
/**
112+
* @public
113+
*/
114+
export type StandardMessages = (typeof StandardMessages)[keyof typeof StandardMessages];
115+
116+
/**
117+
* @public
118+
* @enum
119+
*/
120+
export const TargetedMessages = {
121+
ALL: "ALL",
122+
NONE: "NONE",
123+
} as const;
124+
125+
/**
126+
* @public
127+
*/
128+
export type TargetedMessages = (typeof TargetedMessages)[keyof typeof TargetedMessages];
129+
130+
/**
131+
* @public
132+
* <p>Specifies the type of message that triggers a bot.</p>
133+
*/
134+
export interface InvokedBy {
135+
/**
136+
* <p>Sets standard messages as the bot trigger. For standard messages:</p>
137+
* <ul>
138+
* <li>
139+
* <p>
140+
* <code>ALL</code>: The bot processes all standard messages.</p>
141+
* </li>
142+
* <li>
143+
* <p>
144+
* <code>AUTO</code>: The bot responds to ALL messages when the channel has one other non-hidden member, and responds to MENTIONS when the
145+
* channel has more than one other non-hidden member.</p>
146+
* </li>
147+
* <li>
148+
* <p>
149+
* <code>MENTIONS</code>: The bot processes all standard messages that have a message attribute with <code>CHIME.mentions</code> and a
150+
* value of the bot ARN.</p>
151+
* </li>
152+
* <li>
153+
* <p>
154+
* <code>NONE</code>: The bot processes no standard messages.</p>
155+
* </li>
156+
* </ul>
157+
*/
158+
StandardMessages: StandardMessages | string | undefined;
159+
160+
/**
161+
* <p>Sets targeted messages as the bot trigger. For targeted messages:</p>
162+
* <ul>
163+
* <li>
164+
* <p>
165+
* <code>ALL</code>: The bot processes all <code>TargetedMessages</code> sent to it. The bot then responds with a targeted message back to the sender.
166+
* </p>
167+
* </li>
168+
* <li>
169+
* <p>
170+
* <code>NONE</code>: The bot processes no targeted messages.</p>
171+
* </li>
172+
* </ul>
173+
*/
174+
TargetedMessages: TargetedMessages | string | undefined;
175+
}
176+
100177
/**
101178
* @public
102179
* @enum
@@ -116,9 +193,18 @@ export type RespondsTo = (typeof RespondsTo)[keyof typeof RespondsTo];
116193
*/
117194
export interface LexConfiguration {
118195
/**
119-
* <p>Determines whether the Amazon Lex V2 bot responds to all standard messages. Control messages are not supported.</p>
196+
* <important>
197+
* <p>
198+
* <b>Deprecated</b>. Use <code>InvokedBy</code> instead.</p>
199+
* </important>
200+
* <p>Determines whether the Amazon Lex V2 bot responds to all standard messages. Control messages are not supported.</p>
120201
*/
121-
RespondsTo: RespondsTo | string | undefined;
202+
RespondsTo?: RespondsTo | string;
203+
204+
/**
205+
* <p>Specifies the type of message that triggers a bot.</p>
206+
*/
207+
InvokedBy?: InvokedBy;
122208

123209
/**
124210
* <p>The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format:
@@ -1586,6 +1672,11 @@ export interface UpdateAppInstanceBotRequest {
15861672
* <p>The metadata of the <code>AppInstanceBot</code>.</p>
15871673
*/
15881674
Metadata: string | undefined;
1675+
1676+
/**
1677+
* <p>The configuration for the bot update.</p>
1678+
*/
1679+
Configuration?: Configuration;
15891680
}
15901681

15911682
/**
@@ -1752,8 +1843,6 @@ export const EndpointAttributesFilterSensitiveLog = (obj: EndpointAttributes): a
17521843
*/
17531844
export const AppInstanceUserEndpointFilterSensitiveLog = (obj: AppInstanceUserEndpoint): any => ({
17541845
...obj,
1755-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
1756-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
17571846
...(obj.Name && { Name: SENSITIVE_STRING }),
17581847
...(obj.EndpointAttributes && { EndpointAttributes: EndpointAttributesFilterSensitiveLog(obj.EndpointAttributes) }),
17591848
});
@@ -1763,8 +1852,6 @@ export const AppInstanceUserEndpointFilterSensitiveLog = (obj: AppInstanceUserEn
17631852
*/
17641853
export const AppInstanceUserEndpointSummaryFilterSensitiveLog = (obj: AppInstanceUserEndpointSummary): any => ({
17651854
...obj,
1766-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
1767-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
17681855
...(obj.Name && { Name: SENSITIVE_STRING }),
17691856
});
17701857

@@ -1825,17 +1912,6 @@ export const CreateAppInstanceUserRequestFilterSensitiveLog = (obj: CreateAppIns
18251912
...(obj.Tags && { Tags: obj.Tags.map((item) => TagFilterSensitiveLog(item)) }),
18261913
});
18271914

1828-
/**
1829-
* @internal
1830-
*/
1831-
export const DeregisterAppInstanceUserEndpointRequestFilterSensitiveLog = (
1832-
obj: DeregisterAppInstanceUserEndpointRequest
1833-
): any => ({
1834-
...obj,
1835-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
1836-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
1837-
});
1838-
18391915
/**
18401916
* @internal
18411917
*/
@@ -1868,17 +1944,6 @@ export const DescribeAppInstanceUserResponseFilterSensitiveLog = (obj: DescribeA
18681944
...(obj.AppInstanceUser && { AppInstanceUser: AppInstanceUserFilterSensitiveLog(obj.AppInstanceUser) }),
18691945
});
18701946

1871-
/**
1872-
* @internal
1873-
*/
1874-
export const DescribeAppInstanceUserEndpointRequestFilterSensitiveLog = (
1875-
obj: DescribeAppInstanceUserEndpointRequest
1876-
): any => ({
1877-
...obj,
1878-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
1879-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
1880-
});
1881-
18821947
/**
18831948
* @internal
18841949
*/
@@ -2011,17 +2076,6 @@ export const RegisterAppInstanceUserEndpointRequestFilterSensitiveLog = (
20112076
...(obj.EndpointAttributes && { EndpointAttributes: EndpointAttributesFilterSensitiveLog(obj.EndpointAttributes) }),
20122077
});
20132078

2014-
/**
2015-
* @internal
2016-
*/
2017-
export const RegisterAppInstanceUserEndpointResponseFilterSensitiveLog = (
2018-
obj: RegisterAppInstanceUserEndpointResponse
2019-
): any => ({
2020-
...obj,
2021-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
2022-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
2023-
});
2024-
20252079
/**
20262080
* @internal
20272081
*/
@@ -2072,18 +2126,5 @@ export const UpdateAppInstanceUserEndpointRequestFilterSensitiveLog = (
20722126
obj: UpdateAppInstanceUserEndpointRequest
20732127
): any => ({
20742128
...obj,
2075-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
2076-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
20772129
...(obj.Name && { Name: SENSITIVE_STRING }),
20782130
});
2079-
2080-
/**
2081-
* @internal
2082-
*/
2083-
export const UpdateAppInstanceUserEndpointResponseFilterSensitiveLog = (
2084-
obj: UpdateAppInstanceUserEndpointResponse
2085-
): any => ({
2086-
...obj,
2087-
...(obj.AppInstanceUserArn && { AppInstanceUserArn: SENSITIVE_STRING }),
2088-
...(obj.EndpointId && { EndpointId: SENSITIVE_STRING }),
2089-
});

‎clients/client-chime-sdk-identity/src/protocols/Aws_restJson1.ts

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ import {
136136
EndpointAttributes,
137137
ExpirationSettings,
138138
ForbiddenException,
139+
InvokedBy,
139140
LexConfiguration,
140141
NotFoundException,
141142
ResourceLimitExceededException,
@@ -1084,6 +1085,7 @@ export const se_UpdateAppInstanceBotCommand = async (
10841085
let body: any;
10851086
body = JSON.stringify(
10861087
take(input, {
1088+
Configuration: (_) => _json(_),
10871089
Metadata: [],
10881090
Name: [],
10891091
})
@@ -3297,6 +3299,8 @@ const de_UnauthorizedClientExceptionRes = async (
32973299

32983300
// se_ExpirationSettings omitted.
32993301

3302+
// se_InvokedBy omitted.
3303+
33003304
// se_LexConfiguration omitted.
33013305

33023306
// se_Tag omitted.
@@ -3409,6 +3413,8 @@ const de_AppInstanceUserEndpoint = (output: any, context: __SerdeContext): AppIn
34093413

34103414
// de_Identity omitted.
34113415

3416+
// de_InvokedBy omitted.
3417+
34123418
// de_LexConfiguration omitted.
34133419

34143420
// de_Tag omitted.

‎codegen/sdk-codegen/aws-models/chime-sdk-identity.json

+160-72
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.