@aws-sdk/client-chime-sdk-messaging 3.100.0 → 3.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -2
  3. package/dist-cjs/ChimeSDKMessaging.js +15 -0
  4. package/dist-cjs/ChimeSDKMessagingClient.js +2 -0
  5. package/dist-cjs/commands/SearchChannelsCommand.js +36 -0
  6. package/dist-cjs/commands/index.js +1 -0
  7. package/dist-cjs/models/models_0.js +32 -1
  8. package/dist-cjs/pagination/SearchChannelsPaginator.js +36 -0
  9. package/dist-cjs/pagination/index.js +1 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +145 -2
  11. package/dist-es/ChimeSDKMessaging.js +15 -0
  12. package/dist-es/ChimeSDKMessagingClient.js +2 -0
  13. package/dist-es/commands/SearchChannelsCommand.js +39 -0
  14. package/dist-es/commands/index.js +1 -0
  15. package/dist-es/models/models_0.js +22 -1
  16. package/dist-es/pagination/SearchChannelsPaginator.js +75 -0
  17. package/dist-es/pagination/index.js +1 -0
  18. package/dist-es/protocols/Aws_restJson1.js +159 -2
  19. package/dist-types/ChimeSDKMessaging.d.ts +9 -2
  20. package/dist-types/ChimeSDKMessagingClient.d.ts +4 -4
  21. package/dist-types/commands/SearchChannelsCommand.d.ts +36 -0
  22. package/dist-types/commands/index.d.ts +1 -0
  23. package/dist-types/models/models_0.d.ts +96 -17
  24. package/dist-types/pagination/SearchChannelsPaginator.d.ts +4 -0
  25. package/dist-types/pagination/index.d.ts +1 -0
  26. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  27. package/dist-types/ts3.4/ChimeSDKMessaging.d.ts +5 -0
  28. package/dist-types/ts3.4/ChimeSDKMessagingClient.d.ts +3 -2
  29. package/dist-types/ts3.4/commands/SearchChannelsCommand.d.ts +17 -0
  30. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  31. package/dist-types/ts3.4/models/models_0.d.ts +56 -14
  32. package/dist-types/ts3.4/pagination/SearchChannelsPaginator.d.ts +4 -0
  33. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  34. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  35. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.105.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.104.0...v3.105.0) (2022-06-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * **client-chime-sdk-messaging:** This release adds support for searching channels by members via the SearchChannels API, removes required restrictions for Name and Mode in UpdateChannel API and enhances CreateChannel API by exposing member and moderator list as well as channel id as optional parameters. ([27f0d81](https://github.com/aws/aws-sdk-js-v3/commit/27f0d81adb822a529077714cd8aa5a28e80c3be4))
12
+ * **clients:** support recursion detection in Lambda ([#3654](https://github.com/aws/aws-sdk-js-v3/issues/3654)) ([ecfe46e](https://github.com/aws/aws-sdk-js-v3/commit/ecfe46ea1fd8b6e3812b75b3dc6c03554fb4b3fa))
13
+
14
+
15
+
16
+
17
+
6
18
  # [3.100.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.99.0...v3.100.0) (2022-05-26)
7
19
 
8
20
  **Note:** Version bump only for package @aws-sdk/client-chime-sdk-messaging
package/README.md CHANGED
@@ -12,8 +12,7 @@ AWS SDK for JavaScript ChimeSDKMessaging Client for Node.js, Browser and React N
12
12
  <p>The Amazon Chime SDK Messaging APIs in this section allow software developers to send
13
13
  and receive messages in custom messaging applications. These APIs depend on the frameworks
14
14
  provided by the Amazon Chime SDK Identity APIs. For more information about the messaging
15
- APIs, see <a href="https://docs.aws.amazon.com/chime/latest/APIReference/API_Operations_Amazon_Chime_SDK_Messaging">Amazon Chime SDK messaging</a>
16
- </p>
15
+ APIs, see <a href="https://docs.aws.amazon.com/chime/latest/APIReference/API_Operations_Amazon_Chime_SDK_Messaging.html">Amazon Chime SDK messaging</a>.</p>
17
16
 
18
17
  ## Installing
19
18
 
@@ -40,6 +40,7 @@ const ListChannelsModeratedByAppInstanceUserCommand_1 = require("./commands/List
40
40
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
41
41
  const PutChannelMembershipPreferencesCommand_1 = require("./commands/PutChannelMembershipPreferencesCommand");
42
42
  const RedactChannelMessageCommand_1 = require("./commands/RedactChannelMessageCommand");
43
+ const SearchChannelsCommand_1 = require("./commands/SearchChannelsCommand");
43
44
  const SendChannelMessageCommand_1 = require("./commands/SendChannelMessageCommand");
44
45
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
45
46
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
@@ -580,6 +581,20 @@ class ChimeSDKMessaging extends ChimeSDKMessagingClient_1.ChimeSDKMessagingClien
580
581
  return this.send(command, optionsOrCb);
581
582
  }
582
583
  }
584
+ searchChannels(args, optionsOrCb, cb) {
585
+ const command = new SearchChannelsCommand_1.SearchChannelsCommand(args);
586
+ if (typeof optionsOrCb === "function") {
587
+ this.send(command, optionsOrCb);
588
+ }
589
+ else if (typeof cb === "function") {
590
+ if (typeof optionsOrCb !== "object")
591
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
592
+ this.send(command, optionsOrCb || {}, cb);
593
+ }
594
+ else {
595
+ return this.send(command, optionsOrCb);
596
+ }
597
+ }
583
598
  sendChannelMessage(args, optionsOrCb, cb) {
584
599
  const command = new SendChannelMessageCommand_1.SendChannelMessageCommand(args);
585
600
  if (typeof optionsOrCb === "function") {
@@ -5,6 +5,7 @@ const config_resolver_1 = require("@aws-sdk/config-resolver");
5
5
  const middleware_content_length_1 = require("@aws-sdk/middleware-content-length");
6
6
  const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
7
7
  const middleware_logger_1 = require("@aws-sdk/middleware-logger");
8
+ const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
8
9
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
9
10
  const middleware_signing_1 = require("@aws-sdk/middleware-signing");
10
11
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
@@ -25,6 +26,7 @@ class ChimeSDKMessagingClient extends smithy_client_1.Client {
25
26
  this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
26
27
  this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
27
28
  this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
29
+ this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
28
30
  this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
29
31
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
30
32
  }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchChannelsCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class SearchChannelsCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "ChimeSDKMessagingClient";
18
+ const commandName = "SearchChannelsCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.SearchChannelsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.SearchChannelsResponse.filterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_restJson1_1.serializeAws_restJson1SearchChannelsCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_restJson1_1.deserializeAws_restJson1SearchChannelsCommand)(output, context);
34
+ }
35
+ }
36
+ exports.SearchChannelsCommand = SearchChannelsCommand;
@@ -39,6 +39,7 @@ tslib_1.__exportStar(require("./ListChannelsModeratedByAppInstanceUserCommand"),
39
39
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
40
40
  tslib_1.__exportStar(require("./PutChannelMembershipPreferencesCommand"), exports);
41
41
  tslib_1.__exportStar(require("./RedactChannelMessageCommand"), exports);
42
+ tslib_1.__exportStar(require("./SearchChannelsCommand"), exports);
42
43
  tslib_1.__exportStar(require("./SendChannelMessageCommand"), exports);
43
44
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
44
45
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ChannelModeratedByAppInstanceUserSummary = exports.ChannelMessageSummary = exports.ChannelMessage = exports.ChannelMessageType = exports.ChannelMessageStatusStructure = exports.ChannelMessageStatus = exports.ChannelMessagePersistenceType = exports.ChannelMembershipSummary = exports.ChannelMembershipPreferences = exports.PushNotificationPreferences = exports.ChannelMembershipForAppInstanceUserSummary = exports.ChannelSummary = exports.ChannelMembership = exports.ChannelFlowSummary = exports.ChannelFlowCallbackResponse = exports.ChannelFlowCallbackRequest = exports.ChannelMessageCallback = exports.PushNotificationConfiguration = exports.PushNotificationType = exports.MessageAttributeValue = exports.ChannelFlow = exports.Processor = exports.FallbackAction = exports.ProcessorConfiguration = exports.LambdaConfiguration = exports.InvocationType = exports.ChannelBanSummary = exports.ChannelBan = exports.ChannelAssociatedWithFlowSummary = exports.Channel = exports.ChannelPrivacy = exports.ChannelMode = exports.BatchCreateChannelMembershipResponse = exports.BatchCreateChannelMembershipError = exports.BatchCreateChannelMembershipRequest = exports.BatchChannelMemberships = exports.Identity = exports.UnauthorizedClientException = exports.ThrottledClientException = exports.ServiceUnavailableException = exports.ServiceFailureException = exports.NotFoundException = exports.ForbiddenException = exports.ConflictException = exports.BadRequestException = exports.ErrorCode = exports.AssociateChannelFlowRequest = exports.AppInstanceUserMembershipSummary = exports.ChannelMembershipType = exports.AllowNotifications = void 0;
4
4
  exports.ListChannelMembershipsResponse = exports.ListChannelMembershipsRequest = exports.ListChannelFlowsResponse = exports.ListChannelFlowsRequest = exports.ListChannelBansResponse = exports.ListChannelBansRequest = exports.GetMessagingSessionEndpointResponse = exports.MessagingSessionEndpoint = exports.GetMessagingSessionEndpointRequest = exports.GetChannelMessageStatusResponse = exports.GetChannelMessageStatusRequest = exports.GetChannelMessageResponse = exports.GetChannelMessageRequest = exports.GetChannelMembershipPreferencesResponse = exports.GetChannelMembershipPreferencesRequest = exports.DisassociateChannelFlowRequest = exports.DescribeChannelModeratorResponse = exports.DescribeChannelModeratorRequest = exports.DescribeChannelModeratedByAppInstanceUserResponse = exports.DescribeChannelModeratedByAppInstanceUserRequest = exports.DescribeChannelMembershipForAppInstanceUserResponse = exports.DescribeChannelMembershipForAppInstanceUserRequest = exports.DescribeChannelMembershipResponse = exports.DescribeChannelMembershipRequest = exports.DescribeChannelFlowResponse = exports.DescribeChannelFlowRequest = exports.DescribeChannelBanResponse = exports.DescribeChannelBanRequest = exports.DescribeChannelResponse = exports.DescribeChannelRequest = exports.DeleteChannelModeratorRequest = exports.DeleteChannelMessageRequest = exports.DeleteChannelMembershipRequest = exports.DeleteChannelFlowRequest = exports.DeleteChannelBanRequest = exports.DeleteChannelRequest = exports.CreateChannelModeratorResponse = exports.CreateChannelModeratorRequest = exports.CreateChannelMembershipResponse = exports.CreateChannelMembershipRequest = exports.CreateChannelFlowResponse = exports.CreateChannelFlowRequest = exports.CreateChannelBanResponse = exports.CreateChannelBanRequest = exports.ResourceLimitExceededException = exports.CreateChannelResponse = exports.CreateChannelRequest = exports.Tag = exports.ChannelModeratorSummary = exports.ChannelModerator = void 0;
5
- exports.UpdateChannelReadMarkerResponse = exports.UpdateChannelReadMarkerRequest = exports.UpdateChannelMessageResponse = exports.UpdateChannelMessageRequest = exports.UpdateChannelFlowResponse = exports.UpdateChannelFlowRequest = exports.UpdateChannelResponse = exports.UpdateChannelRequest = exports.UntagResourceRequest = exports.TagResourceRequest = exports.SendChannelMessageResponse = exports.SendChannelMessageRequest = exports.RedactChannelMessageResponse = exports.RedactChannelMessageRequest = exports.PutChannelMembershipPreferencesResponse = exports.PutChannelMembershipPreferencesRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListChannelsModeratedByAppInstanceUserResponse = exports.ListChannelsModeratedByAppInstanceUserRequest = exports.ListChannelsAssociatedWithChannelFlowResponse = exports.ListChannelsAssociatedWithChannelFlowRequest = exports.ListChannelsResponse = exports.ListChannelsRequest = exports.ListChannelModeratorsResponse = exports.ListChannelModeratorsRequest = exports.ListChannelMessagesResponse = exports.ListChannelMessagesRequest = exports.SortOrder = exports.ListChannelMembershipsForAppInstanceUserResponse = exports.ListChannelMembershipsForAppInstanceUserRequest = void 0;
5
+ exports.UpdateChannelReadMarkerResponse = exports.UpdateChannelReadMarkerRequest = exports.UpdateChannelMessageResponse = exports.UpdateChannelMessageRequest = exports.UpdateChannelFlowResponse = exports.UpdateChannelFlowRequest = exports.UpdateChannelResponse = exports.UpdateChannelRequest = exports.UntagResourceRequest = exports.TagResourceRequest = exports.SendChannelMessageResponse = exports.SendChannelMessageRequest = exports.SearchChannelsResponse = exports.SearchChannelsRequest = exports.SearchField = exports.SearchFieldOperator = exports.SearchFieldKey = exports.RedactChannelMessageResponse = exports.RedactChannelMessageRequest = exports.PutChannelMembershipPreferencesResponse = exports.PutChannelMembershipPreferencesRequest = exports.ListTagsForResourceResponse = exports.ListTagsForResourceRequest = exports.ListChannelsModeratedByAppInstanceUserResponse = exports.ListChannelsModeratedByAppInstanceUserRequest = exports.ListChannelsAssociatedWithChannelFlowResponse = exports.ListChannelsAssociatedWithChannelFlowRequest = exports.ListChannelsResponse = exports.ListChannelsRequest = exports.ListChannelModeratorsResponse = exports.ListChannelModeratorsRequest = exports.ListChannelMessagesResponse = exports.ListChannelMessagesRequest = exports.SortOrder = exports.ListChannelMembershipsForAppInstanceUserResponse = exports.ListChannelMembershipsForAppInstanceUserRequest = void 0;
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const ChimeSDKMessagingServiceException_1 = require("./ChimeSDKMessagingServiceException");
8
8
  var AllowNotifications;
@@ -475,6 +475,7 @@ var CreateChannelRequest;
475
475
  ...(obj.Metadata && { Metadata: smithy_client_1.SENSITIVE_STRING }),
476
476
  ...(obj.ClientRequestToken && { ClientRequestToken: smithy_client_1.SENSITIVE_STRING }),
477
477
  ...(obj.Tags && { Tags: obj.Tags.map((item) => Tag.filterSensitiveLog(item)) }),
478
+ ...(obj.ChannelId && { ChannelId: smithy_client_1.SENSITIVE_STRING }),
478
479
  });
479
480
  })(CreateChannelRequest = exports.CreateChannelRequest || (exports.CreateChannelRequest = {}));
480
481
  var CreateChannelResponse;
@@ -939,6 +940,36 @@ var RedactChannelMessageResponse;
939
940
  ...obj,
940
941
  });
