@@ -32,6 +32,8 @@ export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<
32
32
[ K in Keys ] -?: Required < Pick < T , K > > & Partial < Record < Exclude < Keys , K > , undefined > > ;
33
33
} [ Keys ] ;
34
34
35
+ export type PartializeKeys < T , K extends keyof T > = Partial < Pick < T , K > > & Omit < T , K > ;
36
+
35
37
/* Unknown Record */
36
38
export type UR = Record < string , unknown > ;
37
39
export type UnknownType = UR ; //alias to avoid breaking change
@@ -1316,6 +1318,7 @@ export type Event<StreamChatGenerics extends ExtendableGenerics = DefaultGeneric
1316
1318
connection_id ?: string ;
1317
1319
// event creation timestamp, format Date ISO string
1318
1320
created_at ?: string ;
1321
+ draft ?: DraftResponse < StreamChatGenerics > ;
1319
1322
// id of the message that was marked as unread - all the following messages are considered unread. (notification.mark_unread)
1320
1323
first_unread_message_id ?: string ;
1321
1324
hard_delete ?: boolean ;
@@ -3855,7 +3858,7 @@ export type SdkIdentifier = { name: 'react' | 'react-native' | 'expo' | 'angular
3855
3858
*/
3856
3859
export type DeviceIdentifier = { os : string ; model ?: string } ;
3857
3860
3858
- export declare type DraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3861
+ export type DraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3859
3862
channel_cid : string ;
3860
3863
created_at : string ;
3861
3864
message : DraftMessage < StreamChatGenerics > ;
@@ -3864,30 +3867,24 @@ export declare type DraftResponse<StreamChatGenerics extends ExtendableGenerics
3864
3867
parent_message ?: MessageResponseBase < StreamChatGenerics > ;
3865
3868
quoted_message ?: MessageResponseBase < StreamChatGenerics > ;
3866
3869
} ;
3867
- export declare type CreateDraftResponse <
3868
- StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
3869
- > = APIResponse & {
3870
+ export type CreateDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
3870
3871
draft : DraftResponse < StreamChatGenerics > ;
3871
3872
} ;
3872
3873
3873
- export declare type GetDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
3874
+ export type GetDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
3874
3875
draft : DraftResponse < StreamChatGenerics > ;
3875
3876
} ;
3876
3877
3877
- export declare type QueryDraftsResponse <
3878
- StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
3879
- > = APIResponse & {
3878
+ export type QueryDraftsResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
3880
3879
drafts : DraftResponse < StreamChatGenerics > [ ] ;
3881
- next ?: string ;
3882
- } ;
3880
+ } & Omit < Pager , 'limit' > ;
3883
3881
3884
- export declare type DraftMessagePayload < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = Omit <
3882
+ export type DraftMessagePayload < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = PartializeKeys <
3885
3883
DraftMessage < StreamChatGenerics > ,
3886
3884
'id'
3887
- > &
3888
- Partial < Pick < DraftMessage < StreamChatGenerics > , 'id' > > ;
3885
+ > & { user_id ?: string } ;
3889
3886
3890
- export declare type DraftMessage < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3887
+ export type DraftMessage < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3891
3888
id : string ;
3892
3889
text : string ;
3893
3890
attachments ?: Attachment < StreamChatGenerics > [ ] ;
0 commit comments