xquik-types.ts file.
Types
// ─── Draws ──────────────────────────────────────────────
interface Draw {
id: string;
tweetId: string;
tweetUrl: string;
tweetText: string;
tweetAuthorUsername: string;
tweetLikeCount: number;
tweetRetweetCount: number;
tweetReplyCount: number;
tweetQuoteCount: number;
status: "pending" | "running" | "completed" | "failed";
totalEntries: number;
validEntries: number;
createdAt: string;
drawnAt?: string;
}
interface DrawListItem {
id: string;
tweetUrl: string;
status: "pending" | "running" | "completed" | "failed";
totalEntries: number;
validEntries: number;
createdAt: string;
drawnAt?: string;
}
interface DrawWinner {
position: number;
authorUsername: string;
tweetId: string;
isBackup: boolean;
}
interface DrawList {
draws: DrawListItem[];
hasMore: boolean;
nextCursor?: string;
}
// ─── Extractions ────────────────────────────────────────
interface ExtractionJob {
id: string;
toolType: ExtractionToolType;
status: "pending" | "running" | "completed" | "failed";
totalResults: number;
targetTweetId?: string;
targetUsername?: string;
targetUserId?: string;
targetCommunityId?: string;
searchQuery?: string;
errorMessage?: string;
createdAt: string;
completedAt?: string;
}
interface ExtractionResult {
id: string;
xUserId: string;
xUsername?: string;
xDisplayName?: string;
xFollowersCount?: number;
xVerified?: boolean;
xProfileImageUrl?: string;
tweetId?: string;
tweetText?: string;
tweetCreatedAt?: string;
createdAt: string;
enrichmentData?: Record<string, unknown>;
}
interface ExtractionList {
extractions: ExtractionJob[];
hasMore: boolean;
nextCursor?: string;
}
interface ExtractionEstimate {
allowed: boolean;
source:
| "collection"
| "followers"
| "following"
| "paginationCap"
| "quoteCount"
| "replyCount"
| "resultsLimit"
| "retweetCount"
| "unknown";
estimatedResults: number;
creditsRequired: string;
creditsAvailable: string;
resolvedXUserId?: string;
}