stream-chat 5.3.0 → 6.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 (43) hide show
  1. package/README.md +21 -13
  2. package/dist/browser.es.js +290 -149
  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 +290 -149
  7. package/dist/browser.js.map +1 -1
  8. package/dist/index.es.js +290 -149
  9. package/dist/index.es.js.map +1 -1
  10. package/dist/index.js +290 -149
  11. package/dist/index.js.map +1 -1
  12. package/dist/types/channel.d.ts +127 -123
  13. package/dist/types/channel.d.ts.map +1 -1
  14. package/dist/types/channel_state.d.ts +41 -41
  15. package/dist/types/channel_state.d.ts.map +1 -1
  16. package/dist/types/client.d.ts +200 -170
  17. package/dist/types/client.d.ts.map +1 -1
  18. package/dist/types/client_state.d.ts +6 -6
  19. package/dist/types/client_state.d.ts.map +1 -1
  20. package/dist/types/connection.d.ts +10 -10
  21. package/dist/types/connection.d.ts.map +1 -1
  22. package/dist/types/connection_fallback.d.ts +7 -7
  23. package/dist/types/connection_fallback.d.ts.map +1 -1
  24. package/dist/types/events.d.ts +1 -0
  25. package/dist/types/events.d.ts.map +1 -1
  26. package/dist/types/insights.d.ts +2 -2
  27. package/dist/types/token_manager.d.ts +6 -6
  28. package/dist/types/token_manager.d.ts.map +1 -1
  29. package/dist/types/types.d.ts +370 -234
  30. package/dist/types/types.d.ts.map +1 -1
  31. package/dist/types/utils.d.ts +2 -2
  32. package/dist/types/utils.d.ts.map +1 -1
  33. package/package.json +4 -4
  34. package/src/channel.ts +195 -290
  35. package/src/channel_state.ts +54 -219
  36. package/src/client.ts +300 -521
  37. package/src/client_state.ts +6 -6
  38. package/src/connection.ts +10 -23
  39. package/src/connection_fallback.ts +9 -21
  40. package/src/events.ts +1 -0
  41. package/src/token_manager.ts +6 -6
  42. package/src/types.ts +482 -528
  43. package/src/utils.ts +7 -11
@@ -1,4 +1,5 @@
1
1
  import { AxiosRequestConfig } from 'axios';
2
+ import { EVENT_MAP } from './events';
2
3
  import { Role } from './permissions';
