stream-chat 4.4.3-dev.2 → 5.0.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 (53) hide show
  1. package/README.md +4 -13
  2. package/dist/browser.es.js +1229 -720
  3. package/dist/browser.es.js.map +1 -1
  4. package/dist/browser.full-bundle.min.js +1 -1
  5. package/dist/browser.full-bundle.min.js.map +1 -1
  6. package/dist/browser.js +1229 -719
  7. package/dist/browser.js.map +1 -1
  8. package/dist/index.es.js +1229 -720
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/index.js +1229 -719
  11. package/dist/index.js.map +1 -1
  12. package/dist/types/base64.d.ts.map +1 -1
  13. package/dist/types/channel.d.ts +19 -15
  14. package/dist/types/channel.d.ts.map +1 -1
  15. package/dist/types/channel_state.d.ts +2 -2
  16. package/dist/types/channel_state.d.ts.map +1 -1
  17. package/dist/types/client.d.ts +25 -42
  18. package/dist/types/client.d.ts.map +1 -1
  19. package/dist/types/client_state.d.ts +2 -2
  20. package/dist/types/client_state.d.ts.map +1 -1
  21. package/dist/types/connection.d.ts +14 -49
  22. package/dist/types/connection.d.ts.map +1 -1
  23. package/dist/types/connection_fallback.d.ts +41 -0
  24. package/dist/types/connection_fallback.d.ts.map +1 -0
  25. package/dist/types/errors.d.ts +14 -0
  26. package/dist/types/errors.d.ts.map +1 -0
  27. package/dist/types/insights.d.ts +17 -10
  28. package/dist/types/insights.d.ts.map +1 -1
  29. package/dist/types/permissions.d.ts.map +1 -1
  30. package/dist/types/signing.d.ts +3 -3
  31. package/dist/types/signing.d.ts.map +1 -1
  32. package/dist/types/token_manager.d.ts +2 -2
  33. package/dist/types/token_manager.d.ts.map +1 -1
  34. package/dist/types/types.d.ts +94 -88
  35. package/dist/types/types.d.ts.map +1 -1
  36. package/dist/types/utils.d.ts +13 -3
  37. package/dist/types/utils.d.ts.map +1 -1
  38. package/package.json +4 -4
  39. package/src/base64.ts +1 -4
  40. package/src/channel.ts +133 -461
  41. package/src/channel_state.ts +31 -158
  42. package/src/client.ts +291 -712
  43. package/src/client_state.ts +2 -2
  44. package/src/connection.ts +146 -395
  45. package/src/connection_fallback.ts +205 -0
  46. package/src/errors.ts +58 -0
  47. package/src/insights.ts +38 -32
  48. package/src/permissions.ts +3 -24
  49. package/src/signing.ts +6 -17
  50. package/src/token_manager.ts +6 -18
  51. package/src/types.ts +268 -512
  52. package/src/utils.ts +58 -24
  53. package/CHANGELOG.md +0 -844
@@ -21,7 +21,8 @@ export declare type RequireAtLeastOne<T> = {
21
21
  export declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
22
22
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
23
23
  }[Keys];
24
- export declare type UnknownType = Record<string, unknown>;
24
+ export declare type UR = Record<string, unknown>;
25
+ export declare type UnknownType = UR;
25
26
  export declare type Unpacked<T> = T extends (infer U)[] ? U : T extends (...args: any[]) => infer U ? U : T extends Promise<infer U> ? U : T;
