fansunited-sdk-esm 1.55.0 → 1.57.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/Namespaces/MiniGames/Facade/MiniGamesFacade.d.ts +8 -3
- package/Core/Namespaces/MiniGames/MiniGames.d.ts +4 -3
- package/Core/Namespaces/MiniGames/Models/ClassicQuiz/ClassicQuizBasicModel.d.ts +3 -0
- package/Core/Namespaces/MiniGames/Models/ClassicQuiz/ClassicQuizFilters.d.ts +6 -0
- package/Core/Namespaces/MiniGames/Models/ClassicQuiz/ClassicQuizFullModel.d.ts +0 -1
- package/Core/Namespaces/MiniGames/Models/EitherOr/EitherOrBasicModel.d.ts +3 -0
- package/Core/Namespaces/MiniGames/Models/EitherOr/EitherOrFilters.d.ts +6 -0
- package/Core/Namespaces/MiniGames/Models/EitherOr/EitherOrFullModel.d.ts +0 -1
- package/Core/Namespaces/MiniGames/Models/Filters/MiniGamesFilters.d.ts +1 -1
- package/Core/Namespaces/MiniGames/Models/MiniGamesContext.d.ts +8 -0
- package/Core/Namespaces/MiniGames/Models/MiniGamesContextTag.d.ts +6 -0
- package/Core/Namespaces/MiniGames/Models/Remappers/ClassicQuizRemapper.d.ts +1 -0
- package/Core/Namespaces/MiniGames/Models/Remappers/EitherOrRemapper.d.ts +1 -0
- package/Core/Namespaces/MiniGames/Service/MiniGamesService.d.ts +4 -0
- package/index.js +3 -3
- package/index.js.map +4 -4
- package/package.json +1 -1
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
|
|
2
2
|
import MiniGamesHttps from "../../../Https/MiniGamesHttps";
|
|
3
|
+
import ActivityService from "../../Activity/Service/ActivityService";
|
|
3
4
|
import { IEitherOrParticipationCallback } from "../Interfaces/MiniGamesInterfaces";
|
|
5
|
+
import ClassicQuizFilters from "../Models/ClassicQuiz/ClassicQuizFilters";
|
|
4
6
|
import ClassicQuizParticipationBodyModel from "../Models/ClassicQuiz/ClassicQuizParticipationBodyModel";
|
|
7
|
+
import EitherOrFilters from "../Models/EitherOr/EitherOrFilters";
|
|
5
8
|
import EitherOrParticipationRequestModel from "../Models/EitherOr/Participation/EitherOrParticipationRequestModel";
|
|
6
|
-
import MiniGamesFilters from "../Models/Filters/MiniGamesFilters";
|
|
7
9
|
import MiniGamesService from "../Service/MiniGamesService";
|
|
8
10
|
export default class MiniGamesFacade {
|
|
9
11
|
readonly https: MiniGamesHttps;
|
|
10
12
|
readonly service: MiniGamesService;
|
|
13
|
+
readonly activityService: ActivityService;
|
|
14
|
+
readonly idSchema: string;
|
|
11
15
|
constructor(config: SDKConfigurationModel);
|
|
12
|
-
getClassicQuizzes: (filters?:
|
|
16
|
+
getClassicQuizzes: (filters?: ClassicQuizFilters, showFullContextData?: boolean, disableCache?: boolean) => Promise<import("../Models/ClassicQuiz/ClassicQuizzesModel").default>;
|
|
13
17
|
getClassicQuizById: (classicQuizId: string, disableCache?: boolean) => Promise<import("../Models/ClassicQuiz/ClassicQuizFullModel").default>;
|
|
14
18
|
participateInClassicQuiz: (classicQuizId: string, questions: ClassicQuizParticipationBodyModel[], includeCorrectOptionIds?: boolean) => Promise<import("../Models/ClassicQuiz/ClassicQuizParticipationModel").default>;
|
|
15
19
|
getMyClassicQuizParticipations: (classicQuizIds: string[]) => Promise<import("../Models/ClassicQuiz/ClassicQuizUserParticipationModel").default[]>;
|
|
16
|
-
getEitherOrs: (filters?:
|
|
20
|
+
getEitherOrs: (filters?: EitherOrFilters, showFullContextData?: boolean, disableCache?: boolean) => Promise<import("../Models/EitherOr/EitherOrsModel").default>;
|
|
17
21
|
getEitherOrById: (eitherOrId: string, disableCache?: boolean) => Promise<import("../Models/EitherOr/EitherOrFullModel").default>;
|
|
18
22
|
getMyEitherOrStats: (eitherOrId: string) => Promise<import("../Models/EitherOr/EitherOrStatsModel").default>;
|
|
19
23
|
getEitherOrResults: (eitherOrId: string, disableCache?: boolean) => Promise<import("../Models/EitherOr/Results/EitherOrResultsModel").default>;
|
|
20
24
|
participateInEitherOr: (eitherOrId: string, participation: EitherOrParticipationRequestModel | null, onEitherOrParticipationCallbacks?: IEitherOrParticipationCallback) => Promise<import("../Models/EitherOr/Participation/EitherOrParticipationModel").default>;
|
|
25
|
+
private remapTags;
|
|
21
26
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import SDKConfigurationModel from "../../Configurator/Models/SDKConfiguraitonModel";
|
|
2
2
|
import { IEitherOrParticipationCallback } from "./Interfaces/MiniGamesInterfaces";
|
|
3
|
+
import ClassicQuizFilters from "./Models/ClassicQuiz/ClassicQuizFilters";
|
|
3
4
|
import ClassicQuizParticipationBodyModel from "./Models/ClassicQuiz/ClassicQuizParticipationBodyModel";
|
|
5
|
+
import EitherOrFilters from "./Models/EitherOr/EitherOrFilters";
|
|
4
6
|
import EitherOrParticipationRequestModel from "./Models/EitherOr/Participation/EitherOrParticipationRequestModel";
|
|
5
|
-
import MiniGamesFilters from "./Models/Filters/MiniGamesFilters";
|
|
6
7
|
export default class MiniGames {
|
|
7
8
|
private facade;
|
|
8
9
|
constructor(config: SDKConfigurationModel);
|
|
9
|
-
getClassicQuizzes: (filters?:
|
|
10
|
+
getClassicQuizzes: (filters?: ClassicQuizFilters, showFullContextData?: boolean, disableCache?: boolean) => Promise<import("./Models/ClassicQuiz/ClassicQuizzesModel").default>;
|
|
10
11
|
getClassicQuizById: (classicQuizId: string, disableCache?: boolean) => Promise<import("./Models/ClassicQuiz/ClassicQuizFullModel").default>;
|
|
11
12
|
participateInClassicQuiz: (classicQuizId: string, questions: ClassicQuizParticipationBodyModel[], includeCorrectOptionIds?: boolean) => Promise<import("./Models/ClassicQuiz/ClassicQuizParticipationModel").default>;
|
|
12
13
|
getMyClassicQuizParticipations: (classicQuizIds: string[]) => Promise<import("./Models/ClassicQuiz/ClassicQuizUserParticipationModel").default[]>;
|
|
13
|
-
getEitherOrs: (filters?:
|
|
14
|
+
getEitherOrs: (filters?: EitherOrFilters, showFullContextData?: boolean, disableCache?: boolean) => Promise<import("./Models/EitherOr/EitherOrsModel").default>;
|
|
14
15
|
getEitherOrById: (eitherOrId: string, disableCache?: boolean) => Promise<import("./Models/EitherOr/EitherOrFullModel").default>;
|
|
15
16
|
getMyEitherOrStats: (eitherOrId: string) => Promise<import("./Models/EitherOr/EitherOrStatsModel").default>;
|
|
16
17
|
getEitherOrResults: (eitherOrId: string, disableCache?: boolean) => Promise<import("./Models/EitherOr/Results/EitherOrResultsModel").default>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ImagesModel from "../../../../Global/Models/Images/ImagesModel";
|
|
2
|
+
import MiniGamesContext from "../MiniGamesContext";
|
|
2
3
|
export default class ClassicQuizBasicModel {
|
|
3
4
|
id: string;
|
|
4
5
|
title: string;
|
|
@@ -14,6 +15,8 @@ export default class ClassicQuizBasicModel {
|
|
|
14
15
|
time: number;
|
|
15
16
|
averageScore: number;
|
|
16
17
|
perfectScore: number;
|
|
18
|
+
adContent: string;
|
|
19
|
+
context: MiniGamesContext;
|
|
17
20
|
createdAt: string;
|
|
18
21
|
updatedAt: string;
|
|
19
22
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import ClassicQuizBasicModel from "./ClassicQuizBasicModel";
|
|
2
2
|
import ClassicQuizQuestionModel from "./ClassicQuizQuestionModel";
|
|
3
3
|
export default class ClassicQuizFullModel extends ClassicQuizBasicModel {
|
|
4
|
-
adContent: string;
|
|
5
4
|
rules: string;
|
|
6
5
|
questions: ClassicQuizQuestionModel[];
|
|
7
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ImagesModel from "../../../../Global/Models/Images/ImagesModel";
|
|
2
|
+
import MiniGamesContext from "../MiniGamesContext";
|
|
2
3
|
import EitherOrPointsModel from "./EitherOrPointsModel";
|
|
3
4
|
export default class EitherOrBasicModel {
|
|
4
5
|
id: string;
|
|
@@ -13,6 +14,8 @@ export default class EitherOrBasicModel {
|
|
|
13
14
|
points: EitherOrPointsModel[];
|
|
14
15
|
customFields: Record<string, string>;
|
|
15
16
|
labels: Record<string, string>;
|
|
17
|
+
adContent: string;
|
|
18
|
+
context: MiniGamesContext;
|
|
16
19
|
type: string;
|
|
17
20
|
createdAt: string;
|
|
18
21
|
updatedAt: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import CampaignModel from "../../Activity/Models/RequestBody/Context/CampaignModel";
|
|
2
|
+
import ContentModel from "../../Activity/Models/RequestBody/Context/ContentModel";
|
|
3
|
+
import MiniGamesContextTag from "./MiniGamesContextTag";
|
|
4
|
+
export default class MiniGamesContext {
|
|
5
|
+
content: ContentModel;
|
|
6
|
+
tags: MiniGamesContextTag[];
|
|
7
|
+
campaign: CampaignModel;
|
|
8
|
+
}
|
|
@@ -14,6 +14,7 @@ export default class MiniGamesService {
|
|
|
14
14
|
readonly https: MiniGamesHttps;
|
|
15
15
|
readonly entityTypes: string[];
|
|
16
16
|
private readonly profile;
|
|
17
|
+
private readonly football;
|
|
17
18
|
private eitherOrTime;
|
|
18
19
|
private participationStartTimestamp;
|
|
19
20
|
private countdownTimer;
|
|
@@ -31,4 +32,7 @@ export default class MiniGamesService {
|
|
|
31
32
|
private createNewParticipation;
|
|
32
33
|
private resetCallbackParticipationTimers;
|
|
33
34
|
private resetDefaultParticipationTimers;
|
|
35
|
+
setContextTagsModels: (miniGames: any[]) => Promise<void>;
|
|
36
|
+
private extractEntityIdsFromTags;
|
|
37
|
+
private setModelsForContextTags;
|
|
34
38
|
}
|