Catalogue & provider types
Catalogue types#
import type { CompactGame, DetailedGame, CatalogueGame, GameCatalogue, PublicProvider, PublicProviderCatalogue,} from '@aggregator-network/sdk';GameCatalogue may be an array or a record map. Each game uses compact or detailed fields according to the request's list_type. Preserve the exact launch identifier; numeric id is metadata.
CompactGame#
| Field | Type | Meaning |
|---|---|---|
| n | string | Name. |
| p | string | Provider. |
| s | string | Exact launch identifier. |
| fs | boolean | Free-round flag. |
| fb | boolean | Feature-buy flag. |
| d | boolean | Demo flag. |
| id | number | Numeric metadata ID. |
| image | string, optional | Returned artwork URL. |
DetailedGame#
Detailed records contain id_hash, name, category, type, subcategory, image variants, currency and capability flags. image_square and image_portrait may be null. image_long falls back to image. The details field contains JSON metadata.
Narrow records before use#
const catalogue = await client.getGameList({ currency: 'USD', list_type: 2 });const games = Array.isArray(catalogue.response) ? catalogue.response : Object.values(catalogue.response);for (const game of games) { const launchId = 's' in game ? game.s : game.id_hash; // Keep launchId unchanged for later requests.}Capability metadata may be incomplete. A false demo flag is not a universal provider capability conclusion; an actual entitled demo request establishes current demo behavior for that game.
Public provider types#
PublicProviderCatalogue contains providers, totalGames and updatedAt. PublicProvider includes name, games, assets, categories, currencies and currenciesUpdatedAt. Public counts grant no workspace access. See listProviders and catalogue.