26
27
  /**
27
28
  * Response Types
@@ -100,7 +101,7 @@ export declare type ModerationResult = {
100
101
  blocklist_name?: string;
101
102
  moderated_by?: string;
102
103
  };
103
- export declare type MessageFlagsResponse<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType, AttachmentType = UnknownType, MessageType = UnknownType, ReactionType = UnknownType> = APIResponse & {
104
+ export declare type MessageFlagsResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = APIResponse & {
104
105
  flags?: Array<{
105
106
  message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
106
107
  user: UserResponse<UserType>;
@@ -114,7 +115,7 @@ export declare type MessageFlagsResponse<ChannelType extends UnknownType = Unkno
114
115
  updated_at?: string;
115
116
  }>;
116
117
  };
117
- export declare type BannedUsersResponse<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = APIResponse & {
118
+ export declare type BannedUsersResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = APIResponse & {
118
119
  bans?: Array<{
119
120
  user: UserResponse<UserType>;
120
121
  banned_by?: UserResponse<UserType>;
@@ -129,7 +130,7 @@ export declare type BlockListResponse = BlockList & {
129
130
  created_at?: string;
130
131
  updated_at?: string;
131
132
  };
132
- export declare type ChannelResponse<ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType = UnknownType> = ChannelType & {
133
+ export declare type ChannelResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = ChannelType & {
133
134
  cid: string;
134
135
  disabled: boolean;
135
136
  frozen: boolean;
@@ -152,9 +153,10 @@ export declare type ChannelResponse<ChannelType = UnknownType, CommandType exten
152
153
  name?: string;
153
154
  own_capabilities?: string[];
154
155
  team?: string;
156
+ truncated_at?: string;
155
157
  updated_at?: string;
156
158
  };
157
- export declare type ChannelAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
159
+ export declare type ChannelAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
158
160
  channel: ChannelResponse<ChannelType, CommandType, UserType>;
159
161
  members: ChannelMemberResponse<UserType>[];
160
162
  messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
@@ -165,10 +167,14 @@ export declare type ChannelAPIResponse<AttachmentType = UnknownType, ChannelType
165
167
  watcher_count?: number;
166
168
  watchers?: UserResponse<UserType>[];
167
169
  };
168
- export declare type ChannelMemberAPIResponse<UserType = UnknownType> = APIResponse & {
170
+ export declare type ChannelUpdateOptions = {
171
+ hide_history?: boolean;
172
+ skip_push?: boolean;
173
+ };
174
+ export declare type ChannelMemberAPIResponse<UserType = UR> = APIResponse & {
169
175
  members: ChannelMemberResponse<UserType>[];
170
176
  };
171
- export declare type ChannelMemberResponse<UserType = UnknownType> = {
177
+ export declare type ChannelMemberResponse<UserType = UR> = {
172
178
  banned?: boolean;
173
179
  channel_role?: Role;
174
180
  created_at?: string;
@@ -203,7 +209,7 @@ export declare type CommandResponse<CommandType extends string = LiteralStringFo
203
209
  name?: CommandVariants<CommandType>;
204
210
  set?: CommandVariants<CommandType>;
205
211
  };
206
- export declare type ConnectAPIResponse<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = Promise<void | ConnectionOpen<ChannelType, CommandType, UserType>>;
212
+ export declare type ConnectAPIResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = Promise<void | ConnectionOpen<ChannelType, CommandType, UserType>>;
207
213
  export declare type CreateChannelResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & Omit<CreateChannelOptions<CommandType>, 'client_id' | 'connection_id'> & {
208
214
  created_at: string;
209
215
  updated_at: string;
@@ -212,13 +218,13 @@ export declare type CreateChannelResponse<CommandType extends string = LiteralSt
212
218
  export declare type CreateCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
213
219
  command: CreateCommandOptions<CommandType> & CreatedAtUpdatedAt;
214
220
  };
215
- export declare type DeleteChannelAPIResponse<ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType = UnknownType> = APIResponse & {
221
+ export declare type DeleteChannelAPIResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = APIResponse & {
216
222
  channel: ChannelResponse<ChannelType, CommandType, UserType>;
217
223
  };
218
224
  export declare type DeleteCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
219
225
  name?: CommandVariants<CommandType>;
220
226
  };
221
- export declare type EventAPIResponse<AttachmentType extends UnknownType = UnknownType, ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, EventType extends UnknownType = UnknownType, MessageType extends UnknownType = UnknownType, ReactionType extends UnknownType = UnknownType, UserType extends UnknownType = UnknownType> = APIResponse & {
227
+ export declare type EventAPIResponse<AttachmentType extends UR = UR, ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, EventType extends UR = UR, MessageType extends UR = UR, ReactionType extends UR = UR, UserType extends UR = UR> = APIResponse & {
222
228
  event: Event<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>;
223
229
  };
224
230
  export declare type ExportChannelResponse = {
@@ -230,7 +236,7 @@ export declare type ExportChannelStatusResponse = {
230
236
  result?: {};
231
237
  updated_at?: string;
232
238
  };
233
- export declare type FlagMessageResponse<UserType = UnknownType> = APIResponse & {
239
+ export declare type FlagMessageResponse<UserType = UR> = APIResponse & {
234
240
  flag: {
235
241
  created_at: string;
236
242
  created_by_automod: boolean;
@@ -243,7 +249,7 @@ export declare type FlagMessageResponse<UserType = UnknownType> = APIResponse &
243
249
  reviewed_by?: string;
244
250
  };
245
251
  };
246
- export declare type FlagUserResponse<UserType = UnknownType> = APIResponse & {
252
+ export declare type FlagUserResponse<UserType = UR> = APIResponse & {
247
253
  flag: {
248
254
  created_at: string;
249
255
  created_by_automod: boolean;
@@ -256,7 +262,7 @@ export declare type FlagUserResponse<UserType = UnknownType> = APIResponse & {
256
262
  reviewed_by?: string;
257
263
  };
258
264
  };
259
- export declare type FormatMessageResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = Omit<MessageResponse<AttachmentType, ChannelType, CommandType, {}, ReactionType, UserType>, 'created_at' | 'pinned_at' | 'updated_at' | 'status'> & MessageType & {
265
+ export declare type FormatMessageResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = Omit<MessageResponse<AttachmentType, ChannelType, CommandType, {}, ReactionType, UserType>, 'created_at' | 'pinned_at' | 'updated_at' | 'status'> & MessageType & {
260
266
  created_at: Date;
261
267
  pinned_at: Date | null;
262
268
  status: string;
@@ -269,7 +275,7 @@ export declare type GetChannelTypeResponse<CommandType extends string = LiteralS
269
275
  grants?: Record<string, string[]>;
270
276
  };
271
277
  export declare type GetCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & CreateCommandOptions<CommandType> & CreatedAtUpdatedAt;
272
- export declare type GetMultipleMessagesAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
278
+ export declare type GetMultipleMessagesAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
273
279
  messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
274
280
  };
275
281
  export declare type GetRateLimitsResponse = APIResponse & {
@@ -278,10 +284,10 @@ export declare type GetRateLimitsResponse = APIResponse & {
278
284
  server_side?: RateLimitsMap;
279
285
  web?: RateLimitsMap;
280
286
  };
281
- export declare type GetReactionsAPIResponse<ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
287
+ export declare type GetReactionsAPIResponse<ReactionType = UR, UserType = UR> = APIResponse & {
282
288
  reactions: ReactionResponse<ReactionType, UserType>[];
283
289
  };
284
- export declare type GetRepliesAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
290
+ export declare type GetRepliesAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
285
291
  messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
286
292
  };
287
293
  export declare type ListChannelResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
@@ -296,16 +302,16 @@ export declare type ListChannelTypesAPIResponse<CommandType extends string = Lit
296
302
  export declare type ListCommandsResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
297
303
  commands: Array<CreateCommandOptions<CommandType> & CreatedAtUpdatedAt>;
298
304
  };
299
- export declare type MuteChannelAPIResponse<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = APIResponse & {
305
+ export declare type MuteChannelAPIResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = APIResponse & {
300
306
  channel_mute: ChannelMute<ChannelType, CommandType, UserType>;
301
307
  own_user: OwnUserResponse<ChannelType, CommandType, UserType>;
302
308
  channel_mutes?: ChannelMute<ChannelType, CommandType, UserType>[];
303
309
  mute?: MuteResponse<UserType>;
304
310
  };
305
- export declare type MessageResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = MessageResponseBase<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> & {
311
+ export declare type MessageResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = MessageResponseBase<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType> & {
306
312
  quoted_message?: MessageResponseBase<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
307
313
  };
308
- export declare type MessageResponseBase<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = MessageBase<AttachmentType, MessageType, UserType> & {
314
+ export declare type MessageResponseBase<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = MessageBase<AttachmentType, MessageType, UserType> & {
309
315
  args?: string;
310
316
  channel?: ChannelResponse<ChannelType, CommandType, UserType>;
311
317
  cid?: string;
@@ -338,19 +344,19 @@ export declare type MessageResponseBase<AttachmentType = UnknownType, ChannelTyp
338
344
  type?: MessageLabel;
339
345
  updated_at?: string;
340
346
  };
341
- export declare type MuteResponse<UserType = UnknownType> = {
347
+ export declare type MuteResponse<UserType = UR> = {
342
348
  user: UserResponse<UserType>;
343
349
  created_at?: string;
344
350
  expires?: string;
345
351
  target?: UserResponse<UserType>;
346
352
  updated_at?: string;
347
353
  };
348
- export declare type MuteUserResponse<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = APIResponse & {
354
+ export declare type MuteUserResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = APIResponse & {
349
355
  mute?: MuteResponse<UserType>;
350
356
  mutes?: Array<Mute<UserType>>;
351
357
  own_user?: OwnUserResponse<ChannelType, CommandType, UserType>;
352
358
  };
353
- export declare type OwnUserBase<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = {
359
+ export declare type OwnUserBase<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
354
360
  channel_mutes: ChannelMute<ChannelType, CommandType, UserType>[];
355
361
  devices: Device<UserType>[];
356
362
  mutes: Mute<UserType>[];
@@ -360,8 +366,8 @@ export declare type OwnUserBase<ChannelType extends UnknownType = UnknownType, C
360
366
  invisible?: boolean;
361
367
  roles?: string[];
362
368
  };
363
- export declare type OwnUserResponse<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = UserResponse<UserType> & OwnUserBase<ChannelType, CommandType, UserType>;
364
- export declare type PartialUpdateChannelAPIResponse<ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType = UnknownType> = APIResponse & {
369
+ export declare type OwnUserResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = UserResponse<UserType> & OwnUserBase<ChannelType, CommandType, UserType>;
370
+ export declare type PartialUpdateChannelAPIResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = APIResponse & {
365
371
  channel: ChannelResponse<ChannelType, CommandType, UserType>;
366
372
  members: ChannelMemberResponse<UserType>[];
367
373
  };
@@ -371,20 +377,20 @@ export declare type PermissionAPIResponse = APIResponse & {
371
377
  export declare type PermissionsAPIResponse = APIResponse & {
372
378
  permissions?: PermissionAPIObject[];
373
379
  };
374
- export declare type ReactionAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
380
+ export declare type ReactionAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
375
381
  message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
376
382
  reaction: ReactionResponse<ReactionType, UserType>;
377
383
  };
378
- export declare type ReactionResponse<ReactionType = UnknownType, UserType = UnknownType> = Reaction<ReactionType, UserType> & {
384
+ export declare type ReactionResponse<ReactionType = UR, UserType = UR> = Reaction<ReactionType, UserType> & {
379
385
  created_at: string;
380
386
  updated_at: string;
381
387
  };
382
- export declare type ReadResponse<UserType = UnknownType> = {
388
+ export declare type ReadResponse<UserType = UR> = {
383
389
  last_read: string;
384
390
  user: UserResponse<UserType>;
385
391
  unread_messages?: number;
386
392
  };
387
- export declare type SearchAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
393
+ export declare type SearchAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
388
394
  results: {
389
395
  message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
390
396
  }[];
@@ -401,13 +407,14 @@ export declare type SearchWarning = {
401
407
  export declare type SendFileAPIResponse = APIResponse & {
402
408
  file: string;
403
409
  };
404
- export declare type SendMessageAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
410
+ export declare type SendMessageAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
405
411
  message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
406
412
  };
407
- export declare type TruncateChannelAPIResponse<ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType = UnknownType> = APIResponse & {
413
+ export declare type TruncateChannelAPIResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = APIResponse & {
408
414
  channel: ChannelResponse<ChannelType, CommandType, UserType>;
415
+ message?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
409
416
  };
410
- export declare type UpdateChannelAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
417
+ export declare type UpdateChannelAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
411
418
  channel: ChannelResponse<ChannelType, CommandType, UserType>;
412
419
  members: ChannelMemberResponse<UserType>[];
413
420
  message?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
@@ -421,18 +428,18 @@ export declare type UpdateCommandResponse<CommandType extends string = LiteralSt
421
428
  name: CommandVariants<CommandType>;
422
429
  };
423
430
  };
424
- export declare type UpdateMessageAPIResponse<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = APIResponse & {
431
+ export declare type UpdateMessageAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
425
432
  message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
426
433
  };
427
- export declare type UsersAPIResponse<UserType = UnknownType> = APIResponse & {
434
+ export declare type UsersAPIResponse<UserType = UR> = APIResponse & {
428
435
  users: Array<UserResponse<UserType>>;
429
436
  };
430
- export declare type UpdateUsersAPIResponse<UserType = UnknownType> = APIResponse & {
437
+ export declare type UpdateUsersAPIResponse<UserType = UR> = APIResponse & {
431
438
  users: {
432
439
  [key: string]: UserResponse<UserType>;
433
440
  };
434
441
  };
435
- export declare type UserResponse<UserType = UnknownType> = User<UserType> & {
442
+ export declare type UserResponse<UserType = UR> = User<UserType> & {
436
443
  banned?: boolean;
437
444
  created_at?: string;
438
445
  deactivated_at?: string;
@@ -452,35 +459,24 @@ export declare type MessageFlagsPaginationOptions = {
452
459
  offset?: number;
453
460
  };
454
461
  export declare type BannedUsersPaginationOptions = Omit<PaginationOptions, 'id_gt' | 'id_gte' | 'id_lt' | 'id_lte'>;
455
- export declare type BanUserOptions<UserType = UnknownType> = UnBanUserOptions & {
462
+ export declare type BanUserOptions<UserType = UR> = UnBanUserOptions & {
456
463
  banned_by?: UserResponse<UserType>;
457
464
  banned_by_id?: string;
458
465
  ip_ban?: boolean;
459
466
  reason?: string;
460
467
  timeout?: number;
461
- /**
462
- * @deprecated please use banned_by
463
- */
464
- user?: UserResponse<UserType>;
465
- /**
466
- * @deprecated please use banned_by_id
467
- */
468
- user_id?: string;
469
468
  };
