fansunited-sdk-esm 1.30.0 → 1.31.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/Messages/Messages.d.ts +3 -1
- package/Core/Https/LoyaltyHttps.d.ts +2 -1
- package/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.d.ts +2 -1
- package/Core/Namespaces/Loyalty/Loyalty.d.ts +2 -1
- package/Core/Namespaces/Loyalty/Models/Filters/HighestSuccessRateFilters.d.ts +10 -0
- package/Core/Namespaces/Loyalty/Validator/LoyaltyValidator.d.ts +5 -1
- package/index.js +4 -4
- package/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -9,7 +9,9 @@ export declare enum ErrorMessages {
|
|
|
9
9
|
INVALID_TOKEN = "Invalid JWT token is provided",
|
|
10
10
|
EXPIRED_TOKEN = "The provided JWT token is expired",
|
|
11
11
|
ENTITIES_NEEDED = "At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",
|
|
12
|
-
ENTITIES_FOLLOWS_FILTERS_EXCEEDED = "Maximum length per entity should be 10 or less."
|
|
12
|
+
ENTITIES_FOLLOWS_FILTERS_EXCEEDED = "Maximum length per entity should be 10 or less.",
|
|
13
|
+
INVALID_TYPE = "You have provided invalid type. The valid type is ",
|
|
14
|
+
INVALID_VALUE = "You have provided invalid value. The valid value is "
|
|
13
15
|
}
|
|
14
16
|
export declare const WarningMessages: {
|
|
15
17
|
UNEXPECTED_STATUS_PROP: string;
|
|
@@ -9,6 +9,7 @@ import Https from "./Https";
|
|
|
9
9
|
import EntitiesFollowsFilters from "../Namespaces/Loyalty/Models/Filters/EntitiesFollowsFilters";
|
|
10
10
|
import EntitiesFollows from "../Namespaces/Loyalty/Models/EntitiesFollows/EntitiesFollows";
|
|
11
11
|
import TemplateByIdModel from "../Namespaces/Loyalty/Models/Template/TemplateByIdModel";
|
|
12
|
+
import HighestSuccessRateFilters from "../Namespaces/Loyalty/Models/Filters/HighestSuccessRateFilters";
|
|
12
13
|
export default class LoyaltyHttps extends Https {
|
|
13
14
|
private templateRemapper;
|
|
14
15
|
private leaderboardRemapper;
|
|
@@ -20,6 +21,6 @@ export default class LoyaltyHttps extends Https {
|
|
|
20
21
|
getLeaderboard: (templateId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
21
22
|
getLeaderboardForGame: (gameId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
22
23
|
getUserRankings: (userId: string, filters: RankingsFilters, disableCache: boolean) => Promise<FootballPaginationModel>;
|
|
23
|
-
getHighestSuccessRate: (
|
|
24
|
+
getHighestSuccessRate: (filters: HighestSuccessRateFilters, disableCache: boolean) => Promise<HighestSuccessRateModel[]>;
|
|
24
25
|
getEntitiesFollows: (filters: EntitiesFollowsFilters, disableCache: boolean) => Promise<EntitiesFollows>;
|
|
25
26
|
}
|
|
@@ -14,6 +14,7 @@ import ContestWinners from "../../TopX/Models/Games/Winners/ContestWinners";
|
|
|
14
14
|
import EntitiesFollowsFilters from "../Models/Filters/EntitiesFollowsFilters";
|
|
15
15
|
import EntitiesFollows from "../Models/EntitiesFollows/EntitiesFollows";
|
|
16
16
|
import TemplateByIdModel from "../Models/Template/TemplateByIdModel";
|
|
17
|
+
import HighestSuccessRateFilters from "../Models/Filters/HighestSuccessRateFilters";
|
|
17
18
|
export default class LoyaltyFacade {
|
|
18
19
|
private config;
|
|
19
20
|
private clientHttps;
|
|
@@ -35,7 +36,7 @@ export default class LoyaltyFacade {
|
|
|
35
36
|
getLeaderboardForGame: (gameId: string, filters: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
36
37
|
getOwnRankings: (filters?: RankingsFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
37
38
|
getUserRankings: (userId: string, filters?: RankingsFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
38
|
-
getHighestSuccessRate: (
|
|
39
|
+
getHighestSuccessRate: (filters: HighestSuccessRateFilters, disableCache: boolean) => Promise<HighestSuccessRateModel[]>;
|
|
39
40
|
getTemplateWinners: (templateId: string) => Promise<ContestWinners>;
|
|
40
41
|
getEntitiesFollows: (filters: EntitiesFollowsFilters, disableCache: boolean) => Promise<EntitiesFollows>;
|
|
41
42
|
private getModelsForUserRankings;
|
|
@@ -9,6 +9,7 @@ import ContestWinners from "../TopX/Models/Games/Winners/ContestWinners";
|
|
|
9
9
|
import EntitiesFollowsFilters from "./Models/Filters/EntitiesFollowsFilters";
|
|
10
10
|
import EntitiesFollows from "./Models/EntitiesFollows/EntitiesFollows";
|
|
11
11
|
import TemplateByIdModel from "./Models/Template/TemplateByIdModel";
|
|
12
|
+
import HighestSuccessRateFilters from "./Models/Filters/HighestSuccessRateFilters";
|
|
12
13
|
export default class Loyalty {
|
|
13
14
|
private clientHttps;
|
|
14
15
|
private profileHttps;
|
|
@@ -24,7 +25,7 @@ export default class Loyalty {
|
|
|
24
25
|
getLeaderboardForGame: (gameId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
25
26
|
getOwnRankings: (filters?: RankingsFilters, disableCache?: boolean) => Promise<import("../Football/Models/Pagination/FootballPaginationModel").default>;
|
|
26
27
|
getUserRankings: (userId: string, filters?: RankingsFilters, disableCache?: boolean) => Promise<import("../Football/Models/Pagination/FootballPaginationModel").default>;
|
|
27
|
-
getHighestSuccessRate: (
|
|
28
|
+
getHighestSuccessRate: (filters?: HighestSuccessRateFilters, disableCache?: boolean) => Promise<HighestSuccessRateModel[]>;
|
|
28
29
|
getTemplateWinners: (templateId: string) => Promise<ContestWinners>;
|
|
29
30
|
getEntitiesFollows: (filters: EntitiesFollowsFilters, disableCache?: boolean) => Promise<EntitiesFollows>;
|
|
30
31
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FiltersInterface } from "../../../../Global/Interfaces/GlobalInterfaces";
|
|
2
|
+
export default class HighestSuccessRateFilters implements FiltersInterface {
|
|
3
|
+
market?: string;
|
|
4
|
+
fromDate?: string;
|
|
5
|
+
toDate?: string;
|
|
6
|
+
usersCount?: number;
|
|
7
|
+
minimumPredictions?: number;
|
|
8
|
+
constructor(filters: any);
|
|
9
|
+
constructFiltersUrl?(): string;
|
|
10
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { ErrorHandlingModeType } from "../../../Configurator/Types/ConfiguratorTypes";
|
|
2
|
+
import HighestSuccessRateFilters from "../Models/Filters/HighestSuccessRateFilters";
|
|
2
3
|
export default class LoyaltyValidator {
|
|
3
|
-
|
|
4
|
+
validate: (filters: HighestSuccessRateFilters, errorHandlingMode: ErrorHandlingModeType) => void;
|
|
5
|
+
private validateMarket;
|
|
6
|
+
private validateDate;
|
|
7
|
+
private validateNumberFilters;
|
|
4
8
|
}
|