From 7acc1d15774588e631cbd12992289024250e3eb4 Mon Sep 17 00:00:00 2001 From: Ren Koya <112790933+RenKoya1@users.noreply.github.com> Date: Mon, 11 Nov 2024 03:18:45 +0900 Subject: [PATCH] add dm_conversation_id to TDMEventV2Field (#547) * 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 --- src/types/v2/dm.v2.types.ts | 15 ++++++++------- src/types/v2/tweet.definition.v2.ts | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/types/v2/dm.v2.types.ts b/src/types/v2/dm.v2.types.ts index b610bc5..9e49c36 100644 --- a/src/types/v2/dm.v2.types.ts +++ b/src/types/v2/dm.v2.types.ts @@ -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'; @@ -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 { diff --git a/src/types/v2/tweet.definition.v2.ts b/src/types/v2/tweet.definition.v2.ts index b685a29..edf0755 100644 --- a/src/types/v2/tweet.definition.v2.ts +++ b/src/types/v2/tweet.definition.v2.ts @@ -153,6 +153,7 @@ export interface TweetPublicMetricsV2 { export interface TweetNonPublicMetricsV2 { impression_count: number; url_link_clicks: number; + user_profile_clicks: number; } export interface TweetOrganicMetricsV2 {