941
942
  })(RedactChannelMessageResponse = exports.RedactChannelMessageResponse || (exports.RedactChannelMessageResponse = {}));
943
+ var SearchFieldKey;
944
+ (function (SearchFieldKey) {
945
+ SearchFieldKey["MEMBERS"] = "MEMBERS";
946
+ })(SearchFieldKey = exports.SearchFieldKey || (exports.SearchFieldKey = {}));
947
+ var SearchFieldOperator;
948
+ (function (SearchFieldOperator) {
949
+ SearchFieldOperator["EQUALS"] = "EQUALS";
950
+ SearchFieldOperator["INCLUDES"] = "INCLUDES";
951
+ })(SearchFieldOperator = exports.SearchFieldOperator || (exports.SearchFieldOperator = {}));
952
+ var SearchField;
953
+ (function (SearchField) {
954
+ SearchField.filterSensitiveLog = (obj) => ({
955
+ ...obj,
956
+ });
957
+ })(SearchField = exports.SearchField || (exports.SearchField = {}));
958
+ var SearchChannelsRequest;
959
+ (function (SearchChannelsRequest) {
960
+ SearchChannelsRequest.filterSensitiveLog = (obj) => ({
961
+ ...obj,
962
+ ...(obj.NextToken && { NextToken: smithy_client_1.SENSITIVE_STRING }),
963
+ });
964
+ })(SearchChannelsRequest = exports.SearchChannelsRequest || (exports.SearchChannelsRequest = {}));
965
+ var SearchChannelsResponse;
966
+ (function (SearchChannelsResponse) {
967
+ SearchChannelsResponse.filterSensitiveLog = (obj) => ({
968
+ ...obj,
969
+ ...(obj.Channels && { Channels: obj.Channels.map((item) => ChannelSummary.filterSensitiveLog(item)) }),
970
+ ...(obj.NextToken && { NextToken: smithy_client_1.SENSITIVE_STRING }),
971
+ });
972
+ })(SearchChannelsResponse = exports.SearchChannelsResponse || (exports.SearchChannelsResponse = {}));
942
973
  var SendChannelMessageRequest;
