Files
fristydev/lib/game/game-profile-types.ts
T
fristy 864b9226fc
Build & Push / Lint & Build (pull_request) Failing after 52s
Build & Push / Build & Push Image (pull_request) Skipped
Build & Push / Trigger Deploy (pull_request) Skipped
desloppify: code health overhaul plus abuse hardening (140 green, strict 87.2)
Honest baseline after removing 45 gaming suppressions. Structural: lib/game plus root hooks extraction, CORS origin echo, DEV_ORIGINS layering. Fixes: error-cause binding, discord 5xx split, null-cache guard, co-located tests, rejecting-fetch coverage, naming and typing cleanup, socket controller, cache bound, cascade helpers, latch resets. Hardening: per-IP rate limit on API routes, deterministic-miss UX, retry cooldown plus cap. Suite 140 green, build plus lint clean.
2026-09-11 23:54:59 +03:00

142 lines
3.4 KiB
TypeScript

export interface GameExternalLink {
label: string;
url: string;
}
export interface GameReviewSummary {
label: string;
total: number | null;
positive: number | null;
negative: number | null;
url: string;
}
export interface GamePricePoint {
price: number;
regular: number;
currency: string;
shop: string;
url: string;
}
export interface ItadReview {
score: number | null;
source: string;
count: number | null;
url: string;
}
export interface GameProfile {
applicationId: string;
gameId: string;
gameUrl: string;
name: string;
genres: string[];
description: string | null;
developers: string[];
publishers: string[];
releaseDate: string | null;
platforms: string[];
links: GameExternalLink[];
coverUrl: string | null;
artworkUrl: string | null;
screenshots: string[];
steamId: string | null;
steamUrl: string | null;
igdbUrl: string | null;
steamReviews: GameReviewSummary | null;
itad: {
prices: GamePricePoint | null;
historyLow: GamePricePoint | null;
pageUrl: string | null;
playerCount: number | null;
reviews: ItadReview[];
} | null;
sources: {
igdb: boolean;
steam: boolean;
itad: boolean;
};
}
export interface DetectableEntry {
id: string;
name: string;
third_party_skus?: Array<{ distributor: string; id: string }>;
}
export interface SteamAppDetails {
success: boolean;
data?: {
name?: string;
short_description?: string;
header_image?: string;
genres?: Array<{ description?: string }>;
developers?: string[];
publishers?: string[];
platforms?: { windows?: boolean; mac?: boolean; linux?: boolean };
release_date?: { date?: string };
screenshots?: Array<{ path_full?: string }>;
};
}
export interface SteamReviewQuery {
review_score_desc?: string;
total_positive?: number;
total_negative?: number;
total_reviews?: number;
}
export interface IgdbGame {
name?: string;
slug?: string;
genres?: Array<{ name?: string }>;
summary?: string;
storyline?: string;
cover?: { url?: string };
artworks?: Array<{ url?: string }>;
screenshots?: Array<{ url?: string }>;
websites?: Array<{ url?: string; category?: number }>;
involved_companies?: Array<{
developer?: boolean;
publisher?: boolean;
company?: { name?: string };
}>;
platforms?: Array<{ abbreviation?: string; name?: string }>;
first_release_date?: number;
}
export interface ItadGameInfo {
title?: string;
assets?: { boxart?: string; banner600?: string };
tags?: string[];
releaseDate?: string | null;
developers?: Array<{ name?: string }>;
publishers?: Array<{ name?: string }>;
reviews?: Array<{
score?: number | null;
source?: string;
count?: number | null;
url?: string;
}>;
players?: { recent?: number } | null;
urls?: { game?: string };
}
export interface ItadOverviewPrice {
current?: {
shop?: { name?: string };
price?: { amount?: number; currency?: string };
regular?: { amount?: number };
cut?: number;
url?: string;
} | null;
lowest?: {
shop?: { name?: string };
price?: { amount?: number; currency?: string };
regular?: { amount?: number };
cut?: number;
url?: string;
} | null;
}