import type { SteamLanguage } from '../const/steam' /** * Steam Store API * @link https://store.steampowered.com/api/appdetails */ export declare namespace Steam { /** * Steam API language codes for the Store API `l` parameter. * Derived from the const array in `./steam.ts`. * @link https://partner.steamgames.com/doc/store/localization/languages */ export type { SteamLanguage } /** Query params for GET /steam/game-meta/:gameId */ export interface GameMetaQuery { /** * Two-letter country code for currency/pricing * @default "us" * @example "us" */ currency?: string /** * Steam API language code * @default "english" * @link https://partner.steamgames.com/doc/store/localization/languages */ lang?: SteamLanguage } /** * Steam Store appdetails API response, keyed by appid string * @link https://store.steampowered.com/api/appdetails?appids={appid} * @example /steam/game-meta/730 */ export interface GameMeta { [appid: string]: { /** Whether the lookup was successful */ success: boolean /** Absent when `success` is `false` */ data?: GameMetaData } } /** App detail data */ export interface GameMetaData { /** * App type * @example "game" */ type: string /** App name @example "Counter-Strike 2" */ name: string /** Steam App ID @example 730 */ steam_appid: number /** Minimum age requirement, `0` for no restriction @example 0 */ required_age: number /** Whether the app is free to play */ is_free: boolean /** DLC app IDs @example [2678630] */ dlc?: number[] /** Full HTML description */ detailed_description: string /** HTML about section */ about_the_game: string /** Short text description */ short_description: string /** Supported languages in HTML format */ supported_languages: string /** Header image URL @example "https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/730/header.jpg" */ header_image: string /** Capsule image URL (231x87) */ capsule_image: string /** Capsule image URL v5 (184x69) */ capsule_imagev5: string /** Official website URL, `null` if not set @example "http://counter-strike.net/" */ website: string | null /** PC system requirements, empty array `[]` when not available */ pc_requirements: GameMetaRequirements | [] /** Mac system requirements, empty array `[]` when not available */ mac_requirements: GameMetaRequirements | [] /** Linux system requirements, empty array `[]` when not available */ linux_requirements: GameMetaRequirements | [] /** Legal notice text @example "© 2024 ambr, Inc." */ legal_notice?: string /** Developer names @example ["Valve"] */ developers: string[] /** Publisher names @example ["Valve"] */ publishers: string[] /** Package IDs available for purchase */ packages: number[] /** Purchase option groups */ package_groups: GameMetaPackageGroup[] /** Platform availability */ platforms: GameMetaPlatforms /** Category tags (multi-player, workshop, etc.) */ categories: GameMetaCategory[] /** Genre classifications */ genres: GameMetaGenre[] /** Screenshots */ screenshots: GameMetaScreenshot[] /** Trailer videos */ movies?: GameMetaMovie[] /** User recommendations */ recommendations?: { total: number } /** Achievements info */ achievements?: GameMetaAchievements /** Release date info */ release_date: GameMetaReleaseDate /** Support contact info */ support_info: { url: string; email: string } /** Store page background image URL */ background: string /** Raw background image URL */ background_raw: string /** Content descriptor IDs and notes */ content_descriptors: GameMetaContentDescriptors /** Price overview, absent for free games */ price_overview?: GameMetaPriceOverview /** Metacritic score, absent if not rated */ metacritic?: GameMetaMetacritic /** Age ratings by region */ ratings?: Record /** * Controller support level * @example "full" */ controller_support?: string /** Demo app IDs */ demos?: { appid: number; description: string }[] } /** System requirements (minimum and optionally recommended) */ export interface GameMetaRequirements { /** Minimum requirements in HTML */ minimum: string /** Recommended requirements in HTML */ recommended?: string } export interface GameMetaPackageGroup { /** @example "default" */ name: string /** @example "Buy Counter-Strike 2" */ title: string description: string /** @example "Select a purchase option" */ selection_text: string save_text: string display_type: number is_recurring_subscription: string subs: GameMetaPackageSub[] } export interface GameMetaPackageSub { /** Package ID @example 298963 */ packageid: number /** @example " " */ percent_savings_text: string /** Discount percentage, `0` for no discount */ percent_savings: number /** @example "Counter-Strike 2 - Free" */ option_text: string option_description: string can_get_free_license: string is_free_license: boolean /** Price in cents with discount applied @example 0 */ price_in_cents_with_discount: number } export interface GameMetaPlatforms { windows: boolean mac: boolean linux: boolean } export interface GameMetaCategory { /** @example 1 */ id: number /** @example "Multi-player" */ description: string } export interface GameMetaGenre { /** @example "1" */ id: string /** @example "Action" */ description: string } export interface GameMetaScreenshot { /** Screenshot index @example 0 */ id: number /** Thumbnail URL (600x338) */ path_thumbnail: string /** Full size URL (1920x1080) */ path_full: string } export interface GameMetaMovie { /** Movie ID @example 256972298 */ id: number /** @example "Launch Trailer" */ name: string /** Thumbnail URL */ thumbnail: string /** DASH AV1 manifest URL */ dash_av1: string /** DASH H.264 manifest URL */ dash_h264: string /** HLS H.264 master playlist URL */ hls_h264: string /** Whether this is a highlighted trailer */ highlight: boolean } export interface GameMetaAchievements { /** Total number of achievements @example 1 */ total: number /** Featured achievements shown on the store page */ highlighted: { name: string path: string }[] } export interface GameMetaReleaseDate { /** Whether the game is unreleased */ coming_soon: boolean /** Formatted release date @example "21 Aug, 2012" */ date: string } export interface GameMetaContentDescriptors { /** Content descriptor IDs @example [2, 5] */ ids: number[] /** @example "Includes intense violence and blood." */ notes: string | null } export interface GameMetaPriceOverview { /** Currency code @example "USD" */ currency: string /** Original price in cents @example 5999 */ initial: number /** Final price in cents after discount @example 5999 */ final: number /** Discount percentage, `0` for no discount */ discount_percent: number /** Formatted original price @example "$59.99" */ initial_formatted: string /** Formatted final price @example "$59.99" */ final_formatted: string } export interface GameMetaMetacritic { /** Metacritic score @example 83 */ score: number /** Metacritic page URL */ url: string } export interface GameMetaRating { rating: string /** Age rating descriptors */ descriptors?: string /** Whether rating was auto-generated */ rating_generated?: string required_age?: string banned?: string use_age_gate?: string } }