fansunited-sdk-esm 1.3.0 → 1.3.3

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.
Files changed (34) hide show
  1. package/Core/Exception/ErrorMessages.d.ts +3 -0
  2. package/Core/Exception/FansUnitedSdkException.d.ts +5 -0
  3. package/Core/Global/Constants/TestConstants.d.ts +15 -0
  4. package/Core/Global/Helper.d.ts +2 -0
  5. package/Core/Https/ActivityHttps.d.ts +0 -1
  6. package/Core/Https/ClientHttps.d.ts +9 -1
  7. package/Core/Https/LoyaltyHttps.d.ts +2 -2
  8. package/Core/Https/PredictorHttps.d.ts +1 -2
  9. package/Core/Namespaces/Football/Facades/FootballFacade.d.ts +2 -5
  10. package/Core/Namespaces/Football/Facades/MatchFacade.d.ts +3 -1
  11. package/Core/Namespaces/Football/Facades/PlayerFacade.d.ts +3 -1
  12. package/Core/Namespaces/Football/Facades/TeamsFacade.d.ts +3 -1
  13. package/Core/Namespaces/Football/Models/Match/MatchBasicModel.d.ts +1 -0
  14. package/Core/Namespaces/Football/Models/Match/MatchFullModel.d.ts +1 -0
  15. package/Core/Namespaces/Football/Service/FootballService.d.ts +12 -0
  16. package/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.d.ts +4 -3
  17. package/Core/Namespaces/Loyalty/Loyalty.d.ts +4 -2
  18. package/Core/Namespaces/Loyalty/Models/ClientFeatures/ClientFeaturesRemapper.d.ts +2 -2
  19. package/Core/Namespaces/Loyalty/Models/ClientFeatures/{ClientFeaturesModel.d.ts → LoyaltyConfigModel.d.ts} +1 -1
  20. package/Core/Namespaces/Loyalty/Models/Template/TemplateModel.d.ts +1 -0
  21. package/Core/Namespaces/MatchQuiz/Facade/MatchQuizFacade.d.ts +0 -1
  22. package/Core/Namespaces/MatchQuiz/Models/Games/GamesMatchQuizListModel.d.ts +2 -0
  23. package/Core/Namespaces/Predictor/Facade/PredictorFacade.d.ts +3 -4
  24. package/Core/Namespaces/Predictor/Models/Config/FeatureConfigRemapper.d.ts +7 -0
  25. package/Core/Namespaces/Predictor/Predictor.d.ts +2 -2
  26. package/Core/Namespaces/Predictor/Service/PredictorService.d.ts +3 -2
  27. package/Core/Namespaces/Profile/Builders/OwnProfileBuilder.d.ts +7 -6
  28. package/Core/Namespaces/Profile/Models/ProfileModel.d.ts +1 -0
  29. package/Core/Namespaces/Profile/Service/ProfileService.d.ts +34 -0
  30. package/Core/Namespaces/TopX/Facade/TopXFacade.d.ts +0 -1
  31. package/Core/Namespaces/TopX/Models/Games/GamesTopXListModel.d.ts +2 -0
  32. package/index.js +9 -9
  33. package/index.js.map +3 -3
  34. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ export declare enum ErrorMessages {
2
+ LOYALTY_INVALID_TEMPLATE_ID = "Provided template ID does NOT exist! Try again with existing template ID."
3
+ }
@@ -0,0 +1,5 @@
1
+ import { ErrorMessages } from "./ErrorMessages";
2
+ export default class FansUnitedSdkException extends Error {
3
+ constructor(message: ErrorMessages);
4
+ errorMessage: () => string;
5
+ }
@@ -0,0 +1,15 @@
1
+ export declare const predictorConfigResponse: {
2
+ data: {
3
+ data: {
4
+ predictor: {
5
+ enabled: boolean;
6
+ markets: {
7
+ main: string[];
8
+ all: string[];
9
+ };
10
+ full_coverage_competitions: string[];
11
+ success_rate_scopes: any;
12
+ };
13
+ };
14
+ };
15
+ };
@@ -3,3 +3,5 @@ export declare const limitIds: (ids: string[]) => any;
3
3
  export declare const setBaseUrl: (environment: string, namespace: string) => string;
4
4
  export declare const transformIdsToBeUnique: (ids: string[]) => string[];
5
5
  export declare const remapKeysToCamelCase: (obj: any) => any;
