fansunited-sdk-esm 1.24.1 → 1.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,4 +31,5 @@ export default class PredictorHttps extends Https {
31
31
  getGameResults: (gameId: string, disableCache: boolean, filters?: MainFiltersBQ) => Promise<PaginationModel>;
32
32
  getMarketResultsForGame: (gameId: string, disableCache: boolean) => Promise<import("../Namespaces/MatchQuiz/Models/GameMarketsResults/GameMarketsResults").default>;
33
33
  getContestWinners: (gameId: string) => Promise<ContestWinners>;
34
+ getPredictionById: (predictionId: string) => Promise<PredictionResponseModel>;
34
35
  }
@@ -4,6 +4,7 @@ import LineupsModel from "./Lineups/LineupsModel";
4
4
  import CompetitionBasicModel from "../Competition/CompetitionBasicModel";
5
5
  import ScoresModel from "./Scores/ScoresModel";
6
6
  import TimelineModel from "./Timeline/TimelineModel";
7
+ import MatchStatus from "./Status/MatchStatus";
7
8
  export default class MatchFullModel {
8
9
  id: string;
9
10
  kickoffAt: string;
@@ -21,9 +22,6 @@ export default class MatchFullModel {
21
22
  competition: CompetitionBasicModel;
22
23
  };
23
24
  timeline: TimelineModel[];
24
- status: {
25
- type: string;
26
- subType: string;
27
- };
25
+ status: MatchStatus;
28
26
  lineups: LineupsModel;
29
27
  }
