SDK Models

A list of all the SDKs of the Fans United platform

The Fans United platform provides multiple SDKs to facilitate the integration by clients. Even though the
SDKs target different platforms, they share models and conventions. This page details all the models used in the SDKs.

Generic models

The following models are used across namespaces.

Meta

All paginated responses are generic type PaginationModel<M> except for Football and Activity paginated models.

class PaginationModel<M> {
    meta: MetaModel = new MetaModel();
    data: M[] = [];
}

class MetaModel {
    pagination: MetaProperties = new MetaProperties();
}

class MetaProperties {
    nextPageStartsAfter: string = null;
    itemsPerPage: number = null;
}

Football models

Meta

Meta property for paginated responses in Football and Activity namespace is different than the default one for Fans United SDK.

class MetaFootballModel {
    pagination: PaginationFootballProperties = new PaginationFootballProperties();
}

class PaginationFootballProperties {
    currentPage: number = null;
    itemsPerPage: number = null;
    totalItems: number = null;
    numberOfPages: number = null;
}

Country

Country information about all football related data.

class FootballCountryModel {
    id: string = null;
    alias: string = null;
    countryCode = null;
    assets: {} = null;
    name: string = null;
}

Basic Competition

This model is used in competition listings, e.g. array of competitions.

class CompetitionBasicModel {
    id: string = '';
    country: FootballCountryModel = null;
    gender: string = '';
    assets: {} = null;
    type: string = '';
    name: string = '';
}

Full Competition

This model is used when all the competition info needs to be returned.

class CompetitionFullModel {
    id: string = null;
    country: FootballCountryModel = null;
    gender: string = null;
    assets: {} = null;
    type: string = null;
    name: string = null;
    participants: TeamBasicModel[] = [];
}

Competition Filters

Filters model for getCompetitions endpoint.

class CompetitionFilters {
    countryId: string = null;
    name: string = null;
    gender: string = null;
    type: string = null;
    sortField: string = null;
    sortOrder: string =
    competitionIds: string[] = null;
}

Basic Player

This model is used in player listings, e.g. array of players.

class PlayerBasicModel {
    id: string = null;
    country: FootballCountryModel = null;
    birthDate: string = null;
    firstName: string = null;
    lastName: string = null;
    name: string = null;
    position: string = null;
    assets: {} = null;
    teams: TeamBasicModel[] = [];
  	isDeleted: boolean = false;
}

Full Player

This model is used when all the player info needs to be returned.

class PlayerFullModel {
    id: string = null;
    country: FootballCountryModel = null;
    birthDate: string = null;
    firstName: string = null;
    lastName: string = null;
    name: string = null;
    position: string = null;
    assets: {} = null;
    competitions: CompetitionBasicModel[] = [];
    teams: TeamBasicModel[] = [];
  	isDeleted: boolean = false;
}

Player in Squad

This model is used when player info is returned in squad list.

class PlayerSquadModel {
    id: string = null;
    startDate: string = null;
    endDate: string = null;
    shirtNumber: number;
    loan: boolean = false;
    position: string = null;
    country: FootballCountryModel = null;
    name: string = null;
    assets: {} = null;
    birthDate: string = null;
}

Player in Matches

This model is used when player info is returned in Full Match model.

class PlayerShortModel {
    id: string = null;
    name: string = null;
    position: string = null;
    shirtNumber: number = null;
    assets: {} = null;
    type: string = null;
}

Player in Top players list

This model is used when player info is returned in Top players list.

class TopPlayerModel {
    id: string = null;
    country: FootballCountryModel = null;
    birthDate: string = null;
    firstName: string = null;
    lastName: string = null;
    name: string = null;
    position: string = null;
    assets: {} = null;
}

Player in market correct results

This model is used when player info is returned in markets correct result.

class PlayerMarketResultModel {
    id: string = null;
    name: string = null;
    country: FootballCountryModel = null;
}

Filters for players

Filters model for getPlayers endpoint.

class PlayerFilters {
    countryId: string = null;
    scope: string[] = null;
    name: string = null;
    playerIds: string[] = null;
    limit: number = null;
    page: number = null;
    sortField: string = null;
    sortOrder: string = null;
}

Basic Team

This model is used in team listings, e.g. array of teams, such as competition participants.

class TeamBasicModel {
    id: string = null;
    country: FootballCountryModel = null;
    gender: string = null;
    assets: {} = null;
    name: string = null;
    code: string = null;
    national: boolean = false;
    fullName: string = null;
    shortName: string = null;
  	isDeleted: boolean = false;
}

Full Team

This model is used when all the team info needs to be returned.

class TeamFullModel {
    id: string = null;
    country: FootballCountryModel = null;
    gender: string = null;
    assets: {} = null;
    name: string = null;
    competitions: CompetitionBasicModel[] = [];
    code: string = null;
    national: boolean = false;
    fullName: string = null;
    shortName: string = null;
    colors: TeamColors = new TeamColors();
    squad: PlayerSquadModel[] = [];
    isDeleted: boolean = false;
}

Team colors

class TeamColors {
  primary: string = null;
  secondary: string = null;
  tertiary: string = null;
}

Filters for teams

Filters model for getTeams endpoint.

class PlayerFilters {
    countryId: string = null;
    scope: string[] = null;
    name: string = null;
    playerIds: string[] = null;
    limit: number = null;
    page: number = null;
    sortField: string = null;
    sortOrder: string = null;
}

Basic Match

This model is used in match listings, e.g. array of matches.

class MatchBasicModel {
    id: string = null;
    kickoffAt: string = null;
    finishedAt: string = null;
    updatedAt: string = null;
    availableMarkets: string[] = null;
    homeTeam: TeamBasicModel = null;
    awayTeam: TeamBasicModel = null;
    lineupsConfirmed: boolean = false;
    startedAt: string = null;
    minute: string = null;
    scores: any = null;
    context: { competition: CompetitionBasicModel } = { competition: null };
    status: { type: string, subType: string } = { type: null, subType: null};
    isDeleted: boolean = false;
}

Full Match

This model is used when all the match info needs to be returned.

class MatchFullModel {
    id: string = null;
    kickoffAt: string = null;
    finishedAt: string = null;
    updatedAt: string = null;
    availableMarkets: string[] = null;
    homeTeam: TeamBasicModel = null;
    awayTeam: TeamBasicModel = null;
    lineupsConfirmed: boolean = false;
    startedAt: string = null;
    minute: string = null;
    scores: ScoredModel = null;
    stats: StatsModel = null;
    context: { competition: CompetitionBasicModel } = { competition: null };
    timeline: TimelineModel[] = [];
    status: { type: string, subType: string } = { type: null, subType: null};
    lineups: LineupsModel = null;
  	isDeleted: boolean = false;
}

These models are used as sub-objects inside the main Match models.

Timeline model

