@@ -32,6 +32,8 @@ export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<
3232 [ K in Keys ] -?: Required < Pick < T , K > > & Partial < Record < Exclude < Keys , K > , undefined > > ;
3333 } [ Keys ] ;
3434
35+ export type PartializeKeys < T , K extends keyof T > = Partial < Pick < T , K > > & Omit < T , K > ;
36+
3537/* Unknown Record */
3638export type UR = Record < string , unknown > ;
3739export type UnknownType = UR ; //alias to avoid breaking change
@@ -1313,6 +1315,7 @@ export type Event<StreamChatGenerics extends ExtendableGenerics = DefaultGeneric
13131315 connection_id ?: string ;
13141316 // event creation timestamp, format Date ISO string
13151317 created_at ?: string ;
1318+ draft ?: DraftResponse < StreamChatGenerics > ;
13161319 // id of the message that was marked as unread - all the following messages are considered unread. (notification.mark_unread)
13171320 first_unread_message_id ?: string ;
13181321 hard_delete ?: boolean ;
@@ -3852,7 +3855,7 @@ export type SdkIdentifier = { name: 'react' | 'react-native' | 'expo' | 'angular
38523855 */
38533856export type DeviceIdentifier = { os : string ; model ?: string } ;
38543857
3855- export declare type DraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3858+ export type DraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
38563859 channel_cid : string ;
38573860 created_at : string ;
38583861 message : DraftMessage < StreamChatGenerics > ;
@@ -3861,30 +3864,24 @@ export declare type DraftResponse<StreamChatGenerics extends ExtendableGenerics
38613864 parent_message ?: MessageResponseBase < StreamChatGenerics > ;
38623865 quoted_message ?: MessageResponseBase < StreamChatGenerics > ;
38633866} ;
3864- export declare type CreateDraftResponse <
3865- StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
3866- > = APIResponse & {
3867+ export type CreateDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
38673868 draft : DraftResponse < StreamChatGenerics > ;
38683869} ;
38693870
3870- export declare type GetDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
3871+ export type GetDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
38713872 draft : DraftResponse < StreamChatGenerics > ;
38723873} ;
38733874
3874- export declare type QueryDraftsResponse <
3875- StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
3876- > = APIResponse & {
3875+ export type QueryDraftsResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
38773876 drafts : DraftResponse < StreamChatGenerics > [ ] ;
3878- next ?: string ;
3879- } ;
3877+ } & Omit < Pager , 'limit' > ;
38803878
3881- export declare type DraftMessagePayload < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = Omit <
3879+ export type DraftMessagePayload < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = PartializeKeys <
38823880 DraftMessage < StreamChatGenerics > ,
38833881 'id'
3884- > &
3885- Partial < Pick < DraftMessage < StreamChatGenerics > , 'id' > > ;
3882+ > & { user_id ?: string } ;
38863883
3887- export declare type DraftMessage < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3884+ export type DraftMessage < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
38883885 id : string ;
38893886 text : string ;
38903887 attachments ?: Attachment < StreamChatGenerics > [ ] ;
0 commit comments