@@ -0,0 +1,4 @@
1
+ export default class MatchStatus {
2
+ type: string;
3
+ subType: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ export default class TeamColors {
2
+ primary: string;
3
+ secondary: string;
4
+ tertiary: string;
5
+ }
@@ -1,6 +1,7 @@
1
1
  import FootballCountryModel from "../Country/FootballCountryModel";
2
2
  import CompetitionBasicModel from "../Competition/CompetitionBasicModel";
3
3
  import PlayerSquadModel from "../Player/PlayerSquadModel";
4
+ import TeamColors from "./TeamColors";
4
5
  export default class TeamFullModel {
5
6
  id: string;
6
7
  country: FootballCountryModel;
@@ -12,5 +13,6 @@ export default class TeamFullModel {
12
13
  national: boolean;
13
14
  fullName: string;
14
15
  shortName: string;
16
+ colors: TeamColors;
15
17
  squad: PlayerSquadModel[];
16
18
  }
@@ -1,4 +1,5 @@
1
1
  import MatchBasicModel from "../../../Football/Models/Match/MatchBasicModel";
2
+ import MatchStatus from "../../../Football/Models/Match/Status/MatchStatus";
2
3
  import { MarketEnum } from "../../../Predictor/Enums/MarketEnum";
3
4
  import PredictionMatchQuizModel from "../Prediction/PredictionMatchQuizModel";
4
5
  export default class FixturesMatchQuizModel {
@@ -6,5 +7,6 @@ export default class FixturesMatchQuizModel {
6
7
  matchType: string;
7
8
  market: MarketEnum;
8
9
  matchModel: MatchBasicModel;
10
+ matchStatus: MatchStatus;
9
11
  prediction: PredictionMatchQuizModel;
10
12
  }
@@ -8,6 +8,7 @@ import PredictionsFilters from "../Models/Predictions/PredictionsFilters";
8
8
  import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
9
9
  import PaginationModel from "../../../Global/Models/Pagination/PaginationModel";
10
10
  import { FeaturesConfigModels } from "../../../Global/Types/GlobalTypes";
11
+ import PredictionResponseModel from "../Models/Predictions/PredictionResponseModel";
11
12
  export default class PredictorFacade {
12
13
  readonly predictorHttps: PredictorHttps;
13
14
  readonly clientHttps: ClientHttps;
@@ -23,7 +24,7 @@ export default class PredictorFacade {
23
24
  * @param fixture
24
25
  * @returns Fixture response from Prediction API. Ids are remapped if idSchema is different from native.
25
26
  */
26
- makeFootballPrediction: (matchId: string, market: MarketEnum, value: any, playerId?: string) => Promise<import("../Models/Predictions/PredictionResponseModel").default>;
27
+ makeFootballPrediction: (matchId: string, market: MarketEnum, value: any, playerId?: string) => Promise<PredictionResponseModel>;
27
28
  /**
28
29
  * Using PredictorService to perform id mapping for matchId in request body. The response body contains all markets in property predictions.
29
30
  * In case there is prediction with player market, it property's name is the player id itself so it will be remaped to idSchema.
@@ -44,4 +45,5 @@ export default class PredictorFacade {
44
45
  getUserCurrentPredictions: (userId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
45
46
  getUserPastPredictions: (userId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
46
47
  getUserPredictionsForMatches: (userId: string, matchIds: string[], filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
48
+ getPredictionById: (predictionId: string) => Promise<PredictionResponseModel>;
47
49
  }
@@ -4,13 +4,14 @@ import { MarketEnum } from "./Enums/MarketEnum";
4
4
  import PredictionsFilters from "./Models/Predictions/PredictionsFilters";
5
5
  import PaginationModel from "../../Global/Models/Pagination/PaginationModel";
6
6
  import { FeaturesConfigModels } from "../../Global/Types/GlobalTypes";
7
+ import PredictionResponseModel from "./Models/Predictions/PredictionResponseModel";
7
8
  export default class Predictor {
8
9
  private predictorHttps;
9
10
  private clientHttps;
10
11
  private predictorFacade;
11
12
  private idMapping;
12
13
  constructor(config: SDKConfigurationModel);
13
- makeFootballPrediction: (matchId: string, market: MarketEnum, value: any, playerId?: string) => Promise<import("./Models/Predictions/PredictionResponseModel").default>;
14
+ makeFootballPrediction: (matchId: string, market: MarketEnum, value: any, playerId?: string) => Promise<PredictionResponseModel>;
14
15
  getMatchSummary: (matchId: string, disableCache?: boolean) => Promise<MatchSummaryModel>;
15
16
  getMarketSummary: (matchId: string, market: MarketEnum, playerId?: string, disableCache?: boolean) => Promise<any>;
16
17
  getConfig: () => Promise<FeaturesConfigModels>;
@@ -23,4 +24,5 @@ export default class Predictor {
23
24
  getUserCurrentPredictions: (userId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
24
25
  getUserPastPredictions: (userId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
25
26
  getUserPredictionsForMatches: (userId: string, matchIds: string[], filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
27
+ getPredictionById: (predictionId: string) => Promise<PredictionResponseModel>;
26
28
  }
@@ -1,8 +1,10 @@
1
1
  import MatchBasicModel from "../../../Football/Models/Match/MatchBasicModel";
2
+ import MatchStatus from "../../../Football/Models/Match/Status/MatchStatus";
2
3
  import { MarketEnum } from "../../../Predictor/Enums/MarketEnum";
3
4
  export default class FixturesGamesModel {
4
5
  matchId: string;
5
6
  matchType: string;
6
7
  market: MarketEnum;
7
8
  matchModel: MatchBasicModel;
9
+ matchStatus: MatchStatus;
8
10
  }
@@ -1,4 +1,5 @@
1
1
  import MatchBasicModel from "../../../Football/Models/Match/MatchBasicModel";
2
+ import MatchStatus from "../../../Football/Models/Match/Status/MatchStatus";
2
3
  import { MarketEnum } from "../../../Predictor/Enums/MarketEnum";
3
4
  import PredictionTopXModel from "../Prediction/PredictionTopXModel";
4
5
  export default class FixturesTopXModel {
@@ -6,5 +7,6 @@ export default class FixturesTopXModel {
6
7
  matchType: string;
7
8
  market: MarketEnum;
8
9
  matchModel: MatchBasicModel;
10
+ matchStatus: MatchStatus;
9
11
  prediction: PredictionTopXModel;
10
12
  }