3
4
  /**
4
5
  * Utility Types
@@ -23,6 +24,24 @@ export declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T,
23
24
  }[Keys];
24
25
  export declare type UR = Record<string, unknown>;
25
26
  export declare type UnknownType = UR;
27
+ export declare type DefaultGenerics = {
28
+ attachmentType: UR;
29
+ channelType: UR;
30
+ commandType: LiteralStringForUnion;
31
+ eventType: UR;
32
+ messageType: UR;
33
+ reactionType: UR;
34
+ userType: UR;
35
+ };
36
+ export declare type ExtendableGenerics = {
37
+ attachmentType: UR;
38
+ channelType: UR;
39
+ commandType: string;
40
+ eventType: UR;
41
+ messageType: UR;
42
+ reactionType: UR;
43
+ userType: UR;
44
+ };
26
45
  export declare type Unpacked<T> = T extends (infer U)[] ? U : T extends (...args: any[]) => infer U ? U : T extends Promise<infer U> ? U : T;
27
46
  /**
28
47
  * Response Types
@@ -30,13 +49,13 @@ export declare type Unpacked<T> = T extends (infer U)[] ? U : T extends (...args
30
49
  export declare type APIResponse = {
31
50
  duration: string;
32
51
  };
33
- export declare type AppSettingsAPIResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
52
+ export declare type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
34
53
  app?: {
35
54
  channel_configs: Record<string, {
36
55
  automod?: ChannelConfigAutomod;
37
56
  automod_behavior?: ChannelConfigAutomodBehavior;
38
57
  blocklist_behavior?: ChannelConfigAutomodBehavior;
39
- commands?: CommandVariants<CommandType>[];
58
+ commands?: CommandVariants<StreamChatGenerics>[];
40
59
  connect_events?: boolean;
41
60
  created_at?: string;
42
61
  custom_events?: boolean;
@@ -102,43 +121,43 @@ export declare type ModerationResult = {
102
121
  blocklist_name?: string;
103
122
  moderated_by?: string;
104
123
  };
105
- export declare type MessageFlagsResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = APIResponse & {
124
+ export declare type MessageFlagsResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
106
125
  flags?: Array<{
107
- message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
108
- user: UserResponse<UserType>;
126
+ message: MessageResponse<StreamChatGenerics>;
127
+ user: UserResponse<StreamChatGenerics>;
109
128
  approved_at?: string;
110
129
  created_at?: string;
111
130
  created_by_automod?: boolean;
112
131
  moderation_result?: ModerationResult;
113
132
  rejected_at?: string;
114
133
  reviewed_at?: string;
115
- reviewed_by?: UserResponse<UserType>;
134
+ reviewed_by?: UserResponse<StreamChatGenerics>;
116
135
  updated_at?: string;
117
136
  }>;
118
137
  };
119
- export declare type FlagReport<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = {
138
+ export declare type FlagReport<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
120
139
  flags_count: number;
121
140
  id: string;
122
- message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
123
- user: UserResponse<UserType>;
141
+ message: MessageResponse<StreamChatGenerics>;
142
+ user: UserResponse<StreamChatGenerics>;
124
143
  created_at?: string;
125
- review_details?: Object;
144
+ details?: Object;
126
145
  review_result?: string;
127
146
  reviewed_at?: string;
128
- reviewed_by?: UserResponse<UserType>;
147
+ reviewed_by?: UserResponse<StreamChatGenerics>;
129
148
  updated_at?: string;
130
149
  };
131
- export declare type FlagReportsResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = APIResponse & {
132
- flag_reports: Array<FlagReport<ChannelType, CommandType, UserType, AttachmentType, MessageType, ReactionType>>;
150
+ export declare type FlagReportsResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
151
+ flag_reports: Array<FlagReport<StreamChatGenerics>>;
133
152
  };
134
- export declare type ReviewFlagReportResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = APIResponse & {
135
- flag_report: FlagReport<ChannelType, CommandType, UserType, AttachmentType, MessageType, ReactionType>;
153
+ export declare type ReviewFlagReportResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
154
+ flag_report: FlagReport<StreamChatGenerics>;
136
155
  };
137
- export declare type BannedUsersResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = APIResponse & {
156
+ export declare type BannedUsersResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
138
157
  bans?: Array<{
139
- user: UserResponse<UserType>;
140
- banned_by?: UserResponse<UserType>;
141
- channel?: ChannelResponse<ChannelType, CommandType, UserType>;
158
+ user: UserResponse<StreamChatGenerics>;
159
+ banned_by?: UserResponse<StreamChatGenerics>;
160
+ channel?: ChannelResponse<StreamChatGenerics>;
142
161
  expires?: string;
143
162
  ip_ban?: boolean;
144
163
  reason?: string;
@@ -149,7 +168,7 @@ export declare type BlockListResponse = BlockList & {
149
168
  created_at?: string;
150
169
  updated_at?: string;
151
170
  };
152
- export declare type ChannelResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = ChannelType & {
171
+ export declare type ChannelResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['channelType'] & {
153
172
  cid: string;
154
173
  disabled: boolean;
155
174
  frozen: boolean;
@@ -157,17 +176,17 @@ export declare type ChannelResponse<ChannelType = UR, CommandType extends string
157
176
  type: string;
158
177
  auto_translation_enabled?: boolean;
159
178
  auto_translation_language?: TranslationLanguages | '';
160
- config?: ChannelConfigWithInfo<CommandType>;
179
+ config?: ChannelConfigWithInfo<StreamChatGenerics>;
161
180
  cooldown?: number;
162
181
  created_at?: string;
163
- created_by?: UserResponse<UserType> | null;
182
+ created_by?: UserResponse<StreamChatGenerics> | null;
164
183
  created_by_id?: string;
165
184
  deleted_at?: string;
166
185
  hidden?: boolean;
167
186
  invites?: string[];
168
187
  last_message_at?: string;
169
188
  member_count?: number;
170
- members?: ChannelMemberResponse<UserType>[];
189
+ members?: ChannelMemberResponse<StreamChatGenerics>[];
171
190
  muted?: boolean;
172
191
  name?: string;
173
192
  own_capabilities?: string[];
@@ -175,25 +194,25 @@ export declare type ChannelResponse<ChannelType = UR, CommandType extends string
175
194
  truncated_at?: string;
176
195
  updated_at?: string;
177
196
  };
178
- export declare type ChannelAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
179
- channel: ChannelResponse<ChannelType, CommandType, UserType>;
180
- members: ChannelMemberResponse<UserType>[];
181
- messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
182
- pinned_messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
197
+ export declare type ChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
198
+ channel: ChannelResponse<StreamChatGenerics>;
199
+ members: ChannelMemberResponse<StreamChatGenerics>[];
200
+ messages: MessageResponse<StreamChatGenerics>[];
201
+ pinned_messages: MessageResponse<StreamChatGenerics>[];
183
202
  hidden?: boolean;
184
- membership?: ChannelMembership<UserType> | null;
185
- read?: ReadResponse<UserType>[];
203
+ membership?: ChannelMembership<StreamChatGenerics> | null;
204
+ read?: ReadResponse<StreamChatGenerics>[];
186
205
  watcher_count?: number;
187
- watchers?: UserResponse<UserType>[];
206
+ watchers?: UserResponse<StreamChatGenerics>[];
188
207
  };
189
208
  export declare type ChannelUpdateOptions = {
190
209
  hide_history?: boolean;
191
210
  skip_push?: boolean;
192
211
  };
193
- export declare type ChannelMemberAPIResponse<UserType = UR> = APIResponse & {
194
- members: ChannelMemberResponse<UserType>[];
212
+ export declare type ChannelMemberAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
213
+ members: ChannelMemberResponse<StreamChatGenerics>[];
195
214
  };
196
- export declare type ChannelMemberResponse<UserType = UR> = {
215
+ export declare type ChannelMemberResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
197
216
  banned?: boolean;
198
217
  channel_role?: Role;
199
218
  created_at?: string;
@@ -204,7 +223,7 @@ export declare type ChannelMemberResponse<UserType = UR> = {
204
223
  role?: string;
205
224
  shadow_banned?: boolean;
206
225
  updated_at?: string;
207
- user?: UserResponse<UserType>;
226
+ user?: UserResponse<StreamChatGenerics>;
208
227
  user_id?: string;
209
228
  };
210
229
  export declare type CheckPushResponse = APIResponse & {
@@ -225,29 +244,29 @@ export declare type CheckSQSResponse = APIResponse & {
225
244
  data?: {};
226
245
  error?: string;
227
246
  };
228
- export declare type CommandResponse<CommandType extends string = LiteralStringForUnion> = Partial<CreatedAtUpdatedAt> & {
247
+ export declare type CommandResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Partial<CreatedAtUpdatedAt> & {
229
248
  args?: string;
230
249
  description?: string;
231
- name?: CommandVariants<CommandType>;
232
- set?: CommandVariants<CommandType>;
250
+ name?: CommandVariants<StreamChatGenerics>;
251
+ set?: CommandVariants<StreamChatGenerics>;
233
252
  };
234
- export declare type ConnectAPIResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = Promise<void | ConnectionOpen<ChannelType, CommandType, UserType>>;
235
- export declare type CreateChannelResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & Omit<CreateChannelOptions<CommandType>, 'client_id' | 'connection_id'> & {
253
+ export declare type ConnectAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Promise<void | ConnectionOpen<StreamChatGenerics>>;
254
+ export declare type CreateChannelResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & Omit<CreateChannelOptions<StreamChatGenerics>, 'client_id' | 'connection_id'> & {
236
255
  created_at: string;
237
256
  updated_at: string;
238
257
  grants?: Record<string, string[]>;
239
258
  };
240
- export declare type CreateCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
241
- command: CreateCommandOptions<CommandType> & CreatedAtUpdatedAt;
259
+ export declare type CreateCommandResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
260
+ command: CreateCommandOptions<StreamChatGenerics> & CreatedAtUpdatedAt;
242
261
  };
243
- export declare type DeleteChannelAPIResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = APIResponse & {
244
- channel: ChannelResponse<ChannelType, CommandType, UserType>;
262
+ export declare type DeleteChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
263
+ channel: ChannelResponse<StreamChatGenerics>;
245
264
  };
246
- export declare type DeleteCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
247
- name?: CommandVariants<CommandType>;
265
+ export declare type DeleteCommandResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
266
+ name?: CommandVariants<StreamChatGenerics>;
248
267
  };
249
- 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 & {
250
- event: Event<AttachmentType, ChannelType, CommandType, EventType, MessageType, ReactionType, UserType>;
268
+ export declare type EventAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
269
+ event: Event<StreamChatGenerics>;
251
270
  };
252
271
  export declare type ExportChannelResponse = {
253
272
  task_id: string;
@@ -261,13 +280,13 @@ export declare type ExportChannelStatusResponse = {
261
280
  result?: {};
262
281
  updated_at?: string;
263
282
  };
264
- export declare type FlagMessageResponse<UserType = UR> = APIResponse & {
283
+ export declare type FlagMessageResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
265
284
  flag: {
266
285
  created_at: string;
267
286
  created_by_automod: boolean;
268
287
  target_message_id: string;
269
288
  updated_at: string;
270
- user: UserResponse<UserType>;
289
+ user: UserResponse<StreamChatGenerics>;
271
290
  approved_at?: string;
272
291
  channel_cid?: string;
273
292
  details?: Object;
@@ -277,13 +296,13 @@ export declare type FlagMessageResponse<UserType = UR> = APIResponse & {
277
296
  reviewed_by?: string;
278
297
  };
279
298
  };
280
- export declare type FlagUserResponse<UserType = UR> = APIResponse & {
299
+ export declare type FlagUserResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
281
300
  flag: {
282
301
  created_at: string;
283
302
  created_by_automod: boolean;
284
- target_user: UserResponse<UserType>;
303
+ target_user: UserResponse<StreamChatGenerics>;
285
304
  updated_at: string;
286
- user: UserResponse<UserType>;
305
+ user: UserResponse<StreamChatGenerics>;
287
306
  approved_at?: string;
288
307
  details?: Object;
289
308
  rejected_at?: string;
@@ -291,21 +310,29 @@ export declare type FlagUserResponse<UserType = UR> = APIResponse & {
291
310
  reviewed_by?: string;
292
311
  };
293
312
  };
294
- 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 & {
313
+ export declare type FormatMessageResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Omit<MessageResponse<{
314
+ attachmentType: StreamChatGenerics['attachmentType'];
315
+ channelType: StreamChatGenerics['channelType'];
316
+ commandType: StreamChatGenerics['commandType'];
317
+ eventType: StreamChatGenerics['eventType'];
318
+ messageType: {};
319
+ reactionType: StreamChatGenerics['reactionType'];
320
+ userType: StreamChatGenerics['userType'];
321
+ }>, 'created_at' | 'pinned_at' | 'updated_at' | 'status'> & StreamChatGenerics['messageType'] & {
295
322
  created_at: Date;
296
323
  pinned_at: Date | null;
297
324
  status: string;
298
325
  updated_at: Date;
299
326
  };
300
- export declare type GetChannelTypeResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & Omit<CreateChannelOptions<CommandType>, 'client_id' | 'connection_id' | 'commands'> & {
327
+ export declare type GetChannelTypeResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & Omit<CreateChannelOptions<StreamChatGenerics>, 'client_id' | 'connection_id' | 'commands'> & {
301
328
  created_at: string;
302
329
  updated_at: string;
303
- commands?: CommandResponse<CommandType>[];
330
+ commands?: CommandResponse<StreamChatGenerics>[];
304
331
  grants?: Record<string, string[]>;
305
332
  };
306
- export declare type GetCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & CreateCommandOptions<CommandType> & CreatedAtUpdatedAt;
307
- export declare type GetMultipleMessagesAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
308
- messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
333
+ export declare type GetCommandResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & CreateCommandOptions<StreamChatGenerics> & CreatedAtUpdatedAt;
334
+ export declare type GetMultipleMessagesAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
335
+ messages: MessageResponse<StreamChatGenerics>[];
309
336
  };
310
337
  export declare type GetRateLimitsResponse = APIResponse & {
311
338
  android?: RateLimitsMap;
@@ -313,36 +340,36 @@ export declare type GetRateLimitsResponse = APIResponse & {
313
340
  server_side?: RateLimitsMap;
314
341
  web?: RateLimitsMap;
315
342
  };
316
- export declare type GetReactionsAPIResponse<ReactionType = UR, UserType = UR> = APIResponse & {
317
- reactions: ReactionResponse<ReactionType, UserType>[];
343
+ export declare type GetReactionsAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
344
+ reactions: ReactionResponse<StreamChatGenerics>[];
318
345
  };
319
- export declare type GetRepliesAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
320
- messages: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>[];
346
+ export declare type GetRepliesAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
347
+ messages: MessageResponse<StreamChatGenerics>[];
321
348
  };
322
- export declare type ListChannelResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
323
- channel_types: Record<string, Omit<CreateChannelOptions<CommandType>, 'client_id' | 'connection_id' | 'commands'> & {
324
- commands: CommandResponse<CommandType>[];
349
+ export declare type ListChannelResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
350
+ channel_types: Record<string, Omit<CreateChannelOptions<StreamChatGenerics>, 'client_id' | 'connection_id' | 'commands'> & {
351
+ commands: CommandResponse<StreamChatGenerics>[];
325
352
  created_at: string;
326
353
  updated_at: string;
327
354
  grants?: Record<string, string[]>;
328
355
  }>;
329
356
  };
330
- export declare type ListChannelTypesAPIResponse<CommandType extends string = LiteralStringForUnion> = ListChannelResponse<CommandType>;
331
- export declare type ListCommandsResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
332
- commands: Array<CreateCommandOptions<CommandType> & Partial<CreatedAtUpdatedAt>>;
357
+ export declare type ListChannelTypesAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = ListChannelResponse<StreamChatGenerics>;
358
+ export declare type ListCommandsResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
359
+ commands: Array<CreateCommandOptions<StreamChatGenerics> & Partial<CreatedAtUpdatedAt>>;
333
360
  };
334
- export declare type MuteChannelAPIResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = APIResponse & {
335
- channel_mute: ChannelMute<ChannelType, CommandType, UserType>;
336
- own_user: OwnUserResponse<ChannelType, CommandType, UserType>;
337
- channel_mutes?: ChannelMute<ChannelType, CommandType, UserType>[];
338
- mute?: MuteResponse<UserType>;
361
+ export declare type MuteChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
362
+ channel_mute: ChannelMute<StreamChatGenerics>;
363
+ own_user: OwnUserResponse<StreamChatGenerics>;
364
+ channel_mutes?: ChannelMute<StreamChatGenerics>[];
365
+ mute?: MuteResponse<StreamChatGenerics>;
339
366
  };
340
- 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> & {
341
- quoted_message?: MessageResponseBase<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
367
+ export declare type MessageResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = MessageResponseBase<StreamChatGenerics> & {
368
+ quoted_message?: MessageResponseBase<StreamChatGenerics>;
342
369
  };
343
- export declare type MessageResponseBase<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = MessageBase<AttachmentType, MessageType, UserType> & {
370
+ export declare type MessageResponseBase<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = MessageBase<StreamChatGenerics> & {
344
371
  args?: string;
345
- channel?: ChannelResponse<ChannelType, CommandType, UserType>;
372
+ channel?: ChannelResponse<StreamChatGenerics>;
346
373
  cid?: string;
347
374
  command?: string;
348
375
  command_info?: {
@@ -353,12 +380,12 @@ export declare type MessageResponseBase<AttachmentType = UR, ChannelType = UR, C
353
380
  i18n?: RequireAtLeastOne<Record<`${TranslationLanguages}_text`, string>> & {
354
381
  language: TranslationLanguages;
355
382
  };
356
- latest_reactions?: ReactionResponse<ReactionType, UserType>[];
357
- mentioned_users?: UserResponse<UserType>[];
358
- own_reactions?: ReactionResponse<ReactionType, UserType>[] | null;
383
+ latest_reactions?: ReactionResponse<StreamChatGenerics>[];
384
+ mentioned_users?: UserResponse<StreamChatGenerics>[];
385
+ own_reactions?: ReactionResponse<StreamChatGenerics>[] | null;
359
386
  pin_expires?: string | null;
360
387
  pinned_at?: string | null;
361
- pinned_by?: UserResponse<UserType> | null;
388
+ pinned_by?: UserResponse<StreamChatGenerics> | null;
362
389
  reaction_counts?: {
363
390
  [key: string]: number;
364
391
  } | null;
@@ -369,36 +396,36 @@ export declare type MessageResponseBase<AttachmentType = UR, ChannelType = UR, C
369
396
  shadowed?: boolean;
370
397
  silent?: boolean;
371
398
  status?: string;
372
- thread_participants?: UserResponse<UserType>[];
399
+ thread_participants?: UserResponse<StreamChatGenerics>[];
373
400
  type?: MessageLabel;
374
401
  updated_at?: string;
375
402
  };
376
- export declare type MuteResponse<UserType = UR> = {
377
- user: UserResponse<UserType>;
403
+ export declare type MuteResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
404
+ user: UserResponse<StreamChatGenerics>;
378
405
  created_at?: string;
379
406
  expires?: string;
380
- target?: UserResponse<UserType>;
407
+ target?: UserResponse<StreamChatGenerics>;
381
408
  updated_at?: string;
382
409
  };
383
- export declare type MuteUserResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = APIResponse & {
384
- mute?: MuteResponse<UserType>;
385
- mutes?: Array<Mute<UserType>>;
386
- own_user?: OwnUserResponse<ChannelType, CommandType, UserType>;
410
+ export declare type MuteUserResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
411
+ mute?: MuteResponse<StreamChatGenerics>;
412
+ mutes?: Array<Mute<StreamChatGenerics>>;
413
+ own_user?: OwnUserResponse<StreamChatGenerics>;
387
414
  };
388
- export declare type OwnUserBase<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
389
- channel_mutes: ChannelMute<ChannelType, CommandType, UserType>[];
390
- devices: Device<UserType>[];
391
- mutes: Mute<UserType>[];
415
+ export declare type OwnUserBase<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
416
+ channel_mutes: ChannelMute<StreamChatGenerics>[];
417
+ devices: Device<StreamChatGenerics>[];
418
+ mutes: Mute<StreamChatGenerics>[];
392
419
  total_unread_count: number;
393
420
  unread_channels: number;
394
421
  unread_count: number;
395
422
  invisible?: boolean;
396
423
  roles?: string[];
397
424
  };
398
- export declare type OwnUserResponse<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = UserResponse<UserType> & OwnUserBase<ChannelType, CommandType, UserType>;
399
- export declare type PartialUpdateChannelAPIResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = APIResponse & {
400
- channel: ChannelResponse<ChannelType, CommandType, UserType>;
401
- members: ChannelMemberResponse<UserType>[];
425
+ export declare type OwnUserResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = UserResponse<StreamChatGenerics> & OwnUserBase<StreamChatGenerics>;
426
+ export declare type PartialUpdateChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
427
+ channel: ChannelResponse<StreamChatGenerics>;
428
+ members: ChannelMemberResponse<StreamChatGenerics>[];
402
429
  };
403
430
  export declare type PermissionAPIResponse = APIResponse & {
404
431
  permission?: PermissionAPIObject;
@@ -406,22 +433,22 @@ export declare type PermissionAPIResponse = APIResponse & {
406
433
  export declare type PermissionsAPIResponse = APIResponse & {
407
434
  permissions?: PermissionAPIObject[];
408
435
  };
409
- export declare type ReactionAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
410
- message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
411
- reaction: ReactionResponse<ReactionType, UserType>;
436
+ export declare type ReactionAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
437
+ message: MessageResponse<StreamChatGenerics>;
438
+ reaction: ReactionResponse<StreamChatGenerics>;
412
439
  };
413
- export declare type ReactionResponse<ReactionType = UR, UserType = UR> = Reaction<ReactionType, UserType> & {
440
+ export declare type ReactionResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Reaction<StreamChatGenerics> & {
414
441
  created_at: string;
415
442
  updated_at: string;
416
443
  };
417
- export declare type ReadResponse<UserType = UR> = {
444
+ export declare type ReadResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
418
445
  last_read: string;
419
- user: UserResponse<UserType>;
446
+ user: UserResponse<StreamChatGenerics>;
420
447
  unread_messages?: number;
421
448
  };
422
- export declare type SearchAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
449
+ export declare type SearchAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
423
450
  results: {
424
- message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
451
+ message: MessageResponse<StreamChatGenerics>;
425
452
  }[];
426
453
  next?: string;
427
454
  previous?: string;
@@ -436,39 +463,39 @@ export declare type SearchWarning = {
436
463
  export declare type SendFileAPIResponse = APIResponse & {
437
464
  file: string;
438
465
  };
439
- export declare type SendMessageAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
440
- message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
466
+ export declare type SendMessageAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
467
+ message: MessageResponse<StreamChatGenerics>;
441
468
  };
442
- export declare type TruncateChannelAPIResponse<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR, AttachmentType = UR, MessageType = UR, ReactionType = UR> = APIResponse & {
443
- channel: ChannelResponse<ChannelType, CommandType, UserType>;
444
- message?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
469
+ export declare type TruncateChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
470
+ channel: ChannelResponse<StreamChatGenerics>;
471
+ message?: MessageResponse<StreamChatGenerics>;
445
472
  };
446
- export declare type UpdateChannelAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
447
- channel: ChannelResponse<ChannelType, CommandType, UserType>;
448
- members: ChannelMemberResponse<UserType>[];
449
- message?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
473
+ export declare type UpdateChannelAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
474
+ channel: ChannelResponse<StreamChatGenerics>;
475
+ members: ChannelMemberResponse<StreamChatGenerics>[];
476
+ message?: MessageResponse<StreamChatGenerics>;
450
477
  };
451
- export declare type UpdateChannelResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & Omit<CreateChannelOptions<CommandType>, 'client_id' | 'connection_id'> & {
478
+ export declare type UpdateChannelResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & Omit<CreateChannelOptions<StreamChatGenerics>, 'client_id' | 'connection_id'> & {
452
479
  created_at: string;
453
480
  updated_at: string;
454
481
  };
455
- export declare type UpdateCommandResponse<CommandType extends string = LiteralStringForUnion> = APIResponse & {
456
- command: UpdateCommandOptions<CommandType> & CreatedAtUpdatedAt & {
457
- name: CommandVariants<CommandType>;
482
+ export declare type UpdateCommandResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
483
+ command: UpdateCommandOptions<StreamChatGenerics> & CreatedAtUpdatedAt & {
484
+ name: CommandVariants<StreamChatGenerics>;
458
485
  };
459
486
  };
460
- export declare type UpdateMessageAPIResponse<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = APIResponse & {
461
- message: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
487
+ export declare type UpdateMessageAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
488
+ message: MessageResponse<StreamChatGenerics>;
462
489
  };
463
- export declare type UsersAPIResponse<UserType = UR> = APIResponse & {
464
- users: Array<UserResponse<UserType>>;
490
+ export declare type UsersAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
491
+ users: Array<UserResponse<StreamChatGenerics>>;
465
492
  };
466
- export declare type UpdateUsersAPIResponse<UserType = UR> = APIResponse & {
493
+ export declare type UpdateUsersAPIResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = APIResponse & {
467
494
  users: {
468
- [key: string]: UserResponse<UserType>;
495
+ [key: string]: UserResponse<StreamChatGenerics>;
469
496
  };
470
497
  };
471
- export declare type UserResponse<UserType = UR> = User<UserType> & {
498
+ export declare type UserResponse<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = User<StreamChatGenerics> & {
472
499
  banned?: boolean;
473
500
  created_at?: string;
474
501
  deactivated_at?: string;
@@ -501,8 +528,8 @@ export declare type ReviewFlagReportOptions = {
501
528
  user_id?: string;
502
529
  };
503
530
  export declare type BannedUsersPaginationOptions = Omit<PaginationOptions, 'id_gt' | 'id_gte' | 'id_lt' | 'id_lte'>;
504
- export declare type BanUserOptions<UserType = UR> = UnBanUserOptions & {
505
- banned_by?: UserResponse<UserType>;
531
+ export declare type BanUserOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = UnBanUserOptions & {
532
+ banned_by?: UserResponse<StreamChatGenerics>;
506
533
  banned_by_id?: string;
507
534
  ip_ban?: boolean;
508
535
  reason?: string;
@@ -518,10 +545,10 @@ export declare type ChannelOptions = {
518
545
  user_id?: string;
519
546
  watch?: boolean;
520
547
  };
521
- export declare type ChannelQueryOptions<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = {
548
+ export declare type ChannelQueryOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
522
549
  client_id?: string;
523
550
  connection_id?: string;
524
- data?: ChannelResponse<ChannelType, CommandType, UserType>;
551
+ data?: ChannelResponse<StreamChatGenerics>;
525
552
  members?: PaginationOptions;
526
553
  messages?: MessagePaginationOptions;
527
554
  presence?: boolean;
@@ -532,14 +559,14 @@ export declare type ChannelQueryOptions<ChannelType = UR, CommandType extends st
532
559
  export declare type ChannelStateOptions = {
533
560
  skipInitialization?: string[];
534
561
  };
535
- export declare type CreateChannelOptions<CommandType extends string = LiteralStringForUnion> = {
562
+ export declare type CreateChannelOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
536
563
  automod?: ChannelConfigAutomod;
537
564
  automod_behavior?: ChannelConfigAutomodBehavior;
538
565
  automod_thresholds?: ChannelConfigAutomodThresholds;
539
566
  blocklist?: string;
540
567
  blocklist_behavior?: ChannelConfigAutomodBehavior;
541
568
  client_id?: string;
542
- commands?: CommandVariants<CommandType>[];
569
+ commands?: CommandVariants<StreamChatGenerics>[];
543
570
  connect_events?: boolean;
544
571
  connection_id?: string;
545
572
  custom_events?: boolean;
@@ -559,11 +586,11 @@ export declare type CreateChannelOptions<CommandType extends string = LiteralStr
559
586
  uploads?: boolean;
560
587
  url_enrichment?: boolean;
561
588
  };
562
- export declare type CreateCommandOptions<CommandType extends string = LiteralStringForUnion> = {
589
+ export declare type CreateCommandOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
563
590
  description: string;
564
- name: CommandVariants<CommandType>;
591
+ name: CommandVariants<StreamChatGenerics>;
565
592
  args?: string;
566
- set?: CommandVariants<CommandType>;
593
+ set?: CommandVariants<StreamChatGenerics>;
567
594
  };
568
595
  export declare type CustomPermissionOptions = {
569
596
  action: string;
@@ -574,38 +601,38 @@ export declare type CustomPermissionOptions = {
574
601
  owner?: boolean;
575
602
  same_team?: boolean;
576
603
  };
577
- export declare type InviteOptions<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = {
604
+ export declare type InviteOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
578
605
  accept_invite?: boolean;
579
606
  add_members?: string[];
580
607
  add_moderators?: string[];
581
608
  client_id?: string;
582
609
  connection_id?: string;
583
- data?: Omit<ChannelResponse<ChannelType, CommandType, UserType>, 'id' | 'cid'>;
610
+ data?: Omit<ChannelResponse<StreamChatGenerics>, 'id' | 'cid'>;
584
611
  demote_moderators?: string[];
585
612
  invites?: string[];
586
- message?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
613
+ message?: MessageResponse<StreamChatGenerics>;
587
614
  reject_invite?: boolean;
588
615
  remove_members?: string[];
589
- user?: UserResponse<UserType>;
616
+ user?: UserResponse<StreamChatGenerics>;
590
617
  user_id?: string;
591
618
  };
592
619
  /** @deprecated use MarkChannelsReadOptions instead */