class TimelineModel {
    minute: string = null;
    type: string = null;
    teamId: string = null;
    player: PlayerShortModel = null;
    relatedPlayer: PlayerShortModel = null;
    updatedAt: string = null;
}

Stats model

class StatsModel {
    corners: StatType = null;
    cornersFirstHalf: StatType = null;
    cornersSecondHalf: StatType = null;
    cornersExtraTime: StatType = null;
    crosses: StatType = null;
    crossesFirstHalf: StatType = null;
    crossesSecondHalf: StatType = null;
    crossesExtraTime: StatType = null;
    offside: StatType = null;
    offsideFirstHalf: StatType = null;
    offsideSecondHalf: StatType = null;
    offsideExtraTime: StatType = null;
    shotsOn: StatType = null;
    shotsOnFirstHalf: StatType = null;
    shotsOnSecondHalf: StatType = null;
    shotsOnExtraTime: StatType = null;
    throwIn: StatType = null;
    throwInFirstHalf: StatType = null;
    throwInSecondHalf: StatType = null;
    throwInExtraTime: StatType = null;
    redCards: StatType = null;
    redCardsFirstHalf: StatType = null;
    redCardsSecondHalf: StatType = null;
    redCardsExtraTime: StatType = null;
    shotsOff: StatType = null;
    shotsOffFirstHalf: StatType = null;
    shotsOffSecondHalf: StatType = null;
    shotsOffExtraTime: StatType = null;
    goalKicks: StatType = null;
    goalKicksFirstHalf: StatType = null;
    goalKicksSecondHalf: StatType = null;
    goalKicksExtraTime: StatType = null;
    possession: StatType = null;
    possessionFirstHalf: StatType = null;
    possessionSecondHalf: StatType = null;
    possessionExtraTime: StatType = null;
    treatments: StatType = null;
    treatmentsFirstHalf: StatType = null;
    treatmentsSecondHalf: StatType = null;
    treatmentsExtraTime: StatType = null;
    yellowCards: StatType = null;
    yellowCardsFirstHalf: StatType = null;
    yellowCardsSecondHalf: StatType = null;
    yellowCardsExtraTime: StatType = null;
    shotsBlocked: StatType = null;
    shotsBlockedFirstHalf: StatType = null;
    shotsBlockedSecondHalf: StatType = null;
    shotsBlockedExtraTime: StatType = null;
    substitutions: StatType = null;
    substitutionsFirstHalf: StatType = null;
    substitutionsSecondHalf: StatType = null;
    substitutionsExtraTime: StatType = null;
    counterAttacks: StatType = null;
    counterAttacksFirstHalf: StatType = null;
    counterAttacksSecondHalf: StatType = null;
    counterAttacksExtraTime: StatType = null;
    foulsCommitted: StatType = null;
    foulsCommittedFirstHalf: StatType = null;
    foulsCommittedSecondHalf: StatType = null;
    foulsCommittedExtraTime: StatType = null;
}

Scores model

class ScoresModel {
  ftScore: ScoresType = null;
  htScore: ScoresType = null;
  aetScore: ScoresType = null;
  aggScore: ScoresType = null;
  penScore: ScoresType = null;
}

Lineups model

class LineupsModel {
    homeTeam: { players: PlayerShortModel[] } = { players: [] };
    awayTeam: { players: PlayerShortModel[] } = { players: [] };
}

Scores type

type ScoresType = {
    homeGoals: number;
    awayGoals: number;
}

Stats type

type StatType = {
    homeTeam: number;
    awayTeam: number;
}

Filters for matches

Filters model for getMatches endpoint.

class MatchFilters {
    countryIds: string[] = null;
    competitionIds: string[] = null;
    matchIds: string[] = null;
    status: string = null;
    teamIds: string[] = null;
    fromDate: string = null;
    toDate: string = null;
    limit: number = null;
    page: number = null;
    sortField: string = null;
    sortOrder: string = null;
}

Profile models

Profile

This model is used when profile info is returned.

class ProfileModel {
    id: string = null;
    name: string = null;
    nickname: string = null;
    avatar: string = null;
    gender: string = null;
    country: ProfileCountryModel = null;
    birthDate: string = null;
    interests: InterestModel[] = [];
    followingCount: number = null;
    followersCount: number = null;
}

Raw Interests model

This model is used when interest info is returned.

class InterestModel {
    id: string = null;
    source: string = null;
    type: string = null;
    favourite: boolean = null;
}

Full Interests model

This model is used when interest info is returned.

class FullInterestModel {
    id: string = null;
    source: string = null;
    type: string = null;
    favourite: boolean = null;
    model: PlayerBasicModel|TeamBasicModel|CompetitionBasicModel = null;
}

Country model

This models is used when a country is returned anywhere in this namespace.

class ProfileCountryModel {
    id: string = null;
    name: string = null;
    assets: {} = null;
}

Profile Fullness model

This models is used for showing the fullness of one's profile.

class FullnessProfile {
    totalPercentage: number = null;
    breakdown: BreakdownModel = null;
}

class BreakdownModel {
    teamFollowed: CompletedModel = null;
    teamFavourite: CompletedModel = null;
    playerFollowed: CompletedModel = null;
    playerFavourite: CompletedModel = null;
    competitionFollowed: CompletedModel = null;
    competitionFavourite: CompletedModel = null;
    addedBirthdate: CompletedModel = null;
    addedGender: CompletedModel = null;
    addedCountry: CompletedModel = null;
    addedAvatar: CompletedModel = null;
}

class CompletedModel {
    completed: boolean = null;
    percentage: number = null;
}

Following & Followers model

This models is used for showing a list of users (followers or following).

class FollowingModel {
    avatar: string = null;
    followingId: string = null;
    name: string = null;
    profileId: string = null;
    nickname: string = null;
}

class FollowersModel {
    avatar: string = null;
    followerId: string = null;
    name: string = null;
    profileId: string = null;
    nickname: string = null;
}

Filters for Follow

Used as a type of argument filters for getFollowing and getFollowers methods.

class FollowFilters {
    limit: number = null;
    startAfter: string = null;
}

Profile stats model

Model is used to display points, tier and success rates for own or specific users. Related to getStats()

class ProfileStatsModel {
    profileId: string;
    tier: string;
    predictionsMade: number;
    points: number;
    successRates: SuccessRates = new SuccessRates();
  	predictions: PredictionsStats = new PredictionsStats();
  	tiers: AchievementsStats[] = [];
  	badges: AchievementsStats[] = [];
}

class SuccessRates {
    overallPercent: number;
    byFootballCompetition: Record<string, SuccessRatePercent>;
    byFootballTeam: Record<string, SuccessRatePercent>;
    byFootballMarket: Record<string, SuccessRatePercent>;
}

class SuccessRatePercent {
    successRatePercent: number;
}

class PredictionsStats {
  single: SinglePredictionsStats = new SinglePredictionsStats();
  topX: GamePredictionsStats = new GamePredictionsStats();
  matchQuiz: GamePredictionsStats = new GamePredictionsStats();
}

