fansunited-sdk-esm 1.33.3 → 1.34.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.
@@ -1,4 +1,4 @@
1
- export type LangType = "bg" | "en" | "ro" | "el";
2
- export type IdSchemaType = "native" | "enetpulse" | "sportal365" | "sportradar";
3
- export type EnvironmentType = "dev" | "prod" | "staging";
4
- export type ErrorHandlingModeType = "default" | "standard";
1
+ export declare type LangType = "bg" | "en" | "ro" | "el";
2
+ export declare type IdSchemaType = "native" | "enetpulse" | "sportal365" | "sportradar";
3
+ export declare type EnvironmentType = "dev" | "prod" | "staging";
4
+ export declare type ErrorHandlingModeType = "default" | "standard";
@@ -7,5 +7,6 @@ export declare enum ErrorStatuses {
7
7
  EXCEEDED_LENGTH = "EXCEEDED_LENGTH",
8
8
  INVALID_TOKEN = "invalid_token",
9
9
  UNAUTHORIZED = "unauthorized",
10
- INVALID_FILTERS = "invalid_filters"
10
+ INVALID_FILTERS = "invalid_filters",
11
+ INVALID_AVATAR = "invalid_avatar"
11
12
  }
@@ -9,6 +9,17 @@ export declare const SDK_CONFIG_NATIVE: {
9
9
  getIdToken: () => void;
10
10
  };
11
11
  };