593
- export declare type MarkAllReadOptions<UserType = UR> = MarkChannelsReadOptions<UserType>;
594
- export declare type MarkChannelsReadOptions<UserType = UR> = {
620
+ export declare type MarkAllReadOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = MarkChannelsReadOptions<StreamChatGenerics>;
621
+ export declare type MarkChannelsReadOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
595
622
  client_id?: string;
596
623
  connection_id?: string;
597
624
  read_by_channel?: Record<string, string>;
598
- user?: UserResponse<UserType>;
625
+ user?: UserResponse<StreamChatGenerics>;
599
626
  user_id?: string;
600
627
  };
601
- export declare type MarkReadOptions<UserType = UR> = {
628
+ export declare type MarkReadOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
602
629
  client_id?: string;
603
630
  connection_id?: string;
604
631
  message_id?: string;
605
- user?: UserResponse<UserType>;
632
+ user?: UserResponse<StreamChatGenerics>;
606
633
  user_id?: string;
607
634
  };
608
- export declare type MuteUserOptions<UserType = UR> = {
635
+ export declare type MuteUserOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
609
636
  client_id?: string;
610
637
  connection_id?: string;
611
638
  id?: string;
@@ -613,7 +640,7 @@ export declare type MuteUserOptions<UserType = UR> = {
613
640
  target_user_id?: string;
614
641
  timeout?: number;
615
642
  type?: string;
616
- user?: UserResponse<UserType>;
643
+ user?: UserResponse<StreamChatGenerics>;
617
644
  user_id?: string;
618
645
  };
619
646
  export declare type PaginationOptions = {
@@ -654,11 +681,11 @@ export declare type QueryMembersOptions = {
654
681
  user_id_lt?: string;
655
682
  user_id_lte?: string;
656
683
  };
657
- export declare type SearchOptions<MessageType = UR> = {
684
+ export declare type SearchOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
658
685
  limit?: number;
659
686
  next?: string;
660
687
  offset?: number;
661
- sort?: SearchMessageSort<MessageType>;
688
+ sort?: SearchMessageSort<StreamChatGenerics>;
662
689
  };
663
690
  export declare type StreamChatOptions = AxiosRequestConfig & {
664
691
  /**
@@ -696,14 +723,14 @@ export declare type UnBanUserOptions = {
696
723
  target_user_id?: string;
697
724
  type?: string;
698
725
  };
699
- export declare type UpdateChannelOptions<CommandType extends string = LiteralStringForUnion> = Omit<CreateChannelOptions<CommandType>, 'name'> & {
726
+ export declare type UpdateChannelOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Omit<CreateChannelOptions<StreamChatGenerics>, 'name'> & {
700
727
  created_at?: string;
701
728
  updated_at?: string;
702
729
  };
703
- export declare type UpdateCommandOptions<CommandType extends string = LiteralStringForUnion> = {
730
+ export declare type UpdateCommandOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
704
731
  description: string;
705
732
  args?: string;
706
- set?: CommandVariants<CommandType>;
733
+ set?: CommandVariants<StreamChatGenerics>;
707
734
  };
708
735
  export declare type UserOptions = {
709
736
  limit?: number;
@@ -717,9 +744,9 @@ export declare type ConnectionChangeEvent = {
717
744
  type: EventTypes;
718
745
  online?: boolean;
719
746
  };
720
- 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 & {
747
+ export declare type Event<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['eventType'] & {
721
748
  type: EventTypes;
722
- channel?: ChannelResponse<ChannelType, CommandType, UserType>;
749
+ channel?: ChannelResponse<StreamChatGenerics>;
723
750
  channel_id?: string;
724
751
  channel_type?: string;
725
752
  cid?: string;
@@ -728,26 +755,26 @@ export declare type Event<AttachmentType extends UR = UR, ChannelType extends UR
728
755
  created_at?: string;
729
756
  hard_delete?: boolean;
730
757
  mark_messages_deleted?: boolean;
731
- me?: OwnUserResponse<ChannelType, CommandType, UserType>;
732
- member?: ChannelMemberResponse<UserType>;
733
- message?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
758
+ me?: OwnUserResponse<StreamChatGenerics>;
759
+ member?: ChannelMemberResponse<StreamChatGenerics>;
760
+ message?: MessageResponse<StreamChatGenerics>;
734
761
  online?: boolean;
735
762
  parent_id?: string;
736
- reaction?: ReactionResponse<ReactionType, UserType>;
763
+ reaction?: ReactionResponse<StreamChatGenerics>;
737
764
  received_at?: string | Date;
738
765
  team?: string;
739
766
  total_unread_count?: number;
740
767
  unread_channels?: number;
741
768
  unread_count?: number;
742
- user?: UserResponse<UserType>;
769
+ user?: UserResponse<StreamChatGenerics>;
743
770
  user_id?: string;
744
771
  watcher_count?: number;
745
772
  };
746
- export declare type UserCustomEvent<EventType extends UR = UR> = EventType & {
773
+ export declare type UserCustomEvent<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['eventType'] & {
747
774
  type: string;
748
775
  };
749
- 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;
750
- export declare type EventTypes = 'all' | 'channel.created' | 'channel.deleted' | 'channel.hidden' | 'channel.muted' | 'channel.truncated' | 'channel.unmuted' | 'channel.updated' | 'channel.visible' | 'transport.changed' | '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';
776
+ export declare type EventHandler<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = (event: Event<StreamChatGenerics>) => void;
777
+ export declare type EventTypes = 'all' | keyof typeof EVENT_MAP;
751
778
  /**
752
779
  * Filter Types
753
780
  */
@@ -768,11 +795,13 @@ export declare type MessageFlagsFilters = QueryFilters<{
768
795
  [Key in keyof Omit<MessageFlagsFiltersOptions, 'channel_cid' | 'user_id' | 'is_reviewed'>]: RequireOnlyOne<QueryFilter<MessageFlagsFiltersOptions[Key]>> | PrimitiveFilter<MessageFlagsFiltersOptions[Key]>;
769
796
  }>;
770
797
  export declare type FlagReportsFiltersOptions = {
798
+ channel_cid?: string;
771
799
  is_reviewed?: boolean;
772
800
  message_id?: string;
773
801
  report_id?: string;
774
802
  review_result?: string;
775
803
  reviewed_by?: string;
804
+ team?: string;
776
805
  user_id?: string;
777
806
  };
778
807
  export declare type FlagReportsFilters = QueryFilters<{
@@ -785,6 +814,10 @@ export declare type FlagReportsFilters = QueryFilters<{
785
814
  user_id?: RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['user_id']>, '$eq' | '$in'>> | PrimitiveFilter<FlagReportsFiltersOptions['user_id']>;
786
815
  } & {
787
816
  message_id?: RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['message_id']>, '$eq' | '$in'>> | PrimitiveFilter<FlagReportsFiltersOptions['message_id']>;
817
+ } & {
818
+ channel_cid?: RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['channel_cid']>, '$eq' | '$in'>> | PrimitiveFilter<FlagReportsFiltersOptions['channel_cid']>;
819
+ } & {
820
+ team?: RequireOnlyOne<Pick<QueryFilter<FlagReportsFiltersOptions['team']>, '$eq' | '$in'>> | PrimitiveFilter<FlagReportsFiltersOptions['team']>;
788
821
  } & {
789
822
  [Key in keyof Omit<FlagReportsFiltersOptions, 'report_id' | 'user_id' | 'message_id' | 'review_result' | 'reviewed_by'>]: RequireOnlyOne<QueryFilter<FlagReportsFiltersOptions[Key]>> | PrimitiveFilter<FlagReportsFiltersOptions[Key]>;
790
823
  }>;
@@ -804,27 +837,75 @@ export declare type BannedUsersFilters = QueryFilters<{
804
837
  } & {
805
838
  [Key in keyof Omit<BannedUsersFilterOptions, 'channel_cid' | 'reason'>]: RequireOnlyOne<QueryFilter<BannedUsersFilterOptions[Key]>> | PrimitiveFilter<BannedUsersFilterOptions[Key]>;
806
839
  }>;
807
- export declare type ChannelFilters<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = QueryFilters<ContainsOperator<ChannelType> & {
840
+ export declare type ChannelFilters<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = QueryFilters<ContainsOperator<StreamChatGenerics['channelType']> & {
808
841
  members?: RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$nin'>> | RequireOnlyOne<Pick<QueryFilter<string[]>, '$eq'>> | PrimitiveFilter<string[]>;
809
842
  } & {
810
843
  name?: RequireOnlyOne<{
811
- $autocomplete?: ChannelResponse<ChannelType, CommandType, UserType>['name'];
812
- } & QueryFilter<ChannelResponse<ChannelType, CommandType, UserType>['name']>> | PrimitiveFilter<ChannelResponse<ChannelType, CommandType, UserType>['name']>;
844
+ $autocomplete?: ChannelResponse<StreamChatGenerics>['name'];
845
+ } & QueryFilter<ChannelResponse<StreamChatGenerics>['name']>> | PrimitiveFilter<ChannelResponse<StreamChatGenerics>['name']>;
813
846
  } & {
814
- [Key in keyof Omit<ChannelResponse<{}, CommandType, UserType>, 'name' | 'members'>]: RequireOnlyOne<QueryFilter<ChannelResponse<{}, CommandType, UserType>[Key]>> | PrimitiveFilter<ChannelResponse<{}, CommandType, UserType>[Key]>;
847
+ [Key in keyof Omit<ChannelResponse<{
848
+ attachmentType: StreamChatGenerics['attachmentType'];
849
+ channelType: {};
850
+ commandType: StreamChatGenerics['commandType'];
851
+ eventType: StreamChatGenerics['eventType'];
852
+ messageType: StreamChatGenerics['messageType'];
853
+ reactionType: StreamChatGenerics['reactionType'];
854
+ userType: StreamChatGenerics['userType'];
855
+ }>, 'name' | 'members'>]: RequireOnlyOne<QueryFilter<ChannelResponse<{
856
+ attachmentType: StreamChatGenerics['attachmentType'];
857
+ channelType: {};
858
+ commandType: StreamChatGenerics['commandType'];
859
+ eventType: StreamChatGenerics['eventType'];
860
+ messageType: StreamChatGenerics['messageType'];
861
+ reactionType: StreamChatGenerics['reactionType'];
862
+ userType: StreamChatGenerics['userType'];
863
+ }>[Key]>> | PrimitiveFilter<ChannelResponse<{
864
+ attachmentType: StreamChatGenerics['attachmentType'];
865
+ channelType: {};
866
+ commandType: StreamChatGenerics['commandType'];
867
+ eventType: StreamChatGenerics['eventType'];
868
+ messageType: StreamChatGenerics['messageType'];
869
+ reactionType: StreamChatGenerics['reactionType'];
870
+ userType: StreamChatGenerics['userType'];
871
+ }>[Key]>;
815
872
  }>;
816
873
  export declare type ContainsOperator<CustomType = {}> = {
817
874
  [Key in keyof CustomType]?: CustomType[Key] extends (infer ContainType)[] ? RequireOnlyOne<{
818
875
  $contains?: ContainType extends object ? PrimitiveFilter<RequireAtLeastOne<ContainType>> : PrimitiveFilter<ContainType>;
819
876
  } & QueryFilter<PrimitiveFilter<ContainType>[]>> | PrimitiveFilter<PrimitiveFilter<ContainType>[]> : RequireOnlyOne<QueryFilter<CustomType[Key]>> | PrimitiveFilter<CustomType[Key]>;
820
877
  };
821
- export declare type MessageFilters<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = QueryFilters<ContainsOperator<MessageType> & {
878
+ export declare type MessageFilters<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = QueryFilters<ContainsOperator<StreamChatGenerics['messageType']> & {
822
879
  text?: RequireOnlyOne<{
823
- $autocomplete?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text'];
824
- $q?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text'];
825
- } & QueryFilter<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text']>> | PrimitiveFilter<MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text']>;
880
+ $autocomplete?: MessageResponse<StreamChatGenerics>['text'];
881
+ $q?: MessageResponse<StreamChatGenerics>['text'];
882
+ } & QueryFilter<MessageResponse<StreamChatGenerics>['text']>> | PrimitiveFilter<MessageResponse<StreamChatGenerics>['text']>;
826
883
  } & {
827
- [Key in keyof Omit<MessageResponse<AttachmentType, ChannelType, CommandType, {}, ReactionType, UserType>, 'text'>]?: RequireOnlyOne<QueryFilter<MessageResponse<AttachmentType, ChannelType, CommandType, {}, ReactionType, UserType>[Key]>> | PrimitiveFilter<MessageResponse<AttachmentType, ChannelType, CommandType, {}, ReactionType, UserType>[Key]>;
884
+ [Key in keyof Omit<MessageResponse<{
885
+ attachmentType: StreamChatGenerics['attachmentType'];
886
+ channelType: StreamChatGenerics['channelType'];
887
+ commandType: StreamChatGenerics['commandType'];
888
+ eventType: StreamChatGenerics['eventType'];
889
+ messageType: {};
890
+ reactionType: StreamChatGenerics['reactionType'];
891
+ userType: StreamChatGenerics['userType'];
892
+ }>, 'text'>]?: RequireOnlyOne<QueryFilter<MessageResponse<{
893
+ attachmentType: StreamChatGenerics['attachmentType'];
894
+ channelType: StreamChatGenerics['channelType'];
895
+ commandType: StreamChatGenerics['commandType'];
896
+ eventType: StreamChatGenerics['eventType'];
897
+ messageType: {};
898
+ reactionType: StreamChatGenerics['reactionType'];
899
+ userType: StreamChatGenerics['userType'];
900
+ }>[Key]>> | PrimitiveFilter<MessageResponse<{
901
+ attachmentType: StreamChatGenerics['attachmentType'];
902
+ channelType: StreamChatGenerics['channelType'];
903
+ commandType: StreamChatGenerics['commandType'];
904
+ eventType: StreamChatGenerics['eventType'];
905
+ messageType: {};
906
+ reactionType: StreamChatGenerics['reactionType'];
907
+ userType: StreamChatGenerics['userType'];
908
+ }>[Key]>;
828
909
  }>;
829
910
  export declare type PrimitiveFilter<ObjectType> = ObjectType | null;
830
911
  export declare type QueryFilter<ObjectType = string> = NonNullable<ObjectType> extends string | number | boolean ? {
@@ -852,22 +933,46 @@ export declare type QueryLogicalOperators<Operators> = {
852
933
  $nor?: ArrayOneOrMore<QueryFilters<Operators>>;
853
934
  $or?: ArrayTwoOrMore<QueryFilters<Operators>>;
854
935
  };
855
- export declare type UserFilters<UserType = UR> = QueryFilters<ContainsOperator<UserType> & {
936
+ export declare type UserFilters<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = QueryFilters<ContainsOperator<StreamChatGenerics['userType']> & {
856
937
  id?: RequireOnlyOne<{
857
- $autocomplete?: UserResponse<UserType>['id'];
858
- } & QueryFilter<UserResponse<UserType>['id']>> | PrimitiveFilter<UserResponse<UserType>['id']>;
938
+ $autocomplete?: UserResponse<StreamChatGenerics>['id'];
939
+ } & QueryFilter<UserResponse<StreamChatGenerics>['id']>> | PrimitiveFilter<UserResponse<StreamChatGenerics>['id']>;
859
940
  name?: RequireOnlyOne<{
860
- $autocomplete?: UserResponse<UserType>['name'];
861
- } & QueryFilter<UserResponse<UserType>['name']>> | PrimitiveFilter<UserResponse<UserType>['name']>;
941
+ $autocomplete?: UserResponse<StreamChatGenerics>['name'];
942
+ } & QueryFilter<UserResponse<StreamChatGenerics>['name']>> | PrimitiveFilter<UserResponse<StreamChatGenerics>['name']>;
862
943
  teams?: RequireOnlyOne<{
863
944
  $contains?: PrimitiveFilter<string>;
864
- $eq?: PrimitiveFilter<UserResponse<UserType>['teams']>;
865
- }> | PrimitiveFilter<UserResponse<UserType>['teams']>;
945
+ $eq?: PrimitiveFilter<UserResponse<StreamChatGenerics>['teams']>;
946
+ }> | PrimitiveFilter<UserResponse<StreamChatGenerics>['teams']>;
866
947
  username?: RequireOnlyOne<{
867
- $autocomplete?: UserResponse<UserType>['username'];
868
- } & QueryFilter<UserResponse<UserType>['username']>> | PrimitiveFilter<UserResponse<UserType>['username']>;
948
+ $autocomplete?: UserResponse<StreamChatGenerics>['username'];
949
+ } & QueryFilter<UserResponse<StreamChatGenerics>['username']>> | PrimitiveFilter<UserResponse<StreamChatGenerics>['username']>;
869
950
  } & {
870
- [Key in keyof Omit<UserResponse<{}>, 'id' | 'name' | 'teams' | 'username'>]?: RequireOnlyOne<QueryFilter<UserResponse<{}>[Key]>> | PrimitiveFilter<UserResponse<{}>[Key]>;
951
+ [Key in keyof Omit<UserResponse<{
952
+ attachmentType: StreamChatGenerics['attachmentType'];
953
+ channelType: StreamChatGenerics['channelType'];
954
+ commandType: StreamChatGenerics['commandType'];
955
+ eventType: StreamChatGenerics['eventType'];
956
+ messageType: StreamChatGenerics['messageType'];
957
+ reactionType: StreamChatGenerics['reactionType'];
958
+ userType: {};
959
+ }>, 'id' | 'name' | 'teams' | 'username'>]?: RequireOnlyOne<QueryFilter<UserResponse<{
960
+ attachmentType: StreamChatGenerics['attachmentType'];
961
+ channelType: StreamChatGenerics['channelType'];
962
+ commandType: StreamChatGenerics['commandType'];
963
+ eventType: StreamChatGenerics['eventType'];
964
+ messageType: StreamChatGenerics['messageType'];
965
+ reactionType: StreamChatGenerics['reactionType'];
966
+ userType: {};
967
+ }>[Key]>> | PrimitiveFilter<UserResponse<{
968
+ attachmentType: StreamChatGenerics['attachmentType'];
969
+ channelType: StreamChatGenerics['channelType'];
970
+ commandType: StreamChatGenerics['commandType'];
971
+ eventType: StreamChatGenerics['eventType'];
972
+ messageType: StreamChatGenerics['messageType'];
973
+ reactionType: StreamChatGenerics['reactionType'];
974
+ userType: {};
975
+ }>[Key]>;
871
976
  }>;
872
977
  /**
873
978
  * Sort Types
@@ -876,8 +981,8 @@ export declare type BannedUsersSort = BannedUsersSortBase | Array<BannedUsersSor
876
981
  export declare type BannedUsersSortBase = {
877
982
  created_at?: AscDesc;
878
983
  };
879
- export declare type ChannelSort<ChannelType = UR> = ChannelSortBase<ChannelType> | Array<ChannelSortBase<ChannelType>>;
880
- export declare type ChannelSortBase<ChannelType = UR> = Sort<ChannelType> & {
984
+ export declare type ChannelSort<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = ChannelSortBase<StreamChatGenerics> | Array<ChannelSortBase<StreamChatGenerics>>;
985
+ export declare type ChannelSortBase<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Sort<StreamChatGenerics> & {
881
986
  created_at?: AscDesc;
882
987
  has_unread?: AscDesc;
883
988
  last_message_at?: AscDesc;
@@ -893,9 +998,9 @@ export declare type PinnedMessagesSortBase = {
893
998
  export declare type Sort<T> = {
894
999
  [P in keyof T]?: AscDesc;
895
1000
  };
896
- export declare type UserSort<UserType = UR> = Sort<UserResponse<UserType>> | Array<Sort<UserResponse<UserType>>>;
897
- export declare type MemberSort<UserType = UR> = Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>> | Array<Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>>>;
898
- export declare type SearchMessageSortBase<MessageType = UR> = Sort<MessageType> & {
1001
+ export declare type UserSort<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Sort<UserResponse<StreamChatGenerics>> | Array<Sort<UserResponse<StreamChatGenerics>>>;
1002
+ export declare type MemberSort<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Sort<Pick<UserResponse<StreamChatGenerics>, 'id' | 'created_at' | 'name'>> | Array<Sort<Pick<UserResponse<StreamChatGenerics>, 'id' | 'created_at' | 'name'>>>;
1003
+ export declare type SearchMessageSortBase<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Sort<StreamChatGenerics['messageType']> & {
899
1004
  attachments?: AscDesc;
900
1005
  'attachments.type'?: AscDesc;
901
1006
  created_at?: AscDesc;
@@ -910,8 +1015,8 @@ export declare type SearchMessageSortBase<MessageType = UR> = Sort<MessageType>
910
1015
  updated_at?: AscDesc;
911
1016
  'user.id'?: AscDesc;
912
1017
  };
913
- export declare type SearchMessageSort<MessageType = UR> = SearchMessageSortBase<MessageType> | Array<SearchMessageSortBase<MessageType>>;
914
- export declare type QuerySort<ChannelType = UR, UserType = UR, MessageType = UR> = BannedUsersSort | ChannelSort<ChannelType> | SearchMessageSort<MessageType> | UserSort<UserType>;
1018
+ export declare type SearchMessageSort<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = SearchMessageSortBase<StreamChatGenerics> | Array<SearchMessageSortBase<StreamChatGenerics>>;
1019
+ export declare type QuerySort<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = BannedUsersSort | ChannelSort<StreamChatGenerics> | SearchMessageSort<StreamChatGenerics> | UserSort<StreamChatGenerics>;
915
1020
  /**
916
1021
  * Base Types
917
1022
  */
@@ -980,7 +1085,7 @@ export declare type AppSettings = {
980
1085
  secret: string;
981
1086
  };
982
1087
  };
