Skip to content

Commit

Permalink
add dm_conversation_id to TDMEventV2Field (#547)
Browse files Browse the repository at this point in the history
* add most_recent_tweet_id to UserV2 and TTweetv2UserField

* add dm_conversation_id to TDMEventV2Field

* fix BaseDMEventV2

* fix dm event

* add user_profile_clicks in nonPublicMetrics

* fix dmEventV2
  • Loading branch information
RenKoya1 authored Nov 10, 2024
1 parent 9baadce commit 7acc1d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/types/v2/dm.v2.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TTweetv2MediaField, TTweetv2TweetField, TTweetv2UserField } from './twe
import { ApiV2Includes, ReferencedTweetV2 } from './tweet.definition.v2';
import { DataMetaAndIncludeV2, PaginableCountMetaV2 } from './shared.v2.types';

export type TDMEventV2Field = 'created_at' | 'follower_count' | 'member_count' | 'private' | 'description' | 'owner_id';
export type TDMEventV2Field = 'created_at' | 'dm_conversation_id' | 'sender_id' | 'participant_ids' | 'referenced_tweets' | 'attachments';
export type TDMEventV2Expansion = 'attachments.media_keys' | 'referenced_tweets.id' | 'sender_id' | 'participant_ids';
export type TDMEventV2EventType = 'MessageCreate' | 'ParticipantsJoin' | 'ParticipantsLeave';

Expand Down Expand Up @@ -45,12 +45,13 @@ export interface PostDMInConversationResult {
// Types

export interface BaseDMEventV2 {
id: string;
created_at?: string;
sender_id?: string;
dm_conversation_id?: string;
attachments?: DMEventAttachmentV2;
referenced_tweets?: ReferencedTweetV2[];
id: string;
created_at?: string;
sender_id?: string;
dm_conversation_id?: string;
attachments?: DMEventAttachmentV2;
referenced_tweets?: ReferencedTweetV2[];
participant_ids?: string[];
}

export interface DMEventAttachmentV2 {
Expand Down
1 change: 1 addition & 0 deletions src/types/v2/tweet.definition.v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export interface TweetPublicMetricsV2 {
export interface TweetNonPublicMetricsV2 {
impression_count: number;
url_link_clicks: number;
user_profile_clicks: number;
}

export interface TweetOrganicMetricsV2 {
Expand Down

0 comments on commit 7acc1d1

Please sign in to comment.