class GamePredictionsStats {
  participations: number = 0;
  points: number = 0;
}

class SinglePredictionsStats {
  predictionsMade: number = 0;
  correct: number = 0;
  points: number = 0;
  breakdown: SummarizedBreakdown = new SummarizedBreakdown();
}

class SummarizedBreakdown {
    footballCompetitions: SinglePredictionsBreakdown[] = [];
    footballTeams: SinglePredictionsBreakdown[] = [];
}

class AchievementsStats {
  id: string = "";
  achievedAt: string = "";
}

Predictor models

Match Summary model

This model is used for showing the summary of all predictions for a match.

class MatchSummaryModel {
    matchId: string = null;
    matchType: string = null;
    predictions: PredictionsModel = null;
}

class PredictionsModel {
    fullTimeOneXTwo: any = {};
    halfTimeOneXTwo: any = {};
    bothTeamsScore: NoYesModel = new NoYesModel();
    overZeroPointFiveGoals: NoYesModel = new NoYesModel();
    overOnePointFiveGoals: NoYesModel = new NoYesModel();
    overTwoPointFiveGoals: NoYesModel = new NoYesModel();
    overThreePointFiveGoals: NoYesModel = new NoYesModel();
    overFourPointFiveGoals: NoYesModel = new NoYesModel();
    overFivePointFiveGoals: NoYesModel = new NoYesModel();
    overSixPointFiveGoals: NoYesModel = new NoYesModel();
    overSixPointFiveCorners: NoYesModel = new NoYesModel();
    overSevenPointFiveCorners: NoYesModel = new NoYesModel();
    overEightPointFiveCorners: NoYesModel = new NoYesModel();
    overNinePointFiveCorners: NoYesModel = new NoYesModel();
    overTenPointFiveCorners: NoYesModel = new NoYesModel();
    overElevenPointFiveCorners: NoYesModel = new NoYesModel();
    overTwelvePointFiveCorners: NoYesModel = new NoYesModel();
    overThirteenPointFiveCorners: NoYesModel = new NoYesModel();
    doubleChance: any = {};
    halfTimeFullTime: any = {};
    playerScore: any = {};
    playerYellowCard: any = {};
    playerRedCard: any = {};
    redCardMatch: NoYesModel = new NoYesModel();
    penaltyMatch: NoYesModel = new NoYesModel();
    playerScoreFirstGoal: any = {};
    cornersMatch: any = {};
    correctScore: any = {};
    playerScoreHattrick: any = {};
    playerScoreTwice: any = {};
}

class NoYesModel {
    no: number = 0;
    yes: number = 0;
}

Prediction model

This model is used for the response data of a prediction

class PredictionResponseModel {
    id: string = null;
    gameInstanceId: string = null;
    wager: number = null;
    totalFixtures: number = null;
    settledFixtures: number = null;
    userId: string = null;
    fixtures: FixturesResponseModel[] = null;
    status: string = null;
    tiebreaker: TiebreakerModel = new TiebreakerModel();
    points: number = null;
    createdAt: string = null;
    updatedAt: string = null;
}

class FixturesResponseModel {
    matchId: string = null;
    matchType: string = null;
    result: ResultModel = null;
    market: MarketEnum = null;
    prediction?: string | boolean;
    target?: string;
    playerId?: string;
    goalsHome?: string;
    goalsAway?: string;
}

class ResultModel {
    settledAt: string = null;
    resettledAt: string = null;
    status: string = null;
    outcome: OutcomeEnum = null;
    points: number = 0;
}

enum OutcomeEnum {
    CORRECT = "CORRECT",
    INCORRECT = "INCORRECT",
    PARTIALLY_CORRECT = "PARTIALLY_CORRECT",
    NOT_VERIFIED = "NOT_VERIFIED"
}

enum MarketEnum {
    FT_1X2 = 'FT_1X2',
    HT_1X2 = "HT_1X2",
    BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE",
    OVER_GOALS_0_5 = "OVER_GOALS_0_5",
    OVER_GOALS_1_5 = "OVER_GOALS_1_5",
    OVER_GOALS_2_5 = "OVER_GOALS_2_5",
    OVER_GOALS_3_5 = "OVER_GOALS_3_5",
    OVER_GOALS_4_5 = "OVER_GOALS_4_5",
    OVER_GOALS_5_5 = "OVER_GOALS_5_5",
    OVER_GOALS_6_5 = "OVER_GOALS_6_5",
    OVER_CORNERS_6_5 = "OVER_CORNERS_6_5",
    OVER_CORNERS_7_5 = "OVER_CORNERS_7_5",
    OVER_CORNERS_8_5 = "OVER_CORNERS_8_5",
    OVER_CORNERS_9_5 = "OVER_CORNERS_9_5",
    OVER_CORNERS_10_5 = "OVER_CORNERS_10_5",
    OVER_CORNERS_11_5 = "OVER_CORNERS_11_5",
    OVER_CORNERS_12_5 = "OVER_CORNERS_12_5",
    OVER_CORNERS_13_5 = "OVER_CORNERS_13_5",
    DOUBLE_CHANCE = "DOUBLE_CHANCE",
    HT_FT = "HT_FT",
    PLAYER_SCORE = "PLAYER_SCORE",
    PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD",
    PLAYER_RED_CARD = "PLAYER_RED_CARD",
    RED_CARD_MATCH = "RED_CARD_MATCH",
    PENALTY_MATCH = "PENALTY_MATCH",
    PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL",
    CORNERS_MATCH = "CORNERS_MATCH",
    CORRECT_SCORE = "CORRECT_SCORE",
    CORRECT_SCORE_HT = "CORRECT_SCORE_HT",
    CORRECT_SCORE_ADVANCED = "CORRECT_SCORE_ADVANCED",
    PLAYER_SCORE_HATTRICK = "PLAYER_SCORE_HATTRICK",
    PLAYER_SCORE_TWICE = "PLAYER_SCORE_TWICE",
}

class TiebreakerModel {
    goldenGoal: number = null;
}

Filters for predictions

Used as a type of argument filters for all user related operations.

class PredictionsFilters {
    limit: number;
    startAfter: string;
    status: StatusEnum[];
    type: TypeGames;
   	matchIds: string[];
    gameIds: string[];

}

enum StatusEnum {
    ACTIVE = "ACTIVE",
    WON = "WON",
    LOST = "LOST",
    PARTIALLY_WON = "PARTIALLY_WON",
    CANCELED = "CANCELED"
}

type TypeGames = "TOP_X" | "MATCH_QUIZ" | "SINGLE";

Configuration model

This model is used for showing the predictor configuration.

class PredictorConfigModel {
    enabled: boolean = false;
    fullCoverageCompetitions: string[] = null;
    markets: MarketsConfigModel = null;
}