470
469
  export declare type ChannelOptions = {
471
- last_message_ids?: {
472
- [key: string]: string;
473
- };
474
470
  limit?: number;
471
+ member_limit?: number;
475
472
  message_limit?: number;
476
473
  offset?: number;
477
474
  presence?: boolean;
478
- recovery?: boolean;
479
475
  state?: boolean;
480
476
  user_id?: string;
481
477
  watch?: boolean;
482
478
  };
483
- export declare type ChannelQueryOptions<ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType = UnknownType> = {
479
+ export declare type ChannelQueryOptions<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = {
484
480
  client_id?: string;
485
481
  connection_id?: string;
486
482
  data?: ChannelResponse<ChannelType, CommandType, UserType>;
@@ -536,7 +532,7 @@ export declare type CustomPermissionOptions = {
536
532
  owner?: boolean;
537
533
  same_team?: boolean;
538
534
  };
539
- export declare type InviteOptions<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = {
535
+ export declare type InviteOptions<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = {
540
536
  accept_invite?: boolean;
541
537
  add_members?: string[];
542
538
  add_moderators?: string[];
@@ -552,22 +548,22 @@ export declare type InviteOptions<AttachmentType = UnknownType, ChannelType = Un
552
548
  user_id?: string;
553
549
  };
554
550
  /** @deprecated use MarkChannelsReadOptions instead */
555
- export declare type MarkAllReadOptions<UserType = UnknownType> = MarkChannelsReadOptions<UserType>;
556
- export declare type MarkChannelsReadOptions<UserType = UnknownType> = {
551
+ export declare type MarkAllReadOptions<UserType = UR> = MarkChannelsReadOptions<UserType>;
552
+ export declare type MarkChannelsReadOptions<UserType = UR> = {
557
553
  client_id?: string;
558
554
  connection_id?: string;
559
555
  read_by_channel?: Record<string, string>;
560
556
  user?: UserResponse<UserType>;
561
557
  user_id?: string;
562
558
  };
563
- export declare type MarkReadOptions<UserType = UnknownType> = {
559
+ export declare type MarkReadOptions<UserType = UR> = {
564
560
  client_id?: string;
565
561
  connection_id?: string;
566
562
  message_id?: string;
567
563
  user?: UserResponse<UserType>;
568
564
  user_id?: string;
569
565
  };
570
- export declare type MuteUserOptions<UserType = UnknownType> = {
566
+ export declare type MuteUserOptions<UserType = UR> = {
571
567
  client_id?: string;
572
568
  connection_id?: string;
573
569
  id?: string;
@@ -602,7 +598,7 @@ export declare type QueryMembersOptions = {
602
598
  user_id_lt?: string;
603
599
  user_id_lte?: string;
604
600
  };
605
- export declare type SearchOptions<MessageType = UnknownType> = {
601
+ export declare type SearchOptions<MessageType = UR> = {
606
602
  limit?: number;
607
603
  next?: string;
608
604
  offset?: number;
@@ -621,6 +617,8 @@ export declare type StreamChatOptions = AxiosRequestConfig & {
621
617
  browser?: boolean;
622
618
  device?: BaseDeviceFields;
623
619
  enableInsights?: boolean;
620
+ /** experimental feature, please contact support if you want this feature enabled for you */
621
+ enableWSFallback?: boolean;
624
622
  logger?: Logger;
625
623
  /**
626
624
  * When network is recovered, we re-query the active channels on client. But in single query, you can recover
@@ -663,7 +661,7 @@ export declare type ConnectionChangeEvent = {
663
661
  type: EventTypes;
664
662
  online?: boolean;
665
663
  };
666
- export declare type Event<AttachmentType extends UnknownType = UnknownType, ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, EventType extends UnknownType = UnknownType, MessageType extends UnknownType = UnknownType, ReactionType extends UnknownType = UnknownType, UserType extends UnknownType = UnknownType> = EventType & {
664
+ export declare type Event<AttachmentType extends UR = UR, ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, EventType extends UR = UR, MessageType extends UR = UR, ReactionType extends UR = UR, UserType extends UR = UR> = EventType & {
667
665
  type: EventTypes;
668
666
  channel?: ChannelResponse<ChannelType, CommandType, UserType>;
669
667
  channel_id?: string;
@@ -689,10 +687,10 @@ export declare type Event<AttachmentType extends UnknownType = UnknownType, Chan
689
687
  user_id?: string;
690
688
  watcher_count?: number;
691
689
  };
692
- export declare type UserCustomEvent<EventType extends UnknownType = UnknownType> = EventType & {
690
+ export declare type UserCustomEvent<EventType extends UR = UR> = EventType & {
693
691
  type: string;
694
692
  };
695
- export declare type EventHandler<AttachmentType extends UnknownType = UnknownType, ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, EventType extends UnknownType = UnknownType, MessageType extends UnknownType = UnknownType, ReactionType extends UnknownType = UnknownType, UserType extends UnknownType = UnknownType> = (event: Event<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>) => void;
693
+ export declare type EventHandler<AttachmentType extends UR = UR, ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, EventType extends UR = UR, MessageType extends UR = UR, ReactionType extends UR = UR, UserType extends UR = UR> = (event: Event<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>) => void;
696
694
  export declare type EventTypes = 'all' | 'channel.created' | 'channel.deleted' | 'channel.hidden' | 'channel.muted' | 'channel.truncated' | 'channel.unmuted' | 'channel.updated' | 'channel.visible' | 'connection.changed' | 'connection.recovered' | 'health.check' | 'member.added' | 'member.removed' | 'member.updated' | 'message.deleted' | 'message.new' | 'message.read' | 'message.updated' | 'notification.added_to_channel' | 'notification.channel_deleted' | 'notification.channel_mutes_updated' | 'notification.channel_truncated' | 'notification.invite_accepted' | 'notification.invite_rejected' | 'notification.invited' | 'notification.mark_read' | 'notification.message_new' | 'notification.mutes_updated' | 'notification.removed_from_channel' | 'reaction.deleted' | 'reaction.new' | 'reaction.updated' | 'typing.start' | 'typing.stop' | 'user.banned' | 'user.deleted' | 'user.presence.changed' | 'user.unbanned' | 'user.updated' | 'user.watching.start' | 'user.watching.stop';
697
695
  /**
698
696
  * Filter Types
@@ -729,7 +727,7 @@ export declare type BannedUsersFilters = QueryFilters<{
729
727
  } & {
730
728
  [Key in keyof Omit<BannedUsersFilterOptions, 'channel_cid' | 'reason'>]: RequireOnlyOne<QueryFilter<BannedUsersFilterOptions[Key]>> | PrimitiveFilter<BannedUsersFilterOptions[Key]>;
731
729
  }>;
732
- export declare type ChannelFilters<ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType = UnknownType> = QueryFilters<ContainsOperator<ChannelType> & {
730
+ export declare type ChannelFilters<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = QueryFilters<ContainsOperator<ChannelType> & {
733
731
  members?: RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$nin'>> | RequireOnlyOne<Pick<QueryFilter<string[]>, '$eq'>> | PrimitiveFilter<string[]>;
734
732
  } & {
735
733
  name?: RequireOnlyOne<{
@@ -743,7 +741,7 @@ export declare type ContainsOperator<CustomType = {}> = {
743
741
  $contains?: ContainType extends object ? PrimitiveFilter<RequireAtLeastOne<ContainType>> : PrimitiveFilter<ContainType>;
744
742
  } & QueryFilter<PrimitiveFilter<ContainType>[]>> | PrimitiveFilter<PrimitiveFilter<ContainType>[]> : RequireOnlyOne<QueryFilter<CustomType[Key]>> | PrimitiveFilter<CustomType[Key]>;
745
743
  };
746
- export declare type MessageFilters<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = QueryFilters<ContainsOperator<MessageType> & {
744
+ export declare type MessageFilters<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = QueryFilters<ContainsOperator<MessageType> & {
747
745
  text?: RequireOnlyOne<{
748
746
  $autocomplete?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text'];
749
747
  $q?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text'];
@@ -777,7 +775,7 @@ export declare type QueryLogicalOperators<Operators> = {
777
775
  $nor?: ArrayOneOrMore<QueryFilters<Operators>>;
778
776
  $or?: ArrayTwoOrMore<QueryFilters<Operators>>;
779
777
  };
780
- export declare type UserFilters<UserType = UnknownType> = QueryFilters<ContainsOperator<UserType> & {
778
+ export declare type UserFilters<UserType = UR> = QueryFilters<ContainsOperator<UserType> & {
781
779
  id?: RequireOnlyOne<{
782
780
  $autocomplete?: UserResponse<UserType>['id'];
783
781
  } & QueryFilter<UserResponse<UserType>['id']>> | PrimitiveFilter<UserResponse<UserType>['id']>;
@@ -801,8 +799,8 @@ export declare type BannedUsersSort = BannedUsersSortBase | Array<BannedUsersSor
801
799
  export declare type BannedUsersSortBase = {
802
800
  created_at?: AscDesc;
803
801
  };
804
- export declare type ChannelSort<ChannelType = UnknownType> = ChannelSortBase<ChannelType> | Array<ChannelSortBase<ChannelType>>;
805
- export declare type ChannelSortBase<ChannelType = UnknownType> = Sort<ChannelType> & {
802
+ export declare type ChannelSort<ChannelType = UR> = ChannelSortBase<ChannelType> | Array<ChannelSortBase<ChannelType>>;
803
+ export declare type ChannelSortBase<ChannelType = UR> = Sort<ChannelType> & {
806
804
  created_at?: AscDesc;
807
805
  has_unread?: AscDesc;
808
806
  last_message_at?: AscDesc;
@@ -814,9 +812,9 @@ export declare type ChannelSortBase<ChannelType = UnknownType> = Sort<ChannelTyp
814
812
  export declare type Sort<T> = {
815
813
  [P in keyof T]?: AscDesc;
816
814
  };
817
- export declare type UserSort<UserType = UnknownType> = Sort<UserResponse<UserType>> | Array<Sort<UserResponse<UserType>>>;
818
- export declare type MemberSort<UserType = UnknownType> = Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>> | Array<Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>>>;
819
- export declare type SearchMessageSortBase<MessageType = UnknownType> = Sort<MessageType> & {
815
+ export declare type UserSort<UserType = UR> = Sort<UserResponse<UserType>> | Array<Sort<UserResponse<UserType>>>;
816
+ export declare type MemberSort<UserType = UR> = Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>> | Array<Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>>>;
817
+ export declare type SearchMessageSortBase<MessageType = UR> = Sort<MessageType> & {
820
818
  attachments?: AscDesc;
821
819
  'attachments.type'?: AscDesc;
822
820
  created_at?: AscDesc;
@@ -831,8 +829,8 @@ export declare type SearchMessageSortBase<MessageType = UnknownType> = Sort<Mess
831
829
  updated_at?: AscDesc;
832
830
  'user.id'?: AscDesc;
833
831
  };
834
- export declare type SearchMessageSort<MessageType = UnknownType> = SearchMessageSortBase<MessageType> | Array<SearchMessageSortBase<MessageType>>;
835
- export declare type QuerySort<ChannelType = UnknownType, UserType = UnknownType, MessageType = UnknownType> = BannedUsersSort | ChannelSort<ChannelType> | SearchMessageSort<MessageType> | UserSort<UserType>;
832
+ export declare type SearchMessageSort<MessageType = UR> = SearchMessageSortBase<MessageType> | Array<SearchMessageSortBase<MessageType>>;
833
+ export declare type QuerySort<ChannelType = UR, UserType = UR, MessageType = UR> = BannedUsersSort | ChannelSort<ChannelType> | SearchMessageSort<MessageType> | UserSort<UserType>;
836
834
  /**
837
835
  * Base Types
838
836
  */
@@ -898,7 +896,7 @@ export declare type AppSettings = {
898
896
  webhook_events?: Array<string> | null;
899
897
  webhook_url?: string;
900
898
  };
901
- export declare type Attachment<T = UnknownType> = T & {
899
+ export declare type Attachment<T = UR> = T & {
902
900
  actions?: Action[];
903
901
  asset_url?: string;
904
902
  author_icon?: string;
@@ -976,11 +974,11 @@ export declare type ChannelConfigFields = {
976
974
  export declare type ChannelConfigWithInfo<CommandType extends string = LiteralStringForUnion> = ChannelConfigFields & CreatedAtUpdatedAt & {
977
975
  commands?: CommandResponse<CommandType>[];
978
976
  };
979
- export declare type ChannelData<ChannelType = UnknownType> = ChannelType & {
977
+ export declare type ChannelData<ChannelType = UR> = ChannelType & {
980
978
  members?: string[];
981
979
  name?: string;
982
980
  };
983
- export declare type ChannelMembership<UserType = UnknownType> = {
981
+ export declare type ChannelMembership<UserType = UR> = {
984
982
  banned?: boolean;
985
983
  channel_role?: Role;
986
984
  created_at?: string;
@@ -990,7 +988,7 @@ export declare type ChannelMembership<UserType = UnknownType> = {
990
988
  updated_at?: string;
991
989
  user?: UserResponse<UserType>;
992
990
  };
993
- export declare type ChannelMute<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = {
991
+ export declare type ChannelMute<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
994
992
  user: UserResponse<UserType>;
995
993
  channel?: ChannelResponse<ChannelType, CommandType, UserType>;
996
994
  created_at?: string;
@@ -1004,7 +1002,7 @@ export declare type ChannelRole = {
1004
1002
  resource?: string;
1005
1003
  same_team?: boolean;
1006
1004
  };
1007
- export declare type CheckPushInput<UserType = UnknownType> = {
1005
+ export declare type CheckPushInput<UserType = UR> = {
1008
1006
  apn_template?: string;
1009
1007
  client_id?: string;
1010
1008
  connection_id?: string;
@@ -1019,7 +1017,7 @@ export declare type CommandVariants<CommandType extends string = LiteralStringFo
1019
1017
  export declare type Configs<CommandType extends string = LiteralStringForUnion> = {
1020
1018
  [channel_type: string]: ChannelConfigWithInfo<CommandType> | undefined;
1021
1019
  };
1022
- export declare type ConnectionOpen<ChannelType extends UnknownType = UnknownType, CommandType extends string = LiteralStringForUnion, UserType extends UnknownType = UnknownType> = {
1020
+ export declare type ConnectionOpen<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
1023
1021
  connection_id: string;
1024
1022
  cid?: string;
1025
1023
  created_at?: string;
@@ -1030,7 +1028,7 @@ export declare type CreatedAtUpdatedAt = {
1030
1028
  created_at: string;
1031
1029
  updated_at: string;
1032
1030
  };
1033
- export declare type Device<UserType = UnknownType> = DeviceFields & {
1031
+ export declare type Device<UserType = UR> = DeviceFields & {
1034
1032
  provider?: string;
1035
1033
  user?: UserResponse<UserType>;
1036
1034
  user_id?: string;
@@ -1077,11 +1075,12 @@ export declare type HuaweiConfig = {
1077
1075
  enabled?: boolean;
1078
1076
  };
1079
1077
  export declare type LiteralStringForUnion = string & {};
1080
- export declare type Logger = (logLevel: 'info' | 'error' | 'warn', message: string, extraData?: Record<string, unknown>) => void;
1081
- export declare type Message<AttachmentType = UnknownType, MessageType = UnknownType, UserType = UnknownType> = Partial<MessageBase<AttachmentType, MessageType, UserType>> & {
1078
+ export declare type LogLevel = 'info' | 'error' | 'warn';
1079
+ export declare type Logger = (logLevel: LogLevel, message: string, extraData?: Record<string, unknown>) => void;
1080
+ export declare type Message<AttachmentType = UR, MessageType = UR, UserType = UR> = Partial<MessageBase<AttachmentType, MessageType, UserType>> & {
1082
1081
  mentioned_users?: string[];
1083
1082
  };
1084
- export declare type MessageBase<AttachmentType = UnknownType, MessageType = UnknownType, UserType = UnknownType> = MessageType & {
1083
+ export declare type MessageBase<AttachmentType = UR, MessageType = UR, UserType = UR> = MessageType & {
1085
1084
  id: string;
1086
1085
  attachments?: Attachment<AttachmentType>[];
1087
1086
  html?: string;
@@ -1095,23 +1094,23 @@ export declare type MessageBase<AttachmentType = UnknownType, MessageType = Unkn
1095
1094
  user_id?: string;
1096
1095
  };
1097
1096
  export declare type MessageLabel = 'deleted' | 'ephemeral' | 'error' | 'regular' | 'reply' | 'system';
1098
- export declare type Mute<UserType = UnknownType> = {
1097
+ export declare type Mute<UserType = UR> = {
1099
1098
  created_at: string;
1100
1099
  target: UserResponse<UserType>;
1101
1100
  updated_at: string;
1102
1101
  user: UserResponse<UserType>;
1103
1102
  };
1104
- export declare type PartialUpdateChannel<ChannelType = UnknownType> = {
1103
+ export declare type PartialUpdateChannel<ChannelType = UR> = {
1105
1104
  set?: Partial<ChannelResponse<ChannelType>>;
1106
1105
  unset?: Array<keyof ChannelResponse<ChannelType>>;
1107
1106
  };
1108
- export declare type PartialUserUpdate<UserType = UnknownType> = {
1107
+ export declare type PartialUserUpdate<UserType = UR> = {
1109
1108
  id: string;
1110
1109
  set?: Partial<UserResponse<UserType>>;
1111
1110
  unset?: Array<keyof UserResponse<UserType>>;
1112
1111
  };
1113
- export declare type MessageUpdatableFields<MessageType = UnknownType> = Omit<MessageResponse<MessageType>, 'cid' | 'created_at' | 'updated_at' | 'deleted_at' | 'user' | 'user_id'>;
1114
- export declare type PartialMessageUpdate<MessageType = UnknownType> = {
1112
+ export declare type MessageUpdatableFields<MessageType = UR> = Omit<MessageResponse<MessageType>, 'cid' | 'created_at' | 'updated_at' | 'deleted_at' | 'user' | 'user_id'>;
1113
+ export declare type PartialMessageUpdate<MessageType = UR> = {
1115
1114
  set?: Partial<MessageUpdatableFields<MessageType>>;
1116
1115
  unset?: Array<keyof MessageUpdatableFields<MessageType>>;
1117
1116
  };
@@ -1149,7 +1148,7 @@ export declare type RateLimitsInfo = {
1149
1148
  reset: number;
1150
1149
  };
1151
1150
  export declare type RateLimitsMap = Record<EndpointName, RateLimitsInfo>;
1152
- export declare type Reaction<ReactionType = UnknownType, UserType = UnknownType> = ReactionType & {
1151
+ export declare type Reaction<ReactionType = UR, UserType = UR> = ReactionType & {
1153
1152
  type: string;
1154
1153
  message_id?: string;
1155
1154
  score?: number;
@@ -1157,7 +1156,7 @@ export declare type Reaction<ReactionType = UnknownType, UserType = UnknownType>
1157
1156
  user_id?: string;
1158
1157
  };
1159
1158
  export declare type Resource = 'AddLinks' | 'BanUser' | 'CreateChannel' | 'CreateMessage' | 'CreateReaction' | 'DeleteAttachment' | 'DeleteChannel' | 'DeleteMessage' | 'DeleteReaction' | 'EditUser' | 'MuteUser' | 'ReadChannel' | 'RunMessageAction' | 'UpdateChannel' | 'UpdateChannelMembers' | 'UpdateMessage' | 'UpdateUser' | 'UploadAttachment';
1160
- export declare type SearchPayload<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = Omit<SearchOptions<MessageType>, 'sort'> & {
1159
+ export declare type SearchPayload<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = Omit<SearchOptions<MessageType>, 'sort'> & {
1161
1160
  client_id?: string;
1162
1161
  connection_id?: string;
1163
1162
  filter_conditions?: ChannelFilters<ChannelType, CommandType, UserType>;
@@ -1185,10 +1184,11 @@ export declare type TokenOrProvider = null | string | TokenProvider | undefined;
1185
1184
  export declare type TokenProvider = () => Promise<string>;
1186
1185
  export declare type TranslationLanguages = '' | 'af' | 'am' | 'ar' | 'az' | 'bg' | 'bn' | 'bs' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'es-MX' | 'et' | 'fa' | 'fa-AF' | 'fi' | 'fr' | 'fr-CA' | 'ha' | 'he' | 'hi' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ka' | 'ko' | 'lv' | 'ms' | 'nl' | 'no' | 'pl' | 'ps' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'so' | 'sq' | 'sr' | 'sv' | 'sw' | 'ta' | 'th' | 'tl' | 'tr' | 'uk' | 'ur' | 'vi' | 'zh' | 'zh-TW';
1187
1186
  export declare type TypingStartEvent = Event;
1188
- export declare type UpdatedMessage<AttachmentType = UnknownType, ChannelType = UnknownType, CommandType extends string = LiteralStringForUnion, MessageType = UnknownType, ReactionType = UnknownType, UserType = UnknownType> = Omit<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>, 'mentioned_users'> & {
1187
+ export declare type ReservedMessageFields = 'command' | 'created_at' | 'html' | 'latest_reactions' | 'own_reactions' | 'quoted_message' | 'reaction_counts' | 'reply_count' | 'type' | 'updated_at' | 'user' | '__html';
1188
+ export declare type UpdatedMessage<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = Omit<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>, 'mentioned_users'> & {
1189
1189
  mentioned_users?: string[];
1190
1190
  };
1191
- export declare type User<UserType = UnknownType> = UserType & {
1191
+ export declare type User<UserType = UR> = UserType & {
1192
1192
  id: string;
1193
1193
  anon?: boolean;
1194
1194
  name?: string;
@@ -1259,6 +1259,12 @@ export declare type TaskStatus = {
1259
1259
  description: string;
1260
1260
  type: string;
1261
1261
  };
1262
- result?: UnknownType;
1262
+ result?: UR;
1263
+ };
1264
+ export declare type TruncateOptions<AttachmentType, MessageType, UserType> = {
1265
+ hard_delete?: boolean;
1266
+ message?: Message<AttachmentType, MessageType, UserType>;
1267
+ skip_push?: boolean;
1268
+ truncated_at?: Date;
1263
1269
  };
1264
1270
  //# sourceMappingURL=types.d.ts.map