6
+ export declare const isDisabledCache: (disableCache: boolean) => boolean;
7
+ export declare const initDisableCache: () => string;
@@ -9,7 +9,6 @@ export default class ActivityHttps {
9
9
  private instance;
10
10
  private activityRemapper;
11
11
  private apiSignInUrl;
12
- private clientApiSignInUrl;
13
12
  constructor(config: SDKConfiguraitonModel);
14
13
  createActivity: (requestBody: CreateActivityRequestBody) => Promise<ActivityResponseBody>;
15
14
  deleteActivity: (activityId: string) => Promise<boolean>;
@@ -1,7 +1,15 @@
1
1
  import SDKConfigurationModel from "../Configurator/Models/SDKConfiguraitonModel";
2
+ import { FeaturesConfigModels } from "../Namespaces/Predictor/Service/PredictorService";
3
+ export declare enum FeatureConfigType {
4
+ PREDICTOR = "predictor",
5
+ TOP_X = "topX",
6
+ MATCH_QUIZ = "matchQuiz",
7
+ LOYALTY = "loyalty"
8
+ }
2
9
  export default class ClientHttps {
3
10
  private instance;
4
11
  private apiSignInUrl;
12
+ private featureConfigRemapper;
5
13
  constructor(config: SDKConfigurationModel);
6
- getConfig: () => Promise<any>;
14
+ getConfig: (feature: FeatureConfigType) => Promise<FeaturesConfigModels>;
7
15
  }
@@ -1,14 +1,14 @@
1
1
  import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
2
2
  import PaginationModel from "../Global/Models/Pagination/PaginationModel";
3
3
  import LoyaltyFilters from "../Namespaces/Loyalty/Models/Filters/LoyaltyFilters";
4
+ import TemplateModel from "../Namespaces/Loyalty/Models/Template/TemplateModel";
4
5
  export default class LoyaltyHttps {
5
6
  private instance;
6
7
  private apiSignInUrl;
7
- private clientApiSignInUrl;
8
8
  private templateRemapper;
9
9
  private leaderboardRemapper;
10
10
  constructor(config: SDKConfiguraitonModel);
11
- getTemplates: (disableCache: boolean) => Promise<PaginationModel>;
11
+ getTemplates: (disableCache: boolean, isPaginated: boolean) => Promise<PaginationModel | TemplateModel[]>;
12
12
  getLeaderboard: (templateId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
13
13
  getLeaderboardForGame: (gameId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
14
14
  }
@@ -12,14 +12,13 @@ export default class PredictorHttps {
12
12
  private instanceAuth;
13
13
  private instance;
14
14
  private apiSignInUrl;
15
- private clientApiSignInUrl;
16
15
  private predictionRemapper;
17
16
  private matchSummaryRemapper;
18
17
  private gamesRemapper;
19
18
  private metaRemapper;
20
19
  constructor(config: SDKConfiguraitonModel, idMapping: IdMappingService);
21
20
  makeFootballPrediction: (prediction: PredictionRequestModel | TopXPredictionRequestModel) => Promise<PredictionResponseModel>;
22
- getMatchSummary: (matchId: string) => Promise<MatchSummaryModel>;
21
+ getMatchSummary: (matchId: string, disableCache: boolean) => Promise<MatchSummaryModel>;
23
22
  deleteFootballPrediction: (predictionId: string) => Promise<boolean>;
24
23
  getMyPredictions: (filters?: PredictionsFilters) => Promise<PaginationModel>;
25
24
  getMyPredictionsNoRemap: (filters?: PredictionsFilters) => Promise<any>;
@@ -16,18 +16,15 @@ import MatchFilters from "../Models/Match/MatchFilters";
16
16
  import PlayerFilters from "../Models/Player/PlayerFilters";
17
17
  import SearchFilters from "../Models/Search/SearchFilters";
18
18
  import FootballPaginationModel from "../Models/Pagination/FootballPaginationModel";
19
+ import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
19
20
  export default class FootballFacade {
20
- private isBrowser;
21
- private localStorage;
22
- private https;
23
- private idMapping;
24
21
  private countriesFacade;
25
22
  private competitionsFacade;
26
23
  private teamsFacade;
27
24
  private playerFacade;
28
25
  private matchFacade;
29
26
  private searchFacade;
30
- constructor(localStorage: LocalStorage, https: FootballHttps, idMapping: IdMappingService);
27
+ constructor(config: SDKConfigurationModel, localStorage: LocalStorage, https: FootballHttps, idMapping: IdMappingService);
31
28
  getCountries: (disableCache?: boolean) => Promise<FootballCountryModel[]>;
32
29
  getCompetitions: (filters?: CompetitionFilters, disableCache?: boolean) => Promise<CompetitionBasicModel[]>;
33
30
  getCompetitionById: (id: string, disableCache?: boolean) => Promise<CompetitionFullModel>;
@@ -1,3 +1,4 @@
1
+ import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
1
2
  import FootballHttps from "../../../Https/FootballHttps";
2
3
  import IdMappingService from "../../../IdMapping/IdMappingService";
3
4
  import MatchFilters from "../Models/Match/MatchFilters";
@@ -6,7 +7,8 @@ import FootballPaginationModel from "../Models/Pagination/FootballPaginationMode
6
7
  export default class MatchFacade {
7
8
  private https;
8
9
  private idMapping;
9
- constructor(https: FootballHttps, idMapping: IdMappingService);
10
+ private footballService;
11
+ constructor(config: SDKConfigurationModel, https: FootballHttps, idMapping: IdMappingService);
10
12
  getMatchesIdMapping: (filters?: MatchFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
11
13
  private getMatchesWithNativeIds;
12
14
  getMatchesMapWithNativeIds: (matchIds: string[]) => Promise<any>;
@@ -5,10 +5,12 @@ import PlayerFullModel from "../Models/Player/PlayerFullModel";
5
5
  import MatchFullModel from "../Models/Match/MatchFullModel";
6
6
  import PlayerFilters from "../Models/Player/PlayerFilters";
7
7
  import FootballPaginationModel from "../Models/Pagination/FootballPaginationModel";
8
+ import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
8
9
  export default class PlayerFacade {
9
10
  private https;
11
+ private footballService;
10
12
  private idMapping;
11
- constructor(https: FootballHttps, idMapping: IdMappingService);
13
+ constructor(config: SDKConfigurationModel, https: FootballHttps, idMapping: IdMappingService);
12
14
  getPlayersIdMapping: (filters?: PlayerFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
13
15
  getPlayersWithNativeIds: (playerIds: string[]) => Promise<any>;
14
16
  getPlayersMapWithNativeIds: (playerIds: string[]) => Promise<any>;
@@ -5,10 +5,12 @@ import TeamFullModel from "../Models/Team/TeamFullModel";
5
5
  import MatchFullModel from "../Models/Match/MatchFullModel";
6
6
  import TeamFilters from "../Models/Team/TeamFilters";
7
7
  import FootballPaginationModel from "../Models/Pagination/FootballPaginationModel";
8
+ import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
8
9
  export default class TeamsFacade {
10
+ private footballService;
9
11
  private https;
10
12
  private idMapping;
11
- constructor(https: FootballHttps, idMapping: IdMappingService);
13
+ constructor(config: SDKConfigurationModel, https: FootballHttps, idMapping: IdMappingService);
12
14
  getTeamsIdMapping: (filters?: TeamFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
13
15
  private getTeams;
14
16
  getTeamByIdIdMapping: (id: string, disableCache?: boolean) => Promise<TeamFullModel>;
@@ -5,6 +5,7 @@ export default class MatchBasicModel {
5
5
  kickoffAt: string;
6
6
  finishedAt: string;
7
7
  updatedAt: string;
8
+ availableMarkets: string[];
8
9
  homeTeam: TeamBasicModel;
9
10
  awayTeam: TeamBasicModel;
10
11
  lineupsConfirmed: boolean;
@@ -9,6 +9,7 @@ export default class MatchFullModel {
9
9
  kickoffAt: string;
10
10
  finishedAt: string;
11
11
  updatedAt: string;
12
+ availableMarkets: string[];
12
13
  homeTeam: TeamBasicModel;
13
14
  awayTeam: TeamBasicModel;
14
15
  lineupsConfirmed: boolean;
@@ -0,0 +1,12 @@
1
+ import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
2
+ import MatchBasicModel from "../Models/Match/MatchBasicModel";
3
+ import MatchFullModel from "../Models/Match/MatchFullModel";
4
+ declare type MatchData = MatchBasicModel[] | MatchFullModel;
5
+ export default class FootballService {
6
+ private clientHttps;
7
+ constructor(config: SDKConfigurationModel);
8
+ setAvailableMarketsForMatch: (matchData: MatchData) => Promise<MatchData>;
9
+ private setAvailableMarkets;
10
+ private isMatchInCoverageCompetition;
11
+ }
12
+ export {};
@@ -3,18 +3,19 @@ import PaginationModel from "../../../Global/Models/Pagination/PaginationModel";
3
3
  import ClientHttps from "../../../Https/ClientHttps";
4
4
  import LoyaltyHttps from "../../../Https/LoyaltyHttps";
5
5
  import LoyaltyFilters from "../Models/Filters/LoyaltyFilters";
6
- import ClientFeaturesModel from "../Models/ClientFeatures/ClientFeaturesModel";
7
6
  import ClientBadges from "../Models/Badges/ClientBadges";
7
+ import TemplateModel from "../Models/Template/TemplateModel";
8
+ import { FeaturesConfigModels } from "../../Predictor/Service/PredictorService";
8
9
  export default class LoyaltyFacade {
9
10
  private config;
10
11
  private clientHttps;
11
12
  private loyaltyHttps;
12
- private loyaltyRemapper;
13
13
  private loyaltyService;
14
14
  constructor(config: SDKConfigurationModel, clientHttps: ClientHttps, loyaltyHttps: LoyaltyHttps);
15
- getConfig: () => Promise<ClientFeaturesModel>;
15
+ getConfig: () => Promise<FeaturesConfigModels>;
16
16
  getClientBadges: () => Promise<ClientBadges>;
17
17
  getTemplates: (disableCache?: boolean) => Promise<PaginationModel>;
18
+ getTemplateById: (templateId: string, disableCache?: boolean) => Promise<TemplateModel>;
18
19
  getLeaderboard: (templateId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
19
20
  getLeaderboardForGame: (gameId: string, filters: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
20
21
  }
@@ -1,16 +1,18 @@
1
1
  import SDKConfigurationModel from "../../Configurator/Models/SDKConfiguraitonModel";
2
2
  import PaginationModel from "../../Global/Models/Pagination/PaginationModel";
3
3
  import LoyaltyFilters from "./Models/Filters/LoyaltyFilters";
4
- import ClientFeaturesModel from "./Models/ClientFeatures/ClientFeaturesModel";
5
4
  import ClientBadges from "./Models/Badges/ClientBadges";
5
+ import TemplateModel from "./Models/Template/TemplateModel";
6
+ import { FeaturesConfigModels } from "../Predictor/Service/PredictorService";
6
7
  export default class Loyalty {
7
8
  private clientHttps;
8
9
  private loyaltyHttps;
9
10
  private loyaltyFacade;
10
11
  constructor(config: SDKConfigurationModel);
11
- getConfig: () => Promise<ClientFeaturesModel>;
12
+ getConfig: () => Promise<FeaturesConfigModels>;
12
13
  getClientBadges: () => Promise<ClientBadges>;
13
14
  getTemplates: (disableCache?: boolean) => Promise<PaginationModel>;
15
+ getTemplateById: (templateId: string, disableCache?: boolean) => Promise<TemplateModel>;
14
16
  getLeaderboard: (templateId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
15
17
  getLeaderboardForGame: (gameId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
16
18
  }
@@ -1,6 +1,6 @@
1
- import ClientFeaturesModel from "./ClientFeaturesModel";
1
+ import LoyaltyConfigModel from "./LoyaltyConfigModel";
2
2
  export default class ClientFeaturesRemapper {
3
- remapConfigResponse: (response: any) => ClientFeaturesModel;
3
+ remapConfigResponse: (response: any) => LoyaltyConfigModel;
4
4
  private remapRewards;
5
5
  private remapPoints;
6
6
  private remapBadges;
@@ -1,6 +1,6 @@
1
1
  import ActionsModel from "../Actions/ActionsModel";
2
2
  import RewardsModel from "../Rewards/RewardsModel";
3
- export default class ClientFeaturesModel {
3
+ export default class LoyaltyConfigModel {
4
4
  enabled: boolean;
5
5
  conditions: {
6
6
  list: string[];
@@ -1,6 +1,7 @@
1
1
  export default class TemplateModel {
2
2
  id: string;
3
3
  name: string;
4
+ description: string;
4
5
  type: string;
5
6
  fromDate: string;
6
7
  toDate: string;
@@ -12,7 +12,6 @@ export default class MatchQuizFacade {
12
12
  private predictorService;
13
13
  private idMapping;
14
14
  private clientHttps;
15
- private featureConfigRemapper;
16
15
  readonly invalidPredictionModelErrorMessage = "The prediction is invalid. Please check again have you passed appropriate prediction model. For more information please visit our offical documentation: \n https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations";
17
16
  constructor(config: SDKConfigurationModel);
18
17
  getConfig: () => Promise<FeaturesConfigModels>;
@@ -10,6 +10,8 @@ export default class GamesMatchQuizListModel {
10
10
  fixtures: FixturesMatchQuizModel[];
11
11
  rules: string;
12
12
  flags: string[];
13
+ points: number;
13
14
  createdAt: string;
14
15
  updatedAt: string;
16
+ predictionsMadeAt: string;
15
17
  }
@@ -2,7 +2,6 @@ import { MarketEnum } from "../Enums/MarketEnum";
2
2
  import ClientHttps from "../../../Https/ClientHttps";
3
3
  import PredictorHttps from "../../../Https/PredictorHttps";
4
4
  import IdMappingService from "../../../IdMapping/IdMappingService";
5
- import FeatureConfigRemapper from "../Models/Config/FeatureConfigRemapper";
6
5
  import MatchSummaryModel from "../Models/Summary/MatchSummaryModel";
7
6
  import PredictorService, { FeaturesConfigModels } from "../Service/PredictorService";
8
7
  import PredictionsFilters from "../Models/Predictions/PredictionsFilters";
@@ -12,7 +11,6 @@ export default class PredictorFacade {
12
11
  readonly predictorHttps: PredictorHttps;
13
12
  readonly clientHttps: ClientHttps;
14
13
  readonly idMapping: IdMappingService;
15
- readonly predictorConfigRemapper: FeatureConfigRemapper;
16
14
  readonly predictorService: PredictorService;
17
15
  readonly invalidPredictionMessage = "The prediction is invalid. Please check again have you passed appropriate prediction argument. For more information visit our official documentation: \n https://docs.fansunitedmedia.com/sdks/js/predictor#matchrelatedoperations";
18
16
  constructor(config: SDKConfigurationModel, predictorHttps: PredictorHttps, clientHttps: ClientHttps, idMapping: IdMappingService);
@@ -28,10 +26,11 @@ export default class PredictorFacade {
28
26
  * Using PredictorService to perform id mapping for matchId in request body. The response body contains all markets in property predictions.
29
27
  * In case there is prediction with player market, it property's name is the player id itself so it will be remaped to idSchema.
30
28
  * @param matchId
29
+ * @param disableCache
31
30
  * @returns Match summary with all predictions for it. Ids are remapped if idSchema is different from native.
32
31
  */
33
- getMatchSummary: (matchId: string) => Promise<MatchSummaryModel>;
34
- getMarketSummary: (matchId: string, market: MarketEnum, playerId?: string) => Promise<any>;
32
+ getMatchSummary: (matchId: string, disableCache: boolean) => Promise<MatchSummaryModel>;
33
+ getMarketSummary: (matchId: string, market: MarketEnum, playerId?: string, disableCache?: boolean) => Promise<any>;
35
34
  getConfig: () => Promise<FeaturesConfigModels>;
36
35
  deleteFootballPrediction: (predictionId: string) => Promise<boolean>;
37
36
  getMyPredictions: (filters?: PredictionsFilters) => Promise<PaginationModel>;
@@ -1,3 +1,4 @@
1
+ import ClientFeaturesModel from "../../../Loyalty/Models/ClientFeatures/LoyaltyConfigModel";
1
2
  import MatchQuizConfigModel from "../../../MatchQuiz/Models/Config/MatchQuizConfigModel";
2
3
  import TopXConfigModel from "../../../TopX/Models/Config/TopXConfigModel";
3
4
  import PredictorConfigModel from "./PredictorConfigModel";
@@ -5,4 +6,10 @@ export default class FeatureConfigRemapper {
5
6
  remapPredictorConfig: (response: any) => PredictorConfigModel;
6
7
  remapTopXConfig: (response: any) => TopXConfigModel;
7
8
  remapMatchQuizConfig: (response: any) => MatchQuizConfigModel;
9
+ remapLoyaltyConfig: (response: any) => ClientFeaturesModel;
10
+ private remapRewards;
11
+ private remapPoints;
12
+ private remapBadges;
13
+ private remapBadgeValues;
14
+ private remapRequirements;
8
15
  }
@@ -11,8 +11,8 @@ export default class Predictor {
11
11
  private idMapping;
12
12
  constructor(config: SDKConfigurationModel);
13
13
  makeFootballPrediction: (matchId: string, market: MarketEnum, value: any, playerId?: string) => Promise<import("./Models/Predictions/PredictionResponseModel").default>;
14
- getMatchSummary: (matchId: string) => Promise<MatchSummaryModel>;
15
- getMarketSummary: (matchId: string, market: MarketEnum, playerId?: string) => Promise<any>;
14
+ getMatchSummary: (matchId: string, disableCache?: boolean) => Promise<MatchSummaryModel>;
15
+ getMarketSummary: (matchId: string, market: MarketEnum, playerId?: string, disableCache?: boolean) => Promise<any>;
16
16
  getConfig: () => Promise<FeaturesConfigModels>;
17
17
  deleteFootballPrediction: (predictionId: string) => Promise<boolean>;
18
18
  getMyPredictions: (filters?: PredictionsFilters) => Promise<PaginationModel>;
@@ -22,7 +22,8 @@ import GamesFilters from "../../TopX/Models/Games/GamesFilters";
22
22
  import PaginationModel from "../../../Global/Models/Pagination/PaginationModel";
23
23
  import TopXConfigModel from "../../TopX/Models/Config/TopXConfigModel";
24
24
  import MatchQuizConfigModel from "../../MatchQuiz/Models/Config/MatchQuizConfigModel";
25
- export declare type FeaturesConfigModels = PredictorConfigModel | TopXConfigModel | MatchQuizConfigModel;
25
+ import LoyaltyConfigModel from "../../Loyalty/Models/ClientFeatures/LoyaltyConfigModel";
26
+ export declare type FeaturesConfigModels = PredictorConfigModel | TopXConfigModel | MatchQuizConfigModel | LoyaltyConfigModel;
26
27
  export default class PredictorService {
27
28
  private footballHttps;
28
29
  private idMapping;
@@ -55,7 +56,7 @@ export default class PredictorService {
55
56
  * @param fixture
56
57
  * @returns Fixture model.
57
58
  */
58
- validateFixture: (matchId: string, market: MarketEnum, value: any, playerId?: string) => PlayerFixtureModel | CorrectScoreFixtureModel | OverCornersFixtureModel | OverGoalsFixtureModel | HalfTimeFullTimeFixtureModel | DoubleChanceFixtureModel | FullTimeOneXTwoFixtureModel | HalfTimeOneXTwoFixtureModel | CornersFixtureModel | BothTeamsFixtureModel | RedCardFixtureModel | PenaltyMatchFixtureModel;
59
+ validateFixture: (matchId: string, market: MarketEnum, value: any, playerId?: string) => HalfTimeFullTimeFixtureModel | DoubleChanceFixtureModel | FullTimeOneXTwoFixtureModel | CorrectScoreFixtureModel | HalfTimeOneXTwoFixtureModel | CornersFixtureModel | PlayerFixtureModel | BothTeamsFixtureModel | RedCardFixtureModel | PenaltyMatchFixtureModel | OverGoalsFixtureModel | OverCornersFixtureModel;
59
60
  getMarketSummary: (matchSummary: MatchSummaryModel, market: MarketEnum, playerId?: string) => any;
60
61
  remapCompetitionsFromConfig: (config: FeaturesConfigModels) => Promise<FeaturesConfigModels>;
61
62
  /**
@@ -1,7 +1,7 @@
1
1
  import LocalStorage from "../../../Global/LocalStorage";
2
- import FootballHttps from "../../../Https/FootballHttps";
3
2
  import ProfileHttps from "../../../Https/ProfileHttps";
4
3
  import IdMappingService from "../../../IdMapping/IdMappingService";
4
+ import FootballFacade from "../../Football/Facades/FootballFacade";
5
5
  import FollowingModel from "../Models/Following/FollowingModel";
6
6
  import InterestModel from "../Models/InterestModel";
7
7
  import ProfileModel from "../Models/ProfileModel";
@@ -12,23 +12,20 @@ import ProfileStatsModel from "../Models/Stats/ProfileStatsModel";
12
12
  import ActivityHttps from "../../../Https/ActivityHttps";
13
13
  export default class OwnProfileBuilder {
14
14
  private profileHttps;
15
+ private profileService;
15
16
  private activityHttps;
16
- private footballHttps;
17
17
  private localStorage;
18
- private idMapping;
19
18
  private profileFacade;
20
- private footballFacade;
21
19
  private interestsService;
22
20
  private ownProfile;
23
21
  private modified;
24
22
  private expireAt;
25
23
  private promises;
26
24
  private isFetching;
27
- constructor(localStorage: LocalStorage, profileHttps: ProfileHttps, activityHttps: ActivityHttps, idMapping: IdMappingService, footballHttps: FootballHttps);
25
+ constructor(localStorage: LocalStorage, profileHttps: ProfileHttps, activityHttps: ActivityHttps, idMapping: IdMappingService, footballFacade: FootballFacade);
28
26
  private getOwnProfile;
29
27
  private delay;
30
28
  private setOwnProfile;
31
- private extractUpdatedProps;
32
29
  getInfo: () => Promise<ProfileModel>;
33
30
  showInterests: () => Promise<InterestModel[]>;
34
31
  showFullInterests: () => Promise<any[]>;
@@ -46,6 +43,10 @@ export default class OwnProfileBuilder {
46
43
  setBirthdate: (birthDate?: string) => OwnProfileBuilder;
47
44
  private setGenderPromise;
48
45
  setGender: (gender: string) => OwnProfileBuilder;
46
+ private setNicknamePromise;
47
+ setNickname: (nickname?: string) => OwnProfileBuilder;
48
+ private setNamePromise;
49
+ setName: (name: string) => OwnProfileBuilder;
49
50
  private setCountryPromise;
50
51
  setCountry: (countryId?: string) => OwnProfileBuilder;
51
52
  showFullnessProfile: () => Promise<FullnessProfile>;
@@ -3,6 +3,7 @@ import InterestModel from "./InterestModel";
3
3
  export default class ProfileModel {
4
4
  id: string;
5
5
  name: string;
6
+ nickname: string;
6
7
  avatar: string;
7
8
  gender: string;
8
9
  country: ProfileCountryModel;
@@ -0,0 +1,34 @@
1
+ import InterestModel from "../Models/InterestModel";
2
+ export default class ProfileService {
3
+ /**
4
+ * Compares between current and updated profile and extracts properties from updated profile who contain new values.
5
+ * Constructs new request body with these properties.
6
+ * @param oldProfile Current profile model.
7
+ * @param newProfile Updated profile model.
8
+ * @returns Request body for PATCH request to Profile API.
9
+ */
10
+ extractUpdatedProps: (oldProfile: any, newProfile: any) => any;
11
+ /**
12
+ * Functions covers case when length of interests is the same, but their values are different.
13
+ * @param oldInterests Interests from current profile.
14
+ * @param newInterests Interests from updated profile.
15
+ * @returns New interests array.
16
+ */
17
+ private updateInterests;
18
+ /**
19
+ * Validation if there are any new interests from current and updated profile.
20
+ * @param oldInterests Interests from current profile.
21
+ * @param newInterests Interests from updated profile.
22
+ * @returns True for existing new interests, false for not existing ones.
23
+ */
24
+ isNewInterest: (oldInterests: InterestModel[], newInterests: InterestModel[]) => boolean;
25
+ /**
26
+ * Function will filter out two types of interests:
27
+ * 1. Repeating interests from current and new profile
28
+ * 2. New interests who do NOT exist in both current and new profiles.
29
+ * @param oldInterests Interests from current profile.
30
+ * @param newInterests Interests from updated profile.
31
+ * @returns Array containing two types of arrays - one with same interests and the other with new ones.
32
+ */
33
+ private extractSameAndNewInterests;
34
+ }
@@ -12,7 +12,6 @@ export default class TopXFacade {
12
12
  readonly idMapping: IdMappingService;
13
13
  readonly predictorHttps: PredictorHttps;
14
14
  readonly predictorService: PredictorService;
15
- private featureConfigRemapper;
16
15
  private clientHttps;
17
16
  constructor(config: SDKConfigurationModel, idMapping: IdMappingService);
18
17
  getConfig: () => Promise<FeaturesConfigModels>;
@@ -10,6 +10,8 @@ export default class GamesTopXListModel {
10
10
  fixtures: FixturesTopXModel[];
11
11
  rules: string;
12
12
  flags: string[];
13
+ points: number;
13
14
  createdAt: string;
14
15
  updatedAt: string;
16
+ predictionsMadeAt: string;
15
17
  }