xquik-types.ts file.
Types
// ─── X API ──────────────────────────────────────────────
interface Tweet {
id: string;
text: string;
type?: string;
createdAt?: string;
retweetCount?: number;
replyCount?: number;
likeCount?: number;
quoteCount?: number;
viewCount?: number;
bookmarkCount?: number;
media?: TweetMediaItem[];
url?: string;
lang?: string;
isReply?: boolean;
inReplyToId?: string;
inReplyToUserId?: string;
inReplyToUsername?: string;
conversationId?: string;
source?: string;
displayTextRange?: number[];
textHighlights?: Array<{ startIndex: number; endIndex: number }>;
isNoteTweet?: boolean;
isQuoteStatus?: boolean;
isRetweet?: boolean;
isLimitedReply?: boolean;
entities?: Record<string, unknown>;
author?: UserProfile;
quoted_tweet?: Tweet;
retweeted_tweet?: Tweet;
}
interface TweetAuthor {
id: string;
username: string;
followers: number;
verified: boolean;
profilePicture?: string;
}
interface TweetSearchResult {
id: string;
text: string;
createdAt: string;
likeCount: number;
retweetCount: number;
replyCount: number;
author: {
id: string;
username: string;
name: string;
verified: boolean;
};
media?: TweetMediaItem[];
}
interface UserProfile {
id: string;
username: string;
name: string;
description?: string;
followers?: number;
following?: number;
verified?: boolean;
profilePicture?: string;
coverPicture?: string;
location?: string;
createdAt?: string;
statusesCount?: number;
mediaCount?: number;
url?: string;
favouritesCount?: number;
hasCustomTimelines?: boolean;
isTranslator?: boolean;
withheldInCountries?: string[];
possiblySensitive?: boolean;
pinnedTweetIds?: string[];
isAutomated?: boolean;
automatedBy?: string;
unavailable?: boolean;
unavailableReason?: string;
verifiedType?: string;
profile_bio?: Record<string, unknown>;
}
interface FollowerCheck {
sourceUsername: string;
targetUsername: string;
isFollowing: boolean;
isFollowedBy: boolean;
}
// ─── Trends ─────────────────────────────────────────────
interface Trend {
name: string;
description?: string;
rank?: number;
query?: string;
}
interface TrendList {
trends: Trend[];
total: number;
woeid: number;
}