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.

General 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;
}

Branding

Games, Templates, Mini-Games and Polls contain branding property that follows the model:

class BrandingModel {
  colors: BrandingColorsModel;
  urls: BrandingUrlsModel;
  images: BrandingImagesModel;
}

class BrandingColorsModel {
  primaryColor: string;
  secondaryColor: string;
  contentColor: string;
  backgroundColor: string;
  borderColor: string;
  additionalColor: string;
}

class BrandingUrlsModel {
  primaryUrl: string;
  secondaryUrl: string;
  privacyPolicyUrl: string;
  termsAndConditionsUrl: string;
  additionalUrl: string;
}

class BrandingImagesModel {
  mainLogo: string;
  mobileLogo: string;
  backgroundImage: string;
  mobileBackgroundImage: string;
  additionalImage: string;
}

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;
    undecided: 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;
    undecided: 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: MatchStatus = { 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;
    playerStats: PlayerStatsModel[] = null;
    stats: StatsModel = null;
    context: { competition: CompetitionBasicModel } = { competition: null };
    timeline: TimelineModel[] = [];
    status: MatchStatus = { type: null, subType: null};
    lineups: LineupsModel = null;
  	isDeleted: boolean = false;
}

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

Match status model

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

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;
}

Player stats model

class PlayerStatsModel {
  playerId: string;
  position: string;
  minutesPlayed: number;
  yellowCards: number;
  redCards: number;
  goals: number;
  penaltyGoals: number;
  penaltyCommitted: number;
  penaltyWon: number;
  penaltyMissed: number;
  penaltySaved: number;
  penaltyReceived: number;
  ownGoals: number;
  assists: number;
  cleanSheets: number;
  shots: number;
  shotsOn: number;
  shotsBlocked: number;
  offsides: number;
  foulsCommitted: number;
  foulsWon: number;
  tackles: number;
  tacklesBlocks: number;
  tacklesInterceptions: number;
  concededGoals: number;
  caughtBall: number;
  saves: number;
  passes: number;
  crosses: number;
  interceptions: number;
  keyPasses: number;
  passesAccuracy: number;
  duels: number;
  duelsWon: number;
  dribblesAttempts: number;
  dribblesSuccess: number;
  dribblesPast: number;
  updatedAt: string;
}

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;
}

Enum for football match status

enum FootballMatchStatusEnum {
  NONE = "none",
  FINISHED = "finished",
  CANCELLED = "cancelled",
  POSTPONED = "postponed",
  NOT_STARTED = "not_started",
  FIRST_HALF = "1st_half",
  SECOND_HALF = "2nd_half",
  FINISHED_AFTER_AWARDED_WIN = "finished_after_awarded_win",
  TO_FINISH = "to_finish",
  FINISHED_AET = "finished_aet",
  HALFTIME = "halftime",
  FINISHED_AP = "finished_ap",
  INTERRUPTED = "interrupted",
  KICK_OFF_DELAYED = "kick_off_delayed",
  ABANDONED = "abandoned",
  WAITING_FOR_PENALTY = "waiting_for_penalty",
  PENALTY = "penalty",
  PAUSE = "pause",
  EXTRA_TIME_1ST_HALF = "extra_time_1st_half",
  EXTRA_TIME_END_OF_1ST_HALF = "extra_time_end_of_1st_half",
  EXTRA_TIME_2ND_HALF = "extra_time_2nd_half",
  WAITING_FOR_EXTRA_TIME = "waiting_for_extra_time",
  NO_INFO_YET = "no_info_yet",
  AWAITING_INFO = "awaiting_info",
  FINISHED_ASG = "finished_asg"
}

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 public info is returned.

class ProfileModel {
    id: string;
    name: string | null;
    nickname: string | null;
    avatar: string | null;
    gender: string | null;
    country: ProfileCountryModel | null;
    birthDate: string | null;
    interests: InterestModel[] | null;
    verified: boolean;
    anonymous: boolean;
    staffMember: boolean;
    disabled: boolean;
    followingCount: number;
    followersCount: number;
}

Detailed profile

This model is used when profile private info is returned.

class DetailedProfileModel {
    id: string;
    name: string | null;
    email: string;
    nickname: string | null;
    avatar: string | null;
    gender: string | null;
    phoneNumber: string | null;
    phoneCountryCode: string | null;
    country: ProfileCountryModel | null;
    birthDate: string | null;
    interests: InterestModel[] | null;
    preferences: PreferenceModel[];
    verified: boolean;
    anonymous: boolean;
    staffMember: boolean;
  	disabled: boolean;
    followingCount: number;
    followersCount: number;
}

class PreferenceModel {
    preferenceId: string;
    categories: string[];
    source: string;
}

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[] = [];
    discussions: DiscussionStats = new DiscussionStats();
  	classicQuizzes: CLassicQuizzesStats = new CLassicQuizzesStats();
  	eitherOr: EitherOrStats = new EitherOrStats();
}

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 = "";
}

class DiscussionStats {
  totalPoints: number;
  postPoints: number;
  postsMade: number;
  reactionPoints: number;
  reactionCount: number;
}

class CLassicQuizzesStats {
  participationCount: number;
  points: number;
}

class EitherOrStats {
  participationCount: number;
}

Lead request model

Related to collectLead()

class LeadRequestBody {
  firstName?: string | null;
  lastName?: string | null;
  fullName?: string | null;
  email?: string | null;
  gender?: string | null;
  country?: string | null;
  phoneCountryCode?: string | null;
  phoneNumber?: string | null;
  campaignId?: string | null;
  campaignName?: string | null;
  contentType?: string | null;
  contentId?: string | null;
  contentName?: string | null;
  customFields?: Record<string, string> | null;
}

Lead response model

Related to collectLead()

class LeadModel {
	leadId: string;
  profileId: string;
  firstName: string | null;
  lastName: string | null;
  fullName: string | null;
  email: string | null;
  gender: string | null;
  country: string | null;
  phoneCountryCode: string | null;
  phoneNumber: string | null;
  campaignId: string | null;
  campaignName: string | null;
  contentType: string | null;
  contentId: string | null;
  contentName: string | null;
  customFields: Record<string, string> | null;
}

Consents request model

Related to collectConsents()

class ConsentRequestBody {
  consentId: string;
  entityId?: string | null;
  entityType?: ConsentEntityType | null;
  content?: string | null;
}

type ConsentEntityType =
  | "template"
  | "classic_quiz"
  | "personality_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll";

Consent response model

Related to collectConsents()

class ConsentModel {
  consentId: string;
  entityId: string | null;
  entityType: ConsentEntityType | null;
  content: string | null;
  consentedAt: string;
}

type ConsentEntityType =
  | "template"
  | "classic_quiz"
  | "personality_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll";

External Activity response model

Related to getExternalActivities()

class ExternalActivityModel {
  id: string;
  datetime: string;
  status: ExternalActivityStatus;
}

type ExternalActivityStatus = "available" | "consumed";

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;
    gameInstanceId: string | null;
    wager: number | null;
    totalFixtures: number;
    settledFixtures: number;
    userId: string;
    fixtures: FixturesResponseModel[];
    status: string;
    tiebreaker: TiebreakerModel;
    points: number;
    templateId: string | null;
    groupId: string | null;
    profileLastUpdatedAt: string;
    createdAt: string;
    updatedAt: string;
}

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

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

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;
    title: string;
    description: string | null;
    type: string;
    status: string;
    authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
    predictionsCutoff: string;
    scheduleOpenAt: string | null;
    fixtures: FixturesGamesModel[];
    participantsCount: number;
    related: RelatedEntityRelationship[] | null;
    excludedProfileIds: string[] | null;
  	rules: string | null;
		language: string | null;
    flags: string[] | null;
    images: ImagesModel | null;
  	labels: Record<string, string> | null;
    customFields: Record<string, string> | null;
    createdAt: string;
    updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

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

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

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

Game

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

