@rivet-gg/chat 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +201 -0
- package/dist-types/ChatService.d.ts +56 -0
- package/dist-types/ChatServiceClient.d.ts +133 -0
- package/dist-types/commands/GetDirectThreadCommand.d.ts +35 -0
- package/dist-types/commands/GetThreadHistoryCommand.d.ts +37 -0
- package/dist-types/commands/GetThreadTopicCommand.d.ts +35 -0
- package/dist-types/commands/SendChatMessageCommand.d.ts +35 -0
- package/dist-types/commands/SetThreadReadCommand.d.ts +35 -0
- package/dist-types/commands/SetTypingStatusCommand.d.ts +35 -0
- package/dist-types/commands/WatchThreadCommand.d.ts +36 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/ChatServiceServiceException.d.ts +10 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +1317 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +23 -0
- package/dist-types/runtimeConfig.browser.d.ts +31 -0
- package/dist-types/runtimeConfig.d.ts +31 -0
- package/dist-types/runtimeConfig.native.d.ts +30 -0
- package/dist-types/runtimeConfig.shared.d.ts +11 -0
- package/package.json +1 -0
@@ -0,0 +1,1317 @@
|
|
1
|
+
import { ChatServiceServiceException as __BaseException } from "./ChatServiceServiceException";
|
2
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
3
|
+
import { DocumentType as __DocumentType } from "@aws-sdk/types";
|
4
|
+
export declare enum QueryDirection {
|
5
|
+
/**
|
6
|
+
* Query messages after given timestamp.
|
7
|
+
*/
|
8
|
+
AFTER = "after",
|
9
|
+
/**
|
10
|
+
* Query messages send before given timestmap.
|
11
|
+
*/
|
12
|
+
BEFORE = "before",
|
13
|
+
/**
|
14
|
+
* Query messages before and after the given timestamp. This will return at most `count * 2` messages.
|
15
|
+
*/
|
16
|
+
BEFORE_AND_AFTER = "before_and_after"
|
17
|
+
}
|
18
|
+
export interface GetThreadHistoryInput {
|
19
|
+
/**
|
20
|
+
* A universally unique identifier.
|
21
|
+
*/
|
22
|
+
threadId: string | undefined;
|
23
|
+
/**
|
24
|
+
* Unsigned 32 bit integer.
|
25
|
+
*/
|
26
|
+
ts?: number;
|
27
|
+
/**
|
28
|
+
* How many messages to collect in each direction.
|
29
|
+
*
|
30
|
+
* If querying `rivet.api.chat.common#QueryDirection$before_and_after`,
|
31
|
+
* `rivet.api.chat.common#QueryDirection$chat_messages` will be `count *
|
32
|
+
* 2`.
|
33
|
+
*/
|
34
|
+
count: number | undefined;
|
35
|
+
/**
|
36
|
+
* Represents which direction to query messages from relative to the given
|
37
|
+
* timestamp.
|
38
|
+
*/
|
39
|
+
queryDirection?: QueryDirection | string;
|
40
|
+
}
|
41
|
+
export declare namespace GetThreadHistoryInput {
|
42
|
+
/**
|
43
|
+
* @internal
|
44
|
+
*/
|
45
|
+
const filterSensitiveLog: (obj: GetThreadHistoryInput) => any;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* `rivet.chat#ChatMessageBody` variant for indicating a new chat was created.
|
49
|
+
*/
|
50
|
+
export interface ChatMessageBodyChatCreate {
|
51
|
+
}
|
52
|
+
export declare namespace ChatMessageBodyChatCreate {
|
53
|
+
/**
|
54
|
+
* @internal
|
55
|
+
*/
|
56
|
+
const filterSensitiveLog: (obj: ChatMessageBodyChatCreate) => any;
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* External links for an identity.
|
60
|
+
*/
|
61
|
+
export interface IdentityExternalLinks {
|
62
|
+
/**
|
63
|
+
* A link to this identity's profile page.
|
64
|
+
*/
|
65
|
+
profile: string | undefined;
|
66
|
+
/**
|
67
|
+
* A link to the Rivet settings page.
|
68
|
+
*/
|
69
|
+
settings?: string;
|
70
|
+
/**
|
71
|
+
* A link to a chat page with the given identity.
|
72
|
+
*/
|
73
|
+
chat?: string;
|
74
|
+
}
|
75
|
+
export declare namespace IdentityExternalLinks {
|
76
|
+
/**
|
77
|
+
* @internal
|
78
|
+
*/
|
79
|
+
const filterSensitiveLog: (obj: IdentityExternalLinks) => any;
|
80
|
+
}
|
81
|
+
/**
|
82
|
+
* A game handle.
|
83
|
+
*/
|
84
|
+
export interface GameHandle {
|
85
|
+
/**
|
86
|
+
* A universally unique identifier.
|
87
|
+
*/
|
88
|
+
gameId: string | undefined;
|
89
|
+
/**
|
90
|
+
* A human readable short identifier used to references resources.
|
91
|
+
*
|
92
|
+
* Different than a `rivet.common#Uuid` because this is intended to be human readable.
|
93
|
+
*
|
94
|
+
* Different than `rivet.common#DisplayName` because this should not include special
|
95
|
+
* characters and be short.
|
96
|
+
*/
|
97
|
+
nameId: string | undefined;
|
98
|
+
/**
|
99
|
+
* Represent a resource's readable display name.
|
100
|
+
*/
|
101
|
+
displayName: string | undefined;
|
102
|
+
/**
|
103
|
+
* The URL of this game's logo image.
|
104
|
+
*/
|
105
|
+
logoUrl?: string;
|
106
|
+
/**
|
107
|
+
* The URL of this game's banner image.
|
108
|
+
*/
|
109
|
+
bannerUrl?: string;
|
110
|
+
}
|
111
|
+
export declare namespace GameHandle {
|
112
|
+
/**
|
113
|
+
* @internal
|
114
|
+
*/
|
115
|
+
const filterSensitiveLog: (obj: GameHandle) => any;
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* The game an identity is currently participating in.
|
119
|
+
*/
|
120
|
+
export interface IdentityGameActivity {
|
121
|
+
/**
|
122
|
+
* A game handle.
|
123
|
+
*/
|
124
|
+
game: GameHandle | undefined;
|
125
|
+
/**
|
126
|
+
* A short activity message about the current game activity.
|
127
|
+
*/
|
128
|
+
message: string | undefined;
|
129
|
+
/**
|
130
|
+
* JSON data seen by anyone.
|
131
|
+
*/
|
132
|
+
publicMetadata?: __DocumentType;
|
133
|
+
/**
|
134
|
+
* JSON data seen only by the given identity and their friends.
|
135
|
+
*/
|
136
|
+
friendMetadata?: __DocumentType;
|
137
|
+
}
|
138
|
+
export declare namespace IdentityGameActivity {
|
139
|
+
/**
|
140
|
+
* @internal
|
141
|
+
*/
|
142
|
+
const filterSensitiveLog: (obj: IdentityGameActivity) => any;
|
143
|
+
}
|
144
|
+
/**
|
145
|
+
* A party activity denoting that the party is idle.
|
146
|
+
*/
|
147
|
+
export interface PartyActivityIdle {
|
148
|
+
}
|
149
|
+
export declare namespace PartyActivityIdle {
|
150
|
+
/**
|
151
|
+
* @internal
|
152
|
+
*/
|
153
|
+
const filterSensitiveLog: (obj: PartyActivityIdle) => any;
|
154
|
+
}
|
155
|
+
/**
|
156
|
+
* A party activity denoting that the party is currently searching for a lobby.
|
157
|
+
*/
|
158
|
+
export interface PartyActivityMatchmakerFindingLobby {
|
159
|
+
/**
|
160
|
+
* A game handle.
|
161
|
+
*/
|
162
|
+
game: GameHandle | undefined;
|
163
|
+
}
|
164
|
+
export declare namespace PartyActivityMatchmakerFindingLobby {
|
165
|
+
/**
|
166
|
+
* @internal
|
167
|
+
*/
|
168
|
+
const filterSensitiveLog: (obj: PartyActivityMatchmakerFindingLobby) => any;
|
169
|
+
}
|
170
|
+
/**
|
171
|
+
* A party lobby.
|
172
|
+
*/
|
173
|
+
export interface PartyMatchmakerLobby {
|
174
|
+
/**
|
175
|
+
* A universally unique identifier.
|
176
|
+
*/
|
177
|
+
lobbyId: string | undefined;
|
178
|
+
}
|
179
|
+
export declare namespace PartyMatchmakerLobby {
|
180
|
+
/**
|
181
|
+
* @internal
|
182
|
+
*/
|
183
|
+
const filterSensitiveLog: (obj: PartyMatchmakerLobby) => any;
|
184
|
+
}
|
185
|
+
/**
|
186
|
+
* A party activity denoting that the party is currently in a lobby.
|
187
|
+
*/
|
188
|
+
export interface PartyActivityMatchmakerLobby {
|
189
|
+
/**
|
190
|
+
* A party lobby.
|
191
|
+
*/
|
192
|
+
lobby: PartyMatchmakerLobby | undefined;
|
193
|
+
/**
|
194
|
+
* A game handle.
|
195
|
+
*/
|
196
|
+
game: GameHandle | undefined;
|
197
|
+
}
|
198
|
+
export declare namespace PartyActivityMatchmakerLobby {
|
199
|
+
/**
|
200
|
+
* @internal
|
201
|
+
*/
|
202
|
+
const filterSensitiveLog: (obj: PartyActivityMatchmakerLobby) => any;
|
203
|
+
}
|
204
|
+
/**
|
205
|
+
* A union representing the activity of a given party.
|
206
|
+
*/
|
207
|
+
export declare type PartyActivity = PartyActivity.IdleMember | PartyActivity.MatchmakerFindingLobbyMember | PartyActivity.MatchmakerLobbyMember | PartyActivity.$UnknownMember;
|
208
|
+
export declare namespace PartyActivity {
|
209
|
+
/**
|
210
|
+
* A party activity denoting that the party is idle.
|
211
|
+
*/
|
212
|
+
interface IdleMember {
|
213
|
+
idle: PartyActivityIdle;
|
214
|
+
matchmakerFindingLobby?: never;
|
215
|
+
matchmakerLobby?: never;
|
216
|
+
$unknown?: never;
|
217
|
+
}
|
218
|
+
/**
|
219
|
+
* A party activity denoting that the party is currently searching for a lobby.
|
220
|
+
*/
|
221
|
+
interface MatchmakerFindingLobbyMember {
|
222
|
+
idle?: never;
|
223
|
+
matchmakerFindingLobby: PartyActivityMatchmakerFindingLobby;
|
224
|
+
matchmakerLobby?: never;
|
225
|
+
$unknown?: never;
|
226
|
+
}
|
227
|
+
/**
|
228
|
+
* A party activity denoting that the party is currently in a lobby.
|
229
|
+
*/
|
230
|
+
interface MatchmakerLobbyMember {
|
231
|
+
idle?: never;
|
232
|
+
matchmakerFindingLobby?: never;
|
233
|
+
matchmakerLobby: PartyActivityMatchmakerLobby;
|
234
|
+
$unknown?: never;
|
235
|
+
}
|
236
|
+
interface $UnknownMember {
|
237
|
+
idle?: never;
|
238
|
+
matchmakerFindingLobby?: never;
|
239
|
+
matchmakerLobby?: never;
|
240
|
+
$unknown: [string, any];
|
241
|
+
}
|
242
|
+
interface Visitor<T> {
|
243
|
+
idle: (value: PartyActivityIdle) => T;
|
244
|
+
matchmakerFindingLobby: (value: PartyActivityMatchmakerFindingLobby) => T;
|
245
|
+
matchmakerLobby: (value: PartyActivityMatchmakerLobby) => T;
|
246
|
+
_: (name: string, value: any) => T;
|
247
|
+
}
|
248
|
+
const visit: <T>(value: PartyActivity, visitor: Visitor<T>) => T;
|
249
|
+
/**
|
250
|
+
* @internal
|
251
|
+
*/
|
252
|
+
const filterSensitiveLog: (obj: PartyActivity) => any;
|
253
|
+
}
|
254
|
+
/**
|
255
|
+
* External links for a party.
|
256
|
+
*/
|
257
|
+
export interface PartyExternalLinks {
|
258
|
+
/**
|
259
|
+
* A link to the given party's chat thread.
|
260
|
+
*/
|
261
|
+
chat: string | undefined;
|
262
|
+
}
|
263
|
+
export declare namespace PartyExternalLinks {
|
264
|
+
/**
|
265
|
+
* @internal
|
266
|
+
*/
|
267
|
+
const filterSensitiveLog: (obj: PartyExternalLinks) => any;
|
268
|
+
}
|
269
|
+
/**
|
270
|
+
* A party handle.
|
271
|
+
*/
|
272
|
+
export interface PartyHandle {
|
273
|
+
/**
|
274
|
+
* A universally unique identifier.
|
275
|
+
*/
|
276
|
+
partyId: string | undefined;
|
277
|
+
/**
|
278
|
+
* Time since UNIX epoch (in milliseconds).
|
279
|
+
*/
|
280
|
+
createTs: number | undefined;
|
281
|
+
/**
|
282
|
+
* A union representing the activity of a given party.
|
283
|
+
*/
|
284
|
+
activity: PartyActivity | undefined;
|
285
|
+
/**
|
286
|
+
* External links for a party.
|
287
|
+
*/
|
288
|
+
external: PartyExternalLinks | undefined;
|
289
|
+
}
|
290
|
+
export declare namespace PartyHandle {
|
291
|
+
/**
|
292
|
+
* @internal
|
293
|
+
*/
|
294
|
+
const filterSensitiveLog: (obj: PartyHandle) => any;
|
295
|
+
}
|
296
|
+
export declare enum IdentityStatus {
|
297
|
+
AWAY = "away",
|
298
|
+
OFFLINE = "offline",
|
299
|
+
ONLINE = "online"
|
300
|
+
}
|
301
|
+
/**
|
302
|
+
* Information about the identity's current status, party, and active game.
|
303
|
+
*/
|
304
|
+
export interface IdentityPresence {
|
305
|
+
/**
|
306
|
+
* Time since UNIX epoch (in milliseconds).
|
307
|
+
*/
|
308
|
+
updateTs: number | undefined;
|
309
|
+
/**
|
310
|
+
* The current status of an identity. This helps players understand if another
|
311
|
+
* player is currently playing or has their game in the background.
|
312
|
+
*/
|
313
|
+
status: IdentityStatus | string | undefined;
|
314
|
+
/**
|
315
|
+
* A party handle.
|
316
|
+
*/
|
317
|
+
party?: PartyHandle;
|
318
|
+
/**
|
319
|
+
* The game an identity is currently participating in.
|
320
|
+
*/
|
321
|
+
gameActivity?: IdentityGameActivity;
|
322
|
+
}
|
323
|
+
export declare namespace IdentityPresence {
|
324
|
+
/**
|
325
|
+
* @internal
|
326
|
+
*/
|
327
|
+
const filterSensitiveLog: (obj: IdentityPresence) => any;
|
328
|
+
}
|
329
|
+
/**
|
330
|
+
* An identity handle.
|
331
|
+
*/
|
332
|
+
export interface IdentityHandle {
|
333
|
+
/**
|
334
|
+
* A universally unique identifier.
|
335
|
+
*/
|
336
|
+
identityId: string | undefined;
|
337
|
+
/**
|
338
|
+
* Represent a resource's readable display name.
|
339
|
+
*/
|
340
|
+
displayName: string | undefined;
|
341
|
+
/**
|
342
|
+
* Identity profile account number (#1234).
|
343
|
+
*
|
344
|
+
* These are assigned in addition to an identity's display name in order to
|
345
|
+
* allow multiple identities to have the same display name while still
|
346
|
+
* providing a unique handle.
|
347
|
+
*
|
348
|
+
* These are unique to each display name; you can have multiple accounts with
|
349
|
+
* different display names and the same account number.
|
350
|
+
*/
|
351
|
+
accountNumber: number | undefined;
|
352
|
+
/**
|
353
|
+
* The URL of this identity's avatar image.
|
354
|
+
*/
|
355
|
+
avatarUrl: string | undefined;
|
356
|
+
/**
|
357
|
+
* Information about the identity's current status, party, and active game.
|
358
|
+
*/
|
359
|
+
presence?: IdentityPresence;
|
360
|
+
/**
|
361
|
+
* Whether or not this identity is registered with a linked account.
|
362
|
+
*/
|
363
|
+
isRegistered: boolean | undefined;
|
364
|
+
/**
|
365
|
+
* External links for an identity.
|
366
|
+
*/
|
367
|
+
external: IdentityExternalLinks | undefined;
|
368
|
+
}
|
369
|
+
export declare namespace IdentityHandle {
|
370
|
+
/**
|
371
|
+
* @internal
|
372
|
+
*/
|
373
|
+
const filterSensitiveLog: (obj: IdentityHandle) => any;
|
374
|
+
}
|
375
|
+
/**
|
376
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity joined the group.
|
377
|
+
*/
|
378
|
+
export interface ChatMessageBodyGroupJoin {
|
379
|
+
/**
|
380
|
+
* An identity handle.
|
381
|
+
*/
|
382
|
+
identity: IdentityHandle | undefined;
|
383
|
+
}
|
384
|
+
export declare namespace ChatMessageBodyGroupJoin {
|
385
|
+
/**
|
386
|
+
* @internal
|
387
|
+
*/
|
388
|
+
const filterSensitiveLog: (obj: ChatMessageBodyGroupJoin) => any;
|
389
|
+
}
|
390
|
+
/**
|
391
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity left the group.
|
392
|
+
*/
|
393
|
+
export interface ChatMessageBodyGroupLeave {
|
394
|
+
/**
|
395
|
+
* An identity handle.
|
396
|
+
*/
|
397
|
+
identity: IdentityHandle | undefined;
|
398
|
+
}
|
399
|
+
export declare namespace ChatMessageBodyGroupLeave {
|
400
|
+
/**
|
401
|
+
* @internal
|
402
|
+
*/
|
403
|
+
const filterSensitiveLog: (obj: ChatMessageBodyGroupLeave) => any;
|
404
|
+
}
|
405
|
+
/**
|
406
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity followed the identity.
|
407
|
+
*/
|
408
|
+
export interface ChatMessageBodyIdentityFollow {
|
409
|
+
}
|
410
|
+
export declare namespace ChatMessageBodyIdentityFollow {
|
411
|
+
/**
|
412
|
+
* @internal
|
413
|
+
*/
|
414
|
+
const filterSensitiveLog: (obj: ChatMessageBodyIdentityFollow) => any;
|
415
|
+
}
|
416
|
+
/**
|
417
|
+
* `rivet.chat#ChatMessageBody` variant for indicating a change in the party's current
|
418
|
+
* activity.
|
419
|
+
*/
|
420
|
+
export interface ChatMessageBodyPartyActivityChange {
|
421
|
+
}
|
422
|
+
export declare namespace ChatMessageBodyPartyActivityChange {
|
423
|
+
/**
|
424
|
+
* @internal
|
425
|
+
*/
|
426
|
+
const filterSensitiveLog: (obj: ChatMessageBodyPartyActivityChange) => any;
|
427
|
+
}
|
428
|
+
/**
|
429
|
+
* `rivet.chat#ChatMessageBody` variant holding an a party invitation.
|
430
|
+
*/
|
431
|
+
export interface ChatMessageBodyPartyInvite {
|
432
|
+
/**
|
433
|
+
* An identity handle.
|
434
|
+
*/
|
435
|
+
sender: IdentityHandle | undefined;
|
436
|
+
/**
|
437
|
+
* A party handle.
|
438
|
+
*/
|
439
|
+
party?: PartyHandle;
|
440
|
+
/**
|
441
|
+
* Pass to `rivet.api.party#GetPartyFromInvite$token` to view more information about the party.
|
442
|
+
*
|
443
|
+
* Pass to `rivet.api.party.common#JoinPartyInvite$token` to join the party.
|
444
|
+
*/
|
445
|
+
inviteToken?: string;
|
446
|
+
}
|
447
|
+
export declare namespace ChatMessageBodyPartyInvite {
|
448
|
+
/**
|
449
|
+
* @internal
|
450
|
+
*/
|
451
|
+
const filterSensitiveLog: (obj: ChatMessageBodyPartyInvite) => any;
|
452
|
+
}
|
453
|
+
/**
|
454
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity joined the party.
|
455
|
+
*/
|
456
|
+
export interface ChatMessageBodyPartyJoin {
|
457
|
+
/**
|
458
|
+
* An identity handle.
|
459
|
+
*/
|
460
|
+
identity: IdentityHandle | undefined;
|
461
|
+
}
|
462
|
+
export declare namespace ChatMessageBodyPartyJoin {
|
463
|
+
/**
|
464
|
+
* @internal
|
465
|
+
*/
|
466
|
+
const filterSensitiveLog: (obj: ChatMessageBodyPartyJoin) => any;
|
467
|
+
}
|
468
|
+
/**
|
469
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity left the party.
|
470
|
+
*/
|
471
|
+
export interface ChatMessageBodyPartyLeave {
|
472
|
+
/**
|
473
|
+
* An identity handle.
|
474
|
+
*/
|
475
|
+
identity: IdentityHandle | undefined;
|
476
|
+
}
|
477
|
+
export declare namespace ChatMessageBodyPartyLeave {
|
478
|
+
/**
|
479
|
+
* @internal
|
480
|
+
*/
|
481
|
+
const filterSensitiveLog: (obj: ChatMessageBodyPartyLeave) => any;
|
482
|
+
}
|
483
|
+
/**
|
484
|
+
* `rivet.chat#ChatMessageBody` variant for text messages.
|
485
|
+
*
|
486
|
+
* Sent by other identities using the chat interface.
|
487
|
+
*/
|
488
|
+
export interface ChatMessageBodyText {
|
489
|
+
/**
|
490
|
+
* An identity handle.
|
491
|
+
*/
|
492
|
+
sender: IdentityHandle | undefined;
|
493
|
+
/**
|
494
|
+
* The text in the message.
|
495
|
+
*/
|
496
|
+
body: string | undefined;
|
497
|
+
}
|
498
|
+
export declare namespace ChatMessageBodyText {
|
499
|
+
/**
|
500
|
+
* @internal
|
501
|
+
*/
|
502
|
+
const filterSensitiveLog: (obj: ChatMessageBodyText) => any;
|
503
|
+
}
|
504
|
+
/**
|
505
|
+
* Represents types of chat message bodies.
|
506
|
+
*/
|
507
|
+
export declare type ChatMessageBody = ChatMessageBody.ChatCreateMember | ChatMessageBody.GroupJoinMember | ChatMessageBody.GroupLeaveMember | ChatMessageBody.IdentityFollowMember | ChatMessageBody.PartyActivityChangeMember | ChatMessageBody.PartyInviteMember | ChatMessageBody.PartyJoinMember | ChatMessageBody.PartyLeaveMember | ChatMessageBody.TextMember | ChatMessageBody.$UnknownMember;
|
508
|
+
export declare namespace ChatMessageBody {
|
509
|
+
/**
|
510
|
+
* `rivet.chat#ChatMessageBody` variant for text messages.
|
511
|
+
*
|
512
|
+
* Sent by other identities using the chat interface.
|
513
|
+
*/
|
514
|
+
interface TextMember {
|
515
|
+
text: ChatMessageBodyText;
|
516
|
+
chatCreate?: never;
|
517
|
+
identityFollow?: never;
|
518
|
+
groupJoin?: never;
|
519
|
+
groupLeave?: never;
|
520
|
+
partyInvite?: never;
|
521
|
+
partyJoin?: never;
|
522
|
+
partyLeave?: never;
|
523
|
+
partyActivityChange?: never;
|
524
|
+
$unknown?: never;
|
525
|
+
}
|
526
|
+
/**
|
527
|
+
* `rivet.chat#ChatMessageBody` variant for indicating a new chat was created.
|
528
|
+
*/
|
529
|
+
interface ChatCreateMember {
|
530
|
+
text?: never;
|
531
|
+
chatCreate: ChatMessageBodyChatCreate;
|
532
|
+
identityFollow?: never;
|
533
|
+
groupJoin?: never;
|
534
|
+
groupLeave?: never;
|
535
|
+
partyInvite?: never;
|
536
|
+
partyJoin?: never;
|
537
|
+
partyLeave?: never;
|
538
|
+
partyActivityChange?: never;
|
539
|
+
$unknown?: never;
|
540
|
+
}
|
541
|
+
/**
|
542
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity followed the identity.
|
543
|
+
*/
|
544
|
+
interface IdentityFollowMember {
|
545
|
+
text?: never;
|
546
|
+
chatCreate?: never;
|
547
|
+
identityFollow: ChatMessageBodyIdentityFollow;
|
548
|
+
groupJoin?: never;
|
549
|
+
groupLeave?: never;
|
550
|
+
partyInvite?: never;
|
551
|
+
partyJoin?: never;
|
552
|
+
partyLeave?: never;
|
553
|
+
partyActivityChange?: never;
|
554
|
+
$unknown?: never;
|
555
|
+
}
|
556
|
+
/**
|
557
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity joined the group.
|
558
|
+
*/
|
559
|
+
interface GroupJoinMember {
|
560
|
+
text?: never;
|
561
|
+
chatCreate?: never;
|
562
|
+
identityFollow?: never;
|
563
|
+
groupJoin: ChatMessageBodyGroupJoin;
|
564
|
+
groupLeave?: never;
|
565
|
+
partyInvite?: never;
|
566
|
+
partyJoin?: never;
|
567
|
+
partyLeave?: never;
|
568
|
+
partyActivityChange?: never;
|
569
|
+
$unknown?: never;
|
570
|
+
}
|
571
|
+
/**
|
572
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity left the group.
|
573
|
+
*/
|
574
|
+
interface GroupLeaveMember {
|
575
|
+
text?: never;
|
576
|
+
chatCreate?: never;
|
577
|
+
identityFollow?: never;
|
578
|
+
groupJoin?: never;
|
579
|
+
groupLeave: ChatMessageBodyGroupLeave;
|
580
|
+
partyInvite?: never;
|
581
|
+
partyJoin?: never;
|
582
|
+
partyLeave?: never;
|
583
|
+
partyActivityChange?: never;
|
584
|
+
$unknown?: never;
|
585
|
+
}
|
586
|
+
/**
|
587
|
+
* `rivet.chat#ChatMessageBody` variant holding an a party invitation.
|
588
|
+
*/
|
589
|
+
interface PartyInviteMember {
|
590
|
+
text?: never;
|
591
|
+
chatCreate?: never;
|
592
|
+
identityFollow?: never;
|
593
|
+
groupJoin?: never;
|
594
|
+
groupLeave?: never;
|
595
|
+
partyInvite: ChatMessageBodyPartyInvite;
|
596
|
+
partyJoin?: never;
|
597
|
+
partyLeave?: never;
|
598
|
+
partyActivityChange?: never;
|
599
|
+
$unknown?: never;
|
600
|
+
}
|
601
|
+
/**
|
602
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity joined the party.
|
603
|
+
*/
|
604
|
+
interface PartyJoinMember {
|
605
|
+
text?: never;
|
606
|
+
chatCreate?: never;
|
607
|
+
identityFollow?: never;
|
608
|
+
groupJoin?: never;
|
609
|
+
groupLeave?: never;
|
610
|
+
partyInvite?: never;
|
611
|
+
partyJoin: ChatMessageBodyPartyJoin;
|
612
|
+
partyLeave?: never;
|
613
|
+
partyActivityChange?: never;
|
614
|
+
$unknown?: never;
|
615
|
+
}
|
616
|
+
/**
|
617
|
+
* `rivet.chat#ChatMessageBody` variant for indicating an identity left the party.
|
618
|
+
*/
|
619
|
+
interface PartyLeaveMember {
|
620
|
+
text?: never;
|
621
|
+
chatCreate?: never;
|
622
|
+
identityFollow?: never;
|
623
|
+
groupJoin?: never;
|
624
|
+
groupLeave?: never;
|
625
|
+
partyInvite?: never;
|
626
|
+
partyJoin?: never;
|
627
|
+
partyLeave: ChatMessageBodyPartyLeave;
|
628
|
+
partyActivityChange?: never;
|
629
|
+
$unknown?: never;
|
630
|
+
}
|
631
|
+
/**
|
632
|
+
* `rivet.chat#ChatMessageBody` variant for indicating a change in the party's current
|
633
|
+
* activity.
|
634
|
+
*/
|
635
|
+
interface PartyActivityChangeMember {
|
636
|
+
text?: never;
|
637
|
+
chatCreate?: never;
|
638
|
+
identityFollow?: never;
|
639
|
+
groupJoin?: never;
|
640
|
+
groupLeave?: never;
|
641
|
+
partyInvite?: never;
|
642
|
+
partyJoin?: never;
|
643
|
+
partyLeave?: never;
|
644
|
+
partyActivityChange: ChatMessageBodyPartyActivityChange;
|
645
|
+
$unknown?: never;
|
646
|
+
}
|
647
|
+
interface $UnknownMember {
|
648
|
+
text?: never;
|
649
|
+
chatCreate?: never;
|
650
|
+
identityFollow?: never;
|
651
|
+
groupJoin?: never;
|
652
|
+
groupLeave?: never;
|
653
|
+
partyInvite?: never;
|
654
|
+
partyJoin?: never;
|
655
|
+
partyLeave?: never;
|
656
|
+
partyActivityChange?: never;
|
657
|
+
$unknown: [string, any];
|
658
|
+
}
|
659
|
+
interface Visitor<T> {
|
660
|
+
text: (value: ChatMessageBodyText) => T;
|
661
|
+
chatCreate: (value: ChatMessageBodyChatCreate) => T;
|
662
|
+
identityFollow: (value: ChatMessageBodyIdentityFollow) => T;
|
663
|
+
groupJoin: (value: ChatMessageBodyGroupJoin) => T;
|
664
|
+
groupLeave: (value: ChatMessageBodyGroupLeave) => T;
|
665
|
+
partyInvite: (value: ChatMessageBodyPartyInvite) => T;
|
666
|
+
partyJoin: (value: ChatMessageBodyPartyJoin) => T;
|
667
|
+
partyLeave: (value: ChatMessageBodyPartyLeave) => T;
|
668
|
+
partyActivityChange: (value: ChatMessageBodyPartyActivityChange) => T;
|
669
|
+
_: (name: string, value: any) => T;
|
670
|
+
}
|
671
|
+
const visit: <T>(value: ChatMessageBody, visitor: Visitor<T>) => T;
|
672
|
+
/**
|
673
|
+
* @internal
|
674
|
+
*/
|
675
|
+
const filterSensitiveLog: (obj: ChatMessageBody) => any;
|
676
|
+
}
|
677
|
+
/**
|
678
|
+
* A chat message.
|
679
|
+
*/
|
680
|
+
export interface ChatMessage {
|
681
|
+
/**
|
682
|
+
* A universally unique identifier.
|
683
|
+
*/
|
684
|
+
chatMessageId: string | undefined;
|
685
|
+
/**
|
686
|
+
* A universally unique identifier.
|
687
|
+
*/
|
688
|
+
threadId: string | undefined;
|
689
|
+
/**
|
690
|
+
* Time since UNIX epoch (in milliseconds).
|
691
|
+
*/
|
692
|
+
sendTs: number | undefined;
|
693
|
+
/**
|
694
|
+
* Represents types of chat message bodies.
|
695
|
+
*/
|
696
|
+
body: ChatMessageBody | undefined;
|
697
|
+
}
|
698
|
+
export declare namespace ChatMessage {
|
699
|
+
/**
|
700
|
+
* @internal
|
701
|
+
*/
|
702
|
+
const filterSensitiveLog: (obj: ChatMessage) => any;
|
703
|
+
}
|
704
|
+
export interface GetThreadHistoryOutput {
|
705
|
+
/**
|
706
|
+
* Ordered old to new.
|
707
|
+
*
|
708
|
+
* If querying `rivet.api.chat.common#before_and_after`, this will be
|
709
|
+
* `count * 2` long.
|
710
|
+
*/
|
711
|
+
chatMessages: (ChatMessage)[] | undefined;
|
712
|
+
}
|
713
|
+
export declare namespace GetThreadHistoryOutput {
|
714
|
+
/**
|
715
|
+
* @internal
|
716
|
+
*/
|
717
|
+
const filterSensitiveLog: (obj: GetThreadHistoryOutput) => any;
|
718
|
+
}
|
719
|
+
export interface GetThreadTopicInput {
|
720
|
+
/**
|
721
|
+
* A universally unique identifier.
|
722
|
+
*/
|
723
|
+
threadId: string | undefined;
|
724
|
+
}
|
725
|
+
export declare namespace GetThreadTopicInput {
|
726
|
+
/**
|
727
|
+
* @internal
|
728
|
+
*/
|
729
|
+
const filterSensitiveLog: (obj: GetThreadTopicInput) => any;
|
730
|
+
}
|
731
|
+
/**
|
732
|
+
* `rivet.chat#ChatSimpleTopic` variant for direct (identity to identity) chats.
|
733
|
+
*/
|
734
|
+
export interface ChatSimpleTopicDirect {
|
735
|
+
/**
|
736
|
+
* A universally unique identifier.
|
737
|
+
*/
|
738
|
+
identityAId: string | undefined;
|
739
|
+
/**
|
740
|
+
* A universally unique identifier.
|
741
|
+
*/
|
742
|
+
identityBId: string | undefined;
|
743
|
+
}
|
744
|
+
export declare namespace ChatSimpleTopicDirect {
|
745
|
+
/**
|
746
|
+
* @internal
|
747
|
+
*/
|
748
|
+
const filterSensitiveLog: (obj: ChatSimpleTopicDirect) => any;
|
749
|
+
}
|
750
|
+
/**
|
751
|
+
* `rivet.chat#ChatSimpleTopic` variant for groups.
|
752
|
+
*/
|
753
|
+
export interface ChatSimpleTopicGroup {
|
754
|
+
/**
|
755
|
+
* A universally unique identifier.
|
756
|
+
*/
|
757
|
+
groupId: string | undefined;
|
758
|
+
}
|
759
|
+
export declare namespace ChatSimpleTopicGroup {
|
760
|
+
/**
|
761
|
+
* @internal
|
762
|
+
*/
|
763
|
+
const filterSensitiveLog: (obj: ChatSimpleTopicGroup) => any;
|
764
|
+
}
|
765
|
+
/**
|
766
|
+
* `rivet.chat#ChatSimpleTopic` variant for parties.
|
767
|
+
*/
|
768
|
+
export interface ChatSimpleTopicParty {
|
769
|
+
/**
|
770
|
+
* A universally unique identifier.
|
771
|
+
*/
|
772
|
+
partyId: string | undefined;
|
773
|
+
}
|
774
|
+
export declare namespace ChatSimpleTopicParty {
|
775
|
+
/**
|
776
|
+
* @internal
|
777
|
+
*/
|
778
|
+
const filterSensitiveLog: (obj: ChatSimpleTopicParty) => any;
|
779
|
+
}
|
780
|
+
/**
|
781
|
+
* Represents a topic of the given chat thread without the associated handles
|
782
|
+
* for the topic.
|
783
|
+
*/
|
784
|
+
export declare type ChatSimpleTopic = ChatSimpleTopic.DirectMember | ChatSimpleTopic.GroupMember | ChatSimpleTopic.PartyMember | ChatSimpleTopic.$UnknownMember;
|
785
|
+
export declare namespace ChatSimpleTopic {
|
786
|
+
/**
|
787
|
+
* `rivet.chat#ChatSimpleTopic` variant for groups.
|
788
|
+
*/
|
789
|
+
interface GroupMember {
|
790
|
+
group: ChatSimpleTopicGroup;
|
791
|
+
party?: never;
|
792
|
+
direct?: never;
|
793
|
+
$unknown?: never;
|
794
|
+
}
|
795
|
+
/**
|
796
|
+
* `rivet.chat#ChatSimpleTopic` variant for parties.
|
797
|
+
*/
|
798
|
+
interface PartyMember {
|
799
|
+
group?: never;
|
800
|
+
party: ChatSimpleTopicParty;
|
801
|
+
direct?: never;
|
802
|
+
$unknown?: never;
|
803
|
+
}
|
804
|
+
/**
|
805
|
+
* `rivet.chat#ChatSimpleTopic` variant for direct (identity to identity) chats.
|
806
|
+
*/
|
807
|
+
interface DirectMember {
|
808
|
+
group?: never;
|
809
|
+
party?: never;
|
810
|
+
direct: ChatSimpleTopicDirect;
|
811
|
+
$unknown?: never;
|
812
|
+
}
|
813
|
+
interface $UnknownMember {
|
814
|
+
group?: never;
|
815
|
+
party?: never;
|
816
|
+
direct?: never;
|
817
|
+
$unknown: [string, any];
|
818
|
+
}
|
819
|
+
interface Visitor<T> {
|
820
|
+
group: (value: ChatSimpleTopicGroup) => T;
|
821
|
+
party: (value: ChatSimpleTopicParty) => T;
|
822
|
+
direct: (value: ChatSimpleTopicDirect) => T;
|
823
|
+
_: (name: string, value: any) => T;
|
824
|
+
}
|
825
|
+
const visit: <T>(value: ChatSimpleTopic, visitor: Visitor<T>) => T;
|
826
|
+
/**
|
827
|
+
* @internal
|
828
|
+
*/
|
829
|
+
const filterSensitiveLog: (obj: ChatSimpleTopic) => any;
|
830
|
+
}
|
831
|
+
export interface GetThreadTopicOutput {
|
832
|
+
/**
|
833
|
+
* Represents a topic of the given chat thread without the associated handles
|
834
|
+
* for the topic.
|
835
|
+
*/
|
836
|
+
topic: ChatSimpleTopic | undefined;
|
837
|
+
}
|
838
|
+
export declare namespace GetThreadTopicOutput {
|
839
|
+
/**
|
840
|
+
* @internal
|
841
|
+
*/
|
842
|
+
const filterSensitiveLog: (obj: GetThreadTopicOutput) => any;
|
843
|
+
}
|
844
|
+
/**
|
845
|
+
* `rivet.api.chat.common#SendMessageBody` variant for text messages.
|
846
|
+
*/
|
847
|
+
export interface SendMessageBodyText {
|
848
|
+
body: string | undefined;
|
849
|
+
}
|
850
|
+
export declare namespace SendMessageBodyText {
|
851
|
+
/**
|
852
|
+
* @internal
|
853
|
+
*/
|
854
|
+
const filterSensitiveLog: (obj: SendMessageBodyText) => any;
|
855
|
+
}
|
856
|
+
/**
|
857
|
+
* Data to send in a chat message.
|
858
|
+
*/
|
859
|
+
export declare type SendMessageBody = SendMessageBody.TextMember | SendMessageBody.$UnknownMember;
|
860
|
+
export declare namespace SendMessageBody {
|
861
|
+
/**
|
862
|
+
* `rivet.api.chat.common#SendMessageBody` variant for text messages.
|
863
|
+
*/
|
864
|
+
interface TextMember {
|
865
|
+
text: SendMessageBodyText;
|
866
|
+
$unknown?: never;
|
867
|
+
}
|
868
|
+
interface $UnknownMember {
|
869
|
+
text?: never;
|
870
|
+
$unknown: [string, any];
|
871
|
+
}
|
872
|
+
interface Visitor<T> {
|
873
|
+
text: (value: SendMessageBodyText) => T;
|
874
|
+
_: (name: string, value: any) => T;
|
875
|
+
}
|
876
|
+
const visit: <T>(value: SendMessageBody, visitor: Visitor<T>) => T;
|
877
|
+
/**
|
878
|
+
* @internal
|
879
|
+
*/
|
880
|
+
const filterSensitiveLog: (obj: SendMessageBody) => any;
|
881
|
+
}
|
882
|
+
/**
|
883
|
+
* `rivet.api.chat.common#SendChatTopic` variant for direct messages.
|
884
|
+
*/
|
885
|
+
export interface SendChatTopicDirect {
|
886
|
+
/**
|
887
|
+
* A universally unique identifier.
|
888
|
+
*/
|
889
|
+
identityId: string | undefined;
|
890
|
+
}
|
891
|
+
export declare namespace SendChatTopicDirect {
|
892
|
+
/**
|
893
|
+
* @internal
|
894
|
+
*/
|
895
|
+
const filterSensitiveLog: (obj: SendChatTopicDirect) => any;
|
896
|
+
}
|
897
|
+
/**
|
898
|
+
* `rivet.api.chat.common#SendChatTopic` variant for groups.
|
899
|
+
*/
|
900
|
+
export interface SendChatTopicGroup {
|
901
|
+
/**
|
902
|
+
* A universally unique identifier.
|
903
|
+
*/
|
904
|
+
groupId: string | undefined;
|
905
|
+
}
|
906
|
+
export declare namespace SendChatTopicGroup {
|
907
|
+
/**
|
908
|
+
* @internal
|
909
|
+
*/
|
910
|
+
const filterSensitiveLog: (obj: SendChatTopicGroup) => any;
|
911
|
+
}
|
912
|
+
/**
|
913
|
+
* `rivet.api.chat.common#SendChatTopic` variant for parties.
|
914
|
+
*/
|
915
|
+
export interface SendChatTopicParty {
|
916
|
+
/**
|
917
|
+
* A universally unique identifier.
|
918
|
+
*/
|
919
|
+
partyId: string | undefined;
|
920
|
+
}
|
921
|
+
export declare namespace SendChatTopicParty {
|
922
|
+
/**
|
923
|
+
* @internal
|
924
|
+
*/
|
925
|
+
const filterSensitiveLog: (obj: SendChatTopicParty) => any;
|
926
|
+
}
|
927
|
+
/**
|
928
|
+
* Topic to send a chat message to.
|
929
|
+
*
|
930
|
+
* If you already know the thread ID, use `thread_id`.
|
931
|
+
*/
|
932
|
+
export declare type SendChatTopic = SendChatTopic.DirectMember | SendChatTopic.GroupMember | SendChatTopic.PartyMember | SendChatTopic.ThreadIdMember | SendChatTopic.$UnknownMember;
|
933
|
+
export declare namespace SendChatTopic {
|
934
|
+
/**
|
935
|
+
* A universally unique identifier.
|
936
|
+
*/
|
937
|
+
interface ThreadIdMember {
|
938
|
+
threadId: string;
|
939
|
+
group?: never;
|
940
|
+
party?: never;
|
941
|
+
direct?: never;
|
942
|
+
$unknown?: never;
|
943
|
+
}
|
944
|
+
/**
|
945
|
+
* `rivet.api.chat.common#SendChatTopic` variant for groups.
|
946
|
+
*/
|
947
|
+
interface GroupMember {
|
948
|
+
threadId?: never;
|
949
|
+
group: SendChatTopicGroup;
|
950
|
+
party?: never;
|
951
|
+
direct?: never;
|
952
|
+
$unknown?: never;
|
953
|
+
}
|
954
|
+
/**
|
955
|
+
* `rivet.api.chat.common#SendChatTopic` variant for parties.
|
956
|
+
*/
|
957
|
+
interface PartyMember {
|
958
|
+
threadId?: never;
|
959
|
+
group?: never;
|
960
|
+
party: SendChatTopicParty;
|
961
|
+
direct?: never;
|
962
|
+
$unknown?: never;
|
963
|
+
}
|
964
|
+
/**
|
965
|
+
* `rivet.api.chat.common#SendChatTopic` variant for direct messages.
|
966
|
+
*/
|
967
|
+
interface DirectMember {
|
968
|
+
threadId?: never;
|
969
|
+
group?: never;
|
970
|
+
party?: never;
|
971
|
+
direct: SendChatTopicDirect;
|
972
|
+
$unknown?: never;
|
973
|
+
}
|
974
|
+
interface $UnknownMember {
|
975
|
+
threadId?: never;
|
976
|
+
group?: never;
|
977
|
+
party?: never;
|
978
|
+
direct?: never;
|
979
|
+
$unknown: [string, any];
|
980
|
+
}
|
981
|
+
interface Visitor<T> {
|
982
|
+
threadId: (value: string) => T;
|
983
|
+
group: (value: SendChatTopicGroup) => T;
|
984
|
+
party: (value: SendChatTopicParty) => T;
|
985
|
+
direct: (value: SendChatTopicDirect) => T;
|
986
|
+
_: (name: string, value: any) => T;
|
987
|
+
}
|
988
|
+
const visit: <T>(value: SendChatTopic, visitor: Visitor<T>) => T;
|
989
|
+
/**
|
990
|
+
* @internal
|
991
|
+
*/
|
992
|
+
const filterSensitiveLog: (obj: SendChatTopic) => any;
|
993
|
+
}
|
994
|
+
export interface SendChatMessageInput {
|
995
|
+
/**
|
996
|
+
* Topic to send a chat message to.
|
997
|
+
*
|
998
|
+
* If you already know the thread ID, use `thread_id`.
|
999
|
+
*/
|
1000
|
+
topic: SendChatTopic | undefined;
|
1001
|
+
/**
|
1002
|
+
* Data to send in a chat message.
|
1003
|
+
*/
|
1004
|
+
messageBody: SendMessageBody | undefined;
|
1005
|
+
}
|
1006
|
+
export declare namespace SendChatMessageInput {
|
1007
|
+
/**
|
1008
|
+
* @internal
|
1009
|
+
*/
|
1010
|
+
const filterSensitiveLog: (obj: SendChatMessageInput) => any;
|
1011
|
+
}
|
1012
|
+
export interface SendChatMessageOutput {
|
1013
|
+
/**
|
1014
|
+
* A universally unique identifier.
|
1015
|
+
*/
|
1016
|
+
chatMessageId: string | undefined;
|
1017
|
+
}
|
1018
|
+
export declare namespace SendChatMessageOutput {
|
1019
|
+
/**
|
1020
|
+
* @internal
|
1021
|
+
*/
|
1022
|
+
const filterSensitiveLog: (obj: SendChatMessageOutput) => any;
|
1023
|
+
}
|
1024
|
+
export interface SetThreadReadInput {
|
1025
|
+
/**
|
1026
|
+
* A universally unique identifier.
|
1027
|
+
*/
|
1028
|
+
threadId: string | undefined;
|
1029
|
+
/**
|
1030
|
+
* Any messages newer than this timestamp will be marked as unread.
|
1031
|
+
*
|
1032
|
+
* This should be the current timestamp (in milliseconds).
|
1033
|
+
*/
|
1034
|
+
lastReadTs: number | undefined;
|
1035
|
+
}
|
1036
|
+
export declare namespace SetThreadReadInput {
|
1037
|
+
/**
|
1038
|
+
* @internal
|
1039
|
+
*/
|
1040
|
+
const filterSensitiveLog: (obj: SetThreadReadInput) => any;
|
1041
|
+
}
|
1042
|
+
export interface SetThreadReadOutput {
|
1043
|
+
}
|
1044
|
+
export declare namespace SetThreadReadOutput {
|
1045
|
+
/**
|
1046
|
+
* @internal
|
1047
|
+
*/
|
1048
|
+
const filterSensitiveLog: (obj: SetThreadReadOutput) => any;
|
1049
|
+
}
|
1050
|
+
export interface Unit {
|
1051
|
+
}
|
1052
|
+
export declare namespace Unit {
|
1053
|
+
/**
|
1054
|
+
* @internal
|
1055
|
+
*/
|
1056
|
+
const filterSensitiveLog: (obj: Unit) => any;
|
1057
|
+
}
|
1058
|
+
/**
|
1059
|
+
* Represents a chat typing status.
|
1060
|
+
*/
|
1061
|
+
export declare type ChatTypingStatus = ChatTypingStatus.IdleMember | ChatTypingStatus.TypingMember | ChatTypingStatus.$UnknownMember;
|
1062
|
+
export declare namespace ChatTypingStatus {
|
1063
|
+
/**
|
1064
|
+
* Not typing.
|
1065
|
+
*/
|
1066
|
+
interface IdleMember {
|
1067
|
+
idle: Unit;
|
1068
|
+
typing?: never;
|
1069
|
+
$unknown?: never;
|
1070
|
+
}
|
1071
|
+
/**
|
1072
|
+
* Typing.
|
1073
|
+
*/
|
1074
|
+
interface TypingMember {
|
1075
|
+
idle?: never;
|
1076
|
+
typing: Unit;
|
1077
|
+
$unknown?: never;
|
1078
|
+
}
|
1079
|
+
interface $UnknownMember {
|
1080
|
+
idle?: never;
|
1081
|
+
typing?: never;
|
1082
|
+
$unknown: [string, any];
|
1083
|
+
}
|
1084
|
+
interface Visitor<T> {
|
1085
|
+
idle: (value: Unit) => T;
|
1086
|
+
typing: (value: Unit) => T;
|
1087
|
+
_: (name: string, value: any) => T;
|
1088
|
+
}
|
1089
|
+
const visit: <T>(value: ChatTypingStatus, visitor: Visitor<T>) => T;
|
1090
|
+
/**
|
1091
|
+
* @internal
|
1092
|
+
*/
|
1093
|
+
const filterSensitiveLog: (obj: ChatTypingStatus) => any;
|
1094
|
+
}
|
1095
|
+
export interface SetTypingStatusInput {
|
1096
|
+
/**
|
1097
|
+
* A universally unique identifier.
|
1098
|
+
*/
|
1099
|
+
threadId: string | undefined;
|
1100
|
+
/**
|
1101
|
+
* Represents a chat typing status.
|
1102
|
+
*/
|
1103
|
+
status: ChatTypingStatus | undefined;
|
1104
|
+
}
|
1105
|
+
export declare namespace SetTypingStatusInput {
|
1106
|
+
/**
|
1107
|
+
* @internal
|
1108
|
+
*/
|
1109
|
+
const filterSensitiveLog: (obj: SetTypingStatusInput) => any;
|
1110
|
+
}
|
1111
|
+
export interface SetTypingStatusOutput {
|
1112
|
+
}
|
1113
|
+
export declare namespace SetTypingStatusOutput {
|
1114
|
+
/**
|
1115
|
+
* @internal
|
1116
|
+
*/
|
1117
|
+
const filterSensitiveLog: (obj: SetTypingStatusOutput) => any;
|
1118
|
+
}
|
1119
|
+
export interface WatchThreadInput {
|
1120
|
+
/**
|
1121
|
+
* A universally unique identifier.
|
1122
|
+
*/
|
1123
|
+
threadId: string | undefined;
|
1124
|
+
/**
|
1125
|
+
* A query parameter denoting the requests watch index.
|
1126
|
+
*/
|
1127
|
+
watchIndex?: string;
|
1128
|
+
}
|
1129
|
+
export declare namespace WatchThreadInput {
|
1130
|
+
/**
|
1131
|
+
* @internal
|
1132
|
+
*/
|
1133
|
+
const filterSensitiveLog: (obj: WatchThreadInput) => any;
|
1134
|
+
}
|
1135
|
+
/**
|
1136
|
+
* The chat typing status of an identity.
|
1137
|
+
*/
|
1138
|
+
export interface ChatIdentityTypingStatus {
|
1139
|
+
/**
|
1140
|
+
* An identity handle.
|
1141
|
+
*/
|
1142
|
+
identity: IdentityHandle | undefined;
|
1143
|
+
/**
|
1144
|
+
* Represents a chat typing status.
|
1145
|
+
*/
|
1146
|
+
status: ChatTypingStatus | undefined;
|
1147
|
+
}
|
1148
|
+
export declare namespace ChatIdentityTypingStatus {
|
1149
|
+
/**
|
1150
|
+
* @internal
|
1151
|
+
*/
|
1152
|
+
const filterSensitiveLog: (obj: ChatIdentityTypingStatus) => any;
|
1153
|
+
}
|
1154
|
+
/**
|
1155
|
+
* Provided by watchable endpoints used in blocking loops.
|
1156
|
+
*/
|
1157
|
+
export interface WatchResponse {
|
1158
|
+
/**
|
1159
|
+
* Index indicating the version of the data responded.
|
1160
|
+
*
|
1161
|
+
* Pas this to `rivet.common#WatchQuery` to block and wait for the next response.
|
1162
|
+
*/
|
1163
|
+
index: string | undefined;
|
1164
|
+
}
|
1165
|
+
export declare namespace WatchResponse {
|
1166
|
+
/**
|
1167
|
+
* @internal
|
1168
|
+
*/
|
1169
|
+
const filterSensitiveLog: (obj: WatchResponse) => any;
|
1170
|
+
}
|
1171
|
+
export interface WatchThreadOutput {
|
1172
|
+
/**
|
1173
|
+
* All messages new messages posted to this thread. Ordered
|
1174
|
+
* old to new.
|
1175
|
+
*/
|
1176
|
+
chatMessages: (ChatMessage)[] | undefined;
|
1177
|
+
/**
|
1178
|
+
* All identities that are currently typing in this thread.
|
1179
|
+
*/
|
1180
|
+
typingStatuses?: (ChatIdentityTypingStatus)[];
|
1181
|
+
/**
|
1182
|
+
* Provided by watchable endpoints used in blocking loops.
|
1183
|
+
*/
|
1184
|
+
watch: WatchResponse | undefined;
|
1185
|
+
}
|
1186
|
+
export declare namespace WatchThreadOutput {
|
1187
|
+
/**
|
1188
|
+
* @internal
|
1189
|
+
*/
|
1190
|
+
const filterSensitiveLog: (obj: WatchThreadOutput) => any;
|
1191
|
+
}
|
1192
|
+
export interface GetDirectThreadInput {
|
1193
|
+
/**
|
1194
|
+
* A universally unique identifier.
|
1195
|
+
*/
|
1196
|
+
identityId: string | undefined;
|
1197
|
+
}
|
1198
|
+
export declare namespace GetDirectThreadInput {
|
1199
|
+
/**
|
1200
|
+
* @internal
|
1201
|
+
*/
|
1202
|
+
const filterSensitiveLog: (obj: GetDirectThreadInput) => any;
|
1203
|
+
}
|
1204
|
+
export interface GetDirectThreadOutput {
|
1205
|
+
/**
|
1206
|
+
* A universally unique identifier.
|
1207
|
+
*/
|
1208
|
+
threadId?: string;
|
1209
|
+
/**
|
1210
|
+
* An identity handle.
|
1211
|
+
*/
|
1212
|
+
identity?: IdentityHandle;
|
1213
|
+
}
|
1214
|
+
export declare namespace GetDirectThreadOutput {
|
1215
|
+
/**
|
1216
|
+
* @internal
|
1217
|
+
*/
|
1218
|
+
const filterSensitiveLog: (obj: GetDirectThreadOutput) => any;
|
1219
|
+
}
|
1220
|
+
/**
|
1221
|
+
* An error thrown when the requestee has sent an invalid or malformed request.
|
1222
|
+
*/
|
1223
|
+
export declare class BadRequestError extends __BaseException {
|
1224
|
+
readonly name: "BadRequestError";
|
1225
|
+
readonly $fault: "client";
|
1226
|
+
code: string | undefined;
|
1227
|
+
/**
|
1228
|
+
* Unstructured metadata relating to an error. Must be manually parsed.
|
1229
|
+
*/
|
1230
|
+
metadata?: __DocumentType;
|
1231
|
+
/**
|
1232
|
+
* @internal
|
1233
|
+
*/
|
1234
|
+
constructor(opts: __ExceptionOptionType<BadRequestError, __BaseException>);
|
1235
|
+
}
|
1236
|
+
/**
|
1237
|
+
* An error thrown when the requestee requests a resource they do not have access to.
|
1238
|
+
*/
|
1239
|
+
export declare class ForbiddenError extends __BaseException {
|
1240
|
+
readonly name: "ForbiddenError";
|
1241
|
+
readonly $fault: "client";
|
1242
|
+
code: string | undefined;
|
1243
|
+
/**
|
1244
|
+
* Unstructured metadata relating to an error. Must be manually parsed.
|
1245
|
+
*/
|
1246
|
+
metadata?: __DocumentType;
|
1247
|
+
/**
|
1248
|
+
* @internal
|
1249
|
+
*/
|
1250
|
+
constructor(opts: __ExceptionOptionType<ForbiddenError, __BaseException>);
|
1251
|
+
}
|
1252
|
+
/**
|
1253
|
+
* An error caused by internal server problems.
|
1254
|
+
*/
|
1255
|
+
export declare class InternalError extends __BaseException {
|
1256
|
+
readonly name: "InternalError";
|
1257
|
+
readonly $fault: "server";
|
1258
|
+
$retryable: {};
|
1259
|
+
code?: string;
|
1260
|
+
/**
|
1261
|
+
* Unstructured metadata relating to an error. Must be manually parsed.
|
1262
|
+
*/
|
1263
|
+
metadata?: __DocumentType;
|
1264
|
+
/**
|
1265
|
+
* @internal
|
1266
|
+
*/
|
1267
|
+
constructor(opts: __ExceptionOptionType<InternalError, __BaseException>);
|
1268
|
+
}
|
1269
|
+
/**
|
1270
|
+
* An error thrown when the requestee requests a non existant resource.
|
1271
|
+
*/
|
1272
|
+
export declare class NotFoundError extends __BaseException {
|
1273
|
+
readonly name: "NotFoundError";
|
1274
|
+
readonly $fault: "client";
|
1275
|
+
code: string | undefined;
|
1276
|
+
/**
|
1277
|
+
* Unstructured metadata relating to an error. Must be manually parsed.
|
1278
|
+
*/
|
1279
|
+
metadata?: __DocumentType;
|
1280
|
+
/**
|
1281
|
+
* @internal
|
1282
|
+
*/
|
1283
|
+
constructor(opts: __ExceptionOptionType<NotFoundError, __BaseException>);
|
1284
|
+
}
|
1285
|
+
/**
|
1286
|
+
* An error thrown when the requestee has hit a rate limit. You are sending too many requests too quickly.
|
1287
|
+
*/
|
1288
|
+
export declare class RateLimitError extends __BaseException {
|
1289
|
+
readonly name: "RateLimitError";
|
1290
|
+
readonly $fault: "client";
|
1291
|
+
code: string | undefined;
|
1292
|
+
/**
|
1293
|
+
* Unstructured metadata relating to an error. Must be manually parsed.
|
1294
|
+
*/
|
1295
|
+
metadata?: __DocumentType;
|
1296
|
+
/**
|
1297
|
+
* @internal
|
1298
|
+
*/
|
1299
|
+
constructor(opts: __ExceptionOptionType<RateLimitError, __BaseException>);
|
1300
|
+
}
|
1301
|
+
/**
|
1302
|
+
* An error thrown when the requestee is not authenticated.
|
1303
|
+
*/
|
1304
|
+
export declare class UnauthorizedError extends __BaseException {
|
1305
|
+
readonly name: "UnauthorizedError";
|
1306
|
+
readonly $fault: "client";
|
1307
|
+
$retryable: {};
|
1308
|
+
code: string | undefined;
|
1309
|
+
/**
|
1310
|
+
* Unstructured metadata relating to an error. Must be manually parsed.
|
1311
|
+
*/
|
1312
|
+
metadata?: __DocumentType;
|
1313
|
+
/**
|
1314
|
+
* @internal
|
1315
|
+
*/
|
1316
|
+
constructor(opts: __ExceptionOptionType<UnauthorizedError, __BaseException>);
|
1317
|
+
}
|