stream-chat 4.4.3-dev.1 → 4.5.0-beta.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.
- package/README.md +4 -13
- package/dist/browser.es.js +1239 -716
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +1239 -715
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +1239 -716
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1239 -715
- package/dist/index.js.map +1 -1
- package/dist/types/base64.d.ts.map +1 -1
- package/dist/types/channel.d.ts +19 -15
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/channel_state.d.ts +2 -2
- package/dist/types/channel_state.d.ts.map +1 -1
- package/dist/types/client.d.ts +25 -49
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client_state.d.ts +2 -2
- package/dist/types/client_state.d.ts.map +1 -1
- package/dist/types/connection.d.ts +14 -49
- package/dist/types/connection.d.ts.map +1 -1
- package/dist/types/connection_fallback.d.ts +42 -0
- package/dist/types/connection_fallback.d.ts.map +1 -0
- package/dist/types/errors.d.ts +14 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/insights.d.ts +17 -10
- package/dist/types/insights.d.ts.map +1 -1
- package/dist/types/permissions.d.ts.map +1 -1
- package/dist/types/signing.d.ts +3 -3
- package/dist/types/signing.d.ts.map +1 -1
- package/dist/types/token_manager.d.ts +2 -2
- package/dist/types/token_manager.d.ts.map +1 -1
- package/dist/types/types.d.ts +95 -80
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +13 -3
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/base64.ts +1 -4
- package/src/channel.ts +133 -461
- package/src/channel_state.ts +31 -158
- package/src/client.ts +307 -708
- package/src/client_state.ts +2 -2
- package/src/connection.ts +146 -395
- package/src/connection_fallback.ts +205 -0
- package/src/errors.ts +58 -0
- package/src/insights.ts +38 -32
- package/src/permissions.ts +3 -24
- package/src/signing.ts +6 -17
- package/src/token_manager.ts +6 -18
- package/src/types.ts +270 -504
- package/src/utils.ts +49 -24
- package/CHANGELOG.md +0 -844
package/dist/types/types.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
287
|
+
export declare type GetReactionsAPIResponse<ReactionType = UR, UserType = UR> = APIResponse & {
|
|
282
288
|
reactions: ReactionResponse<ReactionType, UserType>[];
|
|
283
289
|
};
|
|
284
|
-
export declare type GetRepliesAPIResponse<AttachmentType =
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
364
|
-
export declare type PartialUpdateChannelAPIResponse<ChannelType =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
434
|
+
export declare type UsersAPIResponse<UserType = UR> = APIResponse & {
|
|
428
435
|
users: Array<UserResponse<UserType>>;
|
|
429
436
|
};
|
|
430
|
-
export declare type UpdateUsersAPIResponse<UserType =
|
|
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 =
|
|
442
|
+
export declare type UserResponse<UserType = UR> = User<UserType> & {
|
|
436
443
|
banned?: boolean;
|
|
437
444
|
created_at?: string;
|
|
438
445
|
deactivated_at?: string;
|
|
@@ -452,7 +459,7 @@ 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 =
|
|
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;
|
|
@@ -468,19 +475,16 @@ export declare type BanUserOptions<UserType = UnknownType> = UnBanUserOptions &
|
|
|
468
475
|
user_id?: string;
|
|
469
476
|
};
|
|
470
477
|
export declare type ChannelOptions = {
|
|
471
|
-
last_message_ids?: {
|
|
472
|
-
[key: string]: string;
|
|
473
|
-
};
|
|
474
478
|
limit?: number;
|
|
479
|
+
member_limit?: number;
|
|
475
480
|
message_limit?: number;
|
|
476
481
|
offset?: number;
|
|
477
482
|
presence?: boolean;
|
|
478
|
-
recovery?: boolean;
|
|
479
483
|
state?: boolean;
|
|
480
484
|
user_id?: string;
|
|
481
485
|
watch?: boolean;
|
|
482
486
|
};
|
|
483
|
-
export declare type ChannelQueryOptions<ChannelType =
|
|
487
|
+
export declare type ChannelQueryOptions<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = {
|
|
484
488
|
client_id?: string;
|
|
485
489
|
connection_id?: string;
|
|
486
490
|
data?: ChannelResponse<ChannelType, CommandType, UserType>;
|
|
@@ -536,7 +540,7 @@ export declare type CustomPermissionOptions = {
|
|
|
536
540
|
owner?: boolean;
|
|
537
541
|
same_team?: boolean;
|
|
538
542
|
};
|
|
539
|
-
export declare type InviteOptions<AttachmentType =
|
|
543
|
+
export declare type InviteOptions<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = {
|
|
540
544
|
accept_invite?: boolean;
|
|
541
545
|
add_members?: string[];
|
|
542
546
|
add_moderators?: string[];
|
|
@@ -552,22 +556,22 @@ export declare type InviteOptions<AttachmentType = UnknownType, ChannelType = Un
|
|
|
552
556
|
user_id?: string;
|
|
553
557
|
};
|
|
554
558
|
/** @deprecated use MarkChannelsReadOptions instead */
|
|
555
|
-
export declare type MarkAllReadOptions<UserType =
|
|
556
|
-
export declare type MarkChannelsReadOptions<UserType =
|
|
559
|
+
export declare type MarkAllReadOptions<UserType = UR> = MarkChannelsReadOptions<UserType>;
|
|
560
|
+
export declare type MarkChannelsReadOptions<UserType = UR> = {
|
|
557
561
|
client_id?: string;
|
|
558
562
|
connection_id?: string;
|
|
559
563
|
read_by_channel?: Record<string, string>;
|
|
560
564
|
user?: UserResponse<UserType>;
|
|
561
565
|
user_id?: string;
|
|
562
566
|
};
|
|
563
|
-
export declare type MarkReadOptions<UserType =
|
|
567
|
+
export declare type MarkReadOptions<UserType = UR> = {
|
|
564
568
|
client_id?: string;
|
|
565
569
|
connection_id?: string;
|
|
566
570
|
message_id?: string;
|
|
567
571
|
user?: UserResponse<UserType>;
|
|
568
572
|
user_id?: string;
|
|
569
573
|
};
|
|
570
|
-
export declare type MuteUserOptions<UserType =
|
|
574
|
+
export declare type MuteUserOptions<UserType = UR> = {
|
|
571
575
|
client_id?: string;
|
|
572
576
|
connection_id?: string;
|
|
573
577
|
id?: string;
|
|
@@ -602,7 +606,7 @@ export declare type QueryMembersOptions = {
|
|
|
602
606
|
user_id_lt?: string;
|
|
603
607
|
user_id_lte?: string;
|
|
604
608
|
};
|
|
605
|
-
export declare type SearchOptions<MessageType =
|
|
609
|
+
export declare type SearchOptions<MessageType = UR> = {
|
|
606
610
|
limit?: number;
|
|
607
611
|
next?: string;
|
|
608
612
|
offset?: number;
|
|
@@ -621,6 +625,8 @@ export declare type StreamChatOptions = AxiosRequestConfig & {
|
|
|
621
625
|
browser?: boolean;
|
|
622
626
|
device?: BaseDeviceFields;
|
|
623
627
|
enableInsights?: boolean;
|
|
628
|
+
/** experimental feature, please contact support if you want this feature enabled for you */
|
|
629
|
+
enableWSFallback?: boolean;
|
|
624
630
|
logger?: Logger;
|
|
625
631
|
/**
|
|
626
632
|
* When network is recovered, we re-query the active channels on client. But in single query, you can recover
|
|
@@ -663,7 +669,7 @@ export declare type ConnectionChangeEvent = {
|
|
|
663
669
|
type: EventTypes;
|
|
664
670
|
online?: boolean;
|
|
665
671
|
};
|
|
666
|
-
export declare type Event<AttachmentType extends
|
|
672
|
+
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
673
|
type: EventTypes;
|
|
668
674
|
channel?: ChannelResponse<ChannelType, CommandType, UserType>;
|
|
669
675
|
channel_id?: string;
|
|
@@ -689,10 +695,10 @@ export declare type Event<AttachmentType extends UnknownType = UnknownType, Chan
|
|
|
689
695
|
user_id?: string;
|
|
690
696
|
watcher_count?: number;
|
|
691
697
|
};
|
|
692
|
-
export declare type UserCustomEvent<EventType extends
|
|
698
|
+
export declare type UserCustomEvent<EventType extends UR = UR> = EventType & {
|
|
693
699
|
type: string;
|
|
694
700
|
};
|
|
695
|
-
export declare type EventHandler<AttachmentType extends
|
|
701
|
+
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
702
|
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
703
|
/**
|
|
698
704
|
* Filter Types
|
|
@@ -729,7 +735,7 @@ export declare type BannedUsersFilters = QueryFilters<{
|
|
|
729
735
|
} & {
|
|
730
736
|
[Key in keyof Omit<BannedUsersFilterOptions, 'channel_cid' | 'reason'>]: RequireOnlyOne<QueryFilter<BannedUsersFilterOptions[Key]>> | PrimitiveFilter<BannedUsersFilterOptions[Key]>;
|
|
731
737
|
}>;
|
|
732
|
-
export declare type ChannelFilters<ChannelType =
|
|
738
|
+
export declare type ChannelFilters<ChannelType = UR, CommandType extends string = LiteralStringForUnion, UserType = UR> = QueryFilters<ContainsOperator<ChannelType> & {
|
|
733
739
|
members?: RequireOnlyOne<Pick<QueryFilter<string>, '$in' | '$nin'>> | RequireOnlyOne<Pick<QueryFilter<string[]>, '$eq'>> | PrimitiveFilter<string[]>;
|
|
734
740
|
} & {
|
|
735
741
|
name?: RequireOnlyOne<{
|
|
@@ -743,7 +749,7 @@ export declare type ContainsOperator<CustomType = {}> = {
|
|
|
743
749
|
$contains?: ContainType extends object ? PrimitiveFilter<RequireAtLeastOne<ContainType>> : PrimitiveFilter<ContainType>;
|
|
744
750
|
} & QueryFilter<PrimitiveFilter<ContainType>[]>> | PrimitiveFilter<PrimitiveFilter<ContainType>[]> : RequireOnlyOne<QueryFilter<CustomType[Key]>> | PrimitiveFilter<CustomType[Key]>;
|
|
745
751
|
};
|
|
746
|
-
export declare type MessageFilters<AttachmentType =
|
|
752
|
+
export declare type MessageFilters<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = QueryFilters<ContainsOperator<MessageType> & {
|
|
747
753
|
text?: RequireOnlyOne<{
|
|
748
754
|
$autocomplete?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text'];
|
|
749
755
|
$q?: MessageResponse<AttachmentType, ChannelType, CommandType, MessageType, ReactionType, UserType>['text'];
|
|
@@ -777,7 +783,7 @@ export declare type QueryLogicalOperators<Operators> = {
|
|
|
777
783
|
$nor?: ArrayOneOrMore<QueryFilters<Operators>>;
|
|
778
784
|
$or?: ArrayTwoOrMore<QueryFilters<Operators>>;
|
|
779
785
|
};
|
|
780
|
-
export declare type UserFilters<UserType =
|
|
786
|
+
export declare type UserFilters<UserType = UR> = QueryFilters<ContainsOperator<UserType> & {
|
|
781
787
|
id?: RequireOnlyOne<{
|
|
782
788
|
$autocomplete?: UserResponse<UserType>['id'];
|
|
783
789
|
} & QueryFilter<UserResponse<UserType>['id']>> | PrimitiveFilter<UserResponse<UserType>['id']>;
|
|
@@ -801,8 +807,8 @@ export declare type BannedUsersSort = BannedUsersSortBase | Array<BannedUsersSor
|
|
|
801
807
|
export declare type BannedUsersSortBase = {
|
|
802
808
|
created_at?: AscDesc;
|
|
803
809
|
};
|
|
804
|
-
export declare type ChannelSort<ChannelType =
|
|
805
|
-
export declare type ChannelSortBase<ChannelType =
|
|
810
|
+
export declare type ChannelSort<ChannelType = UR> = ChannelSortBase<ChannelType> | Array<ChannelSortBase<ChannelType>>;
|
|
811
|
+
export declare type ChannelSortBase<ChannelType = UR> = Sort<ChannelType> & {
|
|
806
812
|
created_at?: AscDesc;
|
|
807
813
|
has_unread?: AscDesc;
|
|
808
814
|
last_message_at?: AscDesc;
|
|
@@ -814,9 +820,9 @@ export declare type ChannelSortBase<ChannelType = UnknownType> = Sort<ChannelTyp
|
|
|
814
820
|
export declare type Sort<T> = {
|
|
815
821
|
[P in keyof T]?: AscDesc;
|
|
816
822
|
};
|
|
817
|
-
export declare type UserSort<UserType =
|
|
818
|
-
export declare type MemberSort<UserType =
|
|
819
|
-
export declare type SearchMessageSortBase<MessageType =
|
|
823
|
+
export declare type UserSort<UserType = UR> = Sort<UserResponse<UserType>> | Array<Sort<UserResponse<UserType>>>;
|
|
824
|
+
export declare type MemberSort<UserType = UR> = Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>> | Array<Sort<Pick<UserResponse<UserType>, 'id' | 'created_at' | 'name'>>>;
|
|
825
|
+
export declare type SearchMessageSortBase<MessageType = UR> = Sort<MessageType> & {
|
|
820
826
|
attachments?: AscDesc;
|
|
821
827
|
'attachments.type'?: AscDesc;
|
|
822
828
|
created_at?: AscDesc;
|
|
@@ -831,8 +837,8 @@ export declare type SearchMessageSortBase<MessageType = UnknownType> = Sort<Mess
|
|
|
831
837
|
updated_at?: AscDesc;
|
|
832
838
|
'user.id'?: AscDesc;
|
|
833
839
|
};
|
|
834
|
-
export declare type SearchMessageSort<MessageType =
|
|
835
|
-
export declare type QuerySort<ChannelType =
|
|
840
|
+
export declare type SearchMessageSort<MessageType = UR> = SearchMessageSortBase<MessageType> | Array<SearchMessageSortBase<MessageType>>;
|
|
841
|
+
export declare type QuerySort<ChannelType = UR, UserType = UR, MessageType = UR> = BannedUsersSort | ChannelSort<ChannelType> | SearchMessageSort<MessageType> | UserSort<UserType>;
|
|
836
842
|
/**
|
|
837
843
|
* Base Types
|
|
838
844
|
*/
|
|
@@ -898,7 +904,7 @@ export declare type AppSettings = {
|
|
|
898
904
|
webhook_events?: Array<string> | null;
|
|
899
905
|
webhook_url?: string;
|
|
900
906
|
};
|
|
901
|
-
export declare type Attachment<T =
|
|
907
|
+
export declare type Attachment<T = UR> = T & {
|
|
902
908
|
actions?: Action[];
|
|
903
909
|
asset_url?: string;
|
|
904
910
|
author_icon?: string;
|
|
@@ -976,11 +982,11 @@ export declare type ChannelConfigFields = {
|
|
|
976
982
|
export declare type ChannelConfigWithInfo<CommandType extends string = LiteralStringForUnion> = ChannelConfigFields & CreatedAtUpdatedAt & {
|
|
977
983
|
commands?: CommandResponse<CommandType>[];
|
|
978
984
|
};
|
|
979
|
-
export declare type ChannelData<ChannelType =
|
|
985
|
+
export declare type ChannelData<ChannelType = UR> = ChannelType & {
|
|
980
986
|
members?: string[];
|
|
981
987
|
name?: string;
|
|
982
988
|
};
|
|
983
|
-
export declare type ChannelMembership<UserType =
|
|
989
|
+
export declare type ChannelMembership<UserType = UR> = {
|
|
984
990
|
banned?: boolean;
|
|
985
991
|
channel_role?: Role;
|
|
986
992
|
created_at?: string;
|
|
@@ -990,7 +996,7 @@ export declare type ChannelMembership<UserType = UnknownType> = {
|
|
|
990
996
|
updated_at?: string;
|
|
991
997
|
user?: UserResponse<UserType>;
|
|
992
998
|
};
|
|
993
|
-
export declare type ChannelMute<ChannelType extends
|
|
999
|
+
export declare type ChannelMute<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
|
|
994
1000
|
user: UserResponse<UserType>;
|
|
995
1001
|
channel?: ChannelResponse<ChannelType, CommandType, UserType>;
|
|
996
1002
|
created_at?: string;
|
|
@@ -1004,7 +1010,7 @@ export declare type ChannelRole = {
|
|
|
1004
1010
|
resource?: string;
|
|
1005
1011
|
same_team?: boolean;
|
|
1006
1012
|
};
|
|
1007
|
-
export declare type CheckPushInput<UserType =
|
|
1013
|
+
export declare type CheckPushInput<UserType = UR> = {
|
|
1008
1014
|
apn_template?: string;
|
|
1009
1015
|
client_id?: string;
|
|
1010
1016
|
connection_id?: string;
|
|
@@ -1019,7 +1025,7 @@ export declare type CommandVariants<CommandType extends string = LiteralStringFo
|
|
|
1019
1025
|
export declare type Configs<CommandType extends string = LiteralStringForUnion> = {
|
|
1020
1026
|
[channel_type: string]: ChannelConfigWithInfo<CommandType> | undefined;
|
|
1021
1027
|
};
|
|
1022
|
-
export declare type ConnectionOpen<ChannelType extends
|
|
1028
|
+
export declare type ConnectionOpen<ChannelType extends UR = UR, CommandType extends string = LiteralStringForUnion, UserType extends UR = UR> = {
|
|
1023
1029
|
connection_id: string;
|
|
1024
1030
|
cid?: string;
|
|
1025
1031
|
created_at?: string;
|
|
@@ -1030,7 +1036,7 @@ export declare type CreatedAtUpdatedAt = {
|
|
|
1030
1036
|
created_at: string;
|
|
1031
1037
|
updated_at: string;
|
|
1032
1038
|
};
|
|
1033
|
-
export declare type Device<UserType =
|
|
1039
|
+
export declare type Device<UserType = UR> = DeviceFields & {
|
|
1034
1040
|
provider?: string;
|
|
1035
1041
|
user?: UserResponse<UserType>;
|
|
1036
1042
|
user_id?: string;
|
|
@@ -1077,11 +1083,12 @@ export declare type HuaweiConfig = {
|
|
|
1077
1083
|
enabled?: boolean;
|
|
1078
1084
|
};
|
|
1079
1085
|
export declare type LiteralStringForUnion = string & {};
|
|
1080
|
-
export declare type
|
|
1081
|
-
export declare type
|
|
1086
|
+
export declare type LogLevel = 'info' | 'error' | 'warn';
|
|
1087
|
+
export declare type Logger = (logLevel: LogLevel, message: string, extraData?: Record<string, unknown>) => void;
|
|
1088
|
+
export declare type Message<AttachmentType = UR, MessageType = UR, UserType = UR> = Partial<MessageBase<AttachmentType, MessageType, UserType>> & {
|
|
1082
1089
|
mentioned_users?: string[];
|
|
1083
1090
|
};
|
|
1084
|
-
export declare type MessageBase<AttachmentType =
|
|
1091
|
+
export declare type MessageBase<AttachmentType = UR, MessageType = UR, UserType = UR> = MessageType & {
|
|
1085
1092
|
id: string;
|
|
1086
1093
|
attachments?: Attachment<AttachmentType>[];
|
|
1087
1094
|
html?: string;
|
|
@@ -1095,23 +1102,23 @@ export declare type MessageBase<AttachmentType = UnknownType, MessageType = Unkn
|
|
|
1095
1102
|
user_id?: string;
|
|
1096
1103
|
};
|
|
1097
1104
|
export declare type MessageLabel = 'deleted' | 'ephemeral' | 'error' | 'regular' | 'reply' | 'system';
|
|
1098
|
-
export declare type Mute<UserType =
|
|
1105
|
+
export declare type Mute<UserType = UR> = {
|
|
1099
1106
|
created_at: string;
|
|
1100
1107
|
target: UserResponse<UserType>;
|
|
1101
1108
|
updated_at: string;
|
|
1102
1109
|
user: UserResponse<UserType>;
|
|
1103
1110
|
};
|
|
1104
|
-
export declare type PartialUpdateChannel<ChannelType =
|
|
1111
|
+
export declare type PartialUpdateChannel<ChannelType = UR> = {
|
|
1105
1112
|
set?: Partial<ChannelResponse<ChannelType>>;
|
|
1106
1113
|
unset?: Array<keyof ChannelResponse<ChannelType>>;
|
|
1107
1114
|
};
|
|
1108
|
-
export declare type PartialUserUpdate<UserType =
|
|
1115
|
+
export declare type PartialUserUpdate<UserType = UR> = {
|
|
1109
1116
|
id: string;
|
|
1110
1117
|
set?: Partial<UserResponse<UserType>>;
|
|
1111
1118
|
unset?: Array<keyof UserResponse<UserType>>;
|
|
1112
1119
|
};
|
|
1113
|
-
export declare type MessageUpdatableFields<MessageType =
|
|
1114
|
-
export declare type PartialMessageUpdate<MessageType =
|
|
1120
|
+
export declare type MessageUpdatableFields<MessageType = UR> = Omit<MessageResponse<MessageType>, 'cid' | 'created_at' | 'updated_at' | 'deleted_at' | 'user' | 'user_id'>;
|
|
1121
|
+
export declare type PartialMessageUpdate<MessageType = UR> = {
|
|
1115
1122
|
set?: Partial<MessageUpdatableFields<MessageType>>;
|
|
1116
1123
|
unset?: Array<keyof MessageUpdatableFields<MessageType>>;
|
|
1117
1124
|
};
|
|
@@ -1149,7 +1156,7 @@ export declare type RateLimitsInfo = {
|
|
|
1149
1156
|
reset: number;
|
|
1150
1157
|
};
|
|
1151
1158
|
export declare type RateLimitsMap = Record<EndpointName, RateLimitsInfo>;
|
|
1152
|
-
export declare type Reaction<ReactionType =
|
|
1159
|
+
export declare type Reaction<ReactionType = UR, UserType = UR> = ReactionType & {
|
|
1153
1160
|
type: string;
|
|
1154
1161
|
message_id?: string;
|
|
1155
1162
|
score?: number;
|
|
@@ -1157,7 +1164,7 @@ export declare type Reaction<ReactionType = UnknownType, UserType = UnknownType>
|
|
|
1157
1164
|
user_id?: string;
|
|
1158
1165
|
};
|
|
1159
1166
|
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 =
|
|
1167
|
+
export declare type SearchPayload<AttachmentType = UR, ChannelType = UR, CommandType extends string = LiteralStringForUnion, MessageType = UR, ReactionType = UR, UserType = UR> = Omit<SearchOptions<MessageType>, 'sort'> & {
|
|
1161
1168
|
client_id?: string;
|
|
1162
1169
|
connection_id?: string;
|
|
1163
1170
|
filter_conditions?: ChannelFilters<ChannelType, CommandType, UserType>;
|
|
@@ -1185,10 +1192,11 @@ export declare type TokenOrProvider = null | string | TokenProvider | undefined;
|
|
|
1185
1192
|
export declare type TokenProvider = () => Promise<string>;
|
|
1186
1193
|
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
1194
|
export declare type TypingStartEvent = Event;
|
|
1188
|
-
export declare type
|
|
1195
|
+
export declare type ReservedMessageFields = 'command' | 'created_at' | 'html' | 'latest_reactions' | 'own_reactions' | 'quoted_message' | 'reaction_counts' | 'reply_count' | 'type' | 'updated_at' | 'user' | '__html';
|
|
1196
|
+
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
1197
|
mentioned_users?: string[];
|
|
1190
1198
|
};
|
|
1191
|
-
export declare type User<UserType =
|
|
1199
|
+
export declare type User<UserType = UR> = UserType & {
|
|
1192
1200
|
id: string;
|
|
1193
1201
|
anon?: boolean;
|
|
1194
1202
|
name?: string;
|
|
@@ -1207,6 +1215,7 @@ export declare type DeleteUserOptions = {
|
|
|
1207
1215
|
user: DeleteType;
|
|
1208
1216
|
conversations?: DeleteType;
|
|
1209
1217
|
messages?: DeleteType;
|
|
1218
|
+
new_channel_owner_id?: string;
|
|
1210
1219
|
};
|
|
1211
1220
|
export declare type SegmentData = {
|
|
1212
1221
|
description: string;
|
|
@@ -1258,6 +1267,12 @@ export declare type TaskStatus = {
|
|
|
1258
1267
|
description: string;
|
|
1259
1268
|
type: string;
|
|
1260
1269
|
};
|
|
1261
|
-
result?:
|
|
1270
|
+
result?: UR;
|
|
1271
|
+
};
|
|
1272
|
+
export declare type TruncateOptions<AttachmentType, MessageType, UserType> = {
|
|
1273
|
+
hard_delete?: boolean;
|
|
1274
|
+
message?: Message<AttachmentType, MessageType, UserType>;
|
|
1275
|
+
skip_push?: boolean;
|
|
1276
|
+
truncated_at?: Date;
|
|
1262
1277
|
};
|
|
1263
1278
|
//# sourceMappingURL=types.d.ts.map
|