943
974
  (function (SendChannelMessageRequest) {
944
975
  SendChannelMessageRequest.filterSensitiveLog = (obj) => ({
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateSearchChannels = void 0;
4
+ const ChimeSDKMessaging_1 = require("../ChimeSDKMessaging");
5
+ const ChimeSDKMessagingClient_1 = require("../ChimeSDKMessagingClient");
6
+ const SearchChannelsCommand_1 = require("../commands/SearchChannelsCommand");
7
+ const makePagedClientRequest = async (client, input, ...args) => {
8
+ return await client.send(new SearchChannelsCommand_1.SearchChannelsCommand(input), ...args);
9
+ };
10
+ const makePagedRequest = async (client, input, ...args) => {
11
+ return await client.searchChannels(input, ...args);
12
+ };
13
+ async function* paginateSearchChannels(config, input, ...additionalArguments) {
14
+ let token = config.startingToken || undefined;
15
+ let hasNext = true;
16
+ let page;
17
+ while (hasNext) {
18
+ input.NextToken = token;
19
+ input["MaxResults"] = config.pageSize;
20
+ if (config.client instanceof ChimeSDKMessaging_1.ChimeSDKMessaging) {
21
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else if (config.client instanceof ChimeSDKMessagingClient_1.ChimeSDKMessagingClient) {
24
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
25
+ }
26
+ else {
27
+ throw new Error("Invalid client, expected ChimeSDKMessaging | ChimeSDKMessagingClient");
28
+ }
29
+ yield page;
30
+ const prevToken = token;
31
+ token = page.NextToken;
32
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ }
34
+ return undefined;
35
+ }
36
+ exports.paginateSearchChannels = paginateSearchChannels;
@@ -11,3 +11,4 @@ tslib_1.__exportStar(require("./ListChannelModeratorsPaginator"), exports);
11
11
  tslib_1.__exportStar(require("./ListChannelsAssociatedWithChannelFlowPaginator"), exports);
12
12
  tslib_1.__exportStar(require("./ListChannelsModeratedByAppInstanceUserPaginator"), exports);
13
13
  tslib_1.__exportStar(require("./ListChannelsPaginator"), exports);
14
+ tslib_1.__exportStar(require("./SearchChannelsPaginator"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1CreateChannelBanCommand = exports.deserializeAws_restJson1CreateChannelCommand = exports.deserializeAws_restJson1ChannelFlowCallbackCommand = exports.deserializeAws_restJson1BatchCreateChannelMembershipCommand = exports.deserializeAws_restJson1AssociateChannelFlowCommand = exports.serializeAws_restJson1UpdateChannelReadMarkerCommand = exports.serializeAws_restJson1UpdateChannelMessageCommand = exports.serializeAws_restJson1UpdateChannelFlowCommand = exports.serializeAws_restJson1UpdateChannelCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SendChannelMessageCommand = exports.serializeAws_restJson1RedactChannelMessageCommand = exports.serializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.serializeAws_restJson1ListChannelsCommand = exports.serializeAws_restJson1ListChannelModeratorsCommand = exports.serializeAws_restJson1ListChannelMessagesCommand = exports.serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.serializeAws_restJson1ListChannelMembershipsCommand = exports.serializeAws_restJson1ListChannelFlowsCommand = exports.serializeAws_restJson1ListChannelBansCommand = exports.serializeAws_restJson1GetMessagingSessionEndpointCommand = exports.serializeAws_restJson1GetChannelMessageStatusCommand = exports.serializeAws_restJson1GetChannelMessageCommand = exports.serializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.serializeAws_restJson1DisassociateChannelFlowCommand = exports.serializeAws_restJson1DescribeChannelModeratorCommand = exports.serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.serializeAws_restJson1DescribeChannelMembershipCommand = exports.serializeAws_restJson1DescribeChannelFlowCommand = exports.serializeAws_restJson1DescribeChannelBanCommand = exports.serializeAws_restJson1DescribeChannelCommand = exports.serializeAws_restJson1DeleteChannelModeratorCommand = exports.serializeAws_restJson1DeleteChannelMessageCommand = exports.serializeAws_restJson1DeleteChannelMembershipCommand = exports.serializeAws_restJson1DeleteChannelFlowCommand = exports.serializeAws_restJson1DeleteChannelBanCommand = exports.serializeAws_restJson1DeleteChannelCommand = exports.serializeAws_restJson1CreateChannelModeratorCommand = exports.serializeAws_restJson1CreateChannelMembershipCommand = exports.serializeAws_restJson1CreateChannelFlowCommand = exports.serializeAws_restJson1CreateChannelBanCommand = exports.serializeAws_restJson1CreateChannelCommand = exports.serializeAws_restJson1ChannelFlowCallbackCommand = exports.serializeAws_restJson1BatchCreateChannelMembershipCommand = exports.serializeAws_restJson1AssociateChannelFlowCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateChannelReadMarkerCommand = exports.deserializeAws_restJson1UpdateChannelMessageCommand = exports.deserializeAws_restJson1UpdateChannelFlowCommand = exports.deserializeAws_restJson1UpdateChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendChannelMessageCommand = exports.deserializeAws_restJson1RedactChannelMessageCommand = exports.deserializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.deserializeAws_restJson1ListChannelsCommand = exports.deserializeAws_restJson1ListChannelModeratorsCommand = exports.deserializeAws_restJson1ListChannelMessagesCommand = exports.deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelMembershipsCommand = exports.deserializeAws_restJson1ListChannelFlowsCommand = exports.deserializeAws_restJson1ListChannelBansCommand = exports.deserializeAws_restJson1GetMessagingSessionEndpointCommand = exports.deserializeAws_restJson1GetChannelMessageStatusCommand = exports.deserializeAws_restJson1GetChannelMessageCommand = exports.deserializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1DisassociateChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelModeratorCommand = exports.deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipCommand = exports.deserializeAws_restJson1DescribeChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelBanCommand = exports.deserializeAws_restJson1DescribeChannelCommand = exports.deserializeAws_restJson1DeleteChannelModeratorCommand = exports.deserializeAws_restJson1DeleteChannelMessageCommand = exports.deserializeAws_restJson1DeleteChannelMembershipCommand = exports.deserializeAws_restJson1DeleteChannelFlowCommand = exports.deserializeAws_restJson1DeleteChannelBanCommand = exports.deserializeAws_restJson1DeleteChannelCommand = exports.deserializeAws_restJson1CreateChannelModeratorCommand = exports.deserializeAws_restJson1CreateChannelMembershipCommand = exports.deserializeAws_restJson1CreateChannelFlowCommand = void 0;
3
+ exports.deserializeAws_restJson1CreateChannelCommand = exports.deserializeAws_restJson1ChannelFlowCallbackCommand = exports.deserializeAws_restJson1BatchCreateChannelMembershipCommand = exports.deserializeAws_restJson1AssociateChannelFlowCommand = exports.serializeAws_restJson1UpdateChannelReadMarkerCommand = exports.serializeAws_restJson1UpdateChannelMessageCommand = exports.serializeAws_restJson1UpdateChannelFlowCommand = exports.serializeAws_restJson1UpdateChannelCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1SendChannelMessageCommand = exports.serializeAws_restJson1SearchChannelsCommand = exports.serializeAws_restJson1RedactChannelMessageCommand = exports.serializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.serializeAws_restJson1ListChannelsCommand = exports.serializeAws_restJson1ListChannelModeratorsCommand = exports.serializeAws_restJson1ListChannelMessagesCommand = exports.serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.serializeAws_restJson1ListChannelMembershipsCommand = exports.serializeAws_restJson1ListChannelFlowsCommand = exports.serializeAws_restJson1ListChannelBansCommand = exports.serializeAws_restJson1GetMessagingSessionEndpointCommand = exports.serializeAws_restJson1GetChannelMessageStatusCommand = exports.serializeAws_restJson1GetChannelMessageCommand = exports.serializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.serializeAws_restJson1DisassociateChannelFlowCommand = exports.serializeAws_restJson1DescribeChannelModeratorCommand = exports.serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.serializeAws_restJson1DescribeChannelMembershipCommand = exports.serializeAws_restJson1DescribeChannelFlowCommand = exports.serializeAws_restJson1DescribeChannelBanCommand = exports.serializeAws_restJson1DescribeChannelCommand = exports.serializeAws_restJson1DeleteChannelModeratorCommand = exports.serializeAws_restJson1DeleteChannelMessageCommand = exports.serializeAws_restJson1DeleteChannelMembershipCommand = exports.serializeAws_restJson1DeleteChannelFlowCommand = exports.serializeAws_restJson1DeleteChannelBanCommand = exports.serializeAws_restJson1DeleteChannelCommand = exports.serializeAws_restJson1CreateChannelModeratorCommand = exports.serializeAws_restJson1CreateChannelMembershipCommand = exports.serializeAws_restJson1CreateChannelFlowCommand = exports.serializeAws_restJson1CreateChannelBanCommand = exports.serializeAws_restJson1CreateChannelCommand = exports.serializeAws_restJson1ChannelFlowCallbackCommand = exports.serializeAws_restJson1BatchCreateChannelMembershipCommand = exports.serializeAws_restJson1AssociateChannelFlowCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateChannelReadMarkerCommand = exports.deserializeAws_restJson1UpdateChannelMessageCommand = exports.deserializeAws_restJson1UpdateChannelFlowCommand = exports.deserializeAws_restJson1UpdateChannelCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1SendChannelMessageCommand = exports.deserializeAws_restJson1SearchChannelsCommand = exports.deserializeAws_restJson1RedactChannelMessageCommand = exports.deserializeAws_restJson1PutChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = exports.deserializeAws_restJson1ListChannelsCommand = exports.deserializeAws_restJson1ListChannelModeratorsCommand = exports.deserializeAws_restJson1ListChannelMessagesCommand = exports.deserializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = exports.deserializeAws_restJson1ListChannelMembershipsCommand = exports.deserializeAws_restJson1ListChannelFlowsCommand = exports.deserializeAws_restJson1ListChannelBansCommand = exports.deserializeAws_restJson1GetMessagingSessionEndpointCommand = exports.deserializeAws_restJson1GetChannelMessageStatusCommand = exports.deserializeAws_restJson1GetChannelMessageCommand = exports.deserializeAws_restJson1GetChannelMembershipPreferencesCommand = exports.deserializeAws_restJson1DisassociateChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelModeratorCommand = exports.deserializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand = exports.deserializeAws_restJson1DescribeChannelMembershipCommand = exports.deserializeAws_restJson1DescribeChannelFlowCommand = exports.deserializeAws_restJson1DescribeChannelBanCommand = exports.deserializeAws_restJson1DescribeChannelCommand = exports.deserializeAws_restJson1DeleteChannelModeratorCommand = exports.deserializeAws_restJson1DeleteChannelMessageCommand = exports.deserializeAws_restJson1DeleteChannelMembershipCommand = exports.deserializeAws_restJson1DeleteChannelFlowCommand = exports.deserializeAws_restJson1DeleteChannelBanCommand = exports.deserializeAws_restJson1DeleteChannelCommand = exports.deserializeAws_restJson1CreateChannelModeratorCommand = exports.deserializeAws_restJson1CreateChannelMembershipCommand = exports.deserializeAws_restJson1CreateChannelFlowCommand = exports.deserializeAws_restJson1CreateChannelBanCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const uuid_1 = require("uuid");
@@ -132,9 +132,16 @@ const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
132
132
  body = JSON.stringify({
133
133
  ...(input.AppInstanceArn !== undefined &&
134
134
  input.AppInstanceArn !== null && { AppInstanceArn: input.AppInstanceArn }),
135
+ ...(input.ChannelId !== undefined && input.ChannelId !== null && { ChannelId: input.ChannelId }),
135
136
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
137
+ ...(input.MemberArns !== undefined &&
138
+ input.MemberArns !== null && { MemberArns: serializeAws_restJson1ChannelMemberArns(input.MemberArns, context) }),
136
139
  ...(input.Metadata !== undefined && input.Metadata !== null && { Metadata: input.Metadata }),
137
140
  ...(input.Mode !== undefined && input.Mode !== null && { Mode: input.Mode }),
141
+ ...(input.ModeratorArns !== undefined &&
142
+ input.ModeratorArns !== null && {
143
+ ModeratorArns: serializeAws_restJson1ChannelModeratorArns(input.ModeratorArns, context),
144
+ }),
138
145
  ...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
139
146
  ...(input.Privacy !== undefined && input.Privacy !== null && { Privacy: input.Privacy }),
140
147
  ...(input.Tags !== undefined &&
@@ -1269,6 +1276,35 @@ const serializeAws_restJson1RedactChannelMessageCommand = async (input, context)
1269
1276
  });
1270
1277
  };
1271
1278
  exports.serializeAws_restJson1RedactChannelMessageCommand = serializeAws_restJson1RedactChannelMessageCommand;
1279
+ const serializeAws_restJson1SearchChannelsCommand = async (input, context) => {
1280
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1281
+ const headers = {
1282
+ "content-type": "application/json",
1283
+ ...(isSerializableHeaderValue(input.ChimeBearer) && { "x-amz-chime-bearer": input.ChimeBearer }),
1284
+ };
1285
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
1286
+ const query = {
1287
+ operation: "search",
1288
+ ...(input.MaxResults !== undefined && { "max-results": input.MaxResults.toString() }),
1289
+ ...(input.NextToken !== undefined && { "next-token": input.NextToken }),
1290
+ };
1291
+ let body;
1292
+ body = JSON.stringify({
1293
+ ...(input.Fields !== undefined &&
1294
+ input.Fields !== null && { Fields: serializeAws_restJson1SearchFields(input.Fields, context) }),
1295
+ });
1296
+ return new protocol_http_1.HttpRequest({
1297
+ protocol,
1298
+ hostname,
1299
+ port,
1300
+ method: "POST",
1301
+ headers,
1302
+ path: resolvedPath,
1303
+ query,
1304
+ body,
1305
+ });
1306
+ };
1307
+ exports.serializeAws_restJson1SearchChannelsCommand = serializeAws_restJson1SearchChannelsCommand;
1272
1308
  const serializeAws_restJson1SendChannelMessageCommand = async (input, context) => {
1273
1309
  var _a;
1274
1310
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -3570,6 +3606,65 @@ const deserializeAws_restJson1RedactChannelMessageCommand = async (output, conte
3570
3606
  };
3571
3607
  exports.deserializeAws_restJson1RedactChannelMessageCommand = deserializeAws_restJson1RedactChannelMessageCommand;
3572
3608
  const deserializeAws_restJson1RedactChannelMessageCommandError = async (output, context) => {
3609
+ const parsedOutput = {
3610
+ ...output,
3611
+ body: await parseBody(output.body, context),
3612
+ };
3613
+ let response;
3614
+ let errorCode = "UnknownError";
3615
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3616
+ switch (errorCode) {
3617
+ case "BadRequestException":
3618
+ case "com.amazonaws.chimesdkmessaging#BadRequestException":
3619
+ throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
3620
+ case "ConflictException":
3621
+ case "com.amazonaws.chimesdkmessaging#ConflictException":
3622
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3623
+ case "ForbiddenException":
3624
+ case "com.amazonaws.chimesdkmessaging#ForbiddenException":
3625
+ throw await deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context);
3626
+ case "ServiceFailureException":
3627
+ case "com.amazonaws.chimesdkmessaging#ServiceFailureException":
3628
+ throw await deserializeAws_restJson1ServiceFailureExceptionResponse(parsedOutput, context);
3629
+ case "ServiceUnavailableException":
3630
+ case "com.amazonaws.chimesdkmessaging#ServiceUnavailableException":
3631
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
3632
+ case "ThrottledClientException":
3633
+ case "com.amazonaws.chimesdkmessaging#ThrottledClientException":
3634
+ throw await deserializeAws_restJson1ThrottledClientExceptionResponse(parsedOutput, context);
3635
+ case "UnauthorizedClientException":
3636
+ case "com.amazonaws.chimesdkmessaging#UnauthorizedClientException":
3637
+ throw await deserializeAws_restJson1UnauthorizedClientExceptionResponse(parsedOutput, context);
3638
+ default:
3639
+ const parsedBody = parsedOutput.body;
3640
+ response = new ChimeSDKMessagingServiceException_1.ChimeSDKMessagingServiceException({
3641
+ name: parsedBody.code || parsedBody.Code || errorCode,
3642
+ $fault: "client",
3643
+ $metadata: deserializeMetadata(output),
3644
+ });
3645
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3646
+ }
3647
+ };
3648
+ const deserializeAws_restJson1SearchChannelsCommand = async (output, context) => {
3649
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3650
+ return deserializeAws_restJson1SearchChannelsCommandError(output, context);
3651
+ }
3652
+ const contents = {
3653
+ $metadata: deserializeMetadata(output),
3654
+ Channels: undefined,
3655
+ NextToken: undefined,
3656
+ };
3657
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3658
+ if (data.Channels !== undefined && data.Channels !== null) {
3659
+ contents.Channels = deserializeAws_restJson1ChannelSummaryList(data.Channels, context);
3660
+ }
3661
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3662
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3663
+ }
3664
+ return Promise.resolve(contents);
3665
+ };
3666
+ exports.deserializeAws_restJson1SearchChannelsCommand = deserializeAws_restJson1SearchChannelsCommand;
3667
+ const deserializeAws_restJson1SearchChannelsCommandError = async (output, context) => {
3573
3668
  const parsedOutput = {
3574
3669
  ...output,
3575
3670
  body: await parseBody(output.body, context),
@@ -4131,6 +4226,16 @@ const deserializeAws_restJson1UnauthorizedClientExceptionResponse = async (parse
4131
4226
  });
4132
4227
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
4133
4228
  };
4229
+ const serializeAws_restJson1ChannelMemberArns = (input, context) => {
4230
+ return input
4231
+ .filter((e) => e != null)
4232
+ .map((entry) => {
4233
+ if (entry === null) {
4234
+ return null;
4235
+ }
4236
+ return entry;
4237
+ });
4238
+ };
4134
4239
  const serializeAws_restJson1ChannelMembershipPreferences = (input, context) => {
4135
4240
  return {
4136
4241
  ...(input.PushNotifications !== undefined &&
@@ -4154,6 +4259,16 @@ const serializeAws_restJson1ChannelMessageCallback = (input, context) => {
4154
4259
  }),
4155
4260
  };
4156
4261
  };
4262
+ const serializeAws_restJson1ChannelModeratorArns = (input, context) => {
4263
+ return input
4264
+ .filter((e) => e != null)
4265
+ .map((entry) => {
4266
+ if (entry === null) {
4267
+ return null;
4268
+ }
4269
+ return entry;
4270
+ });
4271
+ };
4157
4272
  const serializeAws_restJson1LambdaConfiguration = (input, context) => {
4158
4273
  return {
4159
4274
  ...(input.InvocationType !== undefined &&
@@ -4243,6 +4358,34 @@ const serializeAws_restJson1PushNotificationPreferences = (input, context) => {
4243
4358
  ...(input.FilterRule !== undefined && input.FilterRule !== null && { FilterRule: input.FilterRule }),
4244
4359
  };
4245
4360
  };
4361
+ const serializeAws_restJson1SearchField = (input, context) => {
4362
+ return {
4363
+ ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
4364
+ ...(input.Operator !== undefined && input.Operator !== null && { Operator: input.Operator }),
4365
+ ...(input.Values !== undefined &&
4366
+ input.Values !== null && { Values: serializeAws_restJson1SearchFieldValues(input.Values, context) }),
4367
+ };
4368
+ };
4369
+ const serializeAws_restJson1SearchFields = (input, context) => {
4370
+ return input
4371
+ .filter((e) => e != null)
4372
+ .map((entry) => {
4373
+ if (entry === null) {
4374
+ return null;
4375
+ }
4376
+ return serializeAws_restJson1SearchField(entry, context);
4377
+ });
4378
+ };
4379
+ const serializeAws_restJson1SearchFieldValues = (input, context) => {
4380
+ return input
4381
+ .filter((e) => e != null)
4382
+ .map((entry) => {
4383
+ if (entry === null) {
4384
+ return null;
4385
+ }
4386
+ return entry;
4387
+ });
4388
+ };
4246
4389
  const serializeAws_restJson1Tag = (input, context) => {
4247
4390
  return {
4248
4391
  ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
@@ -38,6 +38,7 @@ import { ListChannelsModeratedByAppInstanceUserCommand, } from "./commands/ListC
38
38
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
39
39
  import { PutChannelMembershipPreferencesCommand, } from "./commands/PutChannelMembershipPreferencesCommand";
40
40
  import { RedactChannelMessageCommand, } from "./commands/RedactChannelMessageCommand";
41
+ import { SearchChannelsCommand, } from "./commands/SearchChannelsCommand";
41
42
  import { SendChannelMessageCommand, } from "./commands/SendChannelMessageCommand";
42
43
  import { TagResourceCommand } from "./commands/TagResourceCommand";
43
44
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
@@ -582,6 +583,20 @@ var ChimeSDKMessaging = (function (_super) {
582
583
  return this.send(command, optionsOrCb);
583
584
  }
584
585
  };
586
+ ChimeSDKMessaging.prototype.searchChannels = function (args, optionsOrCb, cb) {
587
+ var command = new SearchChannelsCommand(args);
588
+ if (typeof optionsOrCb === "function") {
589
+ this.send(command, optionsOrCb);
590
+ }
591
+ else if (typeof cb === "function") {
592
+ if (typeof optionsOrCb !== "object")
593
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
594
+ this.send(command, optionsOrCb || {}, cb);
595
+ }
596
+ else {
597
+ return this.send(command, optionsOrCb);
598
+ }
599
+ };
585
600
  ChimeSDKMessaging.prototype.sendChannelMessage = function (args, optionsOrCb, cb) {
586
601
  var command = new SendChannelMessageCommand(args);
587
602
  if (typeof optionsOrCb === "function") {
@@ -3,6 +3,7 @@ import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-re
3
3
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
4
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
5
5
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
6
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
6
7
  import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
7
8
  import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
8
9
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
@@ -25,6 +26,7 @@ var ChimeSDKMessagingClient = (function (_super) {
25
26
  _this.middlewareStack.use(getContentLengthPlugin(_this.config));
26
27
  _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
27
28
  _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
28
30
  _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
29
31
  _this.middlewareStack.use(getUserAgentPlugin(_this.config));
30
32
  return _this;
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { SearchChannelsRequest, SearchChannelsResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1SearchChannelsCommand, serializeAws_restJson1SearchChannelsCommand, } from "../protocols/Aws_restJson1";
6
+ var SearchChannelsCommand = (function (_super) {
7
+ __extends(SearchChannelsCommand, _super);
8
+ function SearchChannelsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ SearchChannelsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "ChimeSDKMessagingClient";
18
+ var commandName = "SearchChannelsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: SearchChannelsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: SearchChannelsResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ SearchChannelsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1SearchChannelsCommand(input, context);
33
+ };
34
+ SearchChannelsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1SearchChannelsCommand(output, context);
36
+ };
37
+ return SearchChannelsCommand;
38
+ }($Command));
39
+ export { SearchChannelsCommand };
@@ -36,6 +36,7 @@ export * from "./ListChannelsModeratedByAppInstanceUserCommand";
36
36
  export * from "./ListTagsForResourceCommand";
37
37
  export * from "./PutChannelMembershipPreferencesCommand";
38
38
  export * from "./RedactChannelMessageCommand";
39
+ export * from "./SearchChannelsCommand";
39
40
  export * from "./SendChannelMessageCommand";
40
41
  export * from "./TagResourceCommand";
41
42
  export * from "./UntagResourceCommand";
@@ -345,7 +345,7 @@ export var Tag;
345
345
  })(Tag || (Tag = {}));
346
346
  export var CreateChannelRequest;
347
347
  (function (CreateChannelRequest) {
348
- CreateChannelRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign(__assign({}, obj), (obj.Name && { Name: SENSITIVE_STRING })), (obj.Metadata && { Metadata: SENSITIVE_STRING })), (obj.ClientRequestToken && { ClientRequestToken: SENSITIVE_STRING })), (obj.Tags && { Tags: obj.Tags.map(function (item) { return Tag.filterSensitiveLog(item); }) }))); };
348
+ CreateChannelRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign(__assign(__assign({}, obj), (obj.Name && { Name: SENSITIVE_STRING })), (obj.Metadata && { Metadata: SENSITIVE_STRING })), (obj.ClientRequestToken && { ClientRequestToken: SENSITIVE_STRING })), (obj.Tags && { Tags: obj.Tags.map(function (item) { return Tag.filterSensitiveLog(item); }) })), (obj.ChannelId && { ChannelId: SENSITIVE_STRING }))); };
349
349
  })(CreateChannelRequest || (CreateChannelRequest = {}));
