> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
> Use this file to discover all available pages before exploring further.

# X (Twitter) API TypeScript shared & event types

> Copy shared TypeScript types for Xquik event names, tweet event data, filters, extraction tools, media, and radar sources. The other type pages build on them.

> For the complete documentation index, see [llms.txt](https://docs.xquik.com/llms.txt).

These types belong to the [X API TypeScript types](https://docs.xquik.com/guides/x-api-typescript-types.md) set. Copy them into your `xquik-types.ts` file.

## Types

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/bash.json","/languages/csharp.json","/languages/go.json","/languages/java.json","/languages/javascript.json","/languages/kotlin.json","/languages/php.json","/languages/python.json","/languages/ruby.json","/languages/typescript.json"]}}
type EventType =
  | "tweet.new"
  | "tweet.quote"
  | "tweet.reply"
  | "tweet.retweet"
  | "tweet.media"
  | "tweet.link"
  | "tweet.poll"
  | "tweet.mention"
  | "tweet.hashtag"
  | "tweet.longform"
  | "profile.avatar.changed"
  | "profile.banner.changed"
  | "profile.name.changed"
  | "profile.username.changed"
  | "profile.bio.changed"
  | "profile.location.changed"
  | "profile.url.changed"
  | "profile.verified.changed"
  | "profile.protected.changed"
  | "profile.pinned_tweet.changed"
  | "profile.unavailable.changed"
  | "tweet.deleted"
  | "broadcast.started"
  | "space.started"
  | "following.added"
  | "following.removed"
  | "follower.added"
  | "follower.removed"
  | "profile.followers.changed"
  | "profile.following.changed";

type PostEventType =
  | "post.reply.new"
  | "post.quote.new"
  | "post.likes.changed"
  | "post.retweets.changed"
  | "post.replies.changed"
  | "post.quotes.changed"
  | "post.bookmarks.changed"
  | "post.views.changed"
  | "post.edited"
  | "post.deleted";

// The data field contains the tweet object stored with the monitor event.
interface TweetEventData {
  id: string;
  text: string;
  author: {
    id: string;
    userName: string;
    name: string;
  };
  isRetweet: boolean;
  isReply: boolean;
  isQuote: boolean;
  createdAt: string;
  inReplyToId?: string;
  quoted_tweet?: {
    id: string;
    text: string;
    author: { userName: string };
  };
}

type EventData = TweetEventData;

interface EventFilters {
  keywords?: { include?: string[]; exclude?: string[] };
  minLikes?: number;
  minRetweets?: number;
  verifiedOnly?: boolean;
}

type ExtractionToolType =
  | "article_extractor"
  | "community_extractor"
  | "community_moderator_explorer"
  | "community_post_extractor"
  | "community_search"
  | "favoriters"
  | "follower_explorer"
  | "following_explorer"
  | "list_follower_explorer"
  | "list_member_extractor"
  | "list_post_extractor"
  | "mention_extractor"
  | "people_search"
  | "post_extractor"
  | "quote_extractor"
  | "reply_extractor"
  | "repost_extractor"
  | "space_explorer"
  | "thread_extractor"
  | "tweet_search_extractor"
  | "user_affiliates"
  | "user_likes"
  | "user_media"
  | "verified_follower_explorer";

type ComposeTweetGoal = "authority" | "conversation" | "engagement" | "followers";
type MediaType = "none" | "photo" | "video";

type RadarSource = string;

type RadarCategory =
  "business" | "culture" | "dev" | "entertainment" | "general" | "politics" | "science" | "tech";

interface TweetMediaItem {
  mediaUrl: string;
  type: string;
  url: string;
}

interface StyleTweet {
  id: string;
  authorUsername: string;
  text: string;
  createdAt: string;
  media?: TweetMediaItem[];
}

interface PerformanceTweet {
  id: string;
  text: string;
  likeCount: number;
  retweetCount: number;
  replyCount: number;
  quoteCount: number;
  viewCount: number;
  bookmarkCount: number;
}
```

## Next steps

* [X API TypeScript types](https://docs.xquik.com/guides/x-api-typescript-types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.