fansunited-sdk-esm 1.27.0 → 1.28.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/Https/ActivityHttps.d.ts +4 -3
- package/Core/Https/LoyaltyHttps.d.ts +2 -1
- package/Core/Namespaces/Activity/Activity.d.ts +4 -3
- package/Core/Namespaces/Activity/Enums/ActionsEnum.d.ts +13 -1
- package/Core/Namespaces/Activity/Enums/UserActionsEnum.d.ts +7 -0
- package/Core/Namespaces/Activity/Facade/ActivityFacade.d.ts +4 -3
- package/Core/Namespaces/Activity/Models/ActivityResponseBody.d.ts +2 -0
- package/Core/Namespaces/Activity/Models/Filters/ActivityFilters.d.ts +5 -0
- package/Core/Namespaces/Activity/Models/Filters/OwnActivityFilters.d.ts +7 -0
- package/Core/Namespaces/Activity/Models/Filters/UserActivityFilters.d.ts +7 -0
- package/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.d.ts +2 -2
- package/Core/Namespaces/Loyalty/Loyalty.d.ts +2 -2
- package/Core/Namespaces/Loyalty/Models/Template/TemplateByIdModel.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Template/TemplateRemapper.d.ts +2 -0
- package/Core/Namespaces/Loyalty/Service/LoyaltyService.d.ts +2 -1
- package/Core/Namespaces/TopX/Models/Games/GameByIdModel.d.ts +2 -0
- package/index.js +4 -4
- package/index.js.map +3 -3
- package/package.json +1 -1
- package/Core/Namespaces/Activity/Models/ActivityFilters.d.ts +0 -8
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
-
import ActivityFilters from "../Namespaces/Activity/Models/ActivityFilters";
|
|
3
2
|
import ActivityResponseBody from "../Namespaces/Activity/Models/ActivityResponseBody";
|
|
4
3
|
import PaginationActivities from "../Namespaces/Activity/Models/PaginationActivities";
|
|
5
4
|
import CreateActivityRequestBody from "../Namespaces/Activity/Models/RequestBody/CreateActivityRequestBody";
|
|
6
5
|
import ProfileStatsModel from "../Namespaces/Profile/Models/Stats/ProfileStatsModel";
|
|
7
6
|
import Https from "./Https";
|
|
7
|
+
import OwnActivityFilters from "../Namespaces/Activity/Models/Filters/OwnActivityFilters";
|
|
8
|
+
import UserActivityFilters from "../Namespaces/Activity/Models/Filters/UserActivityFilters";
|
|
8
9
|
export default class ActivityHttps extends Https {
|
|
9
10
|
private activityRemapper;
|
|
10
11
|
constructor(config: SDKConfiguraitonModel);
|
|
11
12
|
createActivity: (requestBody: CreateActivityRequestBody) => Promise<ActivityResponseBody>;
|
|
12
13
|
deleteActivity: (activityId: string) => Promise<boolean>;
|
|
13
|
-
getOwnActivities: (filters:
|
|
14
|
-
getActivitiesForUser: (userId: string, filters:
|
|
14
|
+
getOwnActivities: (filters: OwnActivityFilters, disableCache: boolean) => Promise<PaginationActivities>;
|
|
15
|
+
getActivitiesForUser: (userId: string, filters: UserActivityFilters, disableCache: boolean) => Promise<PaginationActivities>;
|
|
15
16
|
getStats: (userId?: string, disableCache?: boolean) => Promise<ProfileStatsModel>;
|
|
16
17
|
}
|
|
@@ -8,6 +8,7 @@ import HighestSuccessRateModel from "../Namespaces/Loyalty/Models/HighestSuccess
|
|
|
8
8
|
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
|
+
import TemplateByIdModel from "../Namespaces/Loyalty/Models/Template/TemplateByIdModel";
|
|
11
12
|
export default class LoyaltyHttps extends Https {
|
|
12
13
|
private templateRemapper;
|
|
13
14
|
private leaderboardRemapper;
|
|
@@ -15,7 +16,7 @@ export default class LoyaltyHttps extends Https {
|
|
|
15
16
|
private highestSuccessRateRemapper;
|
|
16
17
|
constructor(config: SDKConfiguraitonModel);
|
|
17
18
|
getTemplates: (disableCache: boolean, isPaginated: boolean) => Promise<PaginationModel | TemplateModel[]>;
|
|
18
|
-
getTemplateById: (templateId: string, disableCache: boolean) => Promise<
|
|
19
|
+
getTemplateById: (templateId: string, disableCache: boolean) => Promise<TemplateByIdModel>;
|
|
19
20
|
getLeaderboard: (templateId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
20
21
|
getLeaderboardForGame: (gameId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
21
22
|
getUserRankings: (userId: string, filters: RankingsFilters, disableCache: boolean) => Promise<FootballPaginationModel>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import SDKConfigurationModel from "../../Configurator/Models/SDKConfiguraitonModel";
|
|
2
2
|
import { ActionsEnum } from "./Enums/ActionsEnum";
|
|
3
|
-
import ActivityFilters from "./Models/ActivityFilters";
|
|
4
3
|
import ActivityResponseBody from "./Models/ActivityResponseBody";
|
|
5
4
|
import PaginationActivities from "./Models/PaginationActivities";
|
|
6
5
|
import CampaignModel from "./Models/RequestBody/Context/CampaignModel";
|
|
7
6
|
import ContentModel from "./Models/RequestBody/Context/ContentModel";
|
|
8
7
|
import TagsModel from "./Models/RequestBody/Context/TagsModel";
|
|
8
|
+
import UserActivityFilters from "./Models/Filters/UserActivityFilters";
|
|
9
|
+
import OwnActivityFilters from "./Models/Filters/OwnActivityFilters";
|
|
9
10
|
export default class Activity {
|
|
10
11
|
private activityFacade;
|
|
11
12
|
constructor(config: SDKConfigurationModel);
|
|
@@ -19,6 +20,6 @@ export default class Activity {
|
|
|
19
20
|
addComment: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
20
21
|
addClickAd: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
21
22
|
addConversion: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
22
|
-
getOwn: (filters?:
|
|
23
|
-
getForUser: (userId: string, filters?:
|
|
23
|
+
getOwn: (filters?: OwnActivityFilters, disableCache?: boolean) => Promise<PaginationActivities>;
|
|
24
|
+
getForUser: (userId: string, filters?: UserActivityFilters, disableCache?: boolean) => Promise<PaginationActivities>;
|
|
24
25
|
}
|
|
@@ -6,5 +6,17 @@ export declare enum ActionsEnum {
|
|
|
6
6
|
SHARE = "share",
|
|
7
7
|
COMMENT = "comment",
|
|
8
8
|
CLICK_AD = "click_ad",
|
|
9
|
-
CONVERSION = "conversion"
|
|
9
|
+
CONVERSION = "conversion",
|
|
10
|
+
PREDICTION_MADE = "prediction_made",
|
|
11
|
+
CONVERT = "convert",
|
|
12
|
+
MANAGE_INTERESTS = "manage_interests",
|
|
13
|
+
GAME_PARTICIPATION = "game_participation",
|
|
14
|
+
ARTICLE_CONSUMED = "article_consumed",
|
|
15
|
+
VIDEO_CONSUMED = "video_consumed",
|
|
16
|
+
SHORT_VIDEO_CONSUMED = "short_video_consumed",
|
|
17
|
+
LONG_VIDEO_CONSUMED = "long_video_consumed",
|
|
18
|
+
AUDIO_CONSUMED = "audio_consumed",
|
|
19
|
+
GALLERY_CONSUMED = "gallery_consumed",
|
|
20
|
+
IMAGE_CONSUMED = "image_consumed",
|
|
21
|
+
POLL_PARTICIPATION = "poll_participation"
|
|
10
22
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
|
|
2
2
|
import { ActionsEnum } from "../Enums/ActionsEnum";
|
|
3
|
-
import ActivityFilters from "../Models/ActivityFilters";
|
|
4
3
|
import ActivityResponseBody from "../Models/ActivityResponseBody";
|
|
5
4
|
import PaginationActivities from "../Models/PaginationActivities";
|
|
6
5
|
import CampaignModel from "../Models/RequestBody/Context/CampaignModel";
|
|
7
6
|
import ContentModel from "../Models/RequestBody/Context/ContentModel";
|
|
8
7
|
import TagsModel from "../Models/RequestBody/Context/TagsModel";
|
|
8
|
+
import OwnActivityFilters from "../Models/Filters/OwnActivityFilters";
|
|
9
|
+
import UserActivityFilters from "../Models/Filters/UserActivityFilters";
|
|
9
10
|
export default class ActivityFacade {
|
|
10
11
|
private idSchema;
|
|
11
12
|
private activityHttps;
|
|
@@ -21,6 +22,6 @@ export default class ActivityFacade {
|
|
|
21
22
|
addComment: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
22
23
|
addClickAd: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
23
24
|
addConversion: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
24
|
-
getOwn: (filters?:
|
|
25
|
-
getForUser: (userId: string, filters?:
|
|
25
|
+
getOwn: (filters?: OwnActivityFilters, disableCache?: boolean) => Promise<PaginationActivities>;
|
|
26
|
+
getForUser: (userId: string, filters?: UserActivityFilters, disableCache?: boolean) => Promise<PaginationActivities>;
|
|
26
27
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UserActionsEnum } from "../../Enums/UserActionsEnum";
|
|
2
|
+
import ActivityFilters from "./ActivityFilters";
|
|
3
|
+
export default class UserActivityFilters extends ActivityFilters {
|
|
4
|
+
action?: UserActionsEnum;
|
|
5
|
+
constructor(filters: any);
|
|
6
|
+
constructFilterUrl?(): string;
|
|
7
|
+
}
|
|
@@ -4,7 +4,6 @@ import ClientHttps from "../../../Https/ClientHttps";
|
|
|
4
4
|
import LoyaltyHttps from "../../../Https/LoyaltyHttps";
|
|
5
5
|
import LoyaltyFilters from "../Models/Filters/LoyaltyFilters";
|
|
6
6
|
import ClientBadges from "../Models/Badges/ClientBadges";
|
|
7
|
-
import TemplateModel from "../Models/Template/TemplateModel";
|
|
8
7
|
import { FeaturesConfigModels } from "../../../Global/Types/GlobalTypes";
|
|
9
8
|
import RankingsFilters from "../Models/Filters/RankingsFilters";
|
|
10
9
|
import FootballPaginationModel from "../../Football/Models/Pagination/FootballPaginationModel";
|
|
@@ -14,6 +13,7 @@ import HighestSuccessRateModel from "../Models/HighestSuccessRate/HighestSuccess
|
|
|
14
13
|
import ContestWinners from "../../TopX/Models/Games/Winners/ContestWinners";
|
|
15
14
|
import EntitiesFollowsFilters from "../Models/Filters/EntitiesFollowsFilters";
|
|
16
15
|
import EntitiesFollows from "../Models/EntitiesFollows/EntitiesFollows";
|
|
16
|
+
import TemplateByIdModel from "../Models/Template/TemplateByIdModel";
|
|
17
17
|
export default class LoyaltyFacade {
|
|
18
18
|
private config;
|
|
19
19
|
private clientHttps;
|
|
@@ -30,7 +30,7 @@ export default class LoyaltyFacade {
|
|
|
30
30
|
getConfig: () => Promise<FeaturesConfigModels>;
|
|
31
31
|
getClientBadges: () => Promise<ClientBadges>;
|
|
32
32
|
getTemplates: (disableCache?: boolean) => Promise<PaginationModel>;
|
|
33
|
-
getTemplateById: (templateId: string, disableCache?: boolean) => Promise<
|
|
33
|
+
getTemplateById: (templateId: string, disableCache?: boolean) => Promise<TemplateByIdModel>;
|
|
34
34
|
getLeaderboard: (templateId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
35
35
|
getLeaderboardForGame: (gameId: string, filters: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
36
36
|
getOwnRankings: (filters?: RankingsFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
@@ -2,13 +2,13 @@ import SDKConfigurationModel from "../../Configurator/Models/SDKConfiguraitonMod
|
|
|
2
2
|
import PaginationModel from "../../Global/Models/Pagination/PaginationModel";
|
|
3
3
|
import LoyaltyFilters from "./Models/Filters/LoyaltyFilters";
|
|
4
4
|
import ClientBadges from "./Models/Badges/ClientBadges";
|
|
5
|
-
import TemplateModel from "./Models/Template/TemplateModel";
|
|
6
5
|
import { FeaturesConfigModels } from "../../Global/Types/GlobalTypes";
|
|
7
6
|
import RankingsFilters from "./Models/Filters/RankingsFilters";
|
|
8
7
|
import HighestSuccessRateModel from "./Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
9
8
|
import ContestWinners from "../TopX/Models/Games/Winners/ContestWinners";
|
|
10
9
|
import EntitiesFollowsFilters from "./Models/Filters/EntitiesFollowsFilters";
|
|
11
10
|
import EntitiesFollows from "./Models/EntitiesFollows/EntitiesFollows";
|
|
11
|
+
import TemplateByIdModel from "./Models/Template/TemplateByIdModel";
|
|
12
12
|
export default class Loyalty {
|
|
13
13
|
private clientHttps;
|
|
14
14
|
private profileHttps;
|
|
@@ -19,7 +19,7 @@ export default class Loyalty {
|
|
|
19
19
|
getConfig: () => Promise<FeaturesConfigModels>;
|
|
20
20
|
getClientBadges: () => Promise<ClientBadges>;
|
|
21
21
|
getTemplates: (disableCache?: boolean) => Promise<PaginationModel>;
|
|
22
|
-
getTemplateById: (templateId: string, disableCache?: boolean) => Promise<
|
|
22
|
+
getTemplateById: (templateId: string, disableCache?: boolean) => Promise<TemplateByIdModel>;
|
|
23
23
|
getLeaderboard: (templateId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
24
24
|
getLeaderboardForGame: (gameId: string, filters?: LoyaltyFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
25
25
|
getOwnRankings: (filters?: RankingsFilters, disableCache?: boolean) => Promise<import("../Football/Models/Pagination/FootballPaginationModel").default>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import TemplateByIdModel from "./TemplateByIdModel";
|
|
1
2
|
import TemplateModel from "./TemplateModel";
|
|
2
3
|
export default class TemplateRemapper {
|
|
3
4
|
remapResponse: (response: any[]) => TemplateModel[];
|
|
5
|
+
remapResponseId: (response: any) => TemplateByIdModel;
|
|
4
6
|
remapMeta: (meta: any) => any;
|
|
5
7
|
private remapRelated;
|
|
6
8
|
}
|
|
@@ -9,6 +9,7 @@ import EntitiesFollowsFilters from "../Models/Filters/EntitiesFollowsFilters";
|
|
|
9
9
|
import HighestSuccessRateModel from "../Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
10
10
|
import LeaderboardModel from "../Models/Leaderboard/LeaderboardModel";
|
|
11
11
|
import RankingsModel from "../Models/Rankings/RankingsModel";
|
|
12
|
+
import TemplateByIdModel from "../Models/Template/TemplateByIdModel";
|
|
12
13
|
import TemplateModel from "../Models/Template/TemplateModel";
|
|
13
14
|
import { FiltersType } from "../Types/LoyaltyTypes";
|
|
14
15
|
export default class LoyaltyService {
|
|
@@ -17,7 +18,7 @@ export default class LoyaltyService {
|
|
|
17
18
|
private footballNamespace;
|
|
18
19
|
private errorHandlingMode;
|
|
19
20
|
constructor(config: SDKConfigurationModel);
|
|
20
|
-
remapTemplatesIds: (templates: TemplateModel[]) => Promise<TemplateModel[]>;
|
|
21
|
+
remapTemplatesIds: (templates: TemplateModel[]) => Promise<TemplateModel[] | TemplateByIdModel[]>;
|
|
21
22
|
addProfileModelToLeaderboad: (leaderboard: any[]) => Promise<LeaderboardModel[]>;
|
|
22
23
|
buildClientBadges: (badges: BadgesModel) => ClientBadges;
|
|
23
24
|
initFilters: (filters: any, type: FiltersType) => any;
|