fansunited-sdk-esm 1.64.2 → 1.64.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.
- package/Core/Https/ClientHttps.d.ts +1 -0
- package/Core/Https/Https.d.ts +1 -0
- package/Core/Namespaces/Football/Facades/FootballFacade.d.ts +1 -0
- package/Core/Namespaces/Football/Models/Competition/CompetitionFilters.d.ts +11 -11
- package/Core/Namespaces/Football/Models/Player/PlayerFilters.d.ts +9 -9
- package/Core/Namespaces/Football/Models/Team/TeamFilters.d.ts +11 -11
- package/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.d.ts +4 -1
- package/Core/Namespaces/Loyalty/Loyalty.d.ts +3 -1
- package/Core/Namespaces/Loyalty/Models/Badges/v2/BadgesModelV2.d.ts +18 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/BadgesValueV2.d.ts +9 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/ClientBadgesV2.d.ts +12 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Discussions/DiscussionsBadgeRequirements.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Discussions/DiscussionsBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Football/FootballBadgeRequirements.d.ts +8 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Football/FootballBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Game/GameBadgeRequirements.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Game/GameBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Games/GamesBadgeRequirements.d.ts +11 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Games/GamesBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/MiniGames/MiniGamesBadgeRequirements.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/MiniGames/MiniGamesBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Predictor/PredictorBadgeRequirements.d.ts +7 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Predictor/PredictorBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Voting/PollBadgesValue.d.ts +3 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Voting/PotmBadgesValue.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Voting/VotingBadgeRequirements.d.ts +7 -0
- package/Core/Namespaces/Loyalty/Models/Badges/v2/Voting/VotingBadgesValue.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/ClientFeatures/LoyaltyConfigModelV2.d.ts +11 -0
- package/Core/Namespaces/Loyalty/Models/Rewards/RewardsModel.d.ts +1 -1
- package/Core/Namespaces/Loyalty/Models/Rewards/RewardsModelV2.d.ts +8 -0
- package/Core/Namespaces/Loyalty/Service/LoyaltyService.d.ts +9 -1
- package/Core/Namespaces/Predictor/Models/Config/FeatureConfigRemapper.d.ts +12 -0
- package/index.js +3 -3
- package/index.js.map +4 -4
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ export default class ClientHttps extends Https {
|
|
|
14
14
|
private clientId;
|
|
15
15
|
constructor(config: SDKConfigurationModel);
|
|
16
16
|
getConfig: (feature: FeatureConfigType) => Promise<FeaturesConfigModels>;
|
|
17
|
+
getNewLoyaltyConfig: (disableCache: boolean) => Promise<import("../Namespaces/Loyalty/Models/ClientFeatures/LoyaltyConfigModelV2").default>;
|
|
17
18
|
private getCachedFeatures;
|
|
18
19
|
private getLocalStorageData;
|
|
19
20
|
}
|
package/Core/Https/Https.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export default class Https {
|
|
|
12
12
|
private errorHandlingMode;
|
|
13
13
|
constructor(configuration: SDKConfigurationModel, baseUrl: string);
|
|
14
14
|
protected fetchWithoutAuth: (url: string, warnMessage: string) => Promise<any>;
|
|
15
|
+
protected fetchWithoutAuthAdditionalHeaders: (url: string, warnMessage: string, headers: HeadersInit) => Promise<any>;
|
|
15
16
|
protected fetchWithAuth: (url: string, warnMessage: string, method?: string, requestBody?: any) => Promise<any>;
|
|
16
17
|
protected fetchWithAuthNewBaseURL: (baseURL: string, url: string, warnMessage: string, method?: string, requestBody?: any) => Promise<any>;
|
|
17
18
|
/**
|
|
@@ -47,6 +47,7 @@ export default class FootballFacade {
|
|
|
47
47
|
getPrevMatchForPlayer: (id: string, disableCache?: boolean) => Promise<MatchFullModel>;
|
|
48
48
|
getPlayersMapWithNativeIds: (playerIds: string[]) => Promise<Map<string, PlayerBasicModel>>;
|
|
49
49
|
getMatches: (filters?: MatchFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
50
|
+
getMatchesMapWithNativeIds: (matchIds: string[]) => Promise<any>;
|
|
50
51
|
getMatchById: (id: string, disableCache?: boolean) => Promise<MatchFullModel>;
|
|
51
52
|
search: (filters: SearchFilters, disableCache?: boolean) => Promise<SearchModel>;
|
|
52
53
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import CompetitionBasicModel from "./CompetitionBasicModel";
|
|
2
2
|
export default class CompetitionFilters {
|
|
3
|
-
countryId
|
|
4
|
-
name
|
|
5
|
-
gender
|
|
6
|
-
type
|
|
7
|
-
sortField
|
|
8
|
-
sortOrder
|
|
9
|
-
competitionIds
|
|
3
|
+
countryId?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
gender?: string;
|
|
6
|
+
type?: string;
|
|
7
|
+
sortField?: string;
|
|
8
|
+
sortOrder?: string;
|
|
9
|
+
competitionIds?: string[];
|
|
10
10
|
constructor(filters: any);
|
|
11
11
|
constructFilterUrl: () => string;
|
|
12
|
-
competitionSearchFilter
|
|
13
|
-
private filter
|
|
14
|
-
private entitiesToSearchWith
|
|
15
|
-
private sort
|
|
12
|
+
competitionSearchFilter?: (competitions: CompetitionBasicModel[]) => any[];
|
|
13
|
+
private filter?;
|
|
14
|
+
private entitiesToSearchWith?;
|
|
15
|
+
private sort?;
|
|
16
16
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export default class PlayerFilters {
|
|
2
|
-
countryId
|
|
3
|
-
scope
|
|
4
|
-
name
|
|
5
|
-
playerIds
|
|
6
|
-
limit
|
|
7
|
-
page
|
|
8
|
-
sortField
|
|
9
|
-
sortOrder
|
|
2
|
+
countryId?: string;
|
|
3
|
+
scope?: string[];
|
|
4
|
+
name?: string;
|
|
5
|
+
playerIds?: string[];
|
|
6
|
+
limit?: number;
|
|
7
|
+
page?: number;
|
|
8
|
+
sortField?: string;
|
|
9
|
+
sortOrder?: string;
|
|
10
10
|
constructor(filters: any);
|
|
11
|
-
constructFilterUrl
|
|
11
|
+
constructFilterUrl?: () => string;
|
|
12
12
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export default class TeamFilters {
|
|
2
|
-
name
|
|
3
|
-
countryId
|
|
4
|
-
national
|
|
5
|
-
gender
|
|
6
|
-
limit
|
|
7
|
-
page
|
|
8
|
-
scope
|
|
9
|
-
sortField
|
|
10
|
-
sortOrder
|
|
11
|
-
teamIds
|
|
2
|
+
name?: string;
|
|
3
|
+
countryId?: string;
|
|
4
|
+
national?: boolean;
|
|
5
|
+
gender?: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
page?: number;
|
|
8
|
+
scope?: string[];
|
|
9
|
+
sortField?: string;
|
|
10
|
+
sortOrder?: string;
|
|
11
|
+
teamIds?: string[];
|
|
12
12
|
constructor(filters: any);
|
|
13
|
-
constructFilterUrl
|
|
13
|
+
constructFilterUrl?: () => string;
|
|
14
14
|
}
|
|
@@ -3,7 +3,6 @@ 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 ClientBadges from "../Models/Badges/ClientBadges";
|
|
7
6
|
import { FeaturesConfigModels } from "../../../Global/Types/GlobalTypes";
|
|
8
7
|
import RankingsFilters from "../Models/Filters/RankingsFilters";
|
|
9
8
|
import FootballPaginationModel from "../../Football/Models/Pagination/FootballPaginationModel";
|
|
@@ -17,6 +16,8 @@ import HighestSuccessRateFilters from "../Models/Filters/HighestSuccessRateFilte
|
|
|
17
16
|
import { LocalCacheInterface } from "../../../Global/Interfaces/GlobalInterfaces";
|
|
18
17
|
import TemplateFilters from "../Models/Filters/TemplateFilters";
|
|
19
18
|
import LeagueLeaderboardFilters from "../Models/Filters/LeagueLeaderboardFilters";
|
|
19
|
+
import ClientBadgesV2 from "../Models/Badges/v2/ClientBadgesV2";
|
|
20
|
+
import ClientBadges from "../Models/Badges/ClientBadges";
|
|
20
21
|
export default class LoyaltyFacade {
|
|
21
22
|
private config;
|
|
22
23
|
private clientHttps;
|
|
@@ -32,7 +33,9 @@ export default class LoyaltyFacade {
|
|
|
32
33
|
private football;
|
|
33
34
|
constructor(config: SDKConfigurationModel, clientHttps: ClientHttps, loyaltyHttps: LoyaltyHttps, profileHttps: ProfileHttps, localCache: LocalCacheInterface);
|
|
34
35
|
getConfig: () => Promise<FeaturesConfigModels>;
|
|
36
|
+
getConfigV2: (disableCache: boolean) => Promise<import("../Models/ClientFeatures/LoyaltyConfigModelV2").default>;
|
|
35
37
|
getClientBadges: () => Promise<ClientBadges>;
|
|
38
|
+
getClientBadgesV2: (disableCache: boolean) => Promise<ClientBadgesV2>;
|
|
36
39
|
getTemplates: (filters?: TemplateFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
37
40
|
getTemplateById: (templateId: string, disableCache?: boolean) => Promise<TemplateByIdModel>;
|
|
38
41
|
getLeaderboard: (templateId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
@@ -1,7 +1,6 @@
|
|
|
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 ClientBadges from "./Models/Badges/ClientBadges";
|
|
5
4
|
import { FeaturesConfigModels } from "../../Global/Types/GlobalTypes";
|
|
6
5
|
import RankingsFilters from "./Models/Filters/RankingsFilters";
|
|
7
6
|
import HighestSuccessRateModel from "./Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
@@ -12,6 +11,7 @@ import TemplateByIdModel from "./Models/Template/TemplateByIdModel";
|
|
|
12
11
|
import HighestSuccessRateFilters from "./Models/Filters/HighestSuccessRateFilters";
|
|
13
12
|
import TemplateFilters from "./Models/Filters/TemplateFilters";
|
|
14
13
|
import LeagueLeaderboardFilters from "./Models/Filters/LeagueLeaderboardFilters";
|
|
14
|
+
import ClientBadges from "./Models/Badges/ClientBadges";
|
|
15
15
|
export default class Loyalty {
|
|
16
16
|
private clientHttps;
|
|
17
17
|
private profileHttps;
|
|
@@ -20,7 +20,9 @@ export default class Loyalty {
|
|
|
20
20
|
private localCache;
|
|
21
21
|
constructor(config: SDKConfigurationModel);
|
|
22
22
|
getConfig: () => Promise<FeaturesConfigModels>;
|
|
23
|
+
getConfigV2: (disableCache?: boolean) => Promise<import("./Models/ClientFeatures/LoyaltyConfigModelV2").default>;
|
|
23
24
|
getClientBadges: () => Promise<ClientBadges>;
|
|
25
|
+
getClientBadgesV2: (disableCache?: boolean) => Promise<import("./Models/Badges/v2/ClientBadgesV2").default>;
|
|
24
26
|
getTemplates: (filters?: TemplateFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
25
27
|
getTemplateById: (templateId: string, disableCache?: boolean) => Promise<TemplateByIdModel>;
|
|
26
28
|
getLeaderboard: (templateId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import DiscussionsBadgesValue from "./Discussions/DiscussionsBadgesValue";
|
|
2
|
+
import FootballBadgesValue from "./Football/FootballBadgesValue";
|
|
3
|
+
import GamesBadgesValue from "./Games/GamesBadgesValue";
|
|
4
|
+
import GameBadgesValue from "./Game/GameBadgesValue";
|
|
5
|
+
import MiniGamesBadgesValue from "./MiniGames/MiniGamesBadgesValue";
|
|
6
|
+
import PredictorBadgesValue from "./Predictor/PredictorBadgesValue";
|
|
7
|
+
import VotingBadgesValue from "./Voting/VotingBadgesValue";
|
|
8
|
+
export default class BadgesModelV2 {
|
|
9
|
+
predictor: PredictorBadgesValue[];
|
|
10
|
+
topX: GameBadgesValue[];
|
|
11
|
+
matchQuiz: GameBadgesValue[];
|
|
12
|
+
games: GamesBadgesValue[];
|
|
13
|
+
football: FootballBadgesValue[];
|
|
14
|
+
classicQuizzes: MiniGamesBadgesValue[];
|
|
15
|
+
eitherOr: MiniGamesBadgesValue[];
|
|
16
|
+
discussions: DiscussionsBadgesValue[];
|
|
17
|
+
voting: VotingBadgesValue;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class ClientBadgesV2 {
|
|
2
|
+
predictor: string[];
|
|
3
|
+
topX: string[];
|
|
4
|
+
matchQuiz: string[];
|
|
5
|
+
games: string[];
|
|
6
|
+
football: string[];
|
|
7
|
+
classicQuizzes: string[];
|
|
8
|
+
eitherOr: string[];
|
|
9
|
+
discussions: string[];
|
|
10
|
+
potm: string[];
|
|
11
|
+
poll: string[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import ActionsModel from "../Actions/ActionsModel";
|
|
2
|
+
import RewardsModelV2 from "../Rewards/RewardsModelV2";
|
|
3
|
+
export default class LoyaltyConfigModelV2 {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
clientId: string;
|
|
6
|
+
conditions: {
|
|
7
|
+
list: string[];
|
|
8
|
+
};
|
|
9
|
+
actions: ActionsModel;
|
|
10
|
+
rewards: RewardsModelV2;
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import BadgesModel from "../Badges/BadgesModel";
|
|
1
2
|
import PointsModel from "../Points/PointsModel";
|
|
2
3
|
import TiersModel from "../Tiers/TiersModel";
|
|
3
|
-
import BadgesModel from "../Badges/BadgesModel";
|
|
4
4
|
export default class RewardsModel {
|
|
5
5
|
points: PointsModel;
|
|
6
6
|
tiers: TiersModel[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import BadgesModelV2 from "../Badges/v2/BadgesModelV2";
|
|
2
|
+
import PointsModel from "../Points/PointsModel";
|
|
3
|
+
import TiersModel from "../Tiers/TiersModel";
|
|
4
|
+
export default class RewardsModelV2 {
|
|
5
|
+
points: PointsModel;
|
|
6
|
+
tiers: TiersModel[];
|
|
7
|
+
badges: BadgesModelV2;
|
|
8
|
+
}
|
|
@@ -5,6 +5,8 @@ import GamesListModel from "../../TopX/Models/Games/GamesListModel";
|
|
|
5
5
|
import ContestWinners from "../../TopX/Models/Games/Winners/ContestWinners";
|
|
6
6
|
import BadgesModel from "../Models/Badges/BadgesModel";
|
|
7
7
|
import ClientBadges from "../Models/Badges/ClientBadges";
|
|
8
|
+
import BadgesModelV2 from "../Models/Badges/v2/BadgesModelV2";
|
|
9
|
+
import ClientBadgesV2 from "../Models/Badges/v2/ClientBadgesV2";
|
|
8
10
|
import EntitiesFollows from "../Models/EntitiesFollows/EntitiesFollows";
|
|
9
11
|
import EntitiesFollowsFilters from "../Models/Filters/EntitiesFollowsFilters";
|
|
10
12
|
import HighestSuccessRateModel from "../Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
@@ -23,7 +25,8 @@ export default class LoyaltyService {
|
|
|
23
25
|
remapTemplatesIds: (templates: TemplateModel[]) => Promise<TemplateModel[] | TemplateByIdModel[]>;
|
|
24
26
|
remapTemplateGroupMatchIds: (groups: TemplateGroups[]) => Promise<void>;
|
|
25
27
|
addProfileModelToLeaderboard: (leaderboard: any[]) => Promise<LeaderboardModel[]>;
|
|
26
|
-
|
|
28
|
+
buildOldClientBadges: (badges: BadgesModel) => ClientBadges;
|
|
29
|
+
buildNewClientBadges: (badges: BadgesModelV2) => ClientBadgesV2;
|
|
27
30
|
initFilters: (filters: any, type: FiltersType) => any;
|
|
28
31
|
addProfileModelToHighestSuccessRate: (highestSuccessRate: HighestSuccessRateModel[]) => Promise<HighestSuccessRateModel[]>;
|
|
29
32
|
extractRankingsIdsMap: (rankings: RankingsModel[]) => string[][];
|
|
@@ -35,4 +38,9 @@ export default class LoyaltyService {
|
|
|
35
38
|
initMatchFiltersForTemplates: (template: TemplateByIdModel, groupId?: string) => MatchFilters;
|
|
36
39
|
private reformatDate;
|
|
37
40
|
private extractEnabledBadgesId;
|
|
41
|
+
addEntityModelToFootballBadges: (badges: BadgesModelV2) => Promise<void>;
|
|
42
|
+
private setEntityModelsFromMap;
|
|
43
|
+
private setEntityModelsFromObject;
|
|
44
|
+
private fetchFootballEntities;
|
|
45
|
+
private extractEntityIdsFromBadges;
|
|
38
46
|
}
|
|
@@ -3,16 +3,28 @@ import LoyaltyConfigModel from "../../../Loyalty/Models/ClientFeatures/LoyaltyCo
|
|
|
3
3
|
import MatchQuizConfigModel from "../../../MatchQuiz/Models/Config/MatchQuizConfigModel";
|
|
4
4
|
import TopXConfigModel from "../../../TopX/Models/Config/TopXConfigModel";
|
|
5
5
|
import PredictorConfigModel from "./PredictorConfigModel";
|
|
6
|
+
import LoyaltyConfigModelV2 from "../../../Loyalty/Models/ClientFeatures/LoyaltyConfigModelV2";
|
|
6
7
|
export default class FeatureConfigRemapper {
|
|
7
8
|
remapPredictorConfig: (response: any) => PredictorConfigModel;
|
|
8
9
|
remapTopXConfig: (response: any) => TopXConfigModel;
|
|
9
10
|
remapMatchQuizConfig: (response: any) => MatchQuizConfigModel;
|
|
10
11
|
remapLoyaltyConfig: (response: any) => LoyaltyConfigModel;
|
|
12
|
+
remapLoyaltyNewConfig: (response: any) => LoyaltyConfigModelV2;
|
|
11
13
|
remapDiscussionsConfig: (response: any) => DiscussionsConfigModel;
|
|
12
14
|
private remapAutomaticModeration;
|
|
15
|
+
private remapNewRewards;
|
|
13
16
|
private remapRewards;
|
|
14
17
|
private remapPoints;
|
|
15
18
|
private remapBadges;
|
|
19
|
+
private remapNewBadges;
|
|
20
|
+
private remapBadgeValuesPredictor;
|
|
21
|
+
private remapBadgeValuesGame;
|
|
22
|
+
private remapBadgeValuesGames;
|
|
23
|
+
private remapSpecificGamesRequirement;
|
|
24
|
+
private remapBadgeValuesFootball;
|
|
25
|
+
private remapBadgeValuesMiniGames;
|
|
26
|
+
private remapBadgeValuesDiscussions;
|
|
27
|
+
private remapBadgeValuesVoting;
|
|
16
28
|
private remapBadgeValues;
|
|
17
29
|
private remapRequirements;
|
|
18
30
|
private remapUserDataConfig;
|