class MarketsConfigModel {
    main: string[] = null;
    all: string[] = null;
}

Top X models

Configuration model

This model is used for showing the top x configuration for client.

class TopXConfigModel {
    enabled: boolean = false;
    minFixtures: number = null;
    maxFixtures: number = null
    competitionsWhitelist: string[] = null;
}

List of games

The response model you receive when you fetch list of Top X games.

class GamesListModel {
    id: string = null;
    title: string = null;
    description: string = null;
    type: string = null;
    status: string = null;
    predictionsCutoff: string = null;
    scheduleOpenAt: string = null;
    fixtures: FixturesGamesModel[] = [];
    participantsCount: number = 0;
    related: RelatedEntity[] = null;
    excludedProfileIds: string[] = null;
    rules: string = null;
    flags: string[] = null;
    images: ImagesModel = null;
  	labels: Record<string, string> = null;
    customFields: Record<string, string> = null;
    createdAt: string = null;
    updatedAt: string = null;
}

class RelatedEntity {
  entityId: string = null;
  entityType: string = null;
}

class ImagesModel {
    main: string = null;
    cover: string = null;
    mobile: string = null;
}

class FixturesGamesModel {
    matchId: string = null;
    matchType: string = null;
    market: MarketEnum = null; // See Predictor models for details
    matchModel: MatchBasicModel = null; // See Football models for details
    matchStatus: MatchStatus = new MatchStatus();
}

class MatchStatus {
  type: string = null;
  subType: string = null;
}

Game

The response model you receive when you fetch Top X game by ID.

class GameByIdModel {
    id: string = null;
    title: string = null;
    description: string = null;
    type: string = null;
    status: string = null;
    predictionsCutoff: string = null;
    scheduleOpenAt: string = null;
    fixtures: FixturesGamesModel[] = [];
    participantsCount: number = 0;
    related: RelatedEntity[] = null;
    excludedProfileIds: string[] = null;
    rules: string = null;
    flags: string[] = null;
    images: ImagesModel = null;
    adContent: string = null;
    labels: Record<string, string> = null;
    customFields: Record<string, string> = null;
    createdAt: string = null;
    updatedAt: string = null;
}

class RelatedEntity {
  entityId: string = null;
  entityType: string = null;
}

class ImagesModel {
    main: string = null;
    cover: string = null;
    mobile: string = null;
}

class FixturesGamesModel {
    matchId: string = null;
    matchType: string = null;
    market: MarketEnum = null; // See Predictor models for details
    matchModel: MatchBasicModel = null; // See Football models for details
    matchStatus: MatchStatus = new MatchStatus();
}

class MatchStatus {
  type: string = null;
  subType: string = null;
}

Results for specific game model

When calling getGameResults(gameId) or getCurrentGameResult(gameId) method the following model will be returned:

class GameModel {
    userId: string = null;
    points: number = null;
    results: GameResultsModel[] = [];
    tiebreaker: TiebreakerModel = null;
}

class GameResultsModel {
    matchId: string = null;
    matchModel: MatchBasicModel = null; // See Football models for details
    outcome: string = null;
}

class TiebreakerModel {
    goldenGoal: number = null;
}

Own or user game editions

When calling getMyGameEditions() or getUserGameEditions(userId) method the following model will be returned:

class GamesTopXListModel {
    id: string = null;
    title: string = null;
    description: string = null;
    type: string = null;
    status: string = null;
    outcome: string = null;
    predictionsCutoff: string = null;
    scheduleOpenAt: string = null;
    fixtures: FixturesTopXModel[] = [];
    tiebreaker: TimeTiebreaker = new TimeTiebreaker();
    predictionId: string = null;
    participantsCount: number = 0;
    related: RelatedGame[] = null;
    excludedProfileIds: string[] = null;
    rules: string = null;
    flags: string[] = null;
    points: number = null;
    images: ImagesModel = null;
    predictionTiebreaker: TiebreakerModel = new TiebreakerModel();
    points: number = null;
    createdAt: string = null;
    updatedAt: string = null;
    predictionsMadeAt: string = null;
}

class RelatedGame {
  entityId: string = null;
  entityType: string = null;
}

class FixturesTopXModel {
    matchId: string = null;
    matchType: string = null;
    market: MarketEnum = MarketEnum.CORRECT_SCORE;
    matchModel: MatchBasicModel = null; // See Football models for details
    prediction: PredictionTopXModel = new PredictionTopXModel();
    matchStatus: MatchStatus = new MatchStatus();
}

class MatchStatus {
  type: string = null;
  subType: string = null;
}

class PredictionTopXModel {
    value: string = null;
    result: ResultModel = null;
}

class ResultModel {
    settledAt: string = null;
    resettledAt: string = null;
    status: string = null;
    outcome: OutcomeEnum = null;
    points: number = 0;
}

class MatchStatus {
  	type: string = null;
  	subType: string = null;
}

class TimeTiebreaker {
    timeTiebreaker: boolean = false;
}

class TiebreakerModel {
    goldenGoal: number = 0;
}

enum OutcomeEnum {
    CORRECT = "CORRECT",
    INCORRECT = "INCORRECT",
    PARTIALLY_CORRECT = "PARTIALLY_CORRECT",
    NOT_VERIFIED = "NOT_VERIFIED"
}

Correct results for specific game

class GameMarketsResults {
  gameId: string = null;
  results: MarketsResults[] = null;
  tieBreakers: TieBreakersType = null;
}

type MarketsResults = {
  matchId: string;
  market: MarketEnum;
  result: string | string[] | boolean;
  matchModel: MatchBasicModel;
	matchStatus: MatchStatus;
  playerModels?: PlayerBasicModel[];
};

type TieBreakersType = {
  goldenGoals: GoldenGoalsType[];
};

type GoldenGoalsType = {
  minute: number;
  matchId: string;
  matchModel: MatchBasicModel;
  playerId: string;
  playerModel: PlayerBasicModel;
  goalType: string;
};

Filters for games

Used as a type of argument filters for most of Top X and Match Quiz methods.

class GamesFilters {
    limit: number = null;
    startAfter: string = null;
    status: GameStatusEnum = null;
    type: TypeGames = null;
    gameIds: string[] = null;
}

enum GameStatusEnum {
    OPEN = "OPEN",
    LIVE = "LIVE",
    PENDING = "PENDING",
    CANCELED = "CANCELED",
    CLOSED = "CLOSED",
    SETTLED = "SETTLED"
}

Match Quiz models

Configuration model

This model is used for showing the match quiz configuration for client.

class MatchQuizConfigModel {
    enabled: boolean = false;
    defaultMarkets: string[] = null;
    competitionsWhitelist: string[] = null;
}

List of games

The response model you receive when you fetch list of Match Quiz games.

Same as Top X

Game

The response model you receive when you fetch Match Quiz game by ID.

Same as Top X

Own or user game editions

When calling getMyGameEditions() or getUserGameEditions(userId) method the following model will be returned:

