fansunited-sdk-esm 1.2.5 → 1.2.6
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/Configurator/ConfigurationValidator.d.ts +21 -0
- package/Core/Configurator/Enums/ConfigFieldEnum.d.ts +8 -0
- package/Core/Configurator/Enums/EnvironmentEnum.d.ts +5 -0
- package/Core/Configurator/Enums/IdSchemaEnum.d.ts +6 -0
- package/Core/Configurator/Enums/LangEnum.d.ts +5 -0
- package/Core/Configurator/Enums/LogEnum.d.ts +4 -0
- package/Core/Configurator/Enums/ValidationMessageEnum.d.ts +14 -0
- package/Core/Configurator/Enums/ValidationResponseEnum.d.ts +5 -0
- package/Core/Configurator/Models/AuthProviderConfigModel.d.ts +4 -0
- package/Core/Configurator/Models/AuthProviderValidationModel.d.ts +8 -0
- package/Core/Configurator/Models/ConfigValidationModel.d.ts +10 -0
- package/Core/Configurator/Models/FansUnitedAuthInterface.d.ts +4 -0
- package/Core/Configurator/Models/MessageLogModel.d.ts +5 -0
- package/Core/Configurator/Models/SDKConfiguraitonModel.d.ts +12 -0
- package/Core/Configurator/Models/ValidationItemModel.d.ts +6 -0
- package/Core/Configurator/Validators/ApiKeyValidator.d.ts +8 -0
- package/Core/Configurator/Validators/AuthProviderValidator.d.ts +7 -0
- package/Core/Configurator/Validators/ClientIdValidator.d.ts +8 -0
- package/Core/Configurator/Validators/EnvironmentValidator.d.ts +8 -0
- package/Core/Configurator/Validators/IValidator.d.ts +5 -0
- package/Core/Configurator/Validators/IdSchemaValidator.d.ts +8 -0
- package/Core/Configurator/Validators/LangValidator.d.ts +8 -0
- package/Core/Global/BulkBuilder.d.ts +3 -0
- package/Core/Global/Constants/Constants.d.ts +6 -0
- package/Core/Global/Constants/Tests/SDKConfigurationsTesting.d.ts +40 -0
- package/Core/Global/Helper.d.ts +5 -0
- package/Core/Global/IRemapper.d.ts +3 -0
- package/Core/Global/LocalStorage.d.ts +35 -0
- package/Core/Global/Models/Pagination/MetaModel.d.ts +4 -0
- package/Core/Global/Models/Pagination/MetaProperties.d.ts +4 -0
- package/Core/Global/Models/Pagination/PaginationModel.d.ts +5 -0
- package/Core/Global/Models/Pagination/Remapper/MetaRemapper.d.ts +4 -0
- package/Core/Https/ActivityHttps.d.ts +19 -0
- package/Core/Https/ClientHttps.d.ts +7 -0
- package/Core/Https/FootballHttps.d.ts +67 -0
- package/Core/Https/IdMappingHttps.d.ts +22 -0
- package/Core/Https/LoyaltyHttps.d.ts +14 -0
- package/Core/Https/PredictorHttps.d.ts +33 -0
- package/Core/Https/ProfileHttps.d.ts +25 -0
- package/Core/IdMapping/IdMappingFacade.d.ts +15 -0
- package/Core/IdMapping/IdMappingService.d.ts +10 -0
- package/Core/IdMapping/TraversalHelper.d.ts +1 -0
- package/Core/IdMapping/TreeTraversalExtract.d.ts +6 -0
- package/Core/IdMapping/TreeTraversalReplace.d.ts +8 -0
- package/Core/Namespaces/Activity/Activity.d.ts +24 -0
- package/Core/Namespaces/Activity/Enums/ActionsEnum.d.ts +10 -0
- package/Core/Namespaces/Activity/Facade/ActivityFacade.d.ts +26 -0
- package/Core/Namespaces/Activity/Models/ActivityFilters.d.ts +8 -0
- package/Core/Namespaces/Activity/Models/ActivityMeta.d.ts +3 -0
- package/Core/Namespaces/Activity/Models/ActivityResponseBody.d.ts +8 -0
- package/Core/Namespaces/Activity/Models/PaginationActivities.d.ts +6 -0
- package/Core/Namespaces/Activity/Models/RequestBody/Context/CampaignModel.d.ts +4 -0
- package/Core/Namespaces/Activity/Models/RequestBody/Context/ContentModel.d.ts +5 -0
- package/Core/Namespaces/Activity/Models/RequestBody/Context/ContextModel.d.ts +8 -0
- package/Core/Namespaces/Activity/Models/RequestBody/Context/TagsModel.d.ts +5 -0
- package/Core/Namespaces/Activity/Models/RequestBody/CreateActivityRequestBody.d.ts +10 -0
- package/Core/Namespaces/Activity/Remapper/ActivityRemapper.d.ts +8 -0
- package/Core/Namespaces/Activity/Service/ActivityService.d.ts +17 -0
- package/Core/Namespaces/Football/Facades/CompetitionsFacade.d.ts +19 -0
- package/Core/Namespaces/Football/Facades/CountriesFacade.d.ts +13 -0
- package/Core/Namespaces/Football/Facades/FootballFacade.d.ts +48 -0
- package/Core/Namespaces/Football/Facades/MatchFacade.d.ts +16 -0
- package/Core/Namespaces/Football/Facades/PlayerFacade.d.ts +24 -0
- package/Core/Namespaces/Football/Facades/SearchFacade.d.ts +11 -0
- package/Core/Namespaces/Football/Facades/TeamsFacade.d.ts +22 -0
- package/Core/Namespaces/Football/Football.d.ts +40 -0
- package/Core/Namespaces/Football/Models/Competition/CompetitionBasicModel.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Competition/CompetitionFilters.d.ts +16 -0
- package/Core/Namespaces/Football/Models/Competition/CompetitionFullModel.d.ts +11 -0
- package/Core/Namespaces/Football/Models/Competition/Remappers/CompetitionBasicRemapper.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Competition/Remappers/CompetitionFullRemapper.d.ts +8 -0
- package/Core/Namespaces/Football/Models/Country/FootballCountryModel.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Country/Remappers/FootballCountryRemapper.d.ts +5 -0
- package/Core/Namespaces/Football/Models/Match/Lineups/LineupsModel.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Match/Lineups/LineupsRemapper.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Match/MatchBasicModel.d.ts +21 -0
- package/Core/Namespaces/Football/Models/Match/MatchFilters.d.ts +15 -0
- package/Core/Namespaces/Football/Models/Match/MatchFullModel.d.ts +28 -0
- package/Core/Namespaces/Football/Models/Match/Remappers/MatchBasicRemapper.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Match/Remappers/MatchFullRemapper.d.ts +12 -0
- package/Core/Namespaces/Football/Models/Match/Scores/ScoresModel.d.ts +8 -0
- package/Core/Namespaces/Football/Models/Match/Scores/ScoresRemapper.d.ts +6 -0
- package/Core/Namespaces/Football/Models/Match/StatType.d.ts +8 -0
- package/Core/Namespaces/Football/Models/Match/Stats/StatsModel.d.ts +18 -0
- package/Core/Namespaces/Football/Models/Match/Stats/StatsRemapper.d.ts +6 -0
- package/Core/Namespaces/Football/Models/Match/Timeline/TimelineModel.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Match/Timeline/TimelineRemapper.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Pagination/FootballPaginationModel.d.ts +5 -0
- package/Core/Namespaces/Football/Models/Pagination/MetaFootballModel.d.ts +4 -0
- package/Core/Namespaces/Football/Models/Pagination/PaginationFootballProperties.d.ts +6 -0
- package/Core/Namespaces/Football/Models/Pagination/Remapper/FootballMetaRemapper.d.ts +4 -0
- package/Core/Namespaces/Football/Models/Player/PlayerBasicModel.d.ts +13 -0
- package/Core/Namespaces/Football/Models/Player/PlayerFilters.d.ts +12 -0
- package/Core/Namespaces/Football/Models/Player/PlayerFullModel.d.ts +15 -0
- package/Core/Namespaces/Football/Models/Player/PlayerShortModel.d.ts +8 -0
- package/Core/Namespaces/Football/Models/Player/PlayerSquadModel.d.ts +13 -0
- package/Core/Namespaces/Football/Models/Player/Remappers/PlayerBasicRemapper.d.ts +8 -0
- package/Core/Namespaces/Football/Models/Player/Remappers/PlayerFullRemapper.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Player/Remappers/PlayerShortRemapper.d.ts +5 -0
- package/Core/Namespaces/Football/Models/Player/Remappers/PlayerSquadRemapper.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Player/Remappers/TopPlayerRemapper.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Player/TopPlayerModel.d.ts +11 -0
- package/Core/Namespaces/Football/Models/Search/SearchFilters.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Search/SearchModel.d.ts +8 -0
- package/Core/Namespaces/Football/Models/Search/SearchRemapper.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Team/Remappers/TeamBasicRemapper.d.ts +7 -0
- package/Core/Namespaces/Football/Models/Team/Remappers/TeamFullRemapper.d.ts +9 -0
- package/Core/Namespaces/Football/Models/Team/TeamBasicModel.d.ts +12 -0
- package/Core/Namespaces/Football/Models/Team/TeamFilters.d.ts +14 -0
- package/Core/Namespaces/Football/Models/Team/TeamFullModel.d.ts +16 -0
- package/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.d.ts +20 -0
- package/Core/Namespaces/Loyalty/Loyalty.d.ts +16 -0
- package/Core/Namespaces/Loyalty/Models/Actions/ActionValueModel.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Actions/ActionsModel.d.ts +4 -0
- package/Core/Namespaces/Loyalty/Models/Badges/BadgesModel.d.ts +7 -0
- package/Core/Namespaces/Loyalty/Models/Badges/BadgesValue.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Badges/ClientBadges.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Badges/RequirementModel.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/ClientFeatures/ClientFeaturesModel.d.ts +10 -0
- package/Core/Namespaces/Loyalty/Models/ClientFeatures/ClientFeaturesRemapper.d.ts +9 -0
- package/Core/Namespaces/Loyalty/Models/Filters/LoyaltyFilters.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Leaderboard/LeaderboardModel.d.ts +7 -0
- package/Core/Namespaces/Loyalty/Models/Leaderboard/LeaderboardRemapper.d.ts +6 -0
- package/Core/Namespaces/Loyalty/Models/Meta/LoyaltyMeta.d.ts +7 -0
- package/Core/Namespaces/Loyalty/Models/Points/Points.d.ts +4 -0
- package/Core/Namespaces/Loyalty/Models/Points/PointsModel.d.ts +9 -0
- package/Core/Namespaces/Loyalty/Models/Rewards/RewardsModel.d.ts +8 -0
- package/Core/Namespaces/Loyalty/Models/Template/TemplateModel.d.ts +13 -0
- package/Core/Namespaces/Loyalty/Models/Template/TemplateRemapper.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Models/Tiers/TiersModel.d.ts +5 -0
- package/Core/Namespaces/Loyalty/Service/LoyaltyService.d.ts +14 -0
- package/Core/Namespaces/MatchQuiz/Facade/MatchQuizFacade.d.ts +29 -0
- package/Core/Namespaces/MatchQuiz/MatchQuiz.d.ts +25 -0
- package/Core/Namespaces/MatchQuiz/Models/Config/MatchQuizConfigModel.d.ts +5 -0
- package/Core/Namespaces/MatchQuiz/Models/Fixtures/FixturesMatchQuizModel.d.ts +10 -0
- package/Core/Namespaces/MatchQuiz/Models/Games/GamesMatchQuizListModel.d.ts +12 -0
- package/Core/Namespaces/MatchQuiz/Models/Prediction/PredictionMatchQuizModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Enums/MarketEnum.d.ts +35 -0
- package/Core/Namespaces/Predictor/Enums/OutcomeEnum.d.ts +6 -0
- package/Core/Namespaces/Predictor/Enums/StatusEnum.d.ts +8 -0
- package/Core/Namespaces/Predictor/Enums/ValueEnums.d.ts +21 -0
- package/Core/Namespaces/Predictor/Facade/PredictorFacade.d.ts +42 -0
- package/Core/Namespaces/Predictor/Models/Config/FeatureConfigRemapper.d.ts +8 -0
- package/Core/Namespaces/Predictor/Models/Config/MarketsConfigModel.d.ts +4 -0
- package/Core/Namespaces/Predictor/Models/Config/PredictorConfigModel.d.ts +6 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/FixturesModel.d.ts +6 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/FixturesPredictionModel.d.ts +6 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/FixturesRemapper.d.ts +33 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/FixturesResponseModel.d.ts +12 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/BothTeamsFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/CornersFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/CorrectScoreFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/DoubleChanceFixtureModel.d.ts +10 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/FullTimeOneXTwoFixtureModel.d.ts +10 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/HalfTimeFullTimeFixtureModel.d.ts +10 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/HalfTimeOneXTwoFixtureModel.d.ts +10 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/OverCornersFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/OverGoalsFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/PenaltyMatchFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/PlayerFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/Markets/RedCardFixtureModel.d.ts +9 -0
- package/Core/Namespaces/Predictor/Models/Fixtures/ResultModel.d.ts +7 -0
- package/Core/Namespaces/Predictor/Models/Predictions/NoYesModel.d.ts +4 -0
- package/Core/Namespaces/Predictor/Models/Predictions/PredictionRemapper.d.ts +18 -0
- package/Core/Namespaces/Predictor/Models/Predictions/PredictionRequestModel.d.ts +4 -0
- package/Core/Namespaces/Predictor/Models/Predictions/PredictionResponseModel.d.ts +17 -0
- package/Core/Namespaces/Predictor/Models/Predictions/PredictionsFilters.d.ts +10 -0
- package/Core/Namespaces/Predictor/Models/Predictions/PredictionsModel.d.ts +33 -0
- package/Core/Namespaces/Predictor/Models/Summary/MatchSummaryModel.d.ts +6 -0
- package/Core/Namespaces/Predictor/Models/Summary/MatchSummaryRemapper.d.ts +8 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueAndPlayerId.d.ts +4 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueBoolean.d.ts +3 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueCorners.d.ts +3 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueCorrectScore.d.ts +3 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueDoubleChance.d.ts +4 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueHalfTimeFullTime.d.ts +4 -0
- package/Core/Namespaces/Predictor/Models/Value/ValueOneXTwo.d.ts +4 -0
- package/Core/Namespaces/Predictor/Predictor.d.ts +24 -0
- package/Core/Namespaces/Predictor/Service/PredictorService.d.ts +89 -0
- package/Core/Namespaces/Profile/Builders/OwnProfileBuilder.d.ts +53 -0
- package/Core/Namespaces/Profile/Builders/ProfileBuilder.d.ts +32 -0
- package/Core/Namespaces/Profile/Facade/ProfileFacade.d.ts +23 -0
- package/Core/Namespaces/Profile/Interests/InterestsService.d.ts +51 -0
- package/Core/Namespaces/Profile/Models/FollowFilters.d.ts +6 -0
- package/Core/Namespaces/Profile/Models/Followers/FollowersModel.d.ts +6 -0
- package/Core/Namespaces/Profile/Models/Following/FollowModel.d.ts +3 -0
- package/Core/Namespaces/Profile/Models/Following/FollowingModel.d.ts +6 -0
- package/Core/Namespaces/Profile/Models/FullnessProfile/BreakdownModel.d.ts +13 -0
- package/Core/Namespaces/Profile/Models/FullnessProfile/CompletedModel.d.ts +5 -0
- package/Core/Namespaces/Profile/Models/FullnessProfile/FullnessProfile.d.ts +5 -0
- package/Core/Namespaces/Profile/Models/InterestModel.d.ts +6 -0
- package/Core/Namespaces/Profile/Models/ProfileCountryModel.d.ts +5 -0
- package/Core/Namespaces/Profile/Models/ProfileModel.d.ts +13 -0
- package/Core/Namespaces/Profile/Models/Remappers/FollowersRemapper.d.ts +5 -0
- package/Core/Namespaces/Profile/Models/Remappers/FollowingRemapper.d.ts +6 -0
- package/Core/Namespaces/Profile/Models/Remappers/ProfileRemapper.d.ts +5 -0
- package/Core/Namespaces/Profile/Models/Stats/ProfileStatsModel.d.ts +5 -0
- package/Core/Namespaces/Profile/Profile.d.ts +19 -0
- package/Core/Namespaces/TopX/Enums/GameStatusEnum.d.ts +8 -0
- package/Core/Namespaces/TopX/Facade/TopXFacade.d.ts +30 -0
- package/Core/Namespaces/TopX/Models/Config/TopXConfigModel.d.ts +6 -0
- package/Core/Namespaces/TopX/Models/Fixtures/FixturesGamesModel.d.ts +8 -0
- package/Core/Namespaces/TopX/Models/Fixtures/FixturesTopXModel.d.ts +10 -0
- package/Core/Namespaces/TopX/Models/Games/GameModel.d.ts +8 -0
- package/Core/Namespaces/TopX/Models/Games/GameResultsModel.d.ts +6 -0
- package/Core/Namespaces/TopX/Models/Games/GamesFilters.d.ts +11 -0
- package/Core/Namespaces/TopX/Models/Games/GamesListModel.d.ts +12 -0
- package/Core/Namespaces/TopX/Models/Games/GamesRemapper.d.ts +20 -0
- package/Core/Namespaces/TopX/Models/Games/GamesTopXListModel.d.ts +12 -0
- package/Core/Namespaces/TopX/Models/Games/TiebreakerModel.d.ts +3 -0
- package/Core/Namespaces/TopX/Models/Prediction/PredictionTopXModel.d.ts +5 -0
- package/Core/Namespaces/TopX/Models/Prediction/TopXPredictionRequestModel.d.ts +8 -0
- package/Core/Namespaces/TopX/TopX.d.ts +25 -0
- package/Core/Namespaces/TopX/Types/TypeGames.d.ts +1 -0
- package/index.d.ts +17 -0
- package/index.js +9 -9
- package/index.js.map +3 -3
- package/package.json +1 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import SDKConfigurationModel from "./Models/SDKConfiguraitonModel";
|
|
2
|
+
import ConfigValidationModel from "./Models/ConfigValidationModel";
|
|
3
|
+
export default class ConfigurationValidator {
|
|
4
|
+
/**
|
|
5
|
+
* Validates the SDK configuration and generates a validation model of type @ConfigValidationModel.
|
|
6
|
+
* The validation model contains information about which field is valid and the appropriate message for each field
|
|
7
|
+
* which must be displayed to the developer.
|
|
8
|
+
* @param config
|
|
9
|
+
*/
|
|
10
|
+
validate: (config: SDKConfigurationModel | any) => ConfigValidationModel;
|
|
11
|
+
/**
|
|
12
|
+
* Loops through the different config values and adds the proper validation for each one.
|
|
13
|
+
* @param config
|
|
14
|
+
*/
|
|
15
|
+
private checkFieldsForValues;
|
|
16
|
+
/**
|
|
17
|
+
* Checks the messages if there is one of type "error" which indicates that the SDK cannot work without it.
|
|
18
|
+
* @param configValidation
|
|
19
|
+
*/
|
|
20
|
+
private containsErrorMessage;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum ValidationMessageEnum {
|
|
2
|
+
API_KEY = "The field apiKey with valid value must be provided to use this SDK",
|
|
3
|
+
CLIENT_ID = "The field clientId must be provided to use this SDK",
|
|
4
|
+
LANG_MISSING = "If no lang is passed the default one will be set which is: EN",
|
|
5
|
+
LANG_INVALID = "This lang value is not supported, the default one will be set which is: EN",
|
|
6
|
+
ID_SCHEMA_MISSING = "If no idSchema is passed the default one will be set which is: native",
|
|
7
|
+
ID_SCHEMA_INVALID = "This idSchema value is not supported, the default one will be set which is: native",
|
|
8
|
+
ENVIRONMENT_MISSING = "If no environment is passed the default one will be set which is: prod",
|
|
9
|
+
ENVIRONMENT_INVALID = "This environment value is not supported, the default one will be set which is: prod",
|
|
10
|
+
AUTH_PROVIDER_CONFIG_PROP_MISSING = "The following property is missing from the authProvider object:",
|
|
11
|
+
AUTH_PROVIDER_CONFIG_INVALID_PROP = "You have passed a property which is not supported for the authentication provider:",
|
|
12
|
+
AUTH_PROVIDER_CONFIG_MISSING = "The field authProvider must be provided to use this SDK",
|
|
13
|
+
AUTH_PROVIDER_CONFIG_MISSING_CONFIG = "The field authProvider has missing properties"
|
|
14
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ValidationResponseEnum } from "../Enums/ValidationResponseEnum";
|
|
2
|
+
import MessageLogModel from "./MessageLogModel";
|
|
3
|
+
export default class AuthProviderValidationModel {
|
|
4
|
+
validation: ValidationResponseEnum;
|
|
5
|
+
message: MessageLogModel;
|
|
6
|
+
getIdToken: any;
|
|
7
|
+
logout: any;
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ValidationItemModel from "./ValidationItemModel";
|
|
2
|
+
export default class ConfigValidationModel {
|
|
3
|
+
apiKey: ValidationItemModel;
|
|
4
|
+
environment: ValidationItemModel;
|
|
5
|
+
idSchema: ValidationItemModel;
|
|
6
|
+
clientId: ValidationItemModel;
|
|
7
|
+
lang: ValidationItemModel;
|
|
8
|
+
authProvider: any;
|
|
9
|
+
isValid: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EnvironmentEnum } from "../Enums/EnvironmentEnum";
|
|
2
|
+
import { IdSchemaEnum } from "../Enums/IdSchemaEnum";
|
|
3
|
+
import { LangEnum } from "../Enums/LangEnum";
|
|
4
|
+
import FansUnitedAuthInterface from "./FansUnitedAuthInterface";
|
|
5
|
+
export default class SDKConfigurationModel {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
environment: EnvironmentEnum;
|
|
8
|
+
idSchema: IdSchemaEnum;
|
|
9
|
+
clientId: string;
|
|
10
|
+
lang: LangEnum;
|
|
11
|
+
authProvider: FansUnitedAuthInterface;
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import IValidator from "./IValidator";
|
|
2
|
+
import SDKConfigurationModel from "../Models/SDKConfiguraitonModel";
|
|
3
|
+
import ValidationItemModel from "../Models/ValidationItemModel";
|
|
4
|
+
export default class ApiKeyValidator implements IValidator {
|
|
5
|
+
validate(config: SDKConfigurationModel): ValidationItemModel;
|
|
6
|
+
private validateField;
|
|
7
|
+
private generateMessage;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import IValidator from "./IValidator";
|
|
2
|
+
import SDKConfigurationModel from "../Models/SDKConfiguraitonModel";
|
|
3
|
+
import ValidationItemModel from "../Models/ValidationItemModel";
|
|
4
|
+
export default class ClientIdValidator implements IValidator {
|
|
5
|
+
validate(config: SDKConfigurationModel): ValidationItemModel;
|
|
6
|
+
private validateField;
|
|
7
|
+
private generateMessage;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import IValidator from "./IValidator";
|
|
2
|
+
import SDKConfigurationModel from "../Models/SDKConfiguraitonModel";
|
|
3
|
+
import ValidationItemModel from "../Models/ValidationItemModel";
|
|
4
|
+
export default class EnvironmentValidator implements IValidator {
|
|
5
|
+
validate(arg: SDKConfigurationModel): ValidationItemModel;
|
|
6
|
+
private validateField;
|
|
7
|
+
private generateMessage;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import IValidator from "./IValidator";
|
|
2
|
+
import SDKConfigurationModel from "../Models/SDKConfiguraitonModel";
|
|
3
|
+
import ValidationItemModel from "../Models/ValidationItemModel";
|
|
4
|
+
export default class IdSchemaValidator implements IValidator {
|
|
5
|
+
validate(config: SDKConfigurationModel): ValidationItemModel;
|
|
6
|
+
private validateField;
|
|
7
|
+
private generateMessage;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import IValidator from "./IValidator";
|
|
2
|
+
import SDKConfigurationModel from "../Models/SDKConfiguraitonModel";
|
|
3
|
+
import ValidationItemModel from "../Models/ValidationItemModel";
|
|
4
|
+
export default class LangValidator implements IValidator {
|
|
5
|
+
validate: (config: SDKConfigurationModel) => ValidationItemModel;
|
|
6
|
+
private validateField;
|
|
7
|
+
private generateMessage;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const SDK_CONFIG_NATIVE: {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
environment: string;
|
|
4
|
+
idSchema: string;
|
|
5
|
+
clientId: string;
|
|
6
|
+
lang: string;
|
|
7
|
+
authProvider: {
|
|
8
|
+
getIdToken: () => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const SDK_CONFIG_ENETPULSE: {
|
|
12
|
+
apiKey: string;
|
|
13
|
+
environment: string;
|
|
14
|
+
idSchema: string;
|
|
15
|
+
clientId: string;
|
|
16
|
+
lang: string;
|
|
17
|
+
authProvider: {
|
|
18
|
+
getIdToken: () => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const SDK_CONFIG_SPORTAL365: {
|
|
22
|
+
apiKey: string;
|
|
23
|
+
environment: string;
|
|
24
|
+
idSchema: string;
|
|
25
|
+
clientId: string;
|
|
26
|
+
lang: string;
|
|
27
|
+
authProvider: {
|
|
28
|
+
getIdToken: () => void;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const SDK_CONFIG_SPORTRADAR: {
|
|
32
|
+
apiKey: string;
|
|
33
|
+
environment: string;
|
|
34
|
+
idSchema: string;
|
|
35
|
+
clientId: string;
|
|
36
|
+
lang: string;
|
|
37
|
+
authProvider: {
|
|
38
|
+
getIdToken: () => void;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const requestChunkBuild: (ids: string[]) => any;
|
|
2
|
+
export declare const limitIds: (ids: string[]) => any;
|
|
3
|
+
export declare const setBaseUrl: (environment: string, namespace: string) => string;
|
|
4
|
+
export declare const transformIdsToBeUnique: (ids: string[]) => string[];
|
|
5
|
+
export declare const remapKeysToCamelCase: (obj: any) => any;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import SDKConfigurationModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import ProfileModel from "../Namespaces/Profile/Models/ProfileModel";
|
|
3
|
+
import FootballCountryModel from "../Namespaces/Football/Models/Country/FootballCountryModel";
|
|
4
|
+
import ProfileCountryModel from "../Namespaces/Profile/Models/ProfileCountryModel";
|
|
5
|
+
import CompetitionBasicModel from "../Namespaces/Football/Models/Competition/CompetitionBasicModel";
|
|
6
|
+
import CompetitionFilters from "../Namespaces/Football/Models/Competition/CompetitionFilters";
|
|
7
|
+
export default class LocalStorage {
|
|
8
|
+
private idSchema;
|
|
9
|
+
private expirationTimeout;
|
|
10
|
+
constructor(configuration: SDKConfigurationModel);
|
|
11
|
+
clearData: () => void;
|
|
12
|
+
getEntityById: (type?: string, id?: string) => any;
|
|
13
|
+
getEntity: (ids: string | string[], type: string, schema: string) => any;
|
|
14
|
+
getEntityByNativeId: (type?: string, id?: string) => any;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the ids as object {id: <entity id>, exists: true/false};
|
|
17
|
+
* @param idsObj
|
|
18
|
+
* @param toSchema
|
|
19
|
+
*/
|
|
20
|
+
checkForExistingIdObjs: (idsObj: any, toSchema: string) => {};
|
|
21
|
+
getIdsByType: (typeIdsObj: any, configSchema: string, toSchema: string) => {};
|
|
22
|
+
addIdMapping: (idMapping: any) => void;
|
|
23
|
+
addIdMappings: (idMappings: any[]) => void;
|
|
24
|
+
setOwnProfile: (profile: ProfileModel) => void;
|
|
25
|
+
getOwnProfile: () => any;
|
|
26
|
+
getProfileCountries: () => any;
|
|
27
|
+
setProfileCountries: (countries: ProfileCountryModel[]) => void;
|
|
28
|
+
getFootballCountries: () => any;
|
|
29
|
+
setFootballCountries: (countries: FootballCountryModel[]) => void;
|
|
30
|
+
getCompetitions: (filters?: CompetitionFilters) => any;
|
|
31
|
+
setCompetitions: (competitions: CompetitionBasicModel[]) => void;
|
|
32
|
+
getExpirationProfile: () => number;
|
|
33
|
+
private getData;
|
|
34
|
+
private setData;
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import ActivityFilters from "../Namespaces/Activity/Models/ActivityFilters";
|
|
3
|
+
import ActivityResponseBody from "../Namespaces/Activity/Models/ActivityResponseBody";
|
|
4
|
+
import PaginationActivities from "../Namespaces/Activity/Models/PaginationActivities";
|
|
5
|
+
import CreateActivityRequestBody from "../Namespaces/Activity/Models/RequestBody/CreateActivityRequestBody";
|
|
6
|
+
import ProfileStatsModel from "../Namespaces/Profile/Models/Stats/ProfileStatsModel";
|
|
7
|
+
export default class ActivityHttps {
|
|
8
|
+
private instanceAuth;
|
|
9
|
+
private instance;
|
|
10
|
+
private activityRemapper;
|
|
11
|
+
private apiSignInUrl;
|
|
12
|
+
private clientApiSignInUrl;
|
|
13
|
+
constructor(config: SDKConfiguraitonModel);
|
|
14
|
+
createActivity: (requestBody: CreateActivityRequestBody) => Promise<ActivityResponseBody>;
|
|
15
|
+
deleteActivity: (activityId: string) => Promise<boolean>;
|
|
16
|
+
getOwnActivities: (filters: ActivityFilters, disableCache: boolean) => Promise<PaginationActivities>;
|
|
17
|
+
getActivitiesForUser: (userId: string, filters: ActivityFilters, disableCache: boolean) => Promise<PaginationActivities>;
|
|
18
|
+
getStats: (userId?: string) => Promise<ProfileStatsModel>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import FootballCountryModel from "../Namespaces/Football/Models/Country/FootballCountryModel";
|
|
3
|
+
import CompetitionFilters from "../Namespaces/Football/Models/Competition/CompetitionFilters";
|
|
4
|
+
import CompetitionBasicModel from "../Namespaces/Football/Models/Competition/CompetitionBasicModel";
|
|
5
|
+
import CompetitionFullModel from "../Namespaces/Football/Models/Competition/CompetitionFullModel";
|
|
6
|
+
import TeamBasicModel from "../Namespaces/Football/Models/Team/TeamBasicModel";
|
|
7
|
+
import TeamFullModel from "../Namespaces/Football/Models/Team/TeamFullModel";
|
|
8
|
+
import MatchFullModel from "../Namespaces/Football/Models/Match/MatchFullModel";
|
|
9
|
+
import TopPlayerModel from "../Namespaces/Football/Models/Player/TopPlayerModel";
|
|
10
|
+
import PlayerFullModel from "../Namespaces/Football/Models/Player/PlayerFullModel";
|
|
11
|
+
import TeamFilters from "../Namespaces/Football/Models/Team/TeamFilters";
|
|
12
|
+
import MatchFilters from "../Namespaces/Football/Models/Match/MatchFilters";
|
|
13
|
+
import PlayerFilters from "../Namespaces/Football/Models/Player/PlayerFilters";
|
|
14
|
+
import SearchFilters from "../Namespaces/Football/Models/Search/SearchFilters";
|
|
15
|
+
import SearchModel from "../Namespaces/Football/Models/Search/SearchModel";
|
|
16
|
+
import FootballPaginationModel from "../Namespaces/Football/Models/Pagination/FootballPaginationModel";
|
|
17
|
+
export default class FootballHttps {
|
|
18
|
+
private instance;
|
|
19
|
+
private apiSignInUrl;
|
|
20
|
+
private clientId;
|
|
21
|
+
private limitIds;
|
|
22
|
+
private countryRemapper;
|
|
23
|
+
private competitionBasicRemapper;
|
|
24
|
+
private competitionFullRemapper;
|
|
25
|
+
private teamBasicRemapper;
|
|
26
|
+
private teamFullRemapper;
|
|
27
|
+
private matchBasicRemapper;
|
|
28
|
+
private matchFullRemapper;
|
|
29
|
+
private playerBasicRemapper;
|
|
30
|
+
private playerFullRemapper;
|
|
31
|
+
private topPlayerRemapper;
|
|
32
|
+
private searchRemapper;
|
|
33
|
+
private footballMetaRemapper;
|
|
34
|
+
constructor(config: SDKConfiguraitonModel);
|
|
35
|
+
getCountries: (disableCache: boolean) => Promise<FootballCountryModel[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Makes request for fetching competitions from Football API with set filters. When ids exceed the limit in URL the requests are splited.
|
|
38
|
+
* @param filters
|
|
39
|
+
* @returns List of competitions with concrete filters. If no filters are passed we retrieve list of competitions sorted by ids.
|
|
40
|
+
*/
|
|
41
|
+
getCompetitions: (filters?: CompetitionFilters, disableCache?: boolean) => Promise<CompetitionBasicModel[]>;
|
|
42
|
+
getCompetitionById: (id: string, disableCache: boolean) => Promise<CompetitionFullModel>;
|
|
43
|
+
getTopCompetitions: (disableCache: boolean) => Promise<CompetitionBasicModel[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Makes request for fetching teams from Football API with set filters. When ids exceed the limit in URL the requests are splited.
|
|
46
|
+
* @param filters
|
|
47
|
+
* @returns List of teams with concrete filters. If no filters are passed we retrieve list of teams sorted by ids.
|
|
48
|
+
*/
|
|
49
|
+
getTeams: (filters?: TeamFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
50
|
+
getTeamById: (id: string, disableCache: boolean) => Promise<TeamFullModel>;
|
|
51
|
+
getTopTeams: (disableCache: boolean) => Promise<TeamBasicModel[]>;
|
|
52
|
+
getNextMatchForTeam: (id: string, disableCache: boolean) => Promise<MatchFullModel>;
|
|
53
|
+
getPrevMatchForTeam: (id: string, disableCache: boolean) => Promise<MatchFullModel>;
|
|
54
|
+
/**
|
|
55
|
+
* Makes request for fetching players from Football API with set filters. When ids exceed the limit in URL the requests are splited.
|
|
56
|
+
* @param filters
|
|
57
|
+
* @returns List of players with concrete filters. If no filters are passed we retrieve list of players sorted by ids.
|
|
58
|
+
*/
|
|
59
|
+
getPlayers: (filters?: PlayerFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
60
|
+
getPlayerById: (id: string, disableCache: boolean) => Promise<PlayerFullModel>;
|
|
61
|
+
getTopPlayers: (disableCache: boolean) => Promise<TopPlayerModel[]>;
|
|
62
|
+
getNextMatchForPlayer: (id: string, disableCache: boolean) => Promise<MatchFullModel>;
|
|
63
|
+
getPrevMatchForPlayer: (id: string, disableCache: boolean) => Promise<MatchFullModel>;
|
|
64
|
+
getMatchById: (id: string, disableCache: boolean) => Promise<MatchFullModel>;
|
|
65
|
+
getMatches: (filters?: MatchFilters, disableCache?: boolean) => Promise<FootballPaginationModel>;
|
|
66
|
+
search: (filters: SearchFilters, disableCache: boolean) => Promise<SearchModel>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AxiosResponse } from "axios";
|
|
2
|
+
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
3
|
+
export default class IdMappingHttps {
|
|
4
|
+
private instance;
|
|
5
|
+
private apiSignInUrl;
|
|
6
|
+
constructor(config: SDKConfiguraitonModel);
|
|
7
|
+
getEntityById: (type: string, id: string) => AxiosResponse<any>;
|
|
8
|
+
getEntityByIdAndSchema: (type: string, id: string, schemaId: string) => AxiosResponse<any>;
|
|
9
|
+
getEntityIdsByIdsAndSchema: (type: string, ids: string[], schemaId: string) => Promise<AxiosResponse<any, any>>;
|
|
10
|
+
getEntitiesByIds: (type: string, ids: string[], idSchema: string) => Promise<any[]>;
|
|
11
|
+
/**
|
|
12
|
+
* API has set a maximum size for url - it can have in total 250 ids. Before making request to API (Id Mapping), the ids are combined and if they are more than 249
|
|
13
|
+
* they are splited in separated chunk arrays. Then it makes verification for the chunks:
|
|
14
|
+
* - For more than one chunk, we create new object @var newIdsObj with type properties and value ids. Then with the new object we get the keys and values and make a request.
|
|
15
|
+
* Same goes for rest of the chunks.
|
|
16
|
+
* - For only one chunk we use the @var entityIdsObj and make a single request with all types and ids.
|
|
17
|
+
* @param entityIdsObj
|
|
18
|
+
* @param schemaId -- Optional
|
|
19
|
+
* @returns Entities ids
|
|
20
|
+
*/
|
|
21
|
+
getEntitiesByIdObjs: (entityIdsObj: any, schemaId?: string) => Promise<any[]>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import PaginationModel from "../Global/Models/Pagination/PaginationModel";
|
|
3
|
+
import LoyaltyFilters from "../Namespaces/Loyalty/Models/Filters/LoyaltyFilters";
|
|
4
|
+
export default class LoyaltyHttps {
|
|
5
|
+
private instance;
|
|
6
|
+
private apiSignInUrl;
|
|
7
|
+
private clientApiSignInUrl;
|
|
8
|
+
private templateRemapper;
|
|
9
|
+
private leaderboardRemapper;
|
|
10
|
+
constructor(config: SDKConfiguraitonModel);
|
|
11
|
+
getTemplates: (disableCache: boolean) => Promise<PaginationModel>;
|
|
12
|
+
getLeaderboard: (templateId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
13
|
+
getLeaderboardForGame: (gameId: string, disableCache: boolean, filters: LoyaltyFilters) => Promise<PaginationModel>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import PredictionRequestModel from "../Namespaces/Predictor/Models/Predictions/PredictionRequestModel";
|
|
3
|
+
import PredictionResponseModel from "../Namespaces/Predictor/Models/Predictions/PredictionResponseModel";
|
|
4
|
+
import MatchSummaryModel from "../Namespaces/Predictor/Models/Summary/MatchSummaryModel";
|
|
5
|
+
import PredictionsFilters from "../Namespaces/Predictor/Models/Predictions/PredictionsFilters";
|
|
6
|
+
import GamesFilters from "../Namespaces/TopX/Models/Games/GamesFilters";
|
|
7
|
+
import IdMappingService from "../IdMapping/IdMappingService";
|
|
8
|
+
import TopXPredictionRequestModel from "../Namespaces/TopX/Models/Prediction/TopXPredictionRequestModel";
|
|
9
|
+
import GamesListModel from "../Namespaces/TopX/Models/Games/GamesListModel";
|
|
10
|
+
import PaginationModel from "../Global/Models/Pagination/PaginationModel";
|
|
11
|
+
export default class PredictorHttps {
|
|
12
|
+
private instanceAuth;
|
|
13
|
+
private instance;
|
|
14
|
+
private apiSignInUrl;
|
|
15
|
+
private clientApiSignInUrl;
|
|
16
|
+
private predictionRemapper;
|
|
17
|
+
private matchSummaryRemapper;
|
|
18
|
+
private gamesRemapper;
|
|
19
|
+
private metaRemapper;
|
|
20
|
+
constructor(config: SDKConfiguraitonModel, idMapping: IdMappingService);
|
|
21
|
+
makeFootballPrediction: (prediction: PredictionRequestModel | TopXPredictionRequestModel) => Promise<PredictionResponseModel>;
|
|
22
|
+
getMatchSummary: (matchId: string) => Promise<MatchSummaryModel>;
|
|
23
|
+
deleteFootballPrediction: (predictionId: string) => Promise<boolean>;
|
|
24
|
+
getMyPredictions: (filters?: PredictionsFilters) => Promise<PaginationModel>;
|
|
25
|
+
getMyPredictionsNoRemap: (filters?: PredictionsFilters) => Promise<any>;
|
|
26
|
+
getUserPredictions: (userId: string, disableCache: boolean, filters?: PredictionsFilters) => Promise<PaginationModel>;
|
|
27
|
+
getUserPredictionsNoRemap: (userId: string, filters?: PredictionsFilters) => Promise<any>;
|
|
28
|
+
getGames: (filters: GamesFilters, disableCache?: boolean) => Promise<PaginationModel>;
|
|
29
|
+
getGameById: (gameId: string, disableCache: boolean) => Promise<GamesListModel>;
|
|
30
|
+
getGamePredictions: (gameId: string, disableCache: boolean, filters?: PredictionsFilters) => Promise<PaginationModel>;
|
|
31
|
+
getUserGameEditions: (filters: GamesFilters, disableCache: boolean) => Promise<PaginationModel>;
|
|
32
|
+
getGameResults: (gameId: string, disableCache: boolean, filters?: GamesFilters) => Promise<PaginationModel>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import ProfileModel from "../Namespaces/Profile/Models/ProfileModel";
|
|
3
|
+
import ProfileCountryModel from "../Namespaces/Profile/Models/ProfileCountryModel";
|
|
4
|
+
import FollowingModel from "../Namespaces/Profile/Models/Following/FollowingModel";
|
|
5
|
+
import FollowFilters from "../Namespaces/Profile/Models/FollowFilters";
|
|
6
|
+
import PaginationModel from "../Global/Models/Pagination/PaginationModel";
|
|
7
|
+
export default class ProfileHttps {
|
|
8
|
+
private instanceAuth;
|
|
9
|
+
private instance;
|
|
10
|
+
private apiSignInUrl;
|
|
11
|
+
private profileRemapper;
|
|
12
|
+
private followingRemapper;
|
|
13
|
+
private followersRemapper;
|
|
14
|
+
private lang;
|
|
15
|
+
constructor(configuration: SDKConfiguraitonModel);
|
|
16
|
+
getCountries: (disableCache: boolean) => Promise<ProfileCountryModel[]>;
|
|
17
|
+
getProfile: (id?: string) => Promise<ProfileModel>;
|
|
18
|
+
getProfiles: (profiles: string[], disableCache: boolean) => Promise<ProfileModel[]>;
|
|
19
|
+
getFollowers: (filters?: FollowFilters, id?: string) => Promise<PaginationModel>;
|
|
20
|
+
getFollowing: (filters?: FollowFilters, id?: string) => Promise<PaginationModel>;
|
|
21
|
+
follow: (profiles: string[]) => Promise<FollowingModel[]>;
|
|
22
|
+
unfollow: (profiles: string[]) => Promise<boolean>;
|
|
23
|
+
getBadges: (profileId?: string) => Promise<string[]>;
|
|
24
|
+
updateProfile: (profile: ProfileModel) => Promise<ProfileModel>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import SDKConfigurationModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
export default class IdMappingFacade {
|
|
3
|
+
private isBrowser;
|
|
4
|
+
private localStorage;
|
|
5
|
+
private https;
|
|
6
|
+
constructor(configuration: SDKConfigurationModel);
|
|
7
|
+
getEntitiesByIds: (idsObj: any, configSchema?: string, toSchema?: string) => Promise<any>;
|
|
8
|
+
getEntityById: (ids: string | string[], type: string, schemaId: string) => Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Checks ids if they exist in the local storage, this function requires the already checked ids object
|
|
11
|
+
* @param checkedIdsObj
|
|
12
|
+
*/
|
|
13
|
+
private splitForRequestAndExisting;
|
|
14
|
+
private requestEntity;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import SDKConfigurationModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import IdMappingFacade from "./IdMappingFacade";
|
|
3
|
+
export default class IdMappingService {
|
|
4
|
+
readonly idSchema: string;
|
|
5
|
+
readonly idMappingFacade: IdMappingFacade;
|
|
6
|
+
constructor(configuration: SDKConfigurationModel);
|
|
7
|
+
getEntityIdBySchemaId: (type: string, id: string) => Promise<any>;
|
|
8
|
+
remapEntities: (entities: any, type: string) => Promise<any>;
|
|
9
|
+
getEntityIdsBySchemaId: (ids: string[], type: string, toSchema?: string) => Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const typeConvert: (type: string) => string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import SDKConfigurationModel from "../../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import { ActionsEnum } from "./Enums/ActionsEnum";
|
|
3
|
+
import ActivityFilters from "./Models/ActivityFilters";
|
|
4
|
+
import ActivityResponseBody from "./Models/ActivityResponseBody";
|
|
5
|
+
import PaginationActivities from "./Models/PaginationActivities";
|
|
6
|
+
import CampaignModel from "./Models/RequestBody/Context/CampaignModel";
|
|
7
|
+
import ContentModel from "./Models/RequestBody/Context/ContentModel";
|
|
8
|
+
import TagsModel from "./Models/RequestBody/Context/TagsModel";
|
|
9
|
+
export default class Activity {
|
|
10
|
+
private activityFacade;
|
|
11
|
+
constructor(config: SDKConfigurationModel);
|
|
12
|
+
add: (action: ActionsEnum, tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
13
|
+
delete: (activityId: string) => Promise<boolean>;
|
|
14
|
+
like: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
15
|
+
dislike: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
16
|
+
addPageview: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
17
|
+
addContentConsumed: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
18
|
+
addShare: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
19
|
+
addComment: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
20
|
+
addClickAd: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
21
|
+
addConversion: (tags: TagsModel[], content?: ContentModel, campaign?: CampaignModel) => Promise<ActivityResponseBody>;
|
|
22
|
+
getOwn: (filters?: ActivityFilters, disableCache?: boolean) => Promise<PaginationActivities>;
|
|
23
|
+
getForUser: (userId: string, filters?: ActivityFilters, disableCache?: boolean) => Promise<PaginationActivities>;
|
|
24
|
+
}
|