@rivet-gg/chat 0.0.2 → 0.0.5

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 (40) hide show
  1. package/dist-cjs/ChatService.js +112 -0
  2. package/dist-cjs/ChatServiceClient.js +47 -0
  3. package/dist-cjs/commands/GetDirectThreadCommand.js +36 -0
  4. package/dist-cjs/commands/GetThreadHistoryCommand.js +36 -0
  5. package/dist-cjs/commands/GetThreadTopicCommand.js +36 -0
  6. package/dist-cjs/commands/SendChatMessageCommand.js +36 -0
  7. package/dist-cjs/commands/SetThreadReadCommand.js +36 -0
  8. package/dist-cjs/commands/SetTypingStatusCommand.js +36 -0
  9. package/dist-cjs/commands/WatchThreadCommand.js +36 -0
  10. package/dist-cjs/commands/index.js +10 -0
  11. package/dist-cjs/index.js +11 -0
  12. package/dist-cjs/models/ChatServiceServiceException.js +11 -0
  13. package/dist-cjs/models/index.js +4 -0
  14. package/dist-cjs/models/models_0.js +600 -0
  15. package/dist-cjs/protocols/Aws_restJson1.js +1055 -0
  16. package/dist-cjs/runtimeConfig.browser.js +42 -0
  17. package/dist-cjs/runtimeConfig.js +45 -0
  18. package/dist-cjs/runtimeConfig.native.js +16 -0
  19. package/dist-cjs/runtimeConfig.shared.js +14 -0
  20. package/dist-es/ChatService.js +115 -0
  21. package/dist-es/ChatServiceClient.js +49 -0
  22. package/dist-es/commands/GetDirectThreadCommand.js +39 -0
  23. package/dist-es/commands/GetThreadHistoryCommand.js +39 -0
  24. package/dist-es/commands/GetThreadTopicCommand.js +39 -0
  25. package/dist-es/commands/SendChatMessageCommand.js +39 -0
  26. package/dist-es/commands/SetThreadReadCommand.js +39 -0
  27. package/dist-es/commands/SetTypingStatusCommand.js +39 -0
  28. package/dist-es/commands/WatchThreadCommand.js +39 -0
  29. package/dist-es/commands/index.js +7 -0
  30. package/dist-es/index.js +6 -0
  31. package/dist-es/models/ChatServiceServiceException.js +12 -0
  32. package/dist-es/models/index.js +1 -0
  33. package/dist-es/models/models_0.js +492 -0
  34. package/dist-es/protocols/Aws_restJson1.js +1238 -0
  35. package/dist-es/runtimeConfig.browser.js +25 -0
  36. package/dist-es/runtimeConfig.js +28 -0
  37. package/dist-es/runtimeConfig.native.js +8 -0
  38. package/dist-es/runtimeConfig.shared.js +10 -0
  39. package/dist-types/models/models_0.d.ts +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1,600 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WatchThreadOutput = exports.WatchResponse = exports.ChatIdentityTypingStatus = exports.WatchThreadInput = exports.SetTypingStatusOutput = exports.SetTypingStatusInput = exports.ChatTypingStatus = exports.Unit = exports.SetThreadReadOutput = exports.SetThreadReadInput = exports.SendChatMessageOutput = exports.SendChatMessageInput = exports.SendChatTopic = exports.SendMessageBody = exports.SendMessageBodyText = exports.SendMessageBodyPartyInvite = exports.GetThreadTopicOutput = exports.ChatSimpleTopic = exports.ChatSimpleTopicParty = exports.ChatSimpleTopicGroup = exports.ChatSimpleTopicDirect = exports.GetThreadTopicInput = exports.GetThreadHistoryOutput = exports.ChatMessage = exports.ChatMessageBody = exports.ChatMessageBodyText = exports.ChatMessageBodyPartyLeave = exports.ChatMessageBodyPartyJoinRequest = exports.ChatMessageBodyPartyJoin = exports.ChatMessageBodyPartyInvite = exports.ChatMessageBodyPartyActivityChange = exports.ChatMessageBodyIdentityFollow = exports.ChatMessageBodyGroupLeave = exports.ChatMessageBodyGroupJoin = exports.IdentityHandle = exports.IdentityPresence = exports.IdentityStatus = exports.IdentityGameActivity = exports.PartyHandle = exports.PartyExternalLinks = exports.PartyActivity = exports.PartyActivityMatchmakerLobby = exports.PartyMatchmakerLobby = exports.PartyActivityMatchmakerFindingLobby = exports.GameHandle = exports.PartyActivityIdle = exports.IdentityExternalLinks = exports.ChatMessageBodyChatCreate = exports.GetThreadHistoryInput = exports.QueryDirection = void 0;