class GamesMatchQuizListModel {
    id: string = null;
    title: string = null;
    description: string = null;
    type: string = null;
    status: string = null;
    outcome: string = null;
    predictionsCutoff: string = null;
    scheduleOpenAt: string = null;
    fixtures: FixturesMatchQuizModel[] = [];
    tiebreaker: TimeTiebreaker = new TimeTiebreaker();
    predictionId: string = null;
    participantsCount: number = 0;
    related: RelatedGame[] = null;
    excludedProfileIds: string[] = null;
    rules: string = null;
    flags: string[] = null;
    points: number = 0;
    images: ImagesModel = null;
    createdAt: string = null;
    updatedAt: string = null;
    predictionsMadeAt: string = null;
}

class RelatedGame {
  entityId: string = null;
  entityType: string = null;
}

class FixturesMatchQuizModel {
    matchId: string = null;
    matchType: string = null;
    market: MarketEnum = null; // See Predictor models for details
    matchModel: MatchBasicModel = null; // See Football models for details
    prediction: PredictionMatchQuizModel = new PredictionMatchQuizModel();
    matchStatus: MatchStatus = new MatchStatus();
}

class MatchStatus {
  type: string = null;
  subType: string = null;
}

class PredictionMatchQuizModel {
    value: any = null;
    target?: number = null;
    playerId?: string = null;
    playerModel?: PlayerBasicModel = null; // See Football models for details
    result: ResultModel = null;
}

class ResultModel {
    settledAt: string = null;
    resettledAt: string = null;
    status: string = null;
    outcome: OutcomeEnum = null;
    points: number = 0;
}

enum OutcomeEnum {
    CORRECT = "CORRECT",
    INCORRECT = "INCORRECT",
    PARTIALLY_CORRECT = "PARTIALLY_CORRECT",
    NOT_VERIFIED = "NOT_VERIFIED"
}

All other models for Match Quiz are the same as Top X models

Loyalty models

Meta

Meta key for paginated responses in Loyalty namespace is different than other namespaces.

Meta for Loyalty namespace example:

class LoyaltyMeta {
    rankType: string = null;
    fromDate: string = null;
    toDate: string = null;
    pagination: PaginationFootballProperties = new PaginationFootballProperties();
}

class PaginationFootballProperties {
    currentPage: number = null;
    itemsPerPage: number = null;
    totalItems: number = null;
    numberOfPages: number = null;
}

Configuration model

This model is used for showing the clients configuration.

class ClientFeaturesModel {
    enabled: boolean = false;
    conditions: {list: string[]} = { list: null };
    actions: ActionsModel = new ActionsModel();
    rewards: RewardsModel = new RewardsModel();
}

class ActionsModel {
    value: ActionValueModel = new ActionValueModel()
}

class ActionValueModel {
    id: string;
    weight: number;
    multiplier: number;
    conditions: string[];
}

class RewardsModel {
    points: PointsModel = null;
    tiers: TiersModel[] = null;
    badges: BadgesModel = null;
}

class PointsModel {
    general: Points[] = null;
    comments: any[] = null
    predictor: PointsValueModel[] = null
    activity: PointsValueModel[] = null;
    topX: PointsValueModel[] = null;
    matchQuiz: PointsValueModel[] = null;
 	 	discussionPost: PointsValueModel[] = null;
}

class PointsValueModel {
    id: string;
    points: number;
    multiplier: number;
    conditions: string[];
}

class Points {
    id: string = null;
    points: number = null;
}

class TiersModel {
    enabled: boolean = false;
    id: string = null;
  	label: string = null;
    points: number = null;
}

class BadgesModel {
    general: GeneralBadgesValue[] = [];
    predictor: BadgesValue[] = [];
    topX: BadgesValue[] = [];
    matchQuiz: BadgesValue[] = [];
}

class GeneralBadgesValue {
  id: string = null;
  label: string = null;
  assets: BadgeAssets = null;
  enabled: boolean = false;
  requirements: GeneralRequirementModel = new GeneralRequirementModel();
}

class BadgesValue {
    id: string = null;
    enabled: boolean = false;
  	label: string = null;
    assets: BadgeAssets = null;
    requirements: RequirementModel = new RequirementModel();
}

interface BadgeAssets {
  mainImageUrl: string;
}

class GeneralRequirementModel extends RequirementModel {
  postPoints: number = null;
  postsCount: number = null;
  reactionsCount: number = null;
  totalDiscussionPoints: number = null;
}

class RequirementModel {
    points: number = 0;
    entityId: string = null;
    entityType: string = null;
    gameParticipationCount: number = null;
    predictionsMade: number = null;
    correctPredictions: number = null;
}

Leaderboard model

Leaderboard can be for a specific template or game.

class LeaderboardModel {
    position: number = null;
    profileId: string = null;
    profileModel: ProfileModel = null;
    points: number = null;
    predictionsMade: number = null;
}

Templates model

Template can be for game, match, competitions, teams and etc. It is returned when list of templates are received.

class TemplateModel {
    id: string = null;
    name: string = null;
    description: string = null;
    type: string = null;
    fromDate: string = null;
    toDate: string = null;
    markets: string[] = [];
    teamIds: string[] = [];
    matchIds: string[] = [];
    groups: TemplateGroups[] = [];
    gameIds: string[] = [];
    gameTypes: string[] = [];
    competitionIds: string[] = [];
    rules: string = null;
    flags: string[] = null;
    images: ImagesModel = null;
    related: RelatedEntity[] = null;
  	labels: Record<string, string> = null;
  	customFields: Record<string, string> = null;
    createdAt: string = null;
    updatedAt: string = null;
}

class RelatedEntity {
  entityId: string = null;
  entityType: string = null;
}

class ImagesModel {
    main: string = null;
    cover: string = null;
    mobile: string = null;
}

class TemplateGroups {
  groupId: string;
  label: string;
  filters: TemplateGroupFilter;
}

class TemplateGroupFilter {
  fromDate: string = null;
  toDate: string = null;
  matchIds: string[] = [];
}

Template By ID model

Template can be for game, match, competitions, teams and etc. It is returned when specific template is called by ID.

class TemplateByIdModel {
    id: string = null;
    name: string = null;
    description: string = null;
    type: string = null;
    fromDate: string = null;
    toDate: string = null;
    markets: string[] = [];
    teamIds: string[] = [];
    matchIds: string[] = [];
    groups: TemplateGroups[] = [];
    gameIds: string[] = [];
    gameTypes: string[] = [];
    competitionIds: string[] = [];
    rules: string = null;
    flags: string[] = null;
    images: ImagesModel = null;
    related: RelatedEntity[] = null;
  	labels: Record<string, string> = null;
  	customFields: Record<string, string> = null;
    createdAt: string = null;
    updatedAt: string = null;
}

class RelatedEntity {
  entityId: string = null;
  entityType: string = null;
}

