fansunited-sdk-esm 1.9.0 → 1.11.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.
- package/Core/Global/Models/Filters/MainFiltersBQ.d.ts +9 -0
- package/Core/Https/LoyaltyHttps.d.ts +3 -0
- package/Core/Https/PredictorHttps.d.ts +2 -1
- package/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.d.ts +3 -0
- package/Core/Namespaces/Loyalty/Loyalty.d.ts +2 -0
- package/Core/Namespaces/Loyalty/Models/HighestSuccessRate/HighestSuccessRateModel.d.ts +9 -0
- package/Core/Namespaces/Loyalty/Models/HighestSuccessRate/HighestSuccessRateRemapper.d.ts +4 -0
- package/Core/Namespaces/Loyalty/Models/Leaderboard/LeaderboardModel.d.ts +1 -0
- package/Core/Namespaces/Loyalty/Service/LoyaltyService.d.ts +3 -1
- package/Core/Namespaces/Loyalty/Validator/LoyaltyValidator.d.ts +3 -0
- package/Core/Namespaces/MatchQuiz/Facade/MatchQuizFacade.d.ts +2 -1
- package/Core/Namespaces/MatchQuiz/MatchQuiz.d.ts +2 -1
- package/Core/Namespaces/MatchQuiz/Models/Games/GamesMatchQuizListModel.d.ts +3 -0
- package/Core/Namespaces/Predictor/Models/Predictions/PredictionsFilters.d.ts +1 -1
- package/Core/Namespaces/Predictor/Service/PredictorService.d.ts +1 -1
- package/Core/Namespaces/Predictor/Validator/PredictorValidator.d.ts +1 -1
- package/Core/Namespaces/Profile/Facade/ProfileFacade.d.ts +2 -1
- package/Core/Namespaces/Profile/Models/Followers/FollowersModel.d.ts +1 -0
- package/Core/Namespaces/Profile/Models/Following/FollowingModel.d.ts +1 -0
- package/Core/Namespaces/TopX/Facade/TopXFacade.d.ts +2 -1
- package/Core/Namespaces/TopX/Models/Games/GamesFilters.d.ts +5 -4
- package/Core/Namespaces/TopX/Models/Games/GamesTopXListModel.d.ts +3 -0
- package/Core/Namespaces/TopX/TopX.d.ts +2 -1
- package/Core/Namespaces/TopX/{Types/TypeGames.d.ts → types/types.d.ts} +0 -0
- package/index.js +12 -12
- package/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -4,15 +4,18 @@ import FootballPaginationModel from "../Namespaces/Football/Models/Pagination/Fo
|
|
|
4
4
|
import LoyaltyFilters from "../Namespaces/Loyalty/Models/Filters/LoyaltyFilters";
|
|
5
5
|
import RankingsFilters from "../Namespaces/Loyalty/Models/Filters/RankingsFilters";
|
|
6
6
|
import TemplateModel from "../Namespaces/Loyalty/Models/Template/TemplateModel";
|
|
7
|
+
import HighestSuccessRateModel from "../Namespaces/Loyalty/Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
7
8
|
export default class LoyaltyHttps {
|
|
8
9
|
private instance;
|
|
9
10
|
private apiSignInUrl;
|
|
10
11
|
private templateRemapper;
|
|
11
12
|
private leaderboardRemapper;
|
|
12
13
|
private rankingsRemapper;
|
|
14
|
+
private highestSuccessRateRemapper;
|
|
13
15
|
constructor(config: SDKConfiguraitonModel);
|
|
14
16
|
getTemplates: (disableCache: boolean, isPaginated: boolean) => Promise<PaginationModel | TemplateModel[]>;
|
|
15
17
|
getLeaderboard: (templateId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
16
18
|
getLeaderboardForGame: (gameId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
17
19
|
getUserRankings: (userId: string, filters: RankingsFilters, disableCache: boolean) => Promise<FootballPaginationModel>;
|
|
20
|
+
getHighestSuccessRate: (market: string, disableCache: boolean) => Promise<HighestSuccessRateModel[]>;
|
|
18
21
|
}
|
|
@@ -8,6 +8,7 @@ import IdMappingService from "../IdMapping/IdMappingService";
|
|
|
8
8
|
import TopXPredictionRequestModel from "../Namespaces/TopX/Models/Prediction/TopXPredictionRequestModel";
|
|
9
9
|
import GamesListModel from "../Namespaces/TopX/Models/Games/GamesListModel";
|
|
10
10
|
import PaginationModel from "../Global/Models/Pagination/PaginationModel";
|
|
11
|
+
import MainFiltersBQ from "../Global/Models/Filters/MainFiltersBQ";
|
|
11
12
|
export default class PredictorHttps {
|
|
12
13
|
private instanceAuth;
|
|
13
14
|
private instance;
|
|
@@ -28,6 +29,6 @@ export default class PredictorHttps {
|
|
|
28
29
|
getGameById: (gameId: string, disableCache: boolean) => Promise<GamesListModel>;
|
|
29
30
|
getGamePredictions: (gameId: string, disableCache: boolean, filters?: PredictionsFilters) => Promise<PaginationModel>;
|
|
30
31
|
getUserGameEditions: (filters: GamesFilters, disableCache: boolean) => Promise<PaginationModel>;
|
|
31
|
-
getGameResults: (gameId: string, disableCache: boolean, filters?:
|
|
32
|
+
getGameResults: (gameId: string, disableCache: boolean, filters?: MainFiltersBQ) => Promise<PaginationModel>;
|
|
32
33
|
getMarketResultsForGame: (gameId: string, disableCache: boolean) => Promise<import("../Namespaces/MatchQuiz/Models/GameMarketsResults/GameMarketsResults").default>;
|
|
33
34
|
}
|
|
@@ -10,12 +10,14 @@ import RankingsFilters from "../Models/Filters/RankingsFilters";
|
|
|
10
10
|
import FootballPaginationModel from "../../Football/Models/Pagination/FootballPaginationModel";
|
|
11
11
|
import ProfileHttps from "../../../Https/ProfileHttps";
|
|
12
12
|
import LocalStorage from "../../../Global/LocalStorage";
|
|
13
|
+
import HighestSuccessRateModel from "../Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
13
14
|
export default class LoyaltyFacade {
|
|
14
15
|
private config;
|
|
15
16
|
private clientHttps;
|
|
16
17
|
private loyaltyHttps;
|
|
17
18
|
private loyaltyService;
|
|
18
19
|
private profileFacade;
|
|
20
|
+
private loyaltyValidator;
|
|
19
21
|
constructor(config: SDKConfigurationModel, clientHttps: ClientHttps, loyaltyHttps: LoyaltyHttps, profileHttps: ProfileHttps, localStorage: LocalStorage);
|
|
20
22
|
getConfig: () => Promise<FeaturesConfigModels>;
|
|
21
23
|
getClientBadges: () => Promise<ClientBadges>;
|
|
@@ -25,4 +27,5 @@ export default class LoyaltyFacade {
|
|
|
25
27
|
getLeaderboardForGame: (gameId: string, filters: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
26
28
|
getOwnRankings: (filters?: RankingsFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
27
29
|
getUserRankings: (userId: string, filters?: RankingsFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
30
|
+
getHighestSuccessRate: (market: string, disableCache: boolean) => Promise<HighestSuccessRateModel[]>;
|
|
28
31
|
}
|
|
@@ -5,6 +5,7 @@ import ClientBadges from "./Models/Badges/ClientBadges";
|
|
|
5
5
|
import TemplateModel from "./Models/Template/TemplateModel";
|
|
6
6
|
import { FeaturesConfigModels } from "../../Global/Types/GlobalTypes";
|
|
7
7
|
import RankingsFilters from "./Models/Filters/RankingsFilters";
|
|
8
|
+
import HighestSuccessRateModel from "./Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
8
9
|
export default class Loyalty {
|
|
9
10
|
private clientHttps;
|
|
10
11
|
private profileHttps;
|
|
@@ -20,4 +21,5 @@ export default class Loyalty {
|
|
|
20
21
|
getLeaderboardForGame: (gameId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
21
22
|
getOwnRankings: (filters?: RankingsFilters, disableCache?: boolean) => Promise<import("../Football/Models/Pagination/FootballPaginationModel").default>;
|
|
22
23
|
getUserRankings: (userId: string, filters?: RankingsFilters, disableCache?: boolean) => Promise<import("../Football/Models/Pagination/FootballPaginationModel").default>;
|
|
24
|
+
getHighestSuccessRate: (market?: string, disableCache?: boolean) => Promise<HighestSuccessRateModel[]>;
|
|
23
25
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
|
|
2
2
|
import BadgesModel from "../Models/Badges/BadgesModel";
|
|
3
3
|
import ClientBadges from "../Models/Badges/ClientBadges";
|
|
4
|
+
import HighestSuccessRateModel from "../Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
4
5
|
import LeaderboardModel from "../Models/Leaderboard/LeaderboardModel";
|
|
5
6
|
import TemplateModel from "../Models/Template/TemplateModel";
|
|
6
7
|
import { FiltersType } from "../Types/LoyaltyTypes";
|
|
@@ -9,8 +10,9 @@ export default class LoyaltyService {
|
|
|
9
10
|
private profileNamespace;
|
|
10
11
|
constructor(config: SDKConfigurationModel);
|
|
11
12
|
remapTemplatesIds: (templates: TemplateModel[]) => Promise<TemplateModel[]>;
|
|
12
|
-
|
|
13
|
+
addProfileModelToLeaderboad: (leaderboard: any[]) => Promise<LeaderboardModel[]>;
|
|
13
14
|
buildClientBadges: (badges: BadgesModel) => ClientBadges;
|
|
14
15
|
initFilters: (filters: any, type: FiltersType) => any;
|
|
16
|
+
addProfileModelToHighestSuccessRate: (highestSuccessRate: HighestSuccessRateModel[]) => Promise<HighestSuccessRateModel[]>;
|
|
15
17
|
private extractEnabledBadgesId;
|
|
16
18
|
}
|
|
@@ -8,6 +8,7 @@ import GameModel from "../../TopX/Models/Games/GameModel";
|
|
|
8
8
|
import GamesFilters from "../../TopX/Models/Games/GamesFilters";
|
|
9
9
|
import GamesListModel from "../../TopX/Models/Games/GamesListModel";
|
|
10
10
|
import GameMarketsResults from "../Models/GameMarketsResults/GameMarketsResults";
|
|
11
|
+
import MainFiltersBQ from "../../../Global/Models/Filters/MainFiltersBQ";
|
|
11
12
|
export default class MatchQuizFacade {
|
|
12
13
|
private predictorHttps;
|
|
13
14
|
private predictorService;
|
|
@@ -21,7 +22,7 @@ export default class MatchQuizFacade {
|
|
|
21
22
|
getGames: (filters?: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
22
23
|
getGameById: (gameId: string, disableCache?: boolean) => Promise<GamesListModel>;
|
|
23
24
|
getGamePredictions: (gameId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
24
|
-
getGameResults: (gameId: string, filters?:
|
|
25
|
+
getGameResults: (gameId: string, filters?: MainFiltersBQ, disableCache?: boolean) => Promise<PaginationModel>;
|
|
25
26
|
getCurrentGameResults: (disableCache?: boolean) => Promise<GameModel>;
|
|
26
27
|
getMyGameEditions: (filters?: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
27
28
|
getMyGamePrediction: (gameId: string) => Promise<PredictionResponseModel>;
|
|
@@ -8,6 +8,7 @@ import GameModel from "../TopX/Models/Games/GameModel";
|
|
|
8
8
|
import GamesFilters from "../TopX/Models/Games/GamesFilters";
|
|
9
9
|
import GamesListModel from "../TopX/Models/Games/GamesListModel";
|
|
10
10
|
import GameMarketsResults from "./Models/GameMarketsResults/GameMarketsResults";
|
|
11
|
+
import MainFiltersBQ from "../../Global/Models/Filters/MainFiltersBQ";
|
|
11
12
|
export default class MatchQuiz {
|
|
12
13
|
private matchQuizFacade;
|
|
13
14
|
constructor(config: SDKConfigurationModel);
|
|
@@ -17,7 +18,7 @@ export default class MatchQuiz {
|
|
|
17
18
|
getGames: (filters?: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
18
19
|
getGameById: (gameId: string, disableCache?: boolean) => Promise<GamesListModel>;
|
|
19
20
|
getGamePredictions: (gameId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
20
|
-
getGameResults: (gameId: string, filters?:
|
|
21
|
+
getGameResults: (gameId: string, filters?: MainFiltersBQ, disableCache?: boolean) => Promise<PaginationModel>;
|
|
21
22
|
getCurrentGameResults: (disableCache?: boolean) => Promise<GameModel>;
|
|
22
23
|
getMyGameEditions: (filters?: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
23
24
|
getMyGamePrediction: (gameId: string) => Promise<PredictionResponseModel>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ImagesModel from "../../../../Global/Models/Images/ImagesModel";
|
|
1
2
|
import FixturesMatchQuizModel from "../Fixtures/FixturesMatchQuizModel";
|
|
2
3
|
export default class GamesMatchQuizListModel {
|
|
3
4
|
id: string;
|
|
@@ -15,4 +16,6 @@ export default class GamesMatchQuizListModel {
|
|
|
15
16
|
createdAt: string;
|
|
16
17
|
updatedAt: string;
|
|
17
18
|
predictionsMadeAt: string;
|
|
19
|
+
images: ImagesModel;
|
|
20
|
+
scheduleOpenAt: string;
|
|
18
21
|
}
|
|
@@ -3,7 +3,7 @@ import IdMappingService from "../../../IdMapping/IdMappingService";
|
|
|
3
3
|
import PredictionsModel from "../Models/Predictions/PredictionsModel";
|
|
4
4
|
import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
|
|
5
5
|
import PredictionsFilters from "../Models/Predictions/PredictionsFilters";
|
|
6
|
-
import { TypeGames } from "../../TopX/
|
|
6
|
+
import { TypeGames } from "../../TopX/types/types";
|
|
7
7
|
import GamesFilters from "../../TopX/Models/Games/GamesFilters";
|
|
8
8
|
import PaginationModel from "../../../Global/Models/Pagination/PaginationModel";
|
|
9
9
|
import { FeaturesConfigModels, FilterCase } from "../../../Global/Types/GlobalTypes";
|
|
@@ -11,7 +11,7 @@ import PenaltyMatchFixtureModel from "../Models/Fixtures/Markets/PenaltyMatchFix
|
|
|
11
11
|
import PlayerFixtureModel from "../Models/Fixtures/Markets/PlayerFixtureModel";
|
|
12
12
|
import RedCardFixtureModel from "../Models/Fixtures/Markets/RedCardFixtureModel";
|
|
13
13
|
import PredictionRequestModel from "../Models/Predictions/PredictionRequestModel";
|
|
14
|
-
import { TypeGames } from "../../TopX/
|
|
14
|
+
import { TypeGames } from "../../TopX/types/types";
|
|
15
15
|
import TopXPredictionRequestModel from "../../TopX/Models/Prediction/TopXPredictionRequestModel";
|
|
16
16
|
export default class PredictorValidator {
|
|
17
17
|
/**
|
|
@@ -7,6 +7,7 @@ import FollowFilters from "../Models/FollowFilters";
|
|
|
7
7
|
import PaginationModel from "../../../Global/Models/Pagination/PaginationModel";
|
|
8
8
|
import ProfileStatsModel from "../Models/Stats/ProfileStatsModel";
|
|
9
9
|
import ActivityHttps from "../../../Https/ActivityHttps";
|
|
10
|
+
import FollowingModel from "../Models/Following/FollowingModel";
|
|
10
11
|
export default class ProfileFacade {
|
|
11
12
|
private isBrowser;
|
|
12
13
|
private localStorage;
|
|
@@ -20,7 +21,7 @@ export default class ProfileFacade {
|
|
|
20
21
|
getCountries: (disableCache?: boolean) => Promise<ProfileCountryModel[]>;
|
|
21
22
|
getFollowers: (filters?: FollowFilters, id?: string) => Promise<PaginationModel>;
|
|
22
23
|
getFollowing: (filters?: FollowFilters, id?: string) => Promise<PaginationModel>;
|
|
23
|
-
follow: (ids: string[]) => Promise<
|
|
24
|
+
follow: (ids: string[]) => Promise<FollowingModel[]>;
|
|
24
25
|
unfollow: (ids: string[]) => Promise<boolean>;
|
|
25
26
|
showFullnessProfile: (profile: ProfileModel) => FullnessProfile;
|
|
26
27
|
getStats: () => Promise<ProfileStatsModel>;
|
|
@@ -11,6 +11,7 @@ import PredictionsFilters from "../../Predictor/Models/Predictions/PredictionsFi
|
|
|
11
11
|
import { FeaturesConfigModels } from "../../../Global/Types/GlobalTypes";
|
|
12
12
|
import GameMarketsResults from "../../MatchQuiz/Models/GameMarketsResults/GameMarketsResults";
|
|
13
13
|
import PredictorValidator from "../../Predictor/Validator/PredictorValidator";
|
|
14
|
+
import MainFiltersBQ from "../../../Global/Models/Filters/MainFiltersBQ";
|
|
14
15
|
export default class TopXFacade {
|
|
15
16
|
readonly idMapping: IdMappingService;
|
|
16
17
|
readonly predictorHttps: PredictorHttps;
|
|
@@ -22,7 +23,7 @@ export default class TopXFacade {
|
|
|
22
23
|
getGames: (filters?: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
23
24
|
getGameById: (gameId: string, disableCache?: boolean) => Promise<GamesListModel>;
|
|
24
25
|
getGamePredictions: (gameId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
25
|
-
getGameResults: (gameId: string, filters?:
|
|
26
|
+
getGameResults: (gameId: string, filters?: MainFiltersBQ, disableCache?: boolean) => Promise<PaginationModel>;
|
|
26
27
|
getCurrentGameResults: (disableCache?: boolean) => Promise<any>;
|
|
27
28
|
play: (topXPrediction: TopXPredictionRequestModel) => Promise<PredictionResponseModel>;
|
|
28
29
|
delete: (predictionGameId: string) => Promise<boolean>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import MainFiltersBQ from "../../../../Global/Models/Filters/MainFiltersBQ";
|
|
2
|
+
import { SortOrder } from "../../../../Global/Types/GlobalTypes";
|
|
1
3
|
import { GameStatusEnum } from "../../Enums/GameStatusEnum";
|
|
2
|
-
import { TypeGames } from "../../
|
|
3
|
-
export default class GamesFilters {
|
|
4
|
-
limit: number;
|
|
5
|
-
startAfter: string;
|
|
4
|
+
import { TypeGames } from "../../types/types";
|
|
5
|
+
export default class GamesFilters extends MainFiltersBQ {
|
|
6
6
|
status: GameStatusEnum;
|
|
7
7
|
type: TypeGames;
|
|
8
8
|
gameIds: string[];
|
|
9
|
+
sortOrder: SortOrder;
|
|
9
10
|
constructor(filters: any);
|
|
10
11
|
constructFiltersUrl: () => string;
|
|
11
12
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import ImagesModel from "../../../../Global/Models/Images/ImagesModel";
|
|
1
2
|
import FixturesTopXModel from "../Fixtures/FixturesTopXModel";
|
|
2
3
|
export default class GamesTopXListModel {
|
|
3
4
|
id: string;
|
|
@@ -15,4 +16,6 @@ export default class GamesTopXListModel {
|
|
|
15
16
|
createdAt: string;
|
|
16
17
|
updatedAt: string;
|
|
17
18
|
predictionsMadeAt: string;
|
|
19
|
+
scheduleOpenAt: string;
|
|
20
|
+
images: ImagesModel;
|
|
18
21
|
}
|
|
@@ -7,6 +7,7 @@ import PaginationModel from "../../Global/Models/Pagination/PaginationModel";
|
|
|
7
7
|
import TopXPredictionRequestModel from "./Models/Prediction/TopXPredictionRequestModel";
|
|
8
8
|
import PredictionsFilters from "../Predictor/Models/Predictions/PredictionsFilters";
|
|
9
9
|
import GameMarketsResults from "../MatchQuiz/Models/GameMarketsResults/GameMarketsResults";
|
|
10
|
+
import MainFiltersBQ from "../../Global/Models/Filters/MainFiltersBQ";
|
|
10
11
|
export default class TopX {
|
|
11
12
|
private topXFacade;
|
|
12
13
|
private idMapping;
|
|
@@ -15,7 +16,7 @@ export default class TopX {
|
|
|
15
16
|
getGames: (filters?: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
16
17
|
getGameById: (gameId: string, disableCache?: boolean) => Promise<GamesListModel>;
|
|
17
18
|
getGamePredictions: (gameId: string, filters?: PredictionsFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
18
|
-
getGameResults: (gameId: string, filters?:
|
|
19
|
+
getGameResults: (gameId: string, filters?: MainFiltersBQ, disableCache?: boolean) => Promise<PaginationModel>;
|
|
19
20
|
getCurrentGameResults: (disableCache?: boolean) => Promise<GameModel>;
|
|
20
21
|
play: (topXPrediction: TopXPredictionRequestModel) => Promise<PredictionResponseModel>;
|
|
21
22
|
delete: (predictionGameId: string) => Promise<boolean>;
|
|
File without changes
|