fansunited-sdk-esm 1.40.0 → 1.41.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/Configurator/Types/ConfiguratorTypes.d.ts +4 -4
- package/Core/Exception/FansUnitedSdkFetchException.d.ts +12 -0
- package/Core/Exception/StandardFansUnitedException.d.ts +5 -8
- package/Core/Global/Constants/TestConstants.d.ts +143 -148
- package/Core/Global/Constants/Tests/SDKConfigurationsTesting.d.ts +5 -5
- package/Core/Global/LocalStorage.d.ts +1 -1
- package/Core/Global/Messages/Messages.d.ts +0 -1
- package/Core/Global/Tests/fetchMocks.d.ts +9 -0
- package/Core/Global/Types/GlobalTypes.d.ts +4 -4
- package/Core/Https/ActivityHttps.d.ts +1 -1
- package/Core/Https/Https.d.ts +13 -8
- package/Core/Https/IdMappingHttps.d.ts +3 -4
- package/Core/Https/LoyaltyHttps.d.ts +1 -1
- package/Core/Https/PredictorHttps.d.ts +1 -1
- package/Core/Namespaces/Activity/Remapper/ActivityRemapper.d.ts +1 -1
- package/Core/Namespaces/Football/Models/Match/StatType.d.ts +2 -2
- package/Core/Namespaces/Football/Service/FootballService.d.ts +1 -1
- package/Core/Namespaces/Loyalty/Models/Badges/BadgesValue.d.ts +1 -1
- package/Core/Namespaces/Loyalty/Types/LoyaltyTypes.d.ts +4 -4
- package/Core/Namespaces/MatchQuiz/Models/GameMarketsResults/GameMarketsResults.d.ts +3 -3
- package/Core/Namespaces/TopX/types/types.d.ts +1 -1
- package/index.js +3 -4
- package/index.js.map +4 -4
- package/package.json +1 -1
- package/Core/Global/axioError.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type LangType = "bg" | "en" | "ro" | "el" | "sk" | "pt" | "sr" | "hu" | "it" | "sv" | "es" | "fr" | "nl" | "de";
|
|
2
|
+
export type IdSchemaType = "native" | "enetpulse" | "sportal365" | "sportradar";
|
|
3
|
+
export type EnvironmentType = "dev" | "prod" | "staging";
|
|
4
|
+
export type ErrorHandlingModeType = "default" | "standard";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StandardFansUnitedExceptionInterface } from "./StandardFansUnitedException";
|
|
2
|
+
export interface DefaultFansUnitedExceptionInterface {
|
|
3
|
+
error: StandardFansUnitedExceptionInterface;
|
|
4
|
+
}
|
|
5
|
+
export default class FansUnitedSdkFetchException {
|
|
6
|
+
data: DefaultFansUnitedExceptionInterface;
|
|
7
|
+
status: number;
|
|
8
|
+
statusText: string;
|
|
9
|
+
headers: Headers;
|
|
10
|
+
constructor(response: Response, error: StandardFansUnitedExceptionInterface);
|
|
11
|
+
errorMessage: () => string;
|
|
12
|
+
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
interface
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
1
|
+
export interface StandardFansUnitedExceptionInterface {
|
|
2
|
+
code: number;
|
|
3
|
+
status: string;
|
|
4
|
+
message: string;
|
|
7
5
|
}
|
|
8
6
|
export default class StandardFansUnitedException {
|
|
9
|
-
|
|
7
|
+
error: StandardFansUnitedExceptionInterface;
|
|
10
8
|
constructor(code: number, status: string, message: string);
|
|
11
9
|
}
|
|
12
|
-
export {};
|
|
@@ -1,55 +1,101 @@
|
|
|
1
1
|
export declare const predictorConfigResponse: {
|
|
2
2
|
data: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
all: string[];
|
|
9
|
-
};
|
|
10
|
-
full_coverage_competitions: string[];
|
|
11
|
-
success_rate_scopes: any;
|
|
3
|
+
predictor: {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
markets: {
|
|
6
|
+
main: string[];
|
|
7
|
+
all: string[];
|
|
12
8
|
};
|
|
9
|
+
full_coverage_competitions: string[];
|
|
10
|
+
success_rate_scopes: any;
|
|
13
11
|
};
|
|
14
12
|
};
|
|
15
13
|
};
|
|
16
14
|
export declare const EFBET_MATCH: {
|
|
15
|
+
meta: {
|
|
16
|
+
pagination: {
|
|
17
|
+
current_page: number;
|
|
18
|
+
items_per_page: number;
|
|
19
|
+
total_items: number;
|
|
20
|
+
number_of_pages: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
17
23
|
data: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
id: string;
|
|
25
|
+
kickoff_at: string;
|
|
26
|
+
finished_at: any;
|
|
27
|
+
updated_at: string;
|
|
28
|
+
home_team: {
|
|
29
|
+
id: string;
|
|
30
|
+
country: {
|
|
31
|
+
id: string;
|
|
32
|
+
alias: any;
|
|
33
|
+
country_code: string;
|
|
34
|
+
assets: {
|
|
35
|
+
flag: string;
|
|
36
|
+
};
|
|
37
|
+
name: string;
|
|
24
38
|
};
|
|
39
|
+
assets: {
|
|
40
|
+
logo: string;
|
|
41
|
+
};
|
|
42
|
+
national: boolean;
|
|
43
|
+
code: string;
|
|
44
|
+
gender: string;
|
|
45
|
+
name: string;
|
|
46
|
+
full_name: any;
|
|
47
|
+
short_name: any;
|
|
48
|
+
is_deleted: boolean;
|
|
25
49
|
};
|
|
26
|
-
|
|
50
|
+
away_team: {
|
|
27
51
|
id: string;
|
|
28
|
-
|
|
29
|
-
finished_at: any;
|
|
30
|
-
updated_at: string;
|
|
31
|
-
home_team: {
|
|
52
|
+
country: {
|
|
32
53
|
id: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
alias: any;
|
|
36
|
-
country_code: string;
|
|
37
|
-
assets: {
|
|
38
|
-
flag: string;
|
|
39
|
-
};
|
|
40
|
-
name: string;
|
|
41
|
-
};
|
|
54
|
+
alias: any;
|
|
55
|
+
country_code: string;
|
|
42
56
|
assets: {
|
|
43
|
-
|
|
57
|
+
flag: string;
|
|
44
58
|
};
|
|
45
|
-
national: boolean;
|
|
46
|
-
code: string;
|
|
47
|
-
gender: string;
|
|
48
59
|
name: string;
|
|
49
|
-
full_name: any;
|
|
50
|
-
short_name: any;
|
|
51
60
|
};
|
|
52
|
-
|
|
61
|
+
assets: {
|
|
62
|
+
logo: string;
|
|
63
|
+
};
|
|
64
|
+
national: boolean;
|
|
65
|
+
code: any;
|
|
66
|
+
gender: string;
|
|
67
|
+
name: string;
|
|
68
|
+
full_name: any;
|
|
69
|
+
short_name: any;
|
|
70
|
+
is_deleted: boolean;
|
|
71
|
+
};
|
|
72
|
+
lineups_confirmed: any;
|
|
73
|
+
started_at: any;
|
|
74
|
+
minute: any;
|
|
75
|
+
scores: {
|
|
76
|
+
ft_score: {
|
|
77
|
+
home_goals: any;
|
|
78
|
+
away_goals: any;
|
|
79
|
+
};
|
|
80
|
+
ht_score: {
|
|
81
|
+
home_goals: any;
|
|
82
|
+
away_goals: any;
|
|
83
|
+
};
|
|
84
|
+
aet_score: {
|
|
85
|
+
home_goals: any;
|
|
86
|
+
away_goals: any;
|
|
87
|
+
};
|
|
88
|
+
agg_score: {
|
|
89
|
+
home_goals: any;
|
|
90
|
+
away_goals: any;
|
|
91
|
+
};
|
|
92
|
+
pen_score: {
|
|
93
|
+
home_goals: any;
|
|
94
|
+
away_goals: any;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
context: {
|
|
98
|
+
competition: {
|
|
53
99
|
id: string;
|
|
54
100
|
country: {
|
|
55
101
|
id: string;
|
|
@@ -60,139 +106,88 @@ export declare const EFBET_MATCH: {
|
|
|
60
106
|
};
|
|
61
107
|
name: string;
|
|
62
108
|
};
|
|
109
|
+
gender: string;
|
|
63
110
|
assets: {
|
|
64
111
|
logo: string;
|
|
65
112
|
};
|
|
66
|
-
national: boolean;
|
|
67
|
-
code: any;
|
|
68
|
-
gender: string;
|
|
69
|
-
name: string;
|
|
70
|
-
full_name: any;
|
|
71
|
-
short_name: any;
|
|
72
|
-
};
|
|
73
|
-
lineups_confirmed: any;
|
|
74
|
-
started_at: any;
|
|
75
|
-
minute: any;
|
|
76
|
-
scores: {
|
|
77
|
-
ft_score: {
|
|
78
|
-
home_goals: any;
|
|
79
|
-
away_goals: any;
|
|
80
|
-
};
|
|
81
|
-
ht_score: {
|
|
82
|
-
home_goals: any;
|
|
83
|
-
away_goals: any;
|
|
84
|
-
};
|
|
85
|
-
aet_score: {
|
|
86
|
-
home_goals: any;
|
|
87
|
-
away_goals: any;
|
|
88
|
-
};
|
|
89
|
-
agg_score: {
|
|
90
|
-
home_goals: any;
|
|
91
|
-
away_goals: any;
|
|
92
|
-
};
|
|
93
|
-
pen_score: {
|
|
94
|
-
home_goals: any;
|
|
95
|
-
away_goals: any;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
context: {
|
|
99
|
-
competition: {
|
|
100
|
-
id: string;
|
|
101
|
-
country: {
|
|
102
|
-
id: string;
|
|
103
|
-
alias: any;
|
|
104
|
-
country_code: string;
|
|
105
|
-
assets: {
|
|
106
|
-
flag: string;
|
|
107
|
-
};
|
|
108
|
-
name: string;
|
|
109
|
-
};
|
|
110
|
-
gender: string;
|
|
111
|
-
assets: {
|
|
112
|
-
logo: string;
|
|
113
|
-
};
|
|
114
|
-
type: string;
|
|
115
|
-
name: string;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
status: {
|
|
119
113
|
type: string;
|
|
120
|
-
|
|
114
|
+
name: string;
|
|
121
115
|
};
|
|
122
|
-
}
|
|
123
|
-
|
|
116
|
+
};
|
|
117
|
+
status: {
|
|
118
|
+
type: string;
|
|
119
|
+
sub_type: string;
|
|
120
|
+
};
|
|
121
|
+
is_deleted: boolean;
|
|
122
|
+
}[];
|
|
124
123
|
};
|
|
125
124
|
export declare const FOOTBALL_COMPETITIONS: {
|
|
126
|
-
data: {
|
|
127
|
-
|
|
125
|
+
data: ({
|
|
126
|
+
id: string;
|
|
127
|
+
country: {
|
|
128
128
|
id: string;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
alias: any;
|
|
132
|
-
country_code: string;
|
|
133
|
-
assets: {
|
|
134
|
-
flag: string;
|
|
135
|
-
};
|
|
136
|
-
name: string;
|
|
137
|
-
};
|
|
138
|
-
gender: string;
|
|
129
|
+
alias: any;
|
|
130
|
+
country_code: string;
|
|
139
131
|
assets: {
|
|
140
|
-
|
|
132
|
+
flag: string;
|
|
141
133
|
};
|
|
142
|
-
type: string;
|
|
143
134
|
name: string;
|
|
144
|
-
}
|
|
135
|
+
};
|
|
136
|
+
gender: string;
|
|
137
|
+
assets: {
|
|
138
|
+
logo: string;
|
|
139
|
+
};
|
|
140
|
+
type: string;
|
|
141
|
+
name: string;
|
|
142
|
+
} | {
|
|
143
|
+
id: string;
|
|
144
|
+
country: {
|
|
145
145
|
id: string;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
alias: string;
|
|
149
|
-
country_code: string;
|
|
150
|
-
assets: {
|
|
151
|
-
flag: string;
|
|
152
|
-
};
|
|
153
|
-
name: string;
|
|
154
|
-
};
|
|
155
|
-
gender: string;
|
|
146
|
+
alias: string;
|
|
147
|
+
country_code: string;
|
|
156
148
|
assets: {
|
|
157
|
-
|
|
149
|
+
flag: string;
|
|
158
150
|
};
|
|
159
|
-
type: string;
|
|
160
151
|
name: string;
|
|
161
|
-
}
|
|
162
|
-
|
|
152
|
+
};
|
|
153
|
+
gender: string;
|
|
154
|
+
assets: {
|
|
155
|
+
logo: any;
|
|
156
|
+
};
|
|
157
|
+
type: string;
|
|
158
|
+
name: string;
|
|
159
|
+
})[];
|
|
163
160
|
};
|
|
164
161
|
export declare const FOOTBALL_TEAMS: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
number_of_pages: number;
|
|
172
|
-
};
|
|
162
|
+
meta: {
|
|
163
|
+
pagination: {
|
|
164
|
+
current_page: number;
|
|
165
|
+
items_per_page: number;
|
|
166
|
+
total_items: number;
|
|
167
|
+
number_of_pages: number;
|
|
173
168
|
};
|
|
174
|
-
|
|
169
|
+
};
|
|
170
|
+
data: {
|
|
171
|
+
id: string;
|
|
172
|
+
country: {
|
|
175
173
|
id: string;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
alias: any;
|
|
179
|
-
country_code: string;
|
|
180
|
-
assets: {
|
|
181
|
-
flag: string;
|
|
182
|
-
};
|
|
183
|
-
name: string;
|
|
184
|
-
};
|
|
174
|
+
alias: any;
|
|
175
|
+
country_code: string;
|
|
185
176
|
assets: {
|
|
186
|
-
|
|
177
|
+
flag: string;
|
|
187
178
|
};
|
|
188
|
-
national: boolean;
|
|
189
|
-
code: string;
|
|
190
|
-
gender: string;
|
|
191
179
|
name: string;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
180
|
+
};
|
|
181
|
+
assets: {
|
|
182
|
+
logo: string;
|
|
183
|
+
};
|
|
184
|
+
national: boolean;
|
|
185
|
+
code: string;
|
|
186
|
+
gender: string;
|
|
187
|
+
name: string;
|
|
188
|
+
full_name: any;
|
|
189
|
+
short_name: any;
|
|
190
|
+
is_deleted: boolean;
|
|
191
|
+
}[];
|
|
197
192
|
};
|
|
198
193
|
export declare const constructMockedResponseByLength: (testScenario: string, arrayLength: number) => any;
|
|
@@ -6,7 +6,7 @@ export declare const SDK_CONFIG_NATIVE: {
|
|
|
6
6
|
lang: string;
|
|
7
7
|
errorHandlingMode: string;
|
|
8
8
|
authProvider: {
|
|
9
|
-
getIdToken: () =>
|
|
9
|
+
getIdToken: () => string;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare const SDK_CONFIG_NATIVE_AND_STANDARD: {
|
|
@@ -17,7 +17,7 @@ export declare const SDK_CONFIG_NATIVE_AND_STANDARD: {
|
|
|
17
17
|
lang: string;
|
|
18
18
|
errorHandlingMode: string;
|
|
19
19
|
authProvider: {
|
|
20
|
-
getIdToken: () =>
|
|
20
|
+
getIdToken: () => string;
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export declare const SDK_CONFIG_ENETPULSE: {
|
|
@@ -28,7 +28,7 @@ export declare const SDK_CONFIG_ENETPULSE: {
|
|
|
28
28
|
lang: string;
|
|
29
29
|
errorHandlingMode: string;
|
|
30
30
|
authProvider: {
|
|
31
|
-
getIdToken: () =>
|
|
31
|
+
getIdToken: () => string;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
export declare const SDK_CONFIG_SPORTAL365: {
|
|
@@ -39,7 +39,7 @@ export declare const SDK_CONFIG_SPORTAL365: {
|
|
|
39
39
|
lang: string;
|
|
40
40
|
errorHandlingMode: string;
|
|
41
41
|
authProvider: {
|
|
42
|
-
getIdToken: () =>
|
|
42
|
+
getIdToken: () => string;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
export declare const SDK_CONFIG_SPORTRADAR: {
|
|
@@ -50,6 +50,6 @@ export declare const SDK_CONFIG_SPORTRADAR: {
|
|
|
50
50
|
lang: string;
|
|
51
51
|
errorHandlingMode: string;
|
|
52
52
|
authProvider: {
|
|
53
|
-
getIdToken: () =>
|
|
53
|
+
getIdToken: () => string;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
@@ -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
|
|
9
|
+
export type ExparationType = "profile" | "statistics" | "badges" | "features" | "ids";
|
|
10
10
|
export default class LocalStorage {
|
|
11
11
|
private idSchema;
|
|
12
12
|
readonly expirationProfileTimeout: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MarketEnum } from "../../Namespaces/Predictor/Enums/MarketEnum";
|
|
2
2
|
export declare enum ErrorMessages {
|
|
3
|
-
LOYALTY_INVALID_TEMPLATE_ID = "Provided template ID does NOT exist! Try again with existing template ID.",
|
|
4
3
|
INVALID_MATCH_ID = "Match id is invalid!",
|
|
5
4
|
INVALID_PLAYER_ID = "Player id is invalid!",
|
|
6
5
|
QUERY_PARAM_MATCH_IDS_EXCEEDED = "Maximum matchIds in PredictionFilters should be 10 or less.",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const fetchOneSuccessfulMock: (data: any) => void;
|
|
2
|
+
export declare const fetchTwoSuccessfulMock: (firstData: any, secondData: any) => void;
|
|
3
|
+
export declare const fetchThreeSuccessfulMock: (firstData: any, secondData: any, thirdData: any) => void;
|
|
4
|
+
export declare const fetchFourSuccessfulMock: (firstData: any, secondData: any, thirdData: any, fourthData: any) => void;
|
|
5
|
+
export declare const fetchFiveSuccessfulMock: (firstData: any, secondData: any, thirdData: any, fourthData: any, fifthData: any) => void;
|
|
6
|
+
export declare const fetchSixSuccessfulMock: (firstData: any, secondData: any, thirdData: any, fourthData: any, fifthData: any, sixthData: any) => void;
|
|
7
|
+
export declare const fetchSevenSuccessfulMock: (firstData: any, secondData: any, thirdData: any, fourthData: any, fifthData: any, sixthData: any, seventhData: any) => void;
|
|
8
|
+
export declare const fetchUnsuccessfulMock: (data: any) => void;
|
|
9
|
+
export declare const fetchUnsuccessfulMockDefaultErrorHandlingMode: (response: any, data: any) => void;
|
|
@@ -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
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type FeaturesConfigModels = PredictorConfigModel | TopXConfigModel | MatchQuizConfigModel | LoyaltyConfigModel;
|
|
6
|
+
export type FilterCase = "user" | "current" | "past" | "matches";
|
|
7
|
+
export type IdEntities = {
|
|
8
8
|
competition?: string[];
|
|
9
9
|
team?: string[];
|
|
10
10
|
player?: string[];
|
|
11
11
|
match?: string[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type SortOrder = "asc" | "desc";
|
|
@@ -3,9 +3,9 @@ import ActivityResponseBody from "../Namespaces/Activity/Models/ActivityResponse
|
|
|
3
3
|
import PaginationActivities from "../Namespaces/Activity/Models/PaginationActivities";
|
|
4
4
|
import CreateActivityRequestBody from "../Namespaces/Activity/Models/RequestBody/CreateActivityRequestBody";
|
|
5
5
|
import ProfileStatsModel from "../Namespaces/Profile/Models/Stats/ProfileStatsModel";
|
|
6
|
-
import Https from "./Https";
|
|
7
6
|
import OwnActivityFilters from "../Namespaces/Activity/Models/Filters/OwnActivityFilters";
|
|
8
7
|
import UserActivityFilters from "../Namespaces/Activity/Models/Filters/UserActivityFilters";
|
|
8
|
+
import Https from "./Https";
|
|
9
9
|
export default class ActivityHttps extends Https {
|
|
10
10
|
private activityRemapper;
|
|
11
11
|
constructor(config: SDKConfiguraitonModel);
|
package/Core/Https/Https.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { AxiosError, AxiosInstance } from "axios";
|
|
2
1
|
import SDKConfigurationModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
2
|
+
import FansUnitedSdkFetchException, { DefaultFansUnitedExceptionInterface } from "../Exception/FansUnitedSdkFetchException";
|
|
3
3
|
import StandardFansUnitedException from "../Exception/StandardFansUnitedException";
|
|
4
4
|
export default class Https {
|
|
5
|
+
protected baseUrl: string;
|
|
5
6
|
protected apiSignInUrl: string;
|
|
6
|
-
protected
|
|
7
|
-
protected
|
|
7
|
+
protected jwtToken: string;
|
|
8
|
+
protected idSchema: string;
|
|
9
|
+
protected retryRequest: boolean;
|
|
10
|
+
protected headers: Record<string, string>;
|
|
11
|
+
protected authHeaders: Record<string, string>;
|
|
8
12
|
private errorHandlingMode;
|
|
9
13
|
constructor(configuration: SDKConfigurationModel, baseUrl: string);
|
|
14
|
+
protected fetchWithoutAuth: (url: string, warnMessage: string) => Promise<any>;
|
|
15
|
+
protected fetchWithAuth: (url: string, warnMessage: string, method?: string, requestBody?: any) => Promise<any>;
|
|
10
16
|
/**
|
|
11
|
-
* Returns the
|
|
12
|
-
*
|
|
13
|
-
* @param e Axios error. Catched from throwed CRUD operations.
|
|
14
|
-
* @returns Axios error or StandardFansUnitedException
|
|
17
|
+
* Returns the concrete exception depending on errorHandlingMode property
|
|
18
|
+
* @param response Response body from Fans United API.
|
|
15
19
|
*/
|
|
16
|
-
protected
|
|
20
|
+
protected transformFetchException: (response: Response, data: DefaultFansUnitedExceptionInterface | null) => StandardFansUnitedException | FansUnitedSdkFetchException;
|
|
21
|
+
protected validateJWTToken: () => void;
|
|
17
22
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { AxiosResponse } from "axios";
|
|
2
1
|
import SDKConfiguraitonModel from "../Configurator/Models/SDKConfiguraitonModel";
|
|
3
2
|
import IdMappingModel from "../IdMapping/Models/IdMappingModel";
|
|
4
3
|
import Https from "./Https";
|
|
5
4
|
export default class IdMappingHttps extends Https {
|
|
6
5
|
constructor(config: SDKConfiguraitonModel);
|
|
7
|
-
getEntityById: (type: string, id: string) =>
|
|
8
|
-
getEntityByIdAndSchema: (type: string, id: string, schemaId: string) =>
|
|
9
|
-
getEntityIdsByIdsAndSchema: (type: string, ids: string[], schemaId: string) => Promise<
|
|
6
|
+
getEntityById: (type: string, id: string) => Promise<any>;
|
|
7
|
+
getEntityByIdAndSchema: (type: string, id: string, schemaId: string) => Promise<any>;
|
|
8
|
+
getEntityIdsByIdsAndSchema: (type: string, ids: string[], schemaId: string) => Promise<any>;
|
|
10
9
|
getEntitiesByIds: (type: string, ids: string[], idSchema: string) => Promise<any[]>;
|
|
11
10
|
/**
|
|
12
11
|
* 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
|
|
@@ -5,11 +5,11 @@ import LoyaltyFilters from "../Namespaces/Loyalty/Models/Filters/LoyaltyFilters"
|
|
|
5
5
|
import RankingsFilters from "../Namespaces/Loyalty/Models/Filters/RankingsFilters";
|
|
6
6
|
import TemplateModel from "../Namespaces/Loyalty/Models/Template/TemplateModel";
|
|
7
7
|
import HighestSuccessRateModel from "../Namespaces/Loyalty/Models/HighestSuccessRate/HighestSuccessRateModel";
|
|
8
|
-
import Https from "./Https";
|
|
9
8
|
import EntitiesFollowsFilters from "../Namespaces/Loyalty/Models/Filters/EntitiesFollowsFilters";
|
|
10
9
|
import EntitiesFollows from "../Namespaces/Loyalty/Models/EntitiesFollows/EntitiesFollows";
|
|
11
10
|
import TemplateByIdModel from "../Namespaces/Loyalty/Models/Template/TemplateByIdModel";
|
|
12
11
|
import HighestSuccessRateFilters from "../Namespaces/Loyalty/Models/Filters/HighestSuccessRateFilters";
|
|
12
|
+
import Https from "./Https";
|
|
13
13
|
export default class LoyaltyHttps extends Https {
|
|
14
14
|
private templateRemapper;
|
|
15
15
|
private leaderboardRemapper;
|
|
@@ -8,9 +8,9 @@ import IdMappingService from "../IdMapping/IdMappingService";
|
|
|
8
8
|
import TopXPredictionRequestModel from "../Namespaces/TopX/Models/Prediction/TopXPredictionRequestModel";
|
|
9
9
|
import PaginationModel from "../Global/Models/Pagination/PaginationModel";
|
|
10
10
|
import MainFiltersBQ from "../Global/Models/Filters/MainFiltersBQ";
|
|
11
|
-
import Https from "./Https";
|
|
12
11
|
import ContestWinners from "../Namespaces/TopX/Models/Games/Winners/ContestWinners";
|
|
13
12
|
import GameByIdModel from "../Namespaces/TopX/Models/Games/GameByIdModel";
|
|
13
|
+
import Https from "./Https";
|
|
14
14
|
export default class PredictorHttps extends Https {
|
|
15
15
|
private predictionRemapper;
|
|
16
16
|
private matchSummaryRemapper;
|
|
@@ -4,7 +4,7 @@ import PaginationActivities from "../Models/PaginationActivities";
|
|
|
4
4
|
export default class ActivityRemapper {
|
|
5
5
|
remapSingleResponse: (response: any) => ActivityResponseBody;
|
|
6
6
|
remapActivitiesResponse: (response: any) => PaginationActivities;
|
|
7
|
-
|
|
7
|
+
remapStatsResponse: (response: any) => ProfileStatsModel;
|
|
8
8
|
private constructNewRecord;
|
|
9
9
|
private remapSuccessRatePercent;
|
|
10
10
|
private remapPredictionsStats;
|
|
@@ -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
|
-
|
|
4
|
+
type MatchData = MatchBasicModel[] | MatchFullModel;
|
|
5
5
|
export default class FootballService {
|
|
6
6
|
private clientHttps;
|
|
7
7
|
constructor(config: SDKConfigurationModel);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
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";
|
|
@@ -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
|
|
5
|
+
export type MarketsResults = {
|
|
6
6
|
matchId: string;
|
|
7
7
|
market: MarketEnum;
|
|
8
8
|
result: string | string[] | boolean;
|
|
@@ -10,10 +10,10 @@ export declare type MarketsResults = {
|
|
|
10
10
|
matchStatus: MatchStatus;
|
|
11
11
|
playerModels?: PlayerBasicModel[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type TieBreakersType = {
|
|
14
14
|
goldenGoals: GoldenGoalsType[];
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type GoldenGoalsType = {
|
|
17
17
|
minute: number;
|
|
18
18
|
matchId: string;
|
|
19
19
|
matchModel: MatchBasicModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type TypeGames = "TOP_X" | "MATCH_QUIZ" | "SINGLE";
|