class ImagesModel {
    main: string = null;
    cover: string = null;
    mobile: string = null;
}

class TemplateGroups {
  groupId: string;
  label: string;
  filters: TemplateGroupFilter;
}

class TemplateGroupFilter {
  fromDate: string = null;
  toDate: string = null;
  matchIds: string[] = [];
}

Filters for loyalty operations

Used as a type of argument filters for getLeaderboard() and getLeaderboardForGame() methods.

class LoyaltyFilters {
    limit: number = null;
    page: number = null;
}

class HighestSuccessRateFilters {
  	market?: string;
  	fromDate?: string;
  	toDate?: string;
  	usersCount?: number;
  	minimumPredictions?: number;
}

Filters for templates

Used as a type of filters for getTemplates()

class TemplateFilters {
  flags?: string;
  status?: string;
  type?: string;
  activeFrom?: string;
  activeTo?: string;
  createdFrom?: string;
  createdTo?: string;
  updatedFrom?: string;
  updatedTo?: string;
}

Activity models

Meta

Same Meta model as Football.

Activity response

class ActivityResponseBody {
    id: string = null;
    profileId: string = null;
  	property: string = null;
    value: string = null;
    action: string = null;
    context: ContextModel = new ContextModel();
    points: number = 0;
}

class ContextModel {
    content?: ContentModel = new ContentModel();
    tags: TagsModel[] = [];
    campaign?: CampaignModel = new CampaignModel();
}

class ContentModel {
    type: string = null;
    id: string = null;
    label: string = null;
}

class TagsModel {
    id: string = null;
    source: string = null;
    type: string = null;
}

class CampaignModel {
    id: string = null;
    label: string = null;
}

Filters for Activity operations

Used as a type of filters for profile activities

class ActivityFilters {
    action: ActionsEnum = null;
    page: number = null;
    limit: number = null;
}

enum ActionsEnum {
    LIKE = "like",
  	DISLIKE = "dislike",
  	PAGE_VIEW = "page_view",
    CONTENT_CONSUMED = "content_consumed",
    SHARE = "share",
    COMMENT = "comment",
    CLICK_AD = "click_ad",
    CONVERSION = "conversion",
    PREDICTION_MADE = "prediction_made",
    CONVERT = "convert",
    MANAGE_INTERESTS = "manage_interests",
    GAME_PARTICIPATION = "game_participation",
    ARTICLE_CONSUMED = "article_consumed",
    VIDEO_CONSUMED = "video_consumed",
    SHORT_VIDEO_CONSUMED = "short_video_consumed",
    LONG_VIDEO_CONSUMED = "long_video_consumed",
    AUDIO_CONSUMED = "audio_consumed",
    GALLERY_CONSUMED = "gallery_consumed",
    IMAGE_CONSUMED = "image_consumed",
    POLL_PARTICIPATION = "poll_participation"
}

enum UserActionsEnum {
  	LIKE = "like",
  	DISLIKE = "dislike",
  	SHARE = "share",
  	COMMENT = "comment",
  	PREDICTION_MADE = "prediction_made"
}

Filters for Rankings operations

Used as a type of filters for profile rankings

class RankingsFilters {
    limit?: number = null;
    page?: number = null;
    sortOrder?: SortOrder = null;
    type?: RankingsType = null;
    leaderboardIds?: string[] = null;
}

type SortOrder = "asc" | "desc";

type RankingsType = "game" | "template";

Entities

Entities follows model

class EntitiesFollows {
  count: number = 0;
  breakdown: EntitiesFollowsBreakdown[] = [];
}

interface EntitiesFollowsBreakdown {
  id: string;
  model: CompetitionBasicModel | TeamBasicModel | PlayerBasicModel;
  count: number;
}

Filters for Entity follows

Used as a type of filters for entity follows

class EntitiesFollowsFilters {
  footballCompetitions?: string[];
  footballTeams?: string[];
  footballPlayers?: string[];
}

Discussions models

Discussion model by ID

type DiscussionType = "LEAGUE" | "COMMENT_SECTION";

type ModerationType = "USER" | "STAFF";

export default class DiscussionModel {
  id: string;
  label: string;
  discussionType: DiscussionType;
  moderationType: ModerationType;
  postsCount: number;
  pinnedPosts: string[];
  lastPostId: string;
  context: ContextModel;
  createdAt: string;
  updatedAt: string;
}

Posts for specific discussion basic model (meta and data)

class PostsDiscussionBasicModel {
  meta: PostsMetaModel;
  data: PostByIdBasicModel[];
}

class PostsMetaModel {
  pagination: {
    totalItems: number;
  	nextPageStartsAfter: string;
  	lastCommentCreateTimestamp: string;
  }
}

class PostByIdBasicModel {
  id: string;
  userId: string;
  discussionId: string;
  content: string;
  repliesCount: number;
  replyId: string;
  reactions: ReactionModel[];
  reactionsCount: number;
  reports: ReportModel[];
  reportsCount: number;
  versions: VersionsModel[];
  privatePost: boolean;
  deleted: boolean;
  deletedAt: string;
  deletedBy: string;
  moderated: boolean;
  moderatedAt: string;
  moderatedBy: string;
  moderatedReason: string;
  createdAt: string;
  updatedAt: string;
}

class ReactionModel {
  id: string;
  userIds: string[];
  reactionCount: number;
}

class VersionsModel {
  updatedAt: string;
  content: string;
}

class ReportModel {
  public userId: string;
  public reason: ReportReasonType;
  public reasonDetails: string;
}

type ReportReasonType =
  | "SPAM"
  | "NOT_ON_THE_SUBJECT"
  | "AD"
  | "COPYRIGHT"
  | "EXPLICIT_SEXUAL_CONTENT"
  | "HATEFUL_SPEECH"
  | "INSULT"
  | "OTHER";

Posts for specific discussion full model (meta and data)

class PostsFullModel {
  meta: PostsMetaModel;
  data: PostByIdFullModel[];
}

class PostsMetaModel {
  pagination: {
    totalItems: number;
  	nextPageStartsAfter: string;
  	lastCommentCreateTimestamp: string;
  }
}

class PostByIdFullModel {
  id: string;
  userId: string;
  userModel: ProfileModel;
  discussionId: string;
  content: string;
  repliesCount: number;
  replyId: string;
  reactions: ReactionModel[];
  reactionsCount: number;
  reports: ReportModel[];
  reportsCount: number;
  versions: VersionsModel[];
  privatePost: boolean;
  deleted: boolean;
  deletedAt: string;
  deletedBy: string;
  moderated: boolean;
  moderatedAt: string;
  moderatedBy: string;
  moderatedReason: string;
  createdAt: string;
  updatedAt: string;
}

class ReactionModel {
  id: string;
  userIds: string[];
  reactionCount: number;
}

class VersionsModel {
  updatedAt: string;
  content: string;
}