class GameByIdModel {
    id: string;
    title: string;
    description: string | null;
    type: string;
    status: string;
    authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
    predictionsCutoff: string;
    scheduleOpenAt: string | null;
    fixtures: FixturesGamesModel[];
    participantsCount: number;
    related: RelatedEntityRelationship[] | 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;
    updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";


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

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

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;
    title: string;
    description: string | null;
    type: string;
    status: string;
    outcome: string;
    predictionsCutoff: string = null;
    authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
    scheduleOpenAt: string | null;
    fixtures: FixturesTopXModel[] | null;
    tiebreaker: TimeTiebreaker | null;
    predictionId: string;
    participantsCount: number;
    related: RelatedGame[] | null;
    excludedProfileIds: string[] | null;
    rules: string | null;
  	flags: string[] | null;
		language: string | null;
    points: number;
    images: ImagesModel | null;
    predictionTiebreaker: TiebreakerModel | null;
    points: number;
    createdAt: string;
    updatedAt: string;
    predictionsMadeAt: string;
    predictionsUpdatedAt: string;
}

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

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

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

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

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

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

class TimeTiebreaker {
    timeTiebreaker: boolean;
}

class TiebreakerModel {
    goldenGoal: number;
}

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;
    startAfter?: string;
    status?: GameStatusEnum;
    type?: TypeGames;
  	gameIds?: string[];
		flags?: string[];
		language?: string;
}

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;
    title: string;
    description: string | null;
    type: string;
    status: string;
    authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
    outcome: string;
    predictionsCutoff: string;
    scheduleOpenAt: string | null;
    fixtures: FixturesMatchQuizModel[];
    tiebreaker: TimeTiebreaker | null;
    predictionId: string;
    participantsCount: number;
    related: RelatedEntityRelationship[] | null;
    excludedProfileIds: string[] | null;
    rules: string | null;
	  flags: string[] | null;
		language: string | null;
    points: number;
    images: ImagesModel | null;
    createdAt: string;
    updatedAt: string;
    predictionsMadeAt: string;
    predictionsUpdatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

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

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

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

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

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

All other models for Match Quiz are the same asTop 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;
}

Configuration model (V2)

This model is used for showing the clients configuration with version 2 (badges are with new structure)

class LoyaltyConfigModelV2 {
    enabled: boolean;
    clientId: string;
    conditions: {list: string[]};
    actions: ActionsModel;
    rewards: RewardsModelV2;
}

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

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

class RewardsModelV2 {
    points: PointsModel = null;
    tiers: TiersModel[] = null;
    badges: BadgesModelV2 = 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 BadgesModelV2 {
  predictor: PredictorBadgesValue[];
  topX: GameBadgesValue[];
  matchQuiz: GameBadgesValue[];
  games: GamesBadgesValue[];
  football: FootballBadgesValue[];
  classicQuizzes: MiniGamesBadgesValue[];
  eitherOr: MiniGamesBadgesValue[];
  discussions: DiscussionsBadgesValue[];
  voting: VotingBadgesValue;
}

class PredictorBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: PredictorBadgeRequirements;
}

class PredictorBadgeRequirements {
  predictionsNumber: number;
  correctPredictions: number;
  points: number;
  fromDate: string;
  toDate: string;
}

class GameBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: GameBadgeRequirements;
}

class GameBadgeRequirements {
  participationCount: number;
  points: number;
  fromDate: string;
  toDate: string;
}

class GamesBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: GamesBadgeRequirements;
}

class GamesBadgeRequirements {
  participationCount: number;
  points: number;
  specificGames: ISpecificGames[];
  fromDate: string;
  toDate: string;
}

interface ISpecificGames {
  gameId: string;
  gameType: string;
  gameModel: GamesListModel | ClassicQuizzesModel | EitherOrsModel
}

class FootballBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: FootballBadgeRequirements;
}

class FootballBadgeRequirements {
  predictionsNumber: number;
  correctPredictions: number;
  points: number;
  entityId: string;
  entityType: string;
  entityModel: any;
}

class MiniGamesBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: MiniGamesBadgeRequirements;
}

class MiniGamesBadgeRequirements {
  participationCount: number;
  fromDate: string;
  toDate: string;
}

class DiscussionsBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: DiscussionsBadgeRequirements;
}

class DiscussionsBadgeRequirements {
  totalDiscussionPoints: number;
  postsCount: number;
  postPoints: number;
  reactionsCount: number;
}

class VotingBadgesValue {
  potm: PotmBadgesValue[];
  poll: PollBadgesValue[];
}

class PotmBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: VotingBadgeRequirements;
}

class PollBadgesValue {
  id: string;
  label: string;
  descritpion: string;
  assets: BadgeAssets;
  enabled: boolean;
  requirements: VotingBadgeRequirements;
}

class VotingBadgeRequirements {
  points: number;
  voteCount: number;
  entityId: string;
  entityType: string;
  entityModel: any;
}

interface BadgeAssets {
  mainImageUrl: string;
}

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: RelatedEntityRelationship[] = null;
  	labels: Record<string, string> = null;
  	customFields: Record<string, string> = null;
	  branding: BrandingModel = null;
    brandingId: string | null = null;
    createdAt: string = null;
    updatedAt: string = null;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

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;
    name: string;
    description: string;
    type: string;
    fromDate: string;
    toDate: string;
    markets: string[];
    teamIds: string[];
    matchIds: string[];
    groups: TemplateGroups[];
    gameIds: string[];
    gameTypes: string[];
    competitionIds: string[];
    rules: string;
    flags: string[];
    images: ImagesModel;
    related: RelatedEntityRelationship[];
  	labels: Record<string, string>;
  	customFields: Record<string, string>;
	  branding: BrandingModel | null;
		brandingId: string | null;
    createdAt: string;
    updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

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 asFootball.

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;
  page?: number;
  sortOrder?: SortOrder;
  rankType?: RankingsType;
  gameType?: GameType | null;
  leaderboardIds?: string[];
  groupId?: string | null;
}

type SortOrder = "asc" | "desc";

type RankingsType = "GAME" | "TEMPLATE";

type GameType = "TOP_X" | "MATCH_QUIZ";

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

type DiscussionType = "LEAGUE" | "COMMENT_SECTION";

type ModerationType = "USER" | "STAFF";

export default class DiscussionModel {
  id: string;
  label: string;
  discussionType: DiscussionType;
  discussionUrl: string | null;
  moderationType: ModerationType;
  postsCount: number;
  pinnedPosts: string[];
  lastPostId: string;
  status: string;
  customFields: Record<string, string>;
  context: ContextModel;
  createdAt: string;
  updatedAt: string;
}

Discussion posts count model

class PostsCountDiscussionModel {
    id: string;
    postsCount: number;
}

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;
  anonymousNickname: 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;
  anonymousNickname: 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 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;
  anonymousNickname: 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 DiscussionsFilters {
  discussionIds?: string[];
  label?: string;
  fromDate?: string;
  toDate?; string;
  fromCount?: string;
  toCount?: string;
  limit?: number;
  startAfter?: string;
  sort?: DiscussionsSortTypes;
  discussionUrl?: string;
}

Filters for top discussions

class TopDiscussionsFilters {
  fromDate?: string;
  toDate?; string;
  entityIds?: string[];
  entityType?: string;
  limit?: number;
  startAfter?: string;
  contentType?:stromg;
}

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 | null;
  type: string | null;
  images: ImagesModel | null; // Same Images model as in 'List of games' subsection
  participationCount: number;
  questionsCount: number;
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  flags: string[] | null;
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  time: number | null;
  averageScore: number;
  perfectScore: number;
  points: number;
  scored: boolean;
  maxAttempts: number | null;
  adContent: string | null;
  context: MiniGamesContext | null;
  branding: BrandingModel | null;
  brandingId: string | null;
  related: RelatedEntityRelationship[]  | null;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";