350
350
  export var CreateChannelResponse;
351
351
  (function (CreateChannelResponse) {
@@ -636,6 +636,27 @@ export var RedactChannelMessageResponse;
636
636
  (function (RedactChannelMessageResponse) {
637
637
  RedactChannelMessageResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
638
638
  })(RedactChannelMessageResponse || (RedactChannelMessageResponse = {}));
639
+ export var SearchFieldKey;
640
+ (function (SearchFieldKey) {
641
+ SearchFieldKey["MEMBERS"] = "MEMBERS";
642
+ })(SearchFieldKey || (SearchFieldKey = {}));
643
+ export var SearchFieldOperator;
644
+ (function (SearchFieldOperator) {
645
+ SearchFieldOperator["EQUALS"] = "EQUALS";
646
+ SearchFieldOperator["INCLUDES"] = "INCLUDES";
647
+ })(SearchFieldOperator || (SearchFieldOperator = {}));
648
+ export var SearchField;
649
+ (function (SearchField) {
650
+ SearchField.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
651
+ })(SearchField || (SearchField = {}));
652
+ export var SearchChannelsRequest;
653
+ (function (SearchChannelsRequest) {
654
+ SearchChannelsRequest.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.NextToken && { NextToken: SENSITIVE_STRING }))); };
655
+ })(SearchChannelsRequest || (SearchChannelsRequest = {}));
656
+ export var SearchChannelsResponse;
657
+ (function (SearchChannelsResponse) {
658
+ SearchChannelsResponse.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Channels && { Channels: obj.Channels.map(function (item) { return ChannelSummary.filterSensitiveLog(item); }) })), (obj.NextToken && { NextToken: SENSITIVE_STRING }))); };
659
+ })(SearchChannelsResponse || (SearchChannelsResponse = {}));
639
660
  export var SendChannelMessageRequest;
640
661
  (function (SendChannelMessageRequest) {
641
662
  SendChannelMessageRequest.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign(__assign(__assign(__assign({}, obj), (obj.Content && { Content: SENSITIVE_STRING })), (obj.Metadata && { Metadata: SENSITIVE_STRING })), (obj.ClientRequestToken && { ClientRequestToken: SENSITIVE_STRING })), (obj.PushNotification && {