@@ -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
@@ -1316,6 +1318,7 @@ export type Event<StreamChatGenerics extends ExtendableGenerics = DefaultGeneric
13161318 connection_id ?: string ;
13171319 // event creation timestamp, format Date ISO string
13181320 created_at ?: string ;
1321+ draft ?: DraftResponse < StreamChatGenerics > ;
13191322 // id of the message that was marked as unread - all the following messages are considered unread. (notification.mark_unread)
13201323 first_unread_message_id ?: string ;
13211324 hard_delete ?: boolean ;
@@ -3855,7 +3858,7 @@ export type SdkIdentifier = { name: 'react' | 'react-native' | 'expo' | 'angular
38553858 */
38563859export type DeviceIdentifier = { os : string ; model ?: string } ;
38573860
3858- export declare type DraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3861+ export type DraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
38593862 channel_cid : string ;
38603863 created_at : string ;
38613864 message : DraftMessage < StreamChatGenerics > ;
@@ -3864,30 +3867,24 @@ export declare type DraftResponse<StreamChatGenerics extends ExtendableGenerics
38643867 parent_message ?: MessageResponseBase < StreamChatGenerics > ;
38653868 quoted_message ?: MessageResponseBase < StreamChatGenerics > ;
38663869} ;
3867- export declare type CreateDraftResponse <
3868- StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
3869- > = APIResponse & {
3870+ export type CreateDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
38703871 draft : DraftResponse < StreamChatGenerics > ;
38713872} ;
38723873
3873- export declare type GetDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
3874+ export type GetDraftResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
38743875 draft : DraftResponse < StreamChatGenerics > ;
38753876} ;
38763877
3877- export declare type QueryDraftsResponse <
3878- StreamChatGenerics extends ExtendableGenerics = DefaultGenerics
3879- > = APIResponse & {
3878+ export type QueryDraftsResponse < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = APIResponse & {
38803879 drafts : DraftResponse < StreamChatGenerics > [ ] ;
3881- next ?: string ;
3882- } ;
3880+ } & Omit < Pager , 'limit' > ;
38833881
3884- export declare type DraftMessagePayload < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = Omit <
3882+ export type DraftMessagePayload < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = PartializeKeys <
38853883 DraftMessage < StreamChatGenerics > ,
38863884 'id'
3887- > &
3888- Partial < Pick < DraftMessage < StreamChatGenerics > , 'id' > > ;
3885+ > & { user_id ?: string } ;
38893886
3890- export declare type DraftMessage < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
3887+ export type DraftMessage < StreamChatGenerics extends ExtendableGenerics = DefaultGenerics > = {
38913888 id : string ;
38923889 text : string ;
38933890 attachments ?: Attachment < StreamChatGenerics > [ ] ;
0 commit comments