class MiniGamesContext {
  content: ContentModel | null; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[];
  campaign: CampaignModel | null; // 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 | null;
  images: ImagesModel | null; // Same Images model as in 'List of games' subsection
  participationCount: number;
  questionsCount: number;
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  flags: string[] | null;
  adContent: string | null;
  context: MiniGamesContext | null;
  rules: string | null;
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  time: number | null;
  averageScore: number;
  perfectScore: number;
  points: number | null;
  scored: boolean;
  maxAttempts: number | null;
  questions: ClassicQuizQuestionModel[];
  branding: BrandingModel | null;
	brandingId: string | null;
  related: RelatedEntityRelationship[]  | null;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class MiniGamesContext {
  content: ContentModel | null; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[];
  campaign: CampaignModel | null; // 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 | null;
  embedCode: string | null;
  explanation: string | null;
  options: ClassicQuizOptionModel[];
}

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

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

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;
  points: number;
  attempts: number;
}

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

Classic Quiz user participations model

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

Classic Quiz user participation model

class ClassicQuizUserParticipationModel {
  classicQuizId: string;
  classicQuizModel: ClassicQuizBasicModel;
  correct: number;
  classicQuizQuestions: number;
  personalBest: number;
  points: number;
  answers: ClassicQuizParticipationQuestionModel[];
}

Classic Quiz leaderboard model

class ClassicQuizzesLeaderboardModel {
  meta: ClassicQuizLeaderboardMeta;
  data: ClassicQuizRankModel[];
}

class ClassicQuizLeaderboardMeta {
  pagination: PaginationFootballProperties;
  filters: ClassicQuizFiltersMeta;
}

class ClassicQuizFiltersMeta {
  classicQuizIds: string;
}

class ClassicQuizRankModel {
  position: number;
  profileId: string;
  profileModel: ProfileModel;
  points: number;
}

Classic Quiz user rankings model

class ClassicQuizUserRankModel {
  meta: MetaFootballModel;
  data: ClassicQuizUserRank[];
}

class ClassicQuizUserRank {
  position: number;
  classicQuizId: string;
  classicQuizModel: ClassicQuizBasicModel;
  points: number;
}

Classic Quiz results summary model

class ResultsSummaryModel {
  questions: number;
  correctAnswers: number;
}

Classic Quiz participations filters

class ClassicQuizLeaderboardFilters {
  limit?: number;
  page?: number;
  classicQuizIds?: string[];
}

Classic Quiz user rankings filters

class ClassicQuizRankFilters {
  limit?: number;
  page?: number;
}

Mini Games filters