983
- export declare type Attachment<T = UR> = T & {
1088
+ export declare type Attachment<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['attachmentType'] & {
984
1089
  actions?: Action[];
985
1090
  asset_url?: string;
986
1091
  author_icon?: string;
@@ -989,9 +1094,11 @@ export declare type Attachment<T = UR> = T & {
989
1094
  color?: string;
990
1095
  fallback?: string;
991
1096
  fields?: Field[];
1097
+ file_size?: number | string;
992
1098
  footer?: string;
993
1099
  footer_icon?: string;
994
1100
  image_url?: string;
1101
+ mime_type?: string;
995
1102
  og_scrape_url?: string;
996
1103
  original_height?: number;
997
1104
  original_width?: number;
@@ -1018,8 +1125,8 @@ export declare type BlockList = {
1018
1125
  name: string;
1019
1126
  words: string[];
1020
1127
  };
1021
- export declare type ChannelConfig<CommandType extends string = LiteralStringForUnion> = ChannelConfigFields & CreatedAtUpdatedAt & {
1022
- commands?: CommandVariants<CommandType>[];
1128
+ export declare type ChannelConfig<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = ChannelConfigFields & CreatedAtUpdatedAt & {
1129
+ commands?: CommandVariants<StreamChatGenerics>[];
1023
1130
  };
1024
1131
  export declare type ChannelConfigAutomod = '' | 'AI' | 'disabled' | 'simple';
1025
1132
  export declare type ChannelConfigAutomodBehavior = '' | 'block' | 'flag';
@@ -1057,14 +1164,14 @@ export declare type ChannelConfigFields = {
1057
1164
  uploads?: boolean;
1058
1165
  url_enrichment?: boolean;
1059
1166
  };
1060
- export declare type ChannelConfigWithInfo<CommandType extends string = LiteralStringForUnion> = ChannelConfigFields & CreatedAtUpdatedAt & {
1061
- commands?: CommandResponse<CommandType>[];
1167
+ export declare type ChannelConfigWithInfo<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = ChannelConfigFields & CreatedAtUpdatedAt & {
1168
+ commands?: CommandResponse<StreamChatGenerics>[];
1062
1169
  };
1063
- export declare type ChannelData<ChannelType = UR> = ChannelType & {
1170
+ export declare type ChannelData<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['channelType'] & {
1064
1171
  members?: string[];
1065
1172
  name?: string;
1066
1173
  };
1067
- export declare type ChannelMembership<UserType = UR> = {
1174
+ export declare type ChannelMembership<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1068
1175
  banned?: boolean;
1069
1176
  channel_role?: Role;
1070
1177
  created_at?: string;
@@ -1072,11 +1179,11 @@ export declare type ChannelMembership<UserType = UR> = {
1072
1179
  role?: string;
1073
1180
  shadow_banned?: boolean;
1074
1181
  updated_at?: string;
1075
- user?: UserResponse<UserType>;
1182
+ user?: UserResponse<StreamChatGenerics>;
1076
1183
  };
1077
- export declare type ChannelMute<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
1078
- user: UserResponse<UserType>;
1079
- channel?: ChannelResponse<ChannelType, CommandType, UserType>;
1184
+ export declare type ChannelMute<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1185
+ user: UserResponse<StreamChatGenerics>;
1186
+ channel?: ChannelResponse<StreamChatGenerics>;
1080
1187
  created_at?: string;
1081
1188
  expires?: string;
1082
1189
  updated_at?: string;
@@ -1088,35 +1195,35 @@ export declare type ChannelRole = {
1088
1195
  resource?: string;
1089
1196
  same_team?: boolean;
1090
1197
  };
1091
- export declare type CheckPushInput<UserType = UR> = {
1198
+ export declare type CheckPushInput<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1092
1199
  apn_template?: string;
1093
1200
  client_id?: string;
1094
1201
  connection_id?: string;
1095
1202
  firebase_data_template?: string;
1096
1203
  firebase_template?: string;
1097
1204
  message_id?: string;
1098
- user?: UserResponse<UserType>;
1205
+ user?: UserResponse<StreamChatGenerics>;
1099
1206
  user_id?: string;
1100
1207
  };
1101
1208
  export declare type PushProvider = 'apn' | 'firebase' | 'huawei' | 'xiaomi';
1102
- export declare type CommandVariants<CommandType extends string = LiteralStringForUnion> = 'all' | 'ban' | 'fun_set' | 'giphy' | 'moderation_set' | 'mute' | 'unban' | 'unmute' | CommandType;
1103
- export declare type Configs<CommandType extends string = LiteralStringForUnion> = {
1104
- [channel_type: string]: ChannelConfigWithInfo<CommandType> | undefined;
1209
+ export declare type CommandVariants<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = 'all' | 'ban' | 'fun_set' | 'giphy' | 'moderation_set' | 'mute' | 'unban' | 'unmute' | StreamChatGenerics['commandType'];
1210
+ export declare type Configs<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1211
+ [channel_type: string]: ChannelConfigWithInfo<StreamChatGenerics> | undefined;
1105
1212
  };
1106
- export declare type ConnectionOpen<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
1213
+ export declare type ConnectionOpen<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1107
1214
  connection_id: string;
1108
1215
  cid?: string;
1109
1216
  created_at?: string;
1110
- me?: OwnUserResponse<ChannelType, CommandType, UserType>;
1217
+ me?: OwnUserResponse<StreamChatGenerics>;
1111
1218
  type?: string;
1112
1219
  };
1113
1220
  export declare type CreatedAtUpdatedAt = {
1114
1221
  created_at: string;
1115
1222
  updated_at: string;
1116
1223
  };
1117
- export declare type Device<UserType = UR> = DeviceFields & {
1224
+ export declare type Device<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = DeviceFields & {
1118
1225
  provider?: string;
1119
- user?: UserResponse<UserType>;
1226
+ user?: UserResponse<StreamChatGenerics>;
1120
1227
  user_id?: string;
1121
1228
  };
1122
1229
  export declare type BaseDeviceFields = {
@@ -1171,12 +1278,12 @@ export declare type XiaomiConfig = {
1171
1278
  export declare type LiteralStringForUnion = string & {};
1172
1279
  export declare type LogLevel = 'info' | 'error' | 'warn';
1173
1280
  export declare type Logger = (logLevel: LogLevel, message: string, extraData?: Record<string, unknown>) => void;
1174
- export declare type Message<AttachmentType = UR, MessageType = UR, UserType = UR> = Partial<MessageBase<AttachmentType, MessageType, UserType>> & {
1281
+ export declare type Message<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Partial<MessageBase<StreamChatGenerics>> & {
1175
1282
  mentioned_users?: string[];
1176
1283
  };
1177
- export declare type MessageBase<AttachmentType = UR, MessageType = UR, UserType = UR> = MessageType & {
1284
+ export declare type MessageBase<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['messageType'] & {
1178
1285
  id: string;
1179
- attachments?: Attachment<AttachmentType>[];
1286
+ attachments?: Attachment<StreamChatGenerics>[];
1180
1287
  html?: string;
1181
1288
  mml?: string;
1182
1289
  parent_id?: string;
@@ -1186,29 +1293,29 @@ export declare type MessageBase<AttachmentType = UR, MessageType = UR, UserType
1186
1293
  quoted_message_id?: string;
1187
1294
  show_in_channel?: boolean;
1188
1295
  text?: string;
1189
- user?: UserResponse<UserType> | null;
1296
+ user?: UserResponse<StreamChatGenerics> | null;
1190
1297
  user_id?: string;
1191
1298
  };
1192
1299
  export declare type MessageLabel = 'deleted' | 'ephemeral' | 'error' | 'regular' | 'reply' | 'system';
1193
- export declare type Mute<UserType = UR> = {
1300
+ export declare type Mute<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1194
1301
  created_at: string;
1195
- target: UserResponse<UserType>;
1302
+ target: UserResponse<StreamChatGenerics>;
1196
1303
  updated_at: string;
1197
- user: UserResponse<UserType>;
1304
+ user: UserResponse<StreamChatGenerics>;
1198
1305
  };
1199
- export declare type PartialUpdateChannel<ChannelType = UR> = {
1200
- set?: Partial<ChannelResponse<ChannelType>>;
1201
- unset?: Array<keyof ChannelResponse<ChannelType>>;
1306
+ export declare type PartialUpdateChannel<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1307
+ set?: Partial<ChannelResponse<StreamChatGenerics>>;
1308
+ unset?: Array<keyof ChannelResponse<StreamChatGenerics>>;
1202
1309
  };
1203
- export declare type PartialUserUpdate<UserType = UR> = {
1310
+ export declare type PartialUserUpdate<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1204
1311
  id: string;
1205
- set?: Partial<UserResponse<UserType>>;
1206
- unset?: Array<keyof UserResponse<UserType>>;
1312
+ set?: Partial<UserResponse<StreamChatGenerics>>;
1313
+ unset?: Array<keyof UserResponse<StreamChatGenerics>>;
1207
1314
  };
1208
- export declare type MessageUpdatableFields<MessageType = UR> = Omit<MessageResponse<MessageType>, 'cid' | 'created_at' | 'updated_at' | 'deleted_at' | 'user' | 'user_id'>;
1209
- export declare type PartialMessageUpdate<MessageType = UR> = {
1210
- set?: Partial<MessageUpdatableFields<MessageType>>;
1211
- unset?: Array<keyof MessageUpdatableFields<MessageType>>;
1315
+ export declare type MessageUpdatableFields<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Omit<MessageResponse<StreamChatGenerics>, 'cid' | 'created_at' | 'updated_at' | 'deleted_at' | 'user' | 'user_id'>;
1316
+ export declare type PartialMessageUpdate<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1317
+ set?: Partial<MessageUpdatableFields<StreamChatGenerics>>;
1318
+ unset?: Array<keyof MessageUpdatableFields<StreamChatGenerics>>;
1212
1319
  };
1213
1320
  export declare type PermissionAPIObject = {
1214
1321
  action?: string;
@@ -1246,23 +1353,23 @@ export declare type RateLimitsInfo = {
1246
1353
  reset: number;
1247
1354
  };
1248
1355
  export declare type RateLimitsMap = Record<EndpointName, RateLimitsInfo>;
1249
- export declare type Reaction<ReactionType = UR, UserType = UR> = ReactionType & {
1356
+ export declare type Reaction<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['reactionType'] & {
1250
1357
  type: string;
1251
1358
  message_id?: string;
1252
1359
  score?: number;
1253
- user?: UserResponse<UserType> | null;
1360
+ user?: UserResponse<StreamChatGenerics> | null;
1254
1361
  user_id?: string;
1255
1362
  };
1256
1363
  export declare type Resource = 'AddLinks' | 'BanUser' | 'CreateChannel' | 'CreateMessage' | 'CreateReaction' | 'DeleteAttachment' | 'DeleteChannel' | 'DeleteMessage' | 'DeleteReaction' | 'EditUser' | 'MuteUser' | 'ReadChannel' | 'RunMessageAction' | 'UpdateChannel' | 'UpdateChannelMembers' | 'UpdateMessage' | 'UpdateUser' | 'UploadAttachment';
1257
- export declare type SearchPayload<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = Omit<SearchOptions<MessageType>, 'sort'> & {
1364
+ export declare type SearchPayload<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Omit<SearchOptions<StreamChatGenerics>, 'sort'> & {
1258
1365
  client_id?: string;
1259
1366
  connection_id?: string;
1260
- filter_conditions?: ChannelFilters<ChannelType, CommandType, UserType>;
1261
- message_filter_conditions?: MessageFilters<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>;
1367
+ filter_conditions?: ChannelFilters<StreamChatGenerics>;
1368
+ message_filter_conditions?: MessageFilters<StreamChatGenerics>;
1262
1369
  query?: string;
1263
1370
  sort?: Array<{
1264
1371
  direction: AscDesc;
1265
- field: keyof SearchMessageSortBase<MessageType>;
1372
+ field: keyof SearchMessageSortBase<StreamChatGenerics>;
1266
1373
  }>;
1267
1374
  };
1268
1375
  export declare type TestPushDataInput = {
@@ -1282,10 +1389,10 @@ export declare type TokenProvider = () => Promise<string>;
1282
1389
  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';
1283
1390
  export declare type TypingStartEvent = Event;
1284
1391
  export declare type ReservedMessageFields = 'command' | 'created_at' | 'html' | 'latest_reactions' | 'own_reactions' | 'quoted_message' | 'reaction_counts' | 'reply_count' | 'type' | 'updated_at' | 'user' | '__html';
1285
- 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'> & {
1392
+ export declare type UpdatedMessage<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = Omit<MessageResponse<StreamChatGenerics>, 'mentioned_users'> & {
1286
1393
  mentioned_users?: string[];
1287
1394
  };
1288
- export declare type User<UserType = UR> = UserType & {
1395
+ export declare type User<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = StreamChatGenerics['userType'] & {
1289
1396
  id: string;
1290
1397
  anon?: boolean;
1291
1398
  name?: string;
@@ -1358,10 +1465,39 @@ export declare type TaskStatus = {
1358
1465
  };
1359
1466
  result?: UR;
1360
1467
  };
1361
- export declare type TruncateOptions<AttachmentType, MessageType, UserType> = {
1468
+ export declare type TruncateOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
1362
1469
  hard_delete?: boolean;
1363
- message?: Message<AttachmentType, MessageType, UserType>;
1470
+ message?: Message<StreamChatGenerics>;
1364
1471
  skip_push?: boolean;
1365
1472
  truncated_at?: Date;
1366
1473
  };
1474
+ export declare type CreateImportResponse = {
1475
+ import_task: ImportTask;
1476
+ upload_url: string;
1477
+ };
1478
+ export declare type GetImportResponse = {
1479
+ import_task: ImportTask;
1480
+ };
1481
+ export declare type ListImportsPaginationOptions = {
1482
+ limit?: number;
1483
+ offset?: number;
1484
+ };
1485
+ export declare type ListImportsResponse = {
1486
+ import_tasks: ImportTask[];
1487
+ };
1488
+ export declare type ImportTaskHistory = {
1489
+ created_at: string;
1490
+ next_state: string;
1491
+ prev_state: string;
1492
+ };
1493
+ export declare type ImportTask = {
1494
+ created_at: string;
1495
+ filename: string;
1496
+ history: ImportTaskHistory[];
1497
+ id: string;
1498
+ state: string;
1499
+ updated_at: string;
1500
+ result?: UR;
1501
+ size?: number;
1502
+ };
1367
1503
  //# sourceMappingURL=types.d.ts.map