12
+ export declare const SDK_CONFIG_NATIVE_AND_STANDARD: {
13
+ apiKey: string;
14
+ environment: string;
15
+ idSchema: string;
16
+ clientId: string;
17
+ lang: string;
18
+ errorHandlingMode: string;
19
+ authProvider: {
20
+ getIdToken: () => void;
21
+ };
22
+ };
12
23
  export declare const SDK_CONFIG_ENETPULSE: {
13
24
  apiKey: string;
14
25
  environment: string;
@@ -6,7 +6,7 @@ import CompetitionBasicModel from "../Namespaces/Football/Models/Competition/Com
6
6
  import CompetitionFilters from "../Namespaces/Football/Models/Competition/CompetitionFilters";
7
7
  import ProfileStatsModel from "../Namespaces/Profile/Models/Stats/ProfileStatsModel";
8
8
  import IdMappingModel from "../IdMapping/Models/IdMappingModel";
9
- export type ExparationType = "profile" | "statistics" | "badges" | "features" | "ids";
9
+ export declare type ExparationType = "profile" | "statistics" | "badges" | "features" | "ids";
10
10
  export default class LocalStorage {
11
11
  private idSchema;
12
12
  readonly expirationProfileTimeout: number;
@@ -11,7 +11,8 @@ export declare enum ErrorMessages {
11
11
  ENTITIES_NEEDED = "At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",
12
12
  ENTITIES_FOLLOWS_FILTERS_EXCEEDED = "Maximum length per entity should be 24 or less.",
13
13
  INVALID_TYPE = "You have provided invalid type. The valid type is ",
14
- INVALID_VALUE = "You have provided invalid value. The valid value is "
14
+ INVALID_VALUE = "You have provided invalid value. The valid value is ",
15
+ INVALID_AVATAR = "Invalid URL syntax for avatar image."
15
16
  }
16
17
  export declare const WarningMessages: {
17
18
  UNEXPECTED_STATUS_PROP: string;
@@ -2,12 +2,12 @@ import LoyaltyConfigModel from "../../Namespaces/Loyalty/Models/ClientFeatures/L
2
2
  import MatchQuizConfigModel from "../../Namespaces/MatchQuiz/Models/Config/MatchQuizConfigModel";
3
3
  import TopXConfigModel from "../../Namespaces/TopX/Models/Config/TopXConfigModel";
4
4
  import PredictorConfigModel from "../../Namespaces/Predictor/Models/Config/PredictorConfigModel";
5
- export type FeaturesConfigModels = PredictorConfigModel | TopXConfigModel | MatchQuizConfigModel | LoyaltyConfigModel;
6
- export type FilterCase = "user" | "current" | "past" | "matches";
7
- export type IdEntities = {
5
+ export declare type FeaturesConfigModels = PredictorConfigModel | TopXConfigModel | MatchQuizConfigModel | LoyaltyConfigModel;
6
+ export declare type FilterCase = "user" | "current" | "past" | "matches";
7
+ export declare type IdEntities = {
8
8
  competition?: string[];
9
9
  team?: string[];
10
10
  player?: string[];
11
11
  match?: string[];
12
12
  };
13
- export type SortOrder = "asc" | "desc";
13
+ export declare type SortOrder = "asc" | "desc";
@@ -1,8 +1,8 @@
1
- export type StatType = {
1
+ export declare type StatType = {
2
2
  homeTeam: number;
3
3
  awayTeam: number;
4
4
  };
5
- export type ScoresType = {
5
+ export declare type ScoresType = {
6
6
  homeGoals: any;
7
7
  awayGoals: any;
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import SDKConfigurationModel from "../../../Configurator/Models/SDKConfiguraitonModel";
2
2
  import MatchBasicModel from "../Models/Match/MatchBasicModel";
3
3
  import MatchFullModel from "../Models/Match/MatchFullModel";
4
- type MatchData = MatchBasicModel[] | MatchFullModel;
4
+ declare type MatchData = MatchBasicModel[] | MatchFullModel;
5
5
  export default class FootballService {
6
6
  private clientHttps;
7
7
  constructor(config: SDKConfigurationModel);
@@ -1,5 +1,5 @@
1
1
  import RequirementModel from "./RequirementModel";
2
- type BadgeAssets = {
2
+ declare type BadgeAssets = {
3
3
  mainImageUrl: string;
4
4
  };
5
5
  export default class BadgesValue {
@@ -2,4 +2,5 @@ import TemplateModel from "./TemplateModel";
2
2
  export default class TemplateByIdModel extends TemplateModel {
3
3
  labels: Record<string, string>;
4
4
  customFields: Record<string, string>;
5
+ adContent: string;
5
6
  }
@@ -1,4 +1,4 @@
1
- export type RankingsType = "GAME" | "TEMPLATE";
2
- export type FiltersType = "loyalty" | "rankings";
3
- export type LeaderboardStatus = "PENDING" | "LIVE" | "SETTLED";
4
- export type GameType = "TOP_X" | "MATCH_QUIZ";
1
+ export declare type RankingsType = "GAME" | "TEMPLATE";
2
+ export declare type FiltersType = "loyalty" | "rankings";
3
+ export declare type LeaderboardStatus = "PENDING" | "LIVE" | "SETTLED";
4
+ export declare type GameType = "TOP_X" | "MATCH_QUIZ";
@@ -2,7 +2,7 @@ import MatchBasicModel from "../../../Football/Models/Match/MatchBasicModel";
2
2
  import MatchStatus from "../../../Football/Models/Match/Status/MatchStatus";
3
3
  import PlayerBasicModel from "../../../Football/Models/Player/PlayerBasicModel";
4
4
  import { MarketEnum } from "../../../Predictor/Enums/MarketEnum";
5
- export type MarketsResults = {
5
+ export declare type MarketsResults = {
6
6
  matchId: string;
7
7
  market: MarketEnum;
8
8
  result: string | string[] | boolean;
@@ -10,10 +10,10 @@ export type MarketsResults = {
10
10
  matchStatus: MatchStatus;
11
11
  playerModels?: PlayerBasicModel[];
12
12
  };
13
- export type TieBreakersType = {
13
+ export declare type TieBreakersType = {
14
14
  goldenGoals: GoldenGoalsType[];
15
15
  };
16
- export type GoldenGoalsType = {
16
+ export declare type GoldenGoalsType = {
17
17
  minute: number;
18
18
  matchId: string;
19
19
  matchModel: MatchBasicModel;
@@ -1,7 +1,5 @@
1
1
  import LocalStorage from "../../../Global/LocalStorage";
2
2
  import ProfileHttps from "../../../Https/ProfileHttps";
3
- import IdMappingService from "../../../IdMapping/IdMappingService";
4
- import FootballFacade from "../../Football/Facades/FootballFacade";
5
3
  import FollowingModel from "../Models/Following/FollowingModel";
6
4
  import InterestModel from "../Models/InterestModel";
7
5
  import ProfileModel from "../Models/ProfileModel";
@@ -11,6 +9,7 @@ import PaginationModel from "../../../Global/Models/Pagination/PaginationModel";
11
9
  import ProfileStatsModel from "../Models/Stats/ProfileStatsModel";
12
10
  import ActivityHttps from "../../../Https/ActivityHttps";
13
11
  import SDKIdsRemapper from "../../../Remapper/SDKIdsRemapper";
12
+ import { ErrorHandlingModeType } from "../../../Configurator/Types/ConfiguratorTypes";
14
13
  export default class OwnProfileBuilder {
15
14
  private idsRemapper;
16
15
  private profileHttps;
@@ -22,7 +21,8 @@ export default class OwnProfileBuilder {
22
21
  private expireAt;
23
22
  private promises;
24
23
  private isFetching;
25
- constructor(idsRemapper: SDKIdsRemapper, localStorage: LocalStorage, profileHttps: ProfileHttps, activityHttps: ActivityHttps, idMapping: IdMappingService, footballFacade: FootballFacade);
24
+ private errorHandlingMode;
25
+ constructor(idsRemapper: SDKIdsRemapper, localStorage: LocalStorage, profileHttps: ProfileHttps, activityHttps: ActivityHttps, errorHandlingMode: ErrorHandlingModeType);
26
26
  private getOwnProfile;
27
27
  private delay;
28
28
  private setOwnProfile;
@@ -50,5 +50,7 @@ export default class OwnProfileBuilder {
50
50
  private setCountryPromise;
51
51
  setCountry: (countryId?: string) => OwnProfileBuilder;
52
52
  showFullnessProfile: () => Promise<FullnessProfile>;
53
+ private setAvatarPromise;
54
+ setAvatar: (avatar: string) => OwnProfileBuilder;
53
55
  update: () => Promise<ProfileModel>;
54
56
  }
@@ -31,4 +31,5 @@ export default class ProfileService {
31
31
  * @returns Array containing two types of arrays - one with same interests and the other with new ones.
32
32
  */
33
33
  private extractSameAndNewInterests;
34
+ isAvatarValidURL: (avatar: string) => boolean;
34
35
  }
@@ -1 +1 @@
1
- export type TypeGames = "TOP_X" | "MATCH_QUIZ" | "SINGLE";
1
+ export declare type TypeGames = "TOP_X" | "MATCH_QUIZ" | "SINGLE";