class MiniGamesFilters {
  limit?: number;
  startAfter: string;
  flags?: string[];
  status?: string;
  entityIds?: string[];
  entityType?: string;
  sort?: string;
  groupByStatus?: boolean;
  language?: 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 | null;
  images: ImagesModel | null;
  flags: string[] | null;
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  winningCondition: string;
  lives: number;
  time: number;
  points: EitherOrPointsModel[];
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  type: string | null;
  adContent: string | null;
  context: MiniGamesContext | null;
  branding: BrandingModel | null;
	brandingId: string | null;
  related: RelatedEntityRelationship[]  | null;
  totalParticipationsCount: number;
  totalUsersCount: number;
  finishedParticipationsCount: number;
  averageStartedParticipationsCount: number;
  averageFinishedParticipationsCount: number;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

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

class MiniGamesContext {
  content: ContentModel | null; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[];
  campaign: CampaignModel | null; // 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 | null;
  images: ImagesModel | null;
  flags: string[] | null;
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  winningCondition: string;
  lives: number;
  time: number;
  points: EitherOrPointsModel[];
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  rules: string | null;
  adContent: string | null;
  type: string | null;
  adContent: string | null;
  context: MiniGamesContext | null;
  branding: BrandingModel | null;
	brandingId: string | null;
  related: RelatedEntityRelationship[]  | null;
  totalParticipationsCount: number;
  totalUsersCount: number;
  finishedParticipationsCount: number;
  averageStartedParticipationsCount: number;
  averageFinishedParticipationsCount: number;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

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

class MiniGamesContext {
  content: ContentModel | null; // Same ContentModel as in 'Activity response' subsection
  tags: MiniGamesContextTag[];
  campaign: CampaignModel | null; // 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;
  public betterThan: 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;
  participationCount: number;
  finishedParticipationsCount: number;
  steps: EitherOrParticipationStepsModel[];
}

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

class EitherOrParticipationStepsOptionModel {
  id: string;
  label: string;
  images: MiniGameImages;
  value: number;
}

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

Personality Quizzes model

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

class PersonalityQuizBasicModel {
  id: string;
  title: string;
	alternativeTitle: string | null;
  description: string | null;
  images: ImagesModel | null; // Same Images model as in 'List of games' subsection
  participationCount: number;
  questionsCount: number;
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  flags: string[];
	preferencesEnabled: boolean;
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  time: number;
  maxAttempts: number;
  adContent: string | null;
  context: MiniGamesContext | null;
  branding: BrandingModel | null;
	brandingId: string | null;
  related: RelatedEntityRelationship[];
	language: string | null;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";


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

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

Personality Quiz by ID model

class PersonalityQuizFullModel {
  id: string;
  title: string;
	alternativeTitle: string | null;
  description: string | null;
  images: ImagesModel | null; // Same Images model as in 'List of games' subsection
  participationCount: number;
  questionsCount: number;
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  flags: string[];
	preferencesEnabled: boolean;
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  time: number;
  maxAttempts: number;
  adContent: string | null;
  context: MiniGamesContext | null;
  branding: BrandingModel | null;
	brandingId: string | null;
  related: RelatedEntityRelationship[];
  language: string | null;
  rules: string | null;
  personaResults: PersonalityQuizPersonaResultsModel[];
	questions: PersonalityQuizQuestionModel[] = [];
  createdAt: string;
  updatedAt: string;
}

class PersonalityQuizPersonaResultsModel {
  personaId: number;
  title: string;
  description: string | null;
  images: MiniGameImages | null;
}

class PersonalityQuizQuestionModel {
  questionId: number;
	question: string;
  images: MiniGameImages | null;
  explanation: string | null;
  options: PersonalityQuizOptionModel[];
}

class PersonalityQuizOptionModel {
  optionId: number;
  option: string;
  images: MiniGameImages | null;
  personaPoints: PersonalityQuizPersonaPointsModel[];
  preferencesMapping: PreferenceMappingModel[];
}

class PersonalityQuizPersonaPointsModel {
  personaId: number;
  points: number;
}

class PreferenceMappingModel {
  preferenceId: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

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

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

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

Personality Quiz participation param body model

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

Personality Quiz participations model

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

Personality Quiz participation model

class PersonalityQuizParticipationModel {
  personalityQuizId: string;
  userId: string;
  questions: PersonalityQuizParticipationQuestionModel[];
	personas: PersonalityQuizPersonaPercentsModel[];
  attempts: number;
}

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

class PersonalityQuizPersonaPercentsModel {
  personaId: number;
  percent: number;
}

Personality Quiz filters

class PersonalityQuizFilters {
  limit?: number;
  startAfter: string;
  flags?: string[];
  status?: string;
  entityIds?: string[];
  entityType?: string;
  sort?: string;
  groupByStatus?: boolean;
  language?: string;
  title?: string;
  personalityQuizIds?: string[];
}

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 | null;
  type: string | null;
  images: ImagesModel | null; // Same Images model as in 'List of games' subsection
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  flags: string[] | null;
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  totalVotes: number;
  adContent: string | null;
  preferencesEnabled: boolean;
  multipleChoice: boolean;
  maxMultipleChoiceOptions: number | null;
  participationCount: number;
  options: PollOptionModel[];
  context: ContextModel | null; // Same as ContextModel as in 'Activity models'
  branding: BrandingModel | null;
	brandingId: string | null;
  embedCode: string | null;
  related: RelatedEntityRelationship[]  | null;
  externalActivity: string | null;
  maxAttempts: number | null;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class PollOptionModel {
  id: string;
  title: string;
  description: string | null;
  images: ImagesModel | null;  // Same Images model as in 'List of games' subsection
  votes: number;
  embedCode: string | null;
  preferencesMapping: PreferenceMappingModel[];
}

class PreferenceMappingModel {
  preferenceId: string;
}

Poll by ID model

class PollFullModel {
  id: string;
  title: string;
  description: string | null;
  type: string | null;
  images: ImagesModel | null; // Same Images model as in 'List of games' subsection
  status: string;
  authRequirement: "FREE" | "LEAD" | "REGISTERED" | "PAID" | null;
  flags: string[] | null;
  customFields: Record<string, string> | null;
  labels: Record<string, string> | null;
  totalVotes: number;
  rules: string | null;
  adContent: string | null;
  preferencesEnabled: boolean;
  multipleChoice: boolean;
  maxMultipleChoiceOptions: number | null;
  participationCount: number;
  options: PollOptionModel[];
  context: ContextModel | null; // Same as ContextModel as in 'Activity models'
  branding: BrandingModel | null;
	brandingId: string | null;
  embedCode: string | null;
  related: RelatedEntityRelationship[]  | null;
	externalActivity: string | null;
  maxAttempts: number | null;
  createdAt: string;
  updatedAt: string;
}

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class PollOptionModel {
  id: string;
  title: string;
  description: string | null;
  images: ImagesModel | null;  // Same Images model as in 'List of games' subsection
  votes: number;
  embedCode: string | null;
  preferencesMapping: PreferenceMappingModel[];
}

class PreferenceMappingModel {
  preferenceId: string;
}

Votes for all polls model

class PollVoteBasicModel {
  id: string;
  pollId: string;
  optionId: string | null;
  optionIds: string[]
  userId: string;
  createdAt: string;
}

Specific Poll user vote model

class PollVoteFullModel {
  id: string;
  pollId: string;
  pollModel: PollBasicModel;
  optionId: string | null;
  optionIds: string[];
  optionModel: PollOptionModel | null;
  optionsModels: PollOptionModel[];
  userId: string;
	previousVotes: PreviousPollVoteModel[];
  attempts: number | null;
  createdAt: string;
}

User poll vote model

class PollVoteFullModel {
  id: string;
  pollId: string;
  optionId: string | null;
  optionIds: string[];
  userId: string;
	previousVotes: PreviousPollVoteModel[];
  attempts: number | null;
  createdAt: 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 | null;
  optionIds: string[];
  optionModel: PollOptionModel | null;
  optionsModels: PollOptionModel[];
  userId: string;
}

Polls filters

class PollsFilters {
  limit?: number;
  startAfter?: string;
  flags?: string[];
  status?: string;
  entityIds?: string[];
  entityType?: string;
  pollIds?: string[];
  sortOrder?: string;
  minVotes?: number;
  language?: string;
}

Player of the match (PoTM) user vote model

class PotmUserVotesResponseModel {
  meta: MetaModel;
  data: PotmUserVotesModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class PotmUserVotesModel {
  matchId: string;
  matchModel: MatchBasicModel | null;
  playerId: string;
  playerModel: PlayerBasicModel | null;
  createdAt: string;
}

Player of the match (PoTM) results model

class PotmResultsResponseModel {
  meta: PotmResultsMetaModel;
  data: PotmResultsModel[];
}

class PotmResultsMetaModel {
  total: number;
}

class PotmResultsModel {
  teamId: string;
  teamModel: TeamBasicModel | null;
  playerId: string;
  playerModel: PlayerBasicModel | null;
  votes: number;
  winner: boolean;
}

Player of the match (PoTM) user votes filters

class PotmUserVotesFilters {
  limit?: number;
  startAfter?: string;
  matchIds?: string[];
}

Fantasy models

Configuration model

class FantasyConfigModel {
  enabled: boolean;
  clientId: string;
  addPointsToProfileTotal: boolean;
  multipliers: FantasyMultipliersModel | null;
  coefficients: FantasyCoefficientsModel;
  players: FantasyPlayersModel;
  competitionsWhitelist: string[];
}

class FantasyMultipliersModel {
  captain: number | null;
  viceCaptain: number | null;
}

class FantasyCoefficientsModel {
  assists: number;
  shots: number;
  offsides: number;
  tackles: number;
  saves: number;
  minutesEqualOrOver60: number;
  minutesUnder60: number;
  yellowCards: number;
  redCards: number;
  goalsGoalkeeper: number;
  goalsDefender: number;
  goalsMidfielder: number;
  goalsForwards: number;
  penaltyGoals: number;
  ownGoals: number;
  cleanSheetsGoalkeeper: number;
  cleanSheetsDefender: number;
  cleanSheetsMidfielder: number;
  cleanSheetsForwards: number;
  shotsOn: number;
  foulsCommitted: number;
  penaltyCommitted: number;
  penaltyWon: number;
  penaltyMissed: number;
  concededGoals: number;
  caughtBall: number;
}

class FantasyPlayersModel {
  total: number;
  minGoalkeepers: number;
  maxGoalkeepers: number;
  minDefenders: number;
  maxDefenders: number;
  minMidfielders: number;
  maxMidfielders: number;
  minStrikers: number;
  maxStrikers: number;
}

Players points model

class FantasyPlayersPointsModel {
  meta: FantasyPlayersMetaModel;
  data: PlayerPointsModel[];
}

class FantasyPlayersMetaModel {
  filters: PlayersPointsFilters;
}

class PlayersPointsFilters {
	templateId: string;
}

class PlayerPointsModel {
  playerId: string;
  playerModel: PlayerBasicModel;
  points: number;
  rank: number;
}

Player detailed statistics and points

class FantasyPlayerDetailedStatsModel {
  meta: FantasyPlayerDetailedStatsMetaModel;
  data: PlayerDetailedStatsModel[];
}

class FantasyPlayerDetailedStatsMetaModel {
  filters: PlayerDetailedStatsFilters;
}

class PlayerDetailedStatsFilters {
  templateId: string;
  playerId: string;
}

class PlayerDetailedStatsModel {
  matchId: string;
  matchModel: MatchBasicModel;
  points: PlayerDetailedPointsModel;
  stats: PlayerStatsMatchModel;
}

class PlayerDetailedPointsModel {
  total: number;
  minutesPlayed: number;
  yellowCards: number;
  redCards: number;
  goals: number;
  penaltyGoals: number;
  ownGoals: number;
  assists: number;
  cleanSheets: number;
  shots: number;
  shotsOn: number;
  offsides: number;
  foulsCommitted: number;
  penaltyCommitted: number;
  penaltyWon: number;
  penaltyMissed: number;
  tackles: number;
  concededGoals: number;
  caughtBall: number;
  saves: number;
}

class PlayerStatsMatchModel {
  minutesPlayed: number;
  yellowCards: number;
  redCards: number;
  goals: number;
  penaltyGoals: number;
  penaltyCommitted: number;
  penaltyWon: number;
  penaltyMissed: number;
  penaltySaved: number;
  penaltyReceived: number;
  ownGoals: number;
  assists: number;
  cleanSheets: number;
  shots: number;
  shotsOn: number;
  shotsBlocked: number;
  offsides: number;
  foulsCommitted: number;
  foulsWon: number;
  tackles: number;
  tacklesBlocks: number;
  tacklesInterceptions: number;
  concededGoals: number;
  caughtBall: number;
  saves: number;
  passes: number;
  crosses: number;
  interceptions: number;
  keyPasses: number;
  passesAccuracy: number;
  duels: number;
  duelsWon: number;
  dribblesAttempts: number;
  dribblesSuccess: number;
  dribblesPast: number;
}

Id Mapping models

Mapping response model

class MappingResponseModel {
  meta: MappingModel;
  data: MappingModel[];
}

class MappingModel {
  input: string;
  output: string;
}

Bracket game models

Bracket games model

class BracketGamesModel {
  meta: MetaModel;
  data: BracketGameModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class BracketGameModel {
  id: string;
  title: string;
  description: string;
  rules: string | null;
  customFields: Record<string, string> | null;
  images: ImagesModel | null;
  type: string = "BRACKET";
  status: GameStatusEnum;
  points: number;
  related: RelatedEntityRelationship[];
  tiebreaker: BracketGameTiebreakerModel | null;
  predictionsCutoff: string | null;
  meta: BracketGameMetaModel;
  fixtures: BracketGameFixturesModel;
  brandingId: string | null;
  flags: string[];
	language: string | null;
  createdAt: string;
  updatedAt: string;
}

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

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class BracketGameTiebreakerModel {
  statTiebreakerEnabled: boolean;
  statTotal: number;
}

class BracketGameMetaModel {
  participants: BracketGameMetaParticipantsModel[];
}

class BracketGameMetaParticipantsModel {
  id: string;
  name: string;
  group: string | null;
  image: string | null;
  undecided: boolean;
}

class BracketGameFixturesModel {
  matchId: string;
  participantOne: string;
  participantTwo: string;
  winner: string | null;
  homeParticipant: string | null;
  startDate: string;
  score: BracketGameFixtureScoreModel;
}

class BracketGameFixtureScoreModel {
  participantOne: string | null;
  participantTwo: string | null;
}

Bracket game model

class BracketGameModel {
  id: string;
  title: string;
  description: string;
  rules: string | null;
  customFields: Record<string, string> | null;
  images: ImagesModel | null;
  type: string = "BRACKET";
  status: GameStatusEnum;
  points: number;
  related: RelatedEntityRelationship[];
  tiebreaker: BracketGameTiebreakerModel | null;
  predictionsCutoff: string | null;
  meta: BracketGameMetaModel;
  fixtures: BracketGameFixturesModel;
	brandingId: string | null;
  createdAt: string;
  updatedAt: string;
}

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

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class BracketGameTiebreakerModel {
  statTiebreakerEnabled: boolean;
  statTotal: number;
}

class BracketGameMetaModel {
  participants: BracketGameMetaParticipantsModel[];
}

class BracketGameMetaParticipantsModel {
  id: string;
  name: string;
  group: string | null;
  image: string | null;
  undecided: boolean;
}

class BracketGameFixturesModel {
  matchId: string;
  participantOne: string;
  participantTwo: string;
  winner: string | null;
  homeParticipant: string | null;
  startDate: string;
  score: BracketGameFixtureScoreModel;
}

class BracketGameFixtureScoreModel {
  participantOne: string | null;
  participantTwo: string | null;
}

Bracket game prediction request model

class BracketGamePredictionRequestBody {
  predictions: BracketGamePredictions[];
  tiebreaker: BracketGameTiebreaker | null;
}

class BracketGamePredictions {
  matchId: string;
  participantOne: string;
  participantTwo: string;
  winner: BracketWinnerEnum;
}

enum BracketWinnerEnum {
  PARTICIPANT_ONE = "PARTICIPANT_ONE",
  PARTICIPANT_TWO = "PARTICIPANT_TWO",
}

class BracketGameTiebreaker {
  statTotal: number;
}

Bracket game prediction response model

class BracketGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: "ACTIVE" | "SETTLED";
  fixtures: BracketGamePredictionFixturesModel[];
  tiebreaker: BracketGameTiebreaker;
  createdAt: string;
  updatedAt: string;
}

class BracketGamePredictionFixturesModel {
  matchId: string;
  participantOne: string;
  participantTwo: string;
  winner: BracketWinnerEnum;
  correct: boolean | null;
}

enum BracketWinnerEnum {
  PARTICIPANT_ONE = "PARTICIPANT_ONE",
  PARTICIPANT_TWO = "PARTICIPANT_TWO",
}

class BracketGameTiebreaker {
  statTotal: number;
}

Bracket game predictions response model

class BracketGamePredictionsModel {
  meta: MetaModel;
  data: BracketGamePredictionModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class BracketGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: "ACTIVE" | "SETTLED";
  fixtures: BracketGamePredictionFixturesModel[];
  tiebreaker: BracketGameTiebreaker;
  createdAt: string;
  updatedAt: string;
}

class BracketGamePredictionFixturesModel {
  matchId: string;
  participantOne: string;
  participantTwo: string;
  winner: BracketWinnerEnum;
  correct: boolean | null;
}

enum BracketWinnerEnum {
  PARTICIPANT_ONE = "PARTICIPANT_ONE",
  PARTICIPANT_TWO = "PARTICIPANT_TWO",
}

class BracketGameTiebreaker {
  statTotal: number;
}

Bracket game rankings response model

class BracketGameRankingsModel {
  meta: MetaModel;
  data: BracketGamePredictionModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class BracketGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: "ACTIVE" | "SETTLED";
  fixtures: BracketGamePredictionFixturesModel[];
  tiebreaker: BracketGameTiebreaker;
  createdAt: string;
  updatedAt: string;
}

class BracketGamePredictionFixturesModel {
  matchId: string;
  participantOne: string;
  participantTwo: string;
  winner: BracketWinnerEnum;
  correct: boolean | null;
}

enum BracketWinnerEnum {
  PARTICIPANT_ONE = "PARTICIPANT_ONE",
  PARTICIPANT_TWO = "PARTICIPANT_TWO",
}

class BracketGameTiebreaker {
  statTotal: number;
}

Bracket game filters

class BracketGameFilters {
  limit?: number;
  startAfter?: string;
  status?: GameStatusEnum;
  sortOrder?: SortOrder;
	flags?: string[];
	language?: string;
}

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

type SortOrder = "asc" | "desc";

Bracket game predictions filters

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

Bracket game rankings filters

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

Lists models

List content model

class ListContentResponseModel {
  meta: MetaFootballModel;
  data: ListContentModel[];
}

class MetaFootballModel {
    pagination: PaginationFootballProperties;
}

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

class ListContentModel {
  entityId: string;
  entityType: ListEntityType;
  entityModel: ListEntityModelMap[ListEntityType] | null;
}

type ListEntityType =
  | "CLASSIC_QUIZ"
  | "EITHER_OR"
  | "POLL"
  | "TOP_X"
  | "MATCH_QUIZ"
  | "LEADERBOARD_TEMPLATES";

type ListEntityModelMap = {
  CLASSIC_QUIZ: ClassicQuizBasicModel;
  EITHER_OR: EitherOrBasicModel;
  POLL: PollBasicModel;
  TOP_X: GamesListModel;
  MATCH_QUIZ: GamesListModel;
  LEADERBOARD_TEMPLATES: TemplateModel;
};

List content filters

class ListContentFilters {
  limit?: number;
  page?: number;
}

Standing game models

Games model

class StandingGamesModel {
  meta: MetaModel;
  data: StandingGameModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class StandingGameModel {
  id: string;
  title: string;
  description: string;
  rules: string | null;
  customFields: Record<string, string> | null;
  images: ImagesModel | null;
  type: string = "BRACKET";
  status: GameStatusEnum;
  points: number;
  related: RelatedEntityRelationship[];
  predictionsCutoff: string | null;
  meta: StandingGameMetaModel;
  outcome: string[];
  outcomeCount: number;
  brandingId: string | null;
  flags: string[];
	language: string | null;
  createdAt: string;
  updatedAt: string;
}

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

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class StandingGameMetaModel {
  participants: StandingGameMetaParticipantsModel[];
}

class StandingGameMetaParticipantsModel {
  id: string;
  name: string;
  group: string | null;
  image: string | null;
  undecided: boolean;
}

Game model

class StandingGameModel {
  id: string;
  title: string;
  description: string;
  rules: string | null;
  customFields: Record<string, string> | null;
  images: ImagesModel | null;
  type: string = "BRACKET";
  status: GameStatusEnum;
  points: number;
  related: RelatedEntityRelationship[];
  predictionsCutoff: string | null;
  meta: StandingGameMetaModel;
  outcome: string[];
  outcomeCount: number;
	brandingId: string | null;
  createdAt: string;
  updatedAt: string;
}

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

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class StandingGameMetaModel {
  participants: StandingGameMetaParticipantsModel[];
}

class StandingGameMetaParticipantsModel {
  id: string;
  name: string;
  group: string | null;
  image: string | null;
  undecided: boolean;
}

Prediction model

class StandingGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  total: number;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: "ACTIVE" | "SETTLED";
  standing: string[];
  createdAt: string;
  updatedAt: string;
}

User game prediction model

class StandingGamePredictionsModel {
  meta: MetaModel;
  data: StandingGamePredictionModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class StandingGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  total: number;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: "ACTIVE" | "SETTLED";
  standing: string[];
  createdAt: string;
  updatedAt: string;
}

Rankings model

class StandingGameRankingsModel {
  meta: MetaModel;
  data: BracketGamePredictionModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class StandingGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  total: number;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: "ACTIVE" | "SETTLED";
  standing: string[];
  createdAt: string;
  updatedAt: string;
}

Standing games filters

class StandingGamesFilters {
  status?: GameStatusEnum;
  sortOrder?: SortOrder;
  gameIds?: string[];
  limit?: number;
  startAfter?: string;
	flags?: string[];
	language?: string;
}

Standing rankings filters

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

Odds models

Match odds filters

class MatchOddsFilters {
  scopeType: ScopeTypeEnum; // Default: ORDINARY_TIME. Applied by the SDK after the response arrives
  oddFormat: OddFormatEnum; // Default: DECIMAL
  marketTypes: MatchOddsMarketType[]; // Default: [FT_1X2]. Applied by the SDK after the response arrives
  operators: string[] | null; // Operator config ids, e.g. ["bookmaker-bg", "bookmaker2-bg"]
  affiliateId: string | null; // Substituted into every operator link with an {affiliate_id} placeholder
  affiliateIds: Record<string, string> | null; // Per operator, e.g. { "bookmaker-bg": "aff-123" }. Wins over affiliateId
  language: string | null; // BCP 47 language tag, e.g. "EN" or "BG"
  oddType: OddTypeEnum; // Deprecated: ignored. The type of the returned odds is reported on MatchOddsModel.type
}

// A market code: one of the MatchOddsMarketEnum values, or any code the API starts returning
type MatchOddsMarketType = MatchOddsMarketEnum | string;

enum ScopeTypeEnum {
  ORDINARY_TIME = "ORDINARY_TIME", // Regular match time without extra time or penalties
  FULL_TIME = "FULL_TIME" // Full time match including the extra time and penalties
}

enum OddFormatEnum {
  DECIMAL = "DECIMAL", // Odds displayed in decimal format (e.g., 1.50, 4.00)
  FRACTIONAL = "FRACTIONAL", // Odds displayed in fractional format (e.g., 1/2, 3/1)
  MONEYLINE = "MONEYLINE" // Deprecated: not supported. Falls back to DECIMAL
}

enum OddTypeEnum {
  PRE_EVENT = "PRE_EVENT", // Odds offered before the match begins
  LIVE = "LIVE", // Odds offered during the match in real-time
  ALL = "ALL" // Deprecated: both types can no longer be requested separately
}

enum MatchOddsMarketEnum {
  FT_1X2 = "FT_1X2", // Full-time 1X2 odds (home win, draw, away win)
  HT_1X2 = "HT_1X2", // Half-time 1X2 odds
  DOUBLE_CHANCE = "DOUBLE_CHANCE", // The match will finish 1 or X, 2 or X, 1 or 2
  DRAW_NO_BET = "DRAW_NO_BET", // The match winner, with the stake returned on a draw
  HT_FT = "HT_FT", // How will finish the first half (1X2) and full time (1X2)
  BOTH_TEAMS_SCORE = "BOTH_TEAMS_SCORE", // Both teams to score in the match
  CORRECT_SCORE = "CORRECT_SCORE", // The correct score of the match
  TEAM_SCORE_FIRST_GOAL = "TEAM_SCORE_FIRST_GOAL", // Team to score the first goal in match
  PLAYER_SCORE_FIRST_GOAL = "PLAYER_SCORE_FIRST_GOAL", // Player to score the first goal in match
  PLAYER_SCORE = "PLAYER_SCORE", // Player to score in match
  PLAYER_RED_CARD = "PLAYER_RED_CARD", // Player to receive red card in match
  PLAYER_YELLOW_CARD = "PLAYER_YELLOW_CARD", // Player to receive yellow card in match
  OVER_GOALS_0_5 = "OVER_GOALS_0_5", // There will be at least 1 goal in match
  OVER_GOALS_1_5 = "OVER_GOALS_1_5", // There will be at least 2 goals in match
  OVER_GOALS_2_5 = "OVER_GOALS_2_5", // There will be at least 3 goals in match
  OVER_GOALS_3_5 = "OVER_GOALS_3_5", // There will be at least 4 goals in match
  OVER_GOALS_4_5 = "OVER_GOALS_4_5", // There will be at least 5 goals in match
  OVER_GOALS_5_5 = "OVER_GOALS_5_5", // There will be at least 6 goals in match
  OVER_GOALS_6_5 = "OVER_GOALS_6_5", // There will be at least 7 goals in match
  OVER_CORNERS_6_5 = "OVER_CORNERS_6_5", // There will be at least 7 corners in match
  OVER_CORNERS_7_5 = "OVER_CORNERS_7_5", // There will be at least 8 corners in match
  OVER_CORNERS_8_5 = "OVER_CORNERS_8_5", // There will be at least 9 corners in match
  OVER_CORNERS_9_5 = "OVER_CORNERS_9_5", // There will be at least 10 corners in match
  OVER_CORNERS_10_5 = "OVER_CORNERS_10_5", // There will be at least 11 corners in match
  OVER_CORNERS_11_5 = "OVER_CORNERS_11_5", // There will be at least 12 corners in match
  OVER_CORNERS_12_5 = "OVER_CORNERS_12_5", // There will be at least 13 corners in match
  OVER_CORNERS_13_5 = "OVER_CORNERS_13_5" // There will be at least 14 corners in match
}

Match odds by date filters

class MatchOddsByDateFilters extends MatchOddsFilters {
  dateFrom: string | null; // Required. Start of the range (inclusive), ISO 8601 datetime
  dateTo: string | null; // Required. End of the range (inclusive), ISO 8601 datetime. At most 7 days after dateFrom
  sport: SportEnum; // Default: FOOTBALL
  competitionId: string | null; // Restricts the result to a single competition, e.g. "fb:c:1"
  limit: number | null; // Items per page. Defaults to 50, maximum 200
  page: number | null; // Page number, 1-based
}

enum SportEnum {
  FOOTBALL = "FOOTBALL",
  BASKETBALL = "BASKETBALL",
  TENNIS = "TENNIS",
  AMERICAN_FOOTBALL = "AMERICAN_FOOTBALL",
  FORMULA_1 = "FORMULA_1",
  HOCKEY = "HOCKEY"
}

Match odds model

Returned by getByMatchIds, one instance per operator.

class MatchOddsModel {
  bookmaker: BookmakerModel | null;
  type: string | null; // "PRE_EVENT" or "LIVE", derived from the match status. Null when the status could not be resolved
  markets: MatchOddsMarketModel[];
  startTime: string; // Match start time as the odds provider knows it, ISO 8601
  updatedAt: string; // Most recent odds update across the operators of this match, ISO 8601
}

class BookmakerModel {
  id: string;
  name: string;
  url: string; // The operator's site, derived from domainName (e.g. "https://bookmaker.com")
  assets: BookmakerAssetModel[];
  links: BookmakerLinkModel[]; // One entry per app type. Empty when the operator carries no links at all
  branding: BookmakerBrandingModel | null;
  eventUrls: BookmakerUrlModel[]; // Resolved link to the match on the operator's site, per app type
  betslipUrlTemplate: BookmakerUrlModel[]; // Betslip link per app type, with {betslip_ids} left in place. Empty for operators without a betslip template
  betslipIdSeparator: string; // Separator to join selection ids with when filling {betslip_ids}, e.g. "," or "|"
  stakesDisclaimer: string;
  domainName: string;
}

class BookmakerAssetModel {
  logo: string;
  type: string;
  transparentBackgroundUrl: string;
  backgroundColor: string;
}

class BookmakerBrandingModel {
  backgroundColor: string;
  textColor: string;
  hoverBackgroundColor: string;
  borderColor: string;
}

class BookmakerLinkModel {
  appType: string; // "desktop" or "mobile"
  selectionTemplateUrl: string; // Link to a selection on the operator's site
  eventTemplateUrl: string; // Link to the match on the operator's site
  homepageUrl: string; // Same value as BookmakerModel.url
}

class BookmakerUrlModel {
  url: string;
  appType: string; // "desktop" or "mobile"
}

class MatchOddsMarketModel {
  type: MatchOddsMarketTypeModel | null;
  scope: MatchOddsMarketScopeModel | null;
  selections: MatchOddsMarketSelectionModel[];
}

class MatchOddsMarketTypeModel {
  id: string; // The market code, e.g. "FT_1X2"
  name: string; // The market code, e.g. "FT_1X2"
  code: string; // The market code, e.g. "FT_1X2"
  entityType: string; // Always "market_type"
}

class MatchOddsMarketScopeModel {
  id: string; // The scope, e.g. "ORDINARY_TIME"
  type: string; // The scope in lower case, e.g. "ordinary_time"
  name: string; // The scope with spaces, e.g. "ORDINARY TIME"
  entityType: string; // Always "market_scope"
}

class MatchOddsMarketSelectionModel {
  id: string; // The selection code, e.g. "1"
  name: string; // The selection code, e.g. "1"
  code: string; // e.g. "1", "X", "2", "over"
  value: string; // Human readable selection value, e.g. "Team A" or the handicap line. Null when not applicable
  odds: string; // Decimal odds as a string (e.g. "1.50"), or the fractional notation (e.g. "5/2") when oddFormat is FRACTIONAL
  urls: BookmakerUrlModel[]; // Resolved link to the selection on the operator's site, per app type
  movement: string; // Direction of the last price change, e.g. "UP", "DOWN", "STABLE"
  oddsOld: string; // The previous price, in the same format as odds
  entityType: string; // Always "market_selection"
  additionalInfo: any; // Operator specific extra info. Usually null
  providerInfo: SelectionProviderInfoModel | null;
}

class SelectionProviderInfoModel {
  selectionId: string; // The operator's own id for the selection
  eventId: string; // The operator's own id for the match
  marketId: string; // The operator's own id for the market
  competitionId: string; // The operator's own id for the competition
}

Event odds model

Returned by getByMatchId, and as the data entries of getByDateRange. It follows the structure of the odds API: odds grouped per operator, the market code and scope in meta, numeric odds, and links as { desktop, mobile } objects.

class EventOddsModel {
  eventId: string; // Match id in the id schema the SDK is configured with
  startTime: string; // Match start time as the odds provider knows it, ISO 8601
  updatedAt: string; // Most recent odds update across the operators of this match, ISO 8601
  odds: OperatorOddsModel[];
}

class OperatorOddsModel {
  operator: OddsOperatorModel;
  urls: OddsUrlModel | null; // Resolved link to the match on the operator's site
  markets: OddsMarketModel[];
}

class OddsOperatorModel {
  id: string; // Operator config id, e.g. "bookmaker-bg"
  name: string;
  domainName: string;
  stakesDisclaimer: string; // Responsible gambling disclaimer to display next to the operator's odds
  branding: OddsOperatorBrandingModel | null;
  assets: OddsOperatorAssetModel[];
  betslipUrlTemplate: OddsUrlModel | null; // Betslip link with {betslip_ids} left in place. Null for operators without a betslip template
  betslipIdSeparator: string; // Separator to join selection ids with when filling {betslip_ids}, e.g. "," or "|"
}

class OddsOperatorBrandingModel {
  backgroundColor: string;
  textColor: string;
  hoverBackgroundColor: string;
  borderColor: string;
}

class OddsOperatorAssetModel {
  type: string;
  logo: string;
  transparentBackgroundUrl: string;
  backgroundColor: string;
}

class OddsUrlModel {
  desktop: string; // Null when the API could not fully resolve the link
  mobile: string; // Null when the API could not fully resolve the link
}

class OddsMarketModel {
  meta: OddsMarketMetaModel;
  selections: OddsSelectionModel[];
}

class OddsMarketMetaModel {
  market: string; // Market code, e.g. "FT_1X2" or "OVER_GOALS_2_5"
  scope: string; // Market scope, e.g. "ORDINARY_TIME" or "FULL_TIME"
}

class OddsSelectionModel {
  code: string; // e.g. "1", "X", "2", "over"
  value: string; // Human readable selection value, e.g. "Team A" or the handicap line. Null when not applicable
  odds: number | string; // A number for DECIMAL odds, a string such as "5/2" for FRACTIONAL
  oddsOld: number | string; // The previous price, in the same format as odds
  movement: string; // Direction of the last price change, e.g. "UP", "DOWN", "STABLE"
  urls: OddsUrlModel | null; // Resolved link to the selection on the operator's site
  additionalInfo: string; // Operator specific extra info. Usually null
  operatorInfo: OddsOperatorInfoModel | null;
}

class OddsOperatorInfoModel {
  selectionId: string; // The operator's own id for the selection
  eventId: string; // The operator's own id for the match
  marketId: string; // The operator's own id for the market
  competitionId: string; // The operator's own id for the competition
}

Events odds pagination model

class EventsOddsPaginationModel {
  data: EventOddsModel[]; // Matches with odds, ordered by start time ascending
  meta: MatchOddsMetaModel;
}

class MatchOddsMetaModel {
  total: number; // Total matching matches before pagination, including fixtures that have already finished
  limit: number; // Items per page
  page: number; // Current page, 1-based
}

Event game models

Games model

class EventGamesModel {
  meta: MetaModel;
  data: EventGameModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class EventGameModel {
  id: string;
  title: string;
  description: string | null;
  rules: string | null;
  customFields: Record<string, string> | null;
  images: ImagesModel | null;
  type: string = "EVENT";
  status: GameStatusEnum;
  related: RelatedEntityRelationship[];
  predictionsCutoff: string | null;
  fixtures: EventGameFixturesModel[];
  tiebreaker: EventGameTiebreakerModel | null;
  brandingId: string | null;
  flags: string[];
	language: string | null;
  createdAt: string;
  updatedAt: string;
}

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

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class EventGameTiebreakerModel {
  statTiebreakerEnabled: boolean;
  statTotal: number;
}

class EventGameFixturesModel<
  T extends EventGameOutcomeTypeEnum = EventGameOutcomeTypeEnum
> {
  id: string;
  question: string;
  status: EventGameFixtureStatusEnum;
  voidReason: string | null;
  points: number;
  outcomeType: T;
  validOutcomes: ValidOutcomesType<T>;
  outcome: OutcomeType<T>;
}

enum EventGameOutcomeTypeEnum {
  BOOLEAN = "BOOLEAN",
  NUMBER = "NUMBER",
  ENUM = "ENUM",
  FREE_INPUT = "FREE_INPUT",
}

enum EventGameFixtureStatusEnum {
  ACTIVE = "ACTIVE",
  SETTLED = "SETTLED",
  VOID = "VOID",
}

type ValidOutcomesType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? null
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? EventGameFixtureNumberModel
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? EventGameFixtureEnumModel
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? null
    : never;

type OutcomeType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? boolean | null
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? number | null
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? string | null
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? string | null
    : never;

Game model

class EventGameModel {
  id: string;
  title: string;
  description: string | null;
  rules: string | null;
  customFields: Record<string, string> | null;
  images: ImagesModel | null;
  type: string = "EVENT";
  status: GameStatusEnum;
  points: number;
  related: RelatedEntityRelationship[];
  predictionsCutoff: string | null;
  fixtures: EventGameFixturesModel[]
  tiebreaker: EventGameTiebreakerModel | null;
	brandingId: string | null;
  createdAt: string;
  updatedAt: string;
}

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

class RelatedEntityRelationship {
  entityId: string;
  entityType: RelatedEntityType;
  entityRelationship: RelatedEntityRelationshipType;
}

type RelatedEntityType =
  | "game"
  | "template"
  | "classic_quiz"
  | "either_or"
  | "match_quiz"
  | "top_x"
  | "bracket"
  | "standing"
  | "poll"
  | "bracket"
  | "standing";

type RelatedEntityRelationshipType =
  | "translatedTo"
  | "translatedFrom"
  | "relatedTo"
  | "blocks"
  | "blockedBy"
  | "nextInSeries"
  | "previousInSeries"
  | "bonusPointsGame";

class EventGameTiebreakerModel {
  statTiebreakerEnabled: boolean;
  statTotal: number;
}

class EventGameFixturesModel<
  T extends EventGameOutcomeTypeEnum = EventGameOutcomeTypeEnum
> {
  id: string;
  question: string;
  status: EventGameFixtureStatusEnum;
  voidReason: string | null;
  points: number;
  outcomeType: T;
  validOutcomes: ValidOutcomesType<T>;
  outcome: OutcomeType<T>;
}

enum EventGameOutcomeTypeEnum {
  BOOLEAN = "BOOLEAN",
  NUMBER = "NUMBER",
  ENUM = "ENUM",
  FREE_INPUT = "FREE_INPUT",
}

enum EventGameFixtureStatusEnum {
  ACTIVE = "ACTIVE",
  SETTLED = "SETTLED",
  VOID = "VOID",
}

type ValidOutcomesType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? null
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? EventGameFixtureNumberModel
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? EventGameFixtureEnumModel
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? null
    : never;

type OutcomeType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? boolean | null
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? number | null
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? string | null
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? string | null
    : never;

Prediction request body model

class EventGamePredictionRequestBody {
  fixtures: EventGameFixtures[];
  tiebreaker: EventGameTiebreaker | null;
}

class EventGameFixtures<
  T extends EventGameOutcomeTypeEnum = EventGameOutcomeTypeEnum
> {
  id: string;
  predictionType: T;
  prediction: PredictionType<T>;
}

enum EventGameOutcomeTypeEnum {
  BOOLEAN = "BOOLEAN",
  NUMBER = "NUMBER",
  ENUM = "ENUM",
  FREE_INPUT = "FREE_INPUT",
}

type PredictionType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? boolean
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? number
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? string
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? string
		: never;

class EventGameTiebreaker {
  statTotal: number | null;
}

Prediction model

class EventGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  total: number;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: EventGamePredictionStatusEnum;
  fixtures: EventGamePredictionFixturesModel[];
  tiebreaker: EventGameTiebreaker;
  createdAt: string;
  updatedAt: string;
}

enum EventGamePredictionStatusEnum {
  /**
   * ACTIVE Predictions are made.
   */
  ACTIVE = "ACTIVE",
  /**
   * Settled WON all Predictions are correct.
   */
  WON = "WON",
  /**
   * Settled LOST all Prediction are incorrect.
   */
  LOST = "LOST",
  /**
   * Settled PARTIAL_WON (obtained some points) not all Predictions are correct.
   */
  PARTIALLY_WON = "PARTIALLY_WON",
  /**
   * CANCELED Predictions because game was canceled.
   */
  CANCELED = "CANCELED",
}

class EventGamePredictionFixturesModel<
  T extends EventGameOutcomeTypeEnum = EventGameOutcomeTypeEnum
> {
  id: string;
  predictionType: T;
  prediction: PredictionType<T>;
  correct: boolean | null;
  points: number;
}

enum EventGameOutcomeTypeEnum {
  BOOLEAN = "BOOLEAN",
  NUMBER = "NUMBER",
  ENUM = "ENUM",
  FREE_INPUT = "FREE_INPUT",
}

type PredictionType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? boolean
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? number
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? string
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? string
    : never;

User game prediction model

class EventGamePredictionsModel {
  meta: MetaModel;
  data: EventGamePredictionModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class EventGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  total: number;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: EventGamePredictionStatusEnum;
  fixtures: EventGamePredictionFixturesModel[];
  tiebreaker: EventGameTiebreaker;
  createdAt: string;
  updatedAt: string;
}

enum EventGamePredictionStatusEnum {
  /**
   * ACTIVE Predictions are made.
   */
  ACTIVE = "ACTIVE",
  /**
   * Settled WON all Predictions are correct.
   */
  WON = "WON",
  /**
   * Settled LOST all Prediction are incorrect.
   */
  LOST = "LOST",
  /**
   * Settled PARTIAL_WON (obtained some points) not all Predictions are correct.
   */
  PARTIALLY_WON = "PARTIALLY_WON",
  /**
   * CANCELED Predictions because game was canceled.
   */
  CANCELED = "CANCELED",
}

class EventGamePredictionFixturesModel<
  T extends EventGameOutcomeTypeEnum = EventGameOutcomeTypeEnum
> {
  id: string;
  predictionType: T;
  prediction: PredictionType<T>;
  correct: boolean | null;
  points: number;
}

enum EventGameOutcomeTypeEnum {
  BOOLEAN = "BOOLEAN",
  NUMBER = "NUMBER",
  ENUM = "ENUM",
  FREE_INPUT = "FREE_INPUT",
}

type PredictionType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? boolean
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? number
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? string
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? string
    : never;

Rankings model

class EventGameRankingsModel {
  meta: MetaModel;
  data: EventGamePredictionModel[];
}

class MetaModel {
    pagination: MetaProperties;
}

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

class EventGamePredictionModel {
  id: string;
  profileId: string;
  profileModel: ProfileModel | null;
  total: number;
  gameId: string;
  totalPoints: number | null;
  gamePoints: number | null;
  bonusPoints: number | null;
  position: number | null;
  status: EventGamePredictionStatusEnum;
  fixtures: EventGamePredictionFixturesModel[];
  tiebreaker: EventGameTiebreaker;
  createdAt: string;
  updatedAt: string;
}

enum EventGamePredictionStatusEnum {
  /**
   * ACTIVE Predictions are made.
   */
  ACTIVE = "ACTIVE",
  /**
   * Settled WON all Predictions are correct.
   */
  WON = "WON",
  /**
   * Settled LOST all Prediction are incorrect.
   */
  LOST = "LOST",
  /**
   * Settled PARTIAL_WON (obtained some points) not all Predictions are correct.
   */
  PARTIALLY_WON = "PARTIALLY_WON",
  /**
   * CANCELED Predictions because game was canceled.
   */
  CANCELED = "CANCELED",
}

class EventGamePredictionFixturesModel<
  T extends EventGameOutcomeTypeEnum = EventGameOutcomeTypeEnum
> {
  id: string;
  predictionType: T;
  prediction: PredictionType<T>;
  correct: boolean | null;
  points: number;
}

enum EventGameOutcomeTypeEnum {
  BOOLEAN = "BOOLEAN",
  NUMBER = "NUMBER",
  ENUM = "ENUM",
  FREE_INPUT = "FREE_INPUT",
}

type PredictionType<T extends EventGameOutcomeTypeEnum> =
  T extends EventGameOutcomeTypeEnum.BOOLEAN
    ? boolean
    : T extends EventGameOutcomeTypeEnum.NUMBER
    ? number
    : T extends EventGameOutcomeTypeEnum.ENUM
    ? string
    : T extends EventGameOutcomeTypeEnum.FREE_INPUT
    ? string
    : never;

Event games filters

class EventGameFilters {
  status?: GameStatusEnum;
  sortOrder?: SortOrder;
  gameIds?: string[];
  limit?: number;
  startAfter?: string;
	flags?: string[];
	language?: string;
}

Event predictions filters

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

Event rankings filters

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

Did this page help you?