4
+ exports.UnauthorizedError = exports.RateLimitError = exports.NotFoundError = exports.InternalError = exports.ForbiddenError = exports.BadRequestError = exports.GetDirectThreadOutput = exports.GetDirectThreadInput = void 0;
5
+ const ChatServiceServiceException_1 = require("./ChatServiceServiceException");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ var QueryDirection;
8
+ (function (QueryDirection) {
9
+ QueryDirection["AFTER"] = "after";
10
+ QueryDirection["BEFORE"] = "before";
11
+ QueryDirection["BEFORE_AND_AFTER"] = "before_and_after";
12
+ })(QueryDirection = exports.QueryDirection || (exports.QueryDirection = {}));
13
+ var GetThreadHistoryInput;
14
+ (function (GetThreadHistoryInput) {
15
+ GetThreadHistoryInput.filterSensitiveLog = (obj) => ({
16
+ ...obj,
17
+ });
18
+ })(GetThreadHistoryInput = exports.GetThreadHistoryInput || (exports.GetThreadHistoryInput = {}));
19
+ var ChatMessageBodyChatCreate;
20
+ (function (ChatMessageBodyChatCreate) {
21
+ ChatMessageBodyChatCreate.filterSensitiveLog = (obj) => ({
22
+ ...obj,
23
+ });
24
+ })(ChatMessageBodyChatCreate = exports.ChatMessageBodyChatCreate || (exports.ChatMessageBodyChatCreate = {}));
25
+ var IdentityExternalLinks;
26
+ (function (IdentityExternalLinks) {
27
+ IdentityExternalLinks.filterSensitiveLog = (obj) => ({
28
+ ...obj,
29
+ });
30
+ })(IdentityExternalLinks = exports.IdentityExternalLinks || (exports.IdentityExternalLinks = {}));
31
+ var PartyActivityIdle;
32
+ (function (PartyActivityIdle) {
33
+ PartyActivityIdle.filterSensitiveLog = (obj) => ({
34
+ ...obj,
35
+ });
36
+ })(PartyActivityIdle = exports.PartyActivityIdle || (exports.PartyActivityIdle = {}));
37
+ var GameHandle;
38
+ (function (GameHandle) {
39
+ GameHandle.filterSensitiveLog = (obj) => ({
40
+ ...obj,
41
+ });
42
+ })(GameHandle = exports.GameHandle || (exports.GameHandle = {}));
43
+ var PartyActivityMatchmakerFindingLobby;
44
+ (function (PartyActivityMatchmakerFindingLobby) {
45
+ PartyActivityMatchmakerFindingLobby.filterSensitiveLog = (obj) => ({
46
+ ...obj,
47
+ });
48
+ })(PartyActivityMatchmakerFindingLobby = exports.PartyActivityMatchmakerFindingLobby || (exports.PartyActivityMatchmakerFindingLobby = {}));
49
+ var PartyMatchmakerLobby;
50
+ (function (PartyMatchmakerLobby) {
51
+ PartyMatchmakerLobby.filterSensitiveLog = (obj) => ({
52
+ ...obj,
53
+ });
54
+ })(PartyMatchmakerLobby = exports.PartyMatchmakerLobby || (exports.PartyMatchmakerLobby = {}));
55
+ var PartyActivityMatchmakerLobby;
56
+ (function (PartyActivityMatchmakerLobby) {
57
+ PartyActivityMatchmakerLobby.filterSensitiveLog = (obj) => ({
58
+ ...obj,
59
+ });
60
+ })(PartyActivityMatchmakerLobby = exports.PartyActivityMatchmakerLobby || (exports.PartyActivityMatchmakerLobby = {}));
61
+ var PartyActivity;
62
+ (function (PartyActivity) {
63
+ PartyActivity.visit = (value, visitor) => {
64
+ if (value.idle !== undefined)
65
+ return visitor.idle(value.idle);
66
+ if (value.matchmakerFindingLobby !== undefined)
67
+ return visitor.matchmakerFindingLobby(value.matchmakerFindingLobby);
68
+ if (value.matchmakerLobby !== undefined)
69
+ return visitor.matchmakerLobby(value.matchmakerLobby);
70
+ return visitor._(value.$unknown[0], value.$unknown[1]);
71
+ };
72
+ PartyActivity.filterSensitiveLog = (obj) => {
73
+ if (obj.idle !== undefined)
74
+ return { idle: PartyActivityIdle.filterSensitiveLog(obj.idle)
75
+ };
76
+ if (obj.matchmakerFindingLobby !== undefined)
77
+ return { matchmakerFindingLobby: PartyActivityMatchmakerFindingLobby.filterSensitiveLog(obj.matchmakerFindingLobby)
78
+ };
79
+ if (obj.matchmakerLobby !== undefined)
80
+ return { matchmakerLobby: PartyActivityMatchmakerLobby.filterSensitiveLog(obj.matchmakerLobby)
81
+ };
82
+ if (obj.$unknown !== undefined)
83
+ return { [obj.$unknown[0]]: 'UNKNOWN' };
84
+ };
85
+ })(PartyActivity = exports.PartyActivity || (exports.PartyActivity = {}));
86
+ var PartyExternalLinks;
87
+ (function (PartyExternalLinks) {
88
+ PartyExternalLinks.filterSensitiveLog = (obj) => ({
89
+ ...obj,
90
+ });
91
+ })(PartyExternalLinks = exports.PartyExternalLinks || (exports.PartyExternalLinks = {}));
92
+ var PartyHandle;
93
+ (function (PartyHandle) {
94
+ PartyHandle.filterSensitiveLog = (obj) => ({
95
+ ...obj,
96
+ ...(obj.activity && { activity: PartyActivity.filterSensitiveLog(obj.activity)
97
+ }),
98
+ });
99
+ })(PartyHandle = exports.PartyHandle || (exports.PartyHandle = {}));
100
+ var IdentityGameActivity;
101
+ (function (IdentityGameActivity) {
102
+ IdentityGameActivity.filterSensitiveLog = (obj) => ({
103
+ ...obj,
104
+ });
105
+ })(IdentityGameActivity = exports.IdentityGameActivity || (exports.IdentityGameActivity = {}));
106
+ var IdentityStatus;
107
+ (function (IdentityStatus) {
108
+ IdentityStatus["AWAY"] = "away";
109
+ IdentityStatus["OFFLINE"] = "offline";
110
+ IdentityStatus["ONLINE"] = "online";
111
+ })(IdentityStatus = exports.IdentityStatus || (exports.IdentityStatus = {}));
112
+ var IdentityPresence;
113
+ (function (IdentityPresence) {
114
+ IdentityPresence.filterSensitiveLog = (obj) => ({
115
+ ...obj,
116
+ });
117
+ })(IdentityPresence = exports.IdentityPresence || (exports.IdentityPresence = {}));
118
+ var IdentityHandle;
119
+ (function (IdentityHandle) {
120
+ IdentityHandle.filterSensitiveLog = (obj) => ({
121
+ ...obj,
122
+ ...(obj.party && { party: PartyHandle.filterSensitiveLog(obj.party)
123
+ }),
124
+ });
125
+ })(IdentityHandle = exports.IdentityHandle || (exports.IdentityHandle = {}));
126
+ var ChatMessageBodyGroupJoin;
127
+ (function (ChatMessageBodyGroupJoin) {
128
+ ChatMessageBodyGroupJoin.filterSensitiveLog = (obj) => ({
129
+ ...obj,
130
+ ...(obj.identity && { identity: IdentityHandle.filterSensitiveLog(obj.identity)
131
+ }),
132
+ });
133
+ })(ChatMessageBodyGroupJoin = exports.ChatMessageBodyGroupJoin || (exports.ChatMessageBodyGroupJoin = {}));
134
+ var ChatMessageBodyGroupLeave;
135
+ (function (ChatMessageBodyGroupLeave) {
136
+ ChatMessageBodyGroupLeave.filterSensitiveLog = (obj) => ({
137
+ ...obj,
138
+ ...(obj.identity && { identity: IdentityHandle.filterSensitiveLog(obj.identity)
139
+ }),
140
+ });
141
+ })(ChatMessageBodyGroupLeave = exports.ChatMessageBodyGroupLeave || (exports.ChatMessageBodyGroupLeave = {}));
142
+ var ChatMessageBodyIdentityFollow;
143
+ (function (ChatMessageBodyIdentityFollow) {
144
+ ChatMessageBodyIdentityFollow.filterSensitiveLog = (obj) => ({
145
+ ...obj,
146
+ });
147
+ })(ChatMessageBodyIdentityFollow = exports.ChatMessageBodyIdentityFollow || (exports.ChatMessageBodyIdentityFollow = {}));
148
+ var ChatMessageBodyPartyActivityChange;
149
+ (function (ChatMessageBodyPartyActivityChange) {
150
+ ChatMessageBodyPartyActivityChange.filterSensitiveLog = (obj) => ({
151
+ ...obj,
152
+ });
153
+ })(ChatMessageBodyPartyActivityChange = exports.ChatMessageBodyPartyActivityChange || (exports.ChatMessageBodyPartyActivityChange = {}));
154
+ var ChatMessageBodyPartyInvite;
155
+ (function (ChatMessageBodyPartyInvite) {
156
+ ChatMessageBodyPartyInvite.filterSensitiveLog = (obj) => ({
157
+ ...obj,
158
+ ...(obj.sender && { sender: IdentityHandle.filterSensitiveLog(obj.sender)
159
+ }),
160
+ ...(obj.party && { party: PartyHandle.filterSensitiveLog(obj.party)
161
+ }),
162
+ ...(obj.inviteToken && { inviteToken: smithy_client_1.SENSITIVE_STRING
163
+ }),
164
+ });
165
+ })(ChatMessageBodyPartyInvite = exports.ChatMessageBodyPartyInvite || (exports.ChatMessageBodyPartyInvite = {}));
166
+ var ChatMessageBodyPartyJoin;
167
+ (function (ChatMessageBodyPartyJoin) {
168
+ ChatMessageBodyPartyJoin.filterSensitiveLog = (obj) => ({
169
+ ...obj,
170
+ ...(obj.identity && { identity: IdentityHandle.filterSensitiveLog(obj.identity)
171
+ }),
172
+ });
173
+ })(ChatMessageBodyPartyJoin = exports.ChatMessageBodyPartyJoin || (exports.ChatMessageBodyPartyJoin = {}));
174
+ var ChatMessageBodyPartyJoinRequest;
175
+ (function (ChatMessageBodyPartyJoinRequest) {
176
+ ChatMessageBodyPartyJoinRequest.filterSensitiveLog = (obj) => ({
177
+ ...obj,
178
+ ...(obj.sender && { sender: IdentityHandle.filterSensitiveLog(obj.sender)
179
+ }),
180
+ });
181
+ })(ChatMessageBodyPartyJoinRequest = exports.ChatMessageBodyPartyJoinRequest || (exports.ChatMessageBodyPartyJoinRequest = {}));
182
+ var ChatMessageBodyPartyLeave;
183
+ (function (ChatMessageBodyPartyLeave) {
184
+ ChatMessageBodyPartyLeave.filterSensitiveLog = (obj) => ({
185
+ ...obj,
186
+ ...(obj.identity && { identity: IdentityHandle.filterSensitiveLog(obj.identity)
187
+ }),
188
+ });
189
+ })(ChatMessageBodyPartyLeave = exports.ChatMessageBodyPartyLeave || (exports.ChatMessageBodyPartyLeave = {}));
190
+ var ChatMessageBodyText;
191
+ (function (ChatMessageBodyText) {
192
+ ChatMessageBodyText.filterSensitiveLog = (obj) => ({
193
+ ...obj,
194
+ ...(obj.sender && { sender: IdentityHandle.filterSensitiveLog(obj.sender)
195
+ }),
196
+ });
197
+ })(ChatMessageBodyText = exports.ChatMessageBodyText || (exports.ChatMessageBodyText = {}));
198
+ var ChatMessageBody;
199
+ (function (ChatMessageBody) {
200
+ ChatMessageBody.visit = (value, visitor) => {
201
+ if (value.text !== undefined)
202
+ return visitor.text(value.text);
203
+ if (value.chatCreate !== undefined)
204
+ return visitor.chatCreate(value.chatCreate);
205
+ if (value.identityFollow !== undefined)
206
+ return visitor.identityFollow(value.identityFollow);
207
+ if (value.groupJoin !== undefined)
208
+ return visitor.groupJoin(value.groupJoin);
209
+ if (value.groupLeave !== undefined)
210
+ return visitor.groupLeave(value.groupLeave);
211
+ if (value.partyInvite !== undefined)
212
+ return visitor.partyInvite(value.partyInvite);
213
+ if (value.partyJoinRequest !== undefined)
214
+ return visitor.partyJoinRequest(value.partyJoinRequest);
215
+ if (value.partyJoin !== undefined)
216
+ return visitor.partyJoin(value.partyJoin);
217
+ if (value.partyLeave !== undefined)
218
+ return visitor.partyLeave(value.partyLeave);
219
+ if (value.partyActivityChange !== undefined)
220
+ return visitor.partyActivityChange(value.partyActivityChange);
221
+ return visitor._(value.$unknown[0], value.$unknown[1]);
222
+ };
223
+ ChatMessageBody.filterSensitiveLog = (obj) => {
224
+ if (obj.text !== undefined)
225
+ return { text: ChatMessageBodyText.filterSensitiveLog(obj.text)
226
+ };
227
+ if (obj.chatCreate !== undefined)
228
+ return { chatCreate: ChatMessageBodyChatCreate.filterSensitiveLog(obj.chatCreate)
229
+ };
230
+ if (obj.identityFollow !== undefined)
231
+ return { identityFollow: ChatMessageBodyIdentityFollow.filterSensitiveLog(obj.identityFollow)
232
+ };
233
+ if (obj.groupJoin !== undefined)
234
+ return { groupJoin: ChatMessageBodyGroupJoin.filterSensitiveLog(obj.groupJoin)
235
+ };
236
+ if (obj.groupLeave !== undefined)
237
+ return { groupLeave: ChatMessageBodyGroupLeave.filterSensitiveLog(obj.groupLeave)
238
+ };
239
+ if (obj.partyInvite !== undefined)
240
+ return { partyInvite: ChatMessageBodyPartyInvite.filterSensitiveLog(obj.partyInvite)
241
+ };
242
+ if (obj.partyJoinRequest !== undefined)
243
+ return { partyJoinRequest: ChatMessageBodyPartyJoinRequest.filterSensitiveLog(obj.partyJoinRequest)
244
+ };
245
+ if (obj.partyJoin !== undefined)
246
+ return { partyJoin: ChatMessageBodyPartyJoin.filterSensitiveLog(obj.partyJoin)
247
+ };
248
+ if (obj.partyLeave !== undefined)
249
+ return { partyLeave: ChatMessageBodyPartyLeave.filterSensitiveLog(obj.partyLeave)
250
+ };
251
+ if (obj.partyActivityChange !== undefined)
252
+ return { partyActivityChange: ChatMessageBodyPartyActivityChange.filterSensitiveLog(obj.partyActivityChange)
253
+ };
254
+ if (obj.$unknown !== undefined)
255
+ return { [obj.$unknown[0]]: 'UNKNOWN' };
256
+ };
257
+ })(ChatMessageBody = exports.ChatMessageBody || (exports.ChatMessageBody = {}));
258
+ var ChatMessage;
259
+ (function (ChatMessage) {
260
+ ChatMessage.filterSensitiveLog = (obj) => ({
261
+ ...obj,
262
+ ...(obj.body && { body: ChatMessageBody.filterSensitiveLog(obj.body)
263
+ }),
264
+ });
265
+ })(ChatMessage = exports.ChatMessage || (exports.ChatMessage = {}));
266
+ var GetThreadHistoryOutput;
267
+ (function (GetThreadHistoryOutput) {
268
+ GetThreadHistoryOutput.filterSensitiveLog = (obj) => ({
269
+ ...obj,
270
+ ...(obj.chatMessages && { chatMessages: obj.chatMessages.map(item => ChatMessage.filterSensitiveLog(item))
271
+ }),
272
+ });
273
+ })(GetThreadHistoryOutput = exports.GetThreadHistoryOutput || (exports.GetThreadHistoryOutput = {}));
274
+ var GetThreadTopicInput;
275
+ (function (GetThreadTopicInput) {
276
+ GetThreadTopicInput.filterSensitiveLog = (obj) => ({
277
+ ...obj,
278
+ });
279
+ })(GetThreadTopicInput = exports.GetThreadTopicInput || (exports.GetThreadTopicInput = {}));
280
+ var ChatSimpleTopicDirect;
281
+ (function (ChatSimpleTopicDirect) {
282
+ ChatSimpleTopicDirect.filterSensitiveLog = (obj) => ({
283
+ ...obj,
284
+ });
285
+ })(ChatSimpleTopicDirect = exports.ChatSimpleTopicDirect || (exports.ChatSimpleTopicDirect = {}));
286
+ var ChatSimpleTopicGroup;
287
+ (function (ChatSimpleTopicGroup) {
288
+ ChatSimpleTopicGroup.filterSensitiveLog = (obj) => ({
289
+ ...obj,
290
+ });
291
+ })(ChatSimpleTopicGroup = exports.ChatSimpleTopicGroup || (exports.ChatSimpleTopicGroup = {}));
292
+ var ChatSimpleTopicParty;
293
+ (function (ChatSimpleTopicParty) {
294
+ ChatSimpleTopicParty.filterSensitiveLog = (obj) => ({
295
+ ...obj,
296
+ });
297
+ })(ChatSimpleTopicParty = exports.ChatSimpleTopicParty || (exports.ChatSimpleTopicParty = {}));
298
+ var ChatSimpleTopic;
299
+ (function (ChatSimpleTopic) {
300
+ ChatSimpleTopic.visit = (value, visitor) => {
301
+ if (value.group !== undefined)
302
+ return visitor.group(value.group);
303
+ if (value.party !== undefined)
304
+ return visitor.party(value.party);
305
+ if (value.direct !== undefined)
306
+ return visitor.direct(value.direct);
307
+ return visitor._(value.$unknown[0], value.$unknown[1]);
308
+ };
309
+ ChatSimpleTopic.filterSensitiveLog = (obj) => {
310
+ if (obj.group !== undefined)
311
+ return { group: ChatSimpleTopicGroup.filterSensitiveLog(obj.group)
312
+ };
313
+ if (obj.party !== undefined)
314
+ return { party: ChatSimpleTopicParty.filterSensitiveLog(obj.party)
315
+ };
316
+ if (obj.direct !== undefined)
317
+ return { direct: ChatSimpleTopicDirect.filterSensitiveLog(obj.direct)
318
+ };
319
+ if (obj.$unknown !== undefined)
320
+ return { [obj.$unknown[0]]: 'UNKNOWN' };
321
+ };
322
+ })(ChatSimpleTopic = exports.ChatSimpleTopic || (exports.ChatSimpleTopic = {}));
323
+ var GetThreadTopicOutput;
324
+ (function (GetThreadTopicOutput) {
325
+ GetThreadTopicOutput.filterSensitiveLog = (obj) => ({
326
+ ...obj,
327
+ ...(obj.topic && { topic: ChatSimpleTopic.filterSensitiveLog(obj.topic)
328
+ }),
329
+ });
330
+ })(GetThreadTopicOutput = exports.GetThreadTopicOutput || (exports.GetThreadTopicOutput = {}));
331
+ var SendMessageBodyPartyInvite;
332
+ (function (SendMessageBodyPartyInvite) {
333
+ SendMessageBodyPartyInvite.filterSensitiveLog = (obj) => ({
334
+ ...obj,
335
+ ...(obj.token && { token: smithy_client_1.SENSITIVE_STRING
336
+ }),
337
+ });
338
+ })(SendMessageBodyPartyInvite = exports.SendMessageBodyPartyInvite || (exports.SendMessageBodyPartyInvite = {}));
339
+ var SendMessageBodyText;
340
+ (function (SendMessageBodyText) {
341
+ SendMessageBodyText.filterSensitiveLog = (obj) => ({
342
+ ...obj,
343
+ });
344
+ })(SendMessageBodyText = exports.SendMessageBodyText || (exports.SendMessageBodyText = {}));
345
+ var SendMessageBody;
346
+ (function (SendMessageBody) {
347
+ SendMessageBody.visit = (value, visitor) => {
348
+ if (value.text !== undefined)
349
+ return visitor.text(value.text);
350
+ if (value.partyInvite !== undefined)
351
+ return visitor.partyInvite(value.partyInvite);
352
+ return visitor._(value.$unknown[0], value.$unknown[1]);
353
+ };
354
+ SendMessageBody.filterSensitiveLog = (obj) => {
355
+ if (obj.text !== undefined)
356
+ return { text: SendMessageBodyText.filterSensitiveLog(obj.text)
357
+ };
358
+ if (obj.partyInvite !== undefined)
359
+ return { partyInvite: SendMessageBodyPartyInvite.filterSensitiveLog(obj.partyInvite)
360
+ };
361
+ if (obj.$unknown !== undefined)
362
+ return { [obj.$unknown[0]]: 'UNKNOWN' };
363
+ };
364
+ })(SendMessageBody = exports.SendMessageBody || (exports.SendMessageBody = {}));
365
+ var SendChatTopic;
366
+ (function (SendChatTopic) {
367
+ SendChatTopic.visit = (value, visitor) => {
368
+ if (value.threadId !== undefined)
369
+ return visitor.threadId(value.threadId);
370
+ if (value.groupId !== undefined)
371
+ return visitor.groupId(value.groupId);
372
+ if (value.partyId !== undefined)
373
+ return visitor.partyId(value.partyId);
374
+ if (value.identityId !== undefined)
375
+ return visitor.identityId(value.identityId);
376
+ return visitor._(value.$unknown[0], value.$unknown[1]);
377
+ };
378
+ SendChatTopic.filterSensitiveLog = (obj) => {
379
+ if (obj.threadId !== undefined)
380
+ return { threadId: obj.threadId
381
+ };
382
+ if (obj.groupId !== undefined)
383
+ return { groupId: obj.groupId
384
+ };
385
+ if (obj.partyId !== undefined)
386
+ return { partyId: obj.partyId
387
+ };
388
+ if (obj.identityId !== undefined)
389
+ return { identityId: obj.identityId
390
+ };
391
+ if (obj.$unknown !== undefined)
392
+ return { [obj.$unknown[0]]: 'UNKNOWN' };
393
+ };
394
+ })(SendChatTopic = exports.SendChatTopic || (exports.SendChatTopic = {}));
395
+ var SendChatMessageInput;
396
+ (function (SendChatMessageInput) {
397
+ SendChatMessageInput.filterSensitiveLog = (obj) => ({
398
+ ...obj,
399
+ ...(obj.topic && { topic: SendChatTopic.filterSensitiveLog(obj.topic)
400
+ }),
401
+ ...(obj.messageBody && { messageBody: SendMessageBody.filterSensitiveLog(obj.messageBody)
402
+ }),
403
+ });
404
+ })(SendChatMessageInput = exports.SendChatMessageInput || (exports.SendChatMessageInput = {}));
405
+ var SendChatMessageOutput;
406
+ (function (SendChatMessageOutput) {
407
+ SendChatMessageOutput.filterSensitiveLog = (obj) => ({
408
+ ...obj,
409
+ });
410
+ })(SendChatMessageOutput = exports.SendChatMessageOutput || (exports.SendChatMessageOutput = {}));
411
+ var SetThreadReadInput;
412
+ (function (SetThreadReadInput) {
413
+ SetThreadReadInput.filterSensitiveLog = (obj) => ({
414
+ ...obj,
415
+ });
416
+ })(SetThreadReadInput = exports.SetThreadReadInput || (exports.SetThreadReadInput = {}));
417
+ var SetThreadReadOutput;
418
+ (function (SetThreadReadOutput) {
419
+ SetThreadReadOutput.filterSensitiveLog = (obj) => ({
420
+ ...obj,
421
+ });
422
+ })(SetThreadReadOutput = exports.SetThreadReadOutput || (exports.SetThreadReadOutput = {}));
423
+ var Unit;
424
+ (function (Unit) {
425
+ Unit.filterSensitiveLog = (obj) => ({
426
+ ...obj,
427
+ });
428
+ })(Unit = exports.Unit || (exports.Unit = {}));
429
+ var ChatTypingStatus;
430
+ (function (ChatTypingStatus) {
431
+ ChatTypingStatus.visit = (value, visitor) => {
432
+ if (value.idle !== undefined)
433
+ return visitor.idle(value.idle);
434
+ if (value.typing !== undefined)
435
+ return visitor.typing(value.typing);
436
+ return visitor._(value.$unknown[0], value.$unknown[1]);
437
+ };
438
+ ChatTypingStatus.filterSensitiveLog = (obj) => {
439
+ if (obj.idle !== undefined)
440
+ return { idle: Unit.filterSensitiveLog(obj.idle)
441
+ };
442
+ if (obj.typing !== undefined)
443
+ return { typing: Unit.filterSensitiveLog(obj.typing)
444
+ };
445
+ if (obj.$unknown !== undefined)
446
+ return { [obj.$unknown[0]]: 'UNKNOWN' };
447
+ };
448
+ })(ChatTypingStatus = exports.ChatTypingStatus || (exports.ChatTypingStatus = {}));
449
+ var SetTypingStatusInput;
450
+ (function (SetTypingStatusInput) {
451
+ SetTypingStatusInput.filterSensitiveLog = (obj) => ({
452
+ ...obj,
453
+ ...(obj.status && { status: ChatTypingStatus.filterSensitiveLog(obj.status)
454
+ }),
455
+ });
456
+ })(SetTypingStatusInput = exports.SetTypingStatusInput || (exports.SetTypingStatusInput = {}));
457
+ var SetTypingStatusOutput;
458
+ (function (SetTypingStatusOutput) {
459
+ SetTypingStatusOutput.filterSensitiveLog = (obj) => ({
460
+ ...obj,
461
+ });
462
+ })(SetTypingStatusOutput = exports.SetTypingStatusOutput || (exports.SetTypingStatusOutput = {}));
463
+ var WatchThreadInput;
464
+ (function (WatchThreadInput) {
465
+ WatchThreadInput.filterSensitiveLog = (obj) => ({
466
+ ...obj,
467
+ });
468
+ })(WatchThreadInput = exports.WatchThreadInput || (exports.WatchThreadInput = {}));
469
+ var ChatIdentityTypingStatus;
470
+ (function (ChatIdentityTypingStatus) {
471
+ ChatIdentityTypingStatus.filterSensitiveLog = (obj) => ({
472
+ ...obj,
473
+ ...(obj.identity && { identity: IdentityHandle.filterSensitiveLog(obj.identity)
474
+ }),
475
+ ...(obj.status && { status: ChatTypingStatus.filterSensitiveLog(obj.status)
476
+ }),
477
+ });
478
+ })(ChatIdentityTypingStatus = exports.ChatIdentityTypingStatus || (exports.ChatIdentityTypingStatus = {}));
479
+ var WatchResponse;
480
+ (function (WatchResponse) {
481
+ WatchResponse.filterSensitiveLog = (obj) => ({
482
+ ...obj,
483
+ });
484
+ })(WatchResponse = exports.WatchResponse || (exports.WatchResponse = {}));
485
+ var WatchThreadOutput;
486
+ (function (WatchThreadOutput) {
487
+ WatchThreadOutput.filterSensitiveLog = (obj) => ({
488
+ ...obj,
489
+ ...(obj.chatMessages && { chatMessages: obj.chatMessages.map(item => ChatMessage.filterSensitiveLog(item))
490
+ }),
491
+ ...(obj.typingStatuses && { typingStatuses: obj.typingStatuses.map(item => ChatIdentityTypingStatus.filterSensitiveLog(item))
492
+ }),
493
+ });
494
+ })(WatchThreadOutput = exports.WatchThreadOutput || (exports.WatchThreadOutput = {}));
495
+ var GetDirectThreadInput;
496
+ (function (GetDirectThreadInput) {
497
+ GetDirectThreadInput.filterSensitiveLog = (obj) => ({
498
+ ...obj,
499
+ });
500
+ })(GetDirectThreadInput = exports.GetDirectThreadInput || (exports.GetDirectThreadInput = {}));
501
+ var GetDirectThreadOutput;
502
+ (function (GetDirectThreadOutput) {
503
+ GetDirectThreadOutput.filterSensitiveLog = (obj) => ({
504
+ ...obj,
505
+ ...(obj.identity && { identity: IdentityHandle.filterSensitiveLog(obj.identity)
506
+ }),
507
+ });
508
+ })(GetDirectThreadOutput = exports.GetDirectThreadOutput || (exports.GetDirectThreadOutput = {}));
509
+ class BadRequestError extends ChatServiceServiceException_1.ChatServiceServiceException {
510
+ constructor(opts) {
511
+ super({
512
+ name: "BadRequestError",
513
+ $fault: "client",
514
+ ...opts
515
+ });
516
+ this.name = "BadRequestError";
517
+ this.$fault = "client";
518
+ Object.setPrototypeOf(this, BadRequestError.prototype);
519
+ this.code = opts.code;
520
+ this.metadata = opts.metadata;
521
+ }
522
+ }
523
+ exports.BadRequestError = BadRequestError;
524
+ class ForbiddenError extends ChatServiceServiceException_1.ChatServiceServiceException {
525
+ constructor(opts) {
526
+ super({
527
+ name: "ForbiddenError",
528
+ $fault: "client",
529
+ ...opts
530
+ });
531
+ this.name = "ForbiddenError";
532
+ this.$fault = "client";
533
+ Object.setPrototypeOf(this, ForbiddenError.prototype);
534
+ this.code = opts.code;
535
+ this.metadata = opts.metadata;
536
+ }
537
+ }
538
+ exports.ForbiddenError = ForbiddenError;
539
+ class InternalError extends ChatServiceServiceException_1.ChatServiceServiceException {
540
+ constructor(opts) {
541
+ super({
542
+ name: "InternalError",
543
+ $fault: "server",
544
+ ...opts
545
+ });
546
+ this.name = "InternalError";
547
+ this.$fault = "server";
548
+ this.$retryable = {};
549
+ Object.setPrototypeOf(this, InternalError.prototype);
550
+ this.code = opts.code;
551
+ this.metadata = opts.metadata;
552
+ }
553
+ }
554
+ exports.InternalError = InternalError;
555
+ class NotFoundError extends ChatServiceServiceException_1.ChatServiceServiceException {
556
+ constructor(opts) {
557
+ super({
558
+ name: "NotFoundError",
559
+ $fault: "client",
560
+ ...opts
561
+ });
562
+ this.name = "NotFoundError";
563
+ this.$fault = "client";
564
+ Object.setPrototypeOf(this, NotFoundError.prototype);
565
+ this.code = opts.code;
566
+ this.metadata = opts.metadata;
567
+ }
568
+ }
569
+ exports.NotFoundError = NotFoundError;
570
+ class RateLimitError extends ChatServiceServiceException_1.ChatServiceServiceException {
571
+ constructor(opts) {
572
+ super({
573
+ name: "RateLimitError",
574
+ $fault: "client",
575
+ ...opts
576
+ });
577
+ this.name = "RateLimitError";
578
+ this.$fault = "client";
579
+ Object.setPrototypeOf(this, RateLimitError.prototype);
580
+ this.code = opts.code;
581
+ this.metadata = opts.metadata;
582
+ }
583
+ }
584
+ exports.RateLimitError = RateLimitError;
585
+ class UnauthorizedError extends ChatServiceServiceException_1.ChatServiceServiceException {
586
+ constructor(opts) {
587
+ super({
588
+ name: "UnauthorizedError",
589
+ $fault: "client",
590
+ ...opts
591
+ });
592
+ this.name = "UnauthorizedError";
593
+ this.$fault = "client";
594
+ this.$retryable = {};
595
+ Object.setPrototypeOf(this, UnauthorizedError.prototype);
596
+ this.code = opts.code;
597
+ this.metadata = opts.metadata;
598
+ }
599
+ }
600
+ exports.UnauthorizedError = UnauthorizedError;