class ReportModel {
  public userId: string;
  public reason: ReportReasonType;
  public reasonDetails: string;
}

type ReportReasonType =
  | "SPAM"
  | "NOT_ON_THE_SUBJECT"
  | "AD"
  | "COPYRIGHT"
  | "EXPLICIT_SEXUAL_CONTENT"
  | "HATEFUL_SPEECH"
  | "INSULT"
  | "OTHER";

Posts for multiple discussions model (meta and data)

class PostsModel {
  meta: MetaModel; // See MetaModel in Generig Models section
  data: PostByIdBasicModel[];
}

class PostByIdBasicModel {
  id: string;
  userId: string;
  discussionId: string;
  content: string;
  repliesCount: number;
  replyId: string;
  reactions: ReactionModel[];
  reactionsCount: number;
  reports: ReportModel[];
  reportsCount: number;
  versions: VersionsModel[];
  privatePost: boolean;
  deleted: boolean;
  deletedAt: string;
  deletedBy: string;
  moderated: boolean;
  moderatedAt: string;
  moderatedBy: string;
  moderatedReason: string;
  createdAt: string;
  updatedAt: string;
}

class ReactionModel {
  id: string;
  userIds: string[];
  reactionCount: number;
}

class VersionsModel {
  updatedAt: string;
  content: string;
}

class ReportModel {
  userId: string;
  reason: ReportReasonType;
  reasonDetails: string;
}

type ReportReasonType =
  | "SPAM"
  | "NOT_ON_THE_SUBJECT"
  | "AD"
  | "COPYRIGHT"
  | "EXPLICIT_SEXUAL_CONTENT"
  | "HATEFUL_SPEECH"
  | "INSULT"
  | "OTHER";

Configuration model

class DiscussionsConfigModel {
  enabled: boolean;
  clientId: string;
  automaticModeration: AutomaticModerationModel;
}

class AutomaticModerationModel {
  enabled: boolean;
  moderateLinks: boolean;
  linksWhitelist: string[];
  moderatorProfileId: string;
  dictionary: DictionaryModel;
}

class DictionaryModel {
  reason: string;
  words: string[];
}

Filters for discussions

type DiscussionsSortTypes =
  | "CREATED_AT_ASC"
  | "CREATED_AT_DESC"
  | "POSTS_COUNT_ASC"
  | "POSTS_COUNT_DESC";

class PostsFilters {
  discussionIds?: string[];
  label?: string;
  fromDate?: string;
  toDate?; string;
  fromCount?: string;
  toCount?: string;
  limit?: number;
  startAfter?: string;
  sort?: DiscussionsSortTypes;
}

Filters for posts

type PostsSortTypes =
  | "OLDEST"
  | "LATEST"
  | "INTERACTED"
  | "POPULAR";

class PostsFilters {
  public limit?: number;
  public startAfter?: string;
  public skipDeleted?: boolean;
  public sort?: PostsSortTypes;
}

Private Leagues models

Private leagues model

class PrivateLeaguesModel {
  meta: MetaModel; // Same Meta model as in Generic models section
  data: PrivateLeagueModel[];
}

Private league model

class PrivateLeagueModel {
  id: string;
  name: string;
  description: string;
  type: string;
  members: string[];
  banned: string[];
  invites: string[];
  administrators: string[];
  invitationCode: string;
  templateId: string;
  templateModel: TemplateModel;
  pastTemplates: PastTemplateModel[];
  usersCanInviteUsers: boolean;
  scoringStartsAt: string;
  pinnedPosts: string[];
}

class PastTemplateModel {
  id: string;
  name: string;
  model: TemplateModel;
}

Accept, join or reject model

class AcceptPrivateLeagueModel {
  profileId: string;
  profileModel: ProfileModel;
  leagueId: string;
  leagueModel: PrivateLeagueModel;
  message: string;
}

Private league predictions model

class PrivateLeaguePredictionsModel {
  meta: MetaFootballModel; // Same Meta model as in Generic models section
  data: PrivateLeaguePredictionModel[];
}

class PrivateLeaguePredictionModel {
  predictionId: string;
  predictionModel: PredictionResponseModel;
  profileId: string;
  profileModel: ProfileModel;
}

Private league rankings model

class PrivateLeagueRankingsModel {
  templateId: string;
  templateModel: TemplateModel;
  privateLeagueId: string;
  privateLeagueModel: PrivateLeagueModel;
  position: string;
  points: number;
  type: string;
}

Private league filters

Private league filters model

class PrivateLeagueFilters {
  limit?: number;
  page?: number;
  leagueId?: string;
  templateId?: string;
  sortOrder?: string;
}

Private league invitations filters model

class InvitationFilters {
  limit?: number;
  startAfter?: string;
}

Private league posts filters model

class PrivateLeaguePostsFilters {
  limit?: number;
  startAfter?: string;
  reportsCount?: number;
}

Private league predictions filters model

class PrivateLeaguePredictionsFilters {
  limit?: number;
  page?: number;
  profileIds?: string[];
}

Challenges models

Accept, join or reject model

class AcceptChallengeModel {
  profileId: string;
  profileModel: ProfileModel;
  challengeId: string;
  challengeModel: PrivateLeagueModel;
  message: string;
}

Challenge rankings model

class ChallengeRankingsModel {
  templateId: string;
  templateModel: TemplateModel;
  challengeId: string;
  challengeModel: PrivateLeagueModel;
  position: string;
  points: number;
  type: string;
}

Challenge filters

Challenge filters model

class ChallengeFilters {
  limit?: number;
  page?: number;
  challengeId?: string;
  templateId?: string;
  sortOrder?: string;
}

Mini-Games models

Classic Quizzes model

class ClassicQuizzesModel {
  meta: MetaModel; // Same Meta model as in Generic models section
  data: ClassicQuizBasicModel[];
}

class ClassicQuizBasicModel {
  id: string;
  title: string;
  description: string;
  type: string;
  images: ImagesModel; // Same Images model as in 'List of games' subsection
  participationCount: number;
  questionsCount: number;
  status: string;
  flags: string[];
  customFields: Record<string, string>;
  labels: Record<string, string>;
  time: number;
  averageScore: number;
  perfectScore: number;
  adContent: string;
  context: MiniGamesContext;
  createdAt: string;
  updatedAt: string;
}

class MiniGamesContext {
  content: ContentModel; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[] = [];
  campaign: CampaignModel; // Same CampaignModel as in 'Activity response' subsection
}

class MiniGamesContextTag {
  id: string;
  model: CompetitionBasicModel | TeamBasicModel | PlayerBasicModel;
  source: string;
  type: string;
}

Classic Quiz by ID model

class ClassicQuizFullModel {
  id: string;
  title: string;
  description: string;
  images: ImagesModel; // Same Images model as in 'List of games' subsection
  participationCount: number;
  questionsCount: number;
  status: string;
  flags: string[];
  adContent: string;
  context: MiniGamesContext;
  rules: string;
  customFields: Record<string, string>;
  labels: Record<string, string>;
  time: number;
  averageScore: number;
  perfectScore: number;
  questions: ClassicQuizQuestionModel[];
  createdAt: string;
  updatedAt: string;
}

class MiniGamesContext {
  content: ContentModel; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[] = [];
  campaign: CampaignModel; // Same CampaignModel as in 'Activity response' subsection
}

class MiniGamesContextTag {
  id: string;
  model: CompetitionBasicModel | TeamBasicModel | PlayerBasicModel;
  source: string;
  type: string;
}

class ClassicQuizQuestionModel {
  questionId: number;
  question: string;
  images: MiniGameImages;
  options: ClassicQuizOptionModel[];
}

class ClassicQuizOptionModel {
  optionId: number;
  option: string;
  images: MiniGameImages;
}

class MiniGameImages {
  main: string;
  mobile: string;
}

Classic Quiz participation param body model

class ClassicQuizParticipationBodyModel {
  questionId: number;
  optionId: number;
}

Classic Quiz participation model

class ClassicQuizParticipationModel {
  classicQuizId: string;
  userId: string;
  questions: ClassicQuizParticipationQuestionModel[];
  correctOptions: number;
}

class ClassicQuizParticipationQuestionModel {
  questionId: number;
  optionId: number;
  correct: boolean;
  correctOptionId: number;
}

Classic Quiz user participation model

class ClassicQuizUserParticipation {
  classicQuizId: string = null;
  correct: number = null;
  classicQuizQuestions: number = null;
}

Mini Games filters

class MiniGamesFilters {
  limit?: number;
  startAfter: string;
  flags?: string[];
  status?: string;
  entityIds?: string[];
  entityType?: string;
}

Either/Ors model

class EitherOrsModel {
  meta: MetaModel; // Same Meta model as in Generic models section
  data: EitherOrBasicModel[];
}

class EitherOrBasicModel {
	id: string;
  title: string;
  description: string;
  images: ImagesModel;
  flags: string[];
  status: string;
  winningCondition: string;
  lives: number;
  time: number;
  points: EitherOrPointsModel[];
  customFields: Record<string, string>;
  labels: Record<string, string>;
  type: string;
  adContent: string;
  context: MiniGamesContext;
  createdAt: string;
  updatedAt: string;
}

class EitherOrPointsModel {
  correctSteps: number;
  score: number;
}

class MiniGamesContext {
  content: ContentModel; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[] = [];
  campaign: CampaignModel; // Same CampaignModel as in 'Activity response' subsection
}

class MiniGamesContextTag {
  id: string;
  model: CompetitionBasicModel | TeamBasicModel | PlayerBasicModel;
  source: string;
  type: string;
}

Either/Or by ID model

class EitherOrFullModel {
  id: string;
  title: string;
  description: string;
  images: ImagesModel;
  flags: string[];
  status: string;
  winningCondition: string;
  lives: number;
  time: number;
  points: EitherOrPointsModel[];
  customFields: Record<string, string>;
  labels: Record<string, string>;
  rules: string;
  adContent: string;
  type: string;
  adContent: string;
  context: MiniGamesContext;
  createdAt: string;
  updatedAt: string;
}

class EitherOrPointsModel {
  correctSteps: number;
  score: number;
}

class MiniGamesContext {
  content: ContentModel; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[] = [];
  campaign: CampaignModel; // Same CampaignModel as in 'Activity response' subsection
}

class MiniGamesContextTag {
  id: string;
  model: CompetitionBasicModel | TeamBasicModel | PlayerBasicModel;
  source: string;
  type: string;
}

Either/Or statistics

class EitherOrStatsModel {
  public eitherOrId: string;
  public personalBest: number;
}

Either/Or results model

class EitherOrResultsModel {
  standings: EitherOrResultsStandingsModel[];
  breakdown: EitherOrResultsBreakdownModel[];
}

class EitherOrResultsStandingsModel {
  userId: string;
  userModel: ProfileModel;
  personalBest: string;
}

class EitherOrResultsBreakdownModel {
  rangeStartInclusive: number;
  rangeEndInclusive: number;
  totalUsers: number;
}

Either/Or user participation model

class EitherOrParticipationModel {
  instanceId: string;
  eitherOrId: string;
  gameStartedAt: string;
  currentStep: number;
  currentStreak: number;
  remainingSteps: number;
  currentLives: number;
  currentPoints: number;
  personalBest: number;
  steps: EitherOrParticipationStepsModel[];
}

class EitherOrParticipationStepsModel {
  pairId: string;
  userSelection: string;
  correct: boolean;
  played: boolean;
  timestamp: string;
  optionOne: EitherOrParticipationStepsOptionModel;
  optionTwo: EitherOrParticipationStepsOptionModel;
}

Voting models

Polls model

class PollsModel {
  meta: MetaModel; // Same Meta model as in Generic models section
  data: PollBasicModel[];
}

class PollBasicModel {
  id: string;
  title: string;
  description: string;
  type: string;
  images: ImagesModel; // Same Images model as in 'List of games' subsection
  status: string;
  flags: string[];
  customFields: Record<string, string>;
  labels: Record<string, string>;
  totalVotes: number;
  adContent: string;
  options: PollOptionModel[];
  context: ContextModel; // Same as ContextModel as in 'Activity models'
  createdAt: string;
  updatedAt: string;
}

class PollOptionModel {
  id: string;
  title: string;
  description: string;
  images: ImagesModel;  // Same Images model as in 'List of games' subsection
  votes: number;
}

Poll by ID model

class PollFullModel {
  id: string;
  title: string;
  description: string;
  type: string;
  images: ImagesModel; // Same Images model as in 'List of games' subsection
  status: string;
  flags: string[];
  customFields: Record<string, string>;
  labels: Record<string, string>;
  totalVotes: number;
  rules: string;
  adContent: string;
  options: PollOptionModel[];
  context: ContextModel; // Same as ContextModel as in 'Activity models'
  createdAt: string;
  updatedAt: string;
}

class PollOptionModel {
  id: string;
  title: string;
  description: string;
  images: ImagesModel;  // Same Images model as in 'List of games' subsection
  votes: number;
}

Voting for poll model

class PollVoteBasicModel {
  id: string;
  pollId: string;
  optionId: string;
  userId: string;
}

Poll user vote model

class PollVoteFullModel {
  id: string;
  pollId: string;
  pollModel: PollBasicModel;
  optionId: string;
  optionModel: PollOptionModel;
  userId: string;
}

Polls user votes model

class PollsModel {
  meta: MetaModel; // Same Meta model as in Generic models section
  data: PollVoteFullModel[];
}

class PollVoteFullModel {
  id: string;
  pollId: string;
  pollModel: PollBasicModel;
  optionId: string;
  optionModel: PollOptionModel;
  userId: string;
}