@smartico/public-api 0.0.158 → 0.0.160
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/.prettierrc +10 -10
- package/dist/Bonuses/Bonus.d.ts +20 -0
- package/dist/Bonuses/BonusMetaMap.d.ts +3 -0
- package/dist/Bonuses/BonusStatus.d.ts +8 -0
- package/dist/Bonuses/BonusTemplateMetaMap.d.ts +5 -0
- package/dist/Bonuses/ClaimBonusRequest.d.ts +4 -0
- package/dist/Bonuses/ClaimBonusResponse.d.ts +4 -0
- package/dist/Bonuses/GetBonusesRequest.d.ts +3 -0
- package/dist/Bonuses/GetBonusesResponse.d.ts +5 -0
- package/dist/Bonuses/index.d.ts +7 -0
- package/dist/SmarticoAPI.d.ts +5 -1
- package/dist/SmarticoLib/index.d.ts +58 -2
- package/dist/WSAPI/WSAPI.d.ts +18 -3
- package/dist/WSAPI/WSAPITypes.d.ts +32 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +254 -147
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +72 -2
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +2 -0
- package/docs/classes/WSAPI.md +109 -72
- package/docs/interfaces/TBonus.md +65 -0
- package/docs/interfaces/TClaimBonusResult.md +27 -0
- package/docs/interfaces/TInboxMessageBody.md +2 -2
- package/docs/interfaces/TLevel.md +2 -2
- package/docs/interfaces/TMissionOrBadgeTask.md +1 -10
- package/docs/interfaces/TTournament.md +1 -1
- package/docs/interfaces/TTournamentDetailed.md +2 -2
- package/docs/interfaces/TUserProfile.md +2 -2
- package/package.json +41 -41
- package/src/Base/AchRelatedGame.ts +10 -10
- package/src/Base/ProtocolMessage.ts +4 -4
- package/src/Base/ProtocolRequest.ts +4 -4
- package/src/Base/ProtocolResponse.ts +3 -3
- package/src/Bonuses/Bonus.ts +40 -0
- package/src/Bonuses/BonusMetaMap.ts +3 -0
- package/src/Bonuses/BonusStatus.ts +8 -0
- package/src/Bonuses/BonusTemplateMetaMap.ts +6 -0
- package/src/Bonuses/ClaimBonusRequest.ts +5 -0
- package/src/Bonuses/ClaimBonusResponse.ts +5 -0
- package/src/Bonuses/GetBonusesRequest.ts +3 -0
- package/src/Bonuses/GetBonusesResponse.ts +6 -0
- package/src/Bonuses/index.ts +7 -0
- package/src/CookieStore.ts +6 -6
- package/src/Core/CheckSegmentMatchRequest.ts +2 -2
- package/src/Core/CheckSegmentMatchResponse.ts +4 -4
- package/src/Core/CoreUtils.ts +12 -7
- package/src/Core/GetAchievementsUserInfoRequest.ts +1 -1
- package/src/Core/GetAchievementsUserInfoResponse.ts +3 -3
- package/src/Core/GetLabelInfoRequest.ts +1 -1
- package/src/Core/GetLabelInfoResponse.ts +3 -3
- package/src/Core/GetTranslationsRequest.ts +5 -5
- package/src/Core/GetTranslationsResponse.ts +3 -3
- package/src/Core/PublicProperties.ts +7 -7
- package/src/Core/ResponseIdentify.ts +10 -10
- package/src/Core/TranslationArea.ts +1 -1
- package/src/Core/index.ts +9 -9
- package/src/CustomSections/GetCustomSectionsRequest.ts +1 -1
- package/src/CustomSections/GetCustomSectionsResponse.ts +3 -3
- package/src/CustomSections/UICustomSection.ts +21 -16
- package/src/CustomSections/index.ts +4 -4
- package/src/ErrorCodes.ts +2 -2
- package/src/GResponse.ts +5 -5
- package/src/ILogger.ts +5 -5
- package/src/Inbox/GetInboxMessagesRequest.ts +4 -4
- package/src/Inbox/GetInboxMessagesResponse.ts +8 -8
- package/src/Inbox/InboxMessage.ts +20 -20
- package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageStarredRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +3 -3
- package/src/Inbox/index.ts +10 -10
- package/src/IntUtils.ts +36 -28
- package/src/Jackpots/GetJackpotsPotsRequest.ts +2 -2
- package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -3
- package/src/Jackpots/GetJackpotsRequest.ts +3 -3
- package/src/Jackpots/GetJackpotsResponse.ts +4 -4
- package/src/Jackpots/JackPotWinner.ts +6 -6
- package/src/Jackpots/JackpotContributionType.ts +1 -1
- package/src/Jackpots/JackpotDetails.ts +18 -18
- package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
- package/src/Jackpots/JackpotPot.ts +6 -6
- package/src/Jackpots/JackpotPublicMeta.ts +9 -9
- package/src/Jackpots/JackpotType.ts +1 -1
- package/src/Jackpots/JackpotWinPush.ts +5 -5
- package/src/Jackpots/JackpotsOptinRequest.ts +2 -2
- package/src/Jackpots/JackpotsOptinResponse.ts +1 -1
- package/src/Jackpots/JackpotsOptoutRequest.ts +2 -2
- package/src/Jackpots/JackpotsOptoutResponse.ts +1 -1
- package/src/Jackpots/index.ts +16 -16
- package/src/Leaderboard/GetLeaderBoardsRequest.ts +5 -5
- package/src/Leaderboard/GetLeaderBoardsResponse.ts +3 -3
- package/src/Leaderboard/LeaderBoardDetails.ts +11 -11
- package/src/Leaderboard/LeaderBoardPosition.ts +8 -8
- package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -3
- package/src/Leaderboard/LeaderBoards.ts +16 -16
- package/src/Leaderboard/index.ts +6 -6
- package/src/Level/GetLevelMapResponse.ts +7 -7
- package/src/Level/Level.ts +9 -9
- package/src/Level/LevelPublicMeta.ts +10 -10
- package/src/Level/index.ts +3 -3
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -3
- package/src/MiniGames/SAWBuyInType.ts +2 -2
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +2 -2
- package/src/MiniGames/SAWDoAknowledgeResponse.ts +2 -2
- package/src/MiniGames/SAWDoSpinRequest.ts +3 -3
- package/src/MiniGames/SAWDoSpinResponse.ts +9 -9
- package/src/MiniGames/SAWEventSawPush.ts +3 -3
- package/src/MiniGames/SAWGameType.ts +2 -2
- package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
- package/src/MiniGames/SAWGetTemplatesResponse.ts +18 -16
- package/src/MiniGames/SAWPrize.ts +11 -11
- package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +4 -4
- package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +2 -2
- package/src/MiniGames/SAWPrizeDropWinPush.ts +8 -8
- package/src/MiniGames/SAWPrizeType.ts +2 -2
- package/src/MiniGames/SAWPrizeUI.ts +16 -16
- package/src/MiniGames/SAWSpinsCountPush.ts +3 -3
- package/src/MiniGames/SAWTemplate.ts +26 -26
- package/src/MiniGames/SAWTemplateUI.ts +42 -42
- package/src/MiniGames/SAWUtils.ts +10 -10
- package/src/MiniGames/SAWWinSoundType.ts +1 -1
- package/src/MiniGames/index.ts +24 -24
- package/src/Missions/AchCategoryPublicMeta.ts +2 -2
- package/src/Missions/AchClaimPrizeRequest.ts +3 -3
- package/src/Missions/AchClaimPrizeResponse.ts +1 -1
- package/src/Missions/AchievementCategory.ts +8 -8
- package/src/Missions/AchievementOptinRequest.ts +2 -2
- package/src/Missions/AchievementOptinResponse.ts +1 -1
- package/src/Missions/AchievementPublicMeta.ts +19 -19
- package/src/Missions/AchievementTaskPublicMeta.ts +2 -2
- package/src/Missions/GetAchCategoriesRequest.ts +1 -1
- package/src/Missions/GetAchCategoriesResponse.ts +3 -3
- package/src/Missions/GetAchievementMapRequest.ts +1 -1
- package/src/Missions/GetAchievementMapResponse.ts +3 -3
- package/src/Missions/GetRelatedAchTourRequest.ts +2 -2
- package/src/Missions/GetRelatedAchTourResponse.ts +5 -5
- package/src/Missions/ReloadAchievementsEvent.ts +3 -3
- package/src/Missions/UserAchievement.ts +48 -46
- package/src/Missions/UserAchievementTask.ts +13 -13
- package/src/Missions/index.ts +19 -19
- package/src/NodeCache.ts +12 -12
- package/src/OCache.ts +22 -22
- package/src/Quiz/MarketsAnswers.ts +9 -9
- package/src/Quiz/MarketsInfo.ts +62 -23
- package/src/Quiz/MarketsPerSport.ts +11 -4
- package/src/Quiz/ScoreResultTypes.ts +22 -22
- package/src/Quiz/SportTypes.ts +1 -1
- package/src/Quiz/index.ts +6 -6
- package/src/SmarticoAPI.ts +556 -303
- package/src/SmarticoLib/index.ts +956 -840
- package/src/Store/BuyStoreItemRequest.ts +2 -2
- package/src/Store/BuyStoreItemResponse.ts +2 -2
- package/src/Store/GetCategoriesStoreResponse.ts +3 -3
- package/src/Store/GetStoreHistoryRequest.ts +3 -3
- package/src/Store/GetStoreHistoryResponse.ts +4 -4
- package/src/Store/GetStoreItemsResponse.ts +3 -3
- package/src/Store/StoreCategory.ts +8 -8
- package/src/Store/StoreCategoryPublicMeta.ts +2 -2
- package/src/Store/StoreItem.ts +13 -13
- package/src/Store/StoreItemPublicMeta.ts +10 -10
- package/src/Store/StoreItemPurchased.ts +17 -17
- package/src/Store/StoreItemType.ts +2 -2
- package/src/Store/index.ts +13 -13
- package/src/Tournaments/GetTournamentInfoRequest.ts +2 -2
- package/src/Tournaments/GetTournamentInfoResponse.ts +18 -18
- package/src/Tournaments/GetTournamentsRequest.ts +1 -1
- package/src/Tournaments/GetTournamentsResponse.ts +6 -6
- package/src/Tournaments/Tournament.ts +43 -39
- package/src/Tournaments/TournamentInstanceStatus.ts +2 -2
- package/src/Tournaments/TournamentPlayer.ts +7 -7
- package/src/Tournaments/TournamentPrize.ts +8 -8
- package/src/Tournaments/TournamentPublicMeta.ts +16 -16
- package/src/Tournaments/TournamentRegisterRequest.ts +2 -2
- package/src/Tournaments/TournamentRegisterResponse.ts +3 -3
- package/src/Tournaments/TournamentRegistrationStatus.ts +6 -4
- package/src/Tournaments/TournamentRegistrationType.ts +9 -3
- package/src/Tournaments/TournamentUtils.ts +44 -38
- package/src/Tournaments/index.ts +16 -16
- package/src/WSAPI/WSAPI.ts +244 -132
- package/src/WSAPI/WSAPITypes.ts +287 -250
- package/src/index.ts +16 -15
- package/tsconfig.json +41 -43
package/src/OCache.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NodeCache } from './NodeCache'
|
|
1
|
+
import { NodeCache } from './NodeCache';
|
|
2
2
|
|
|
3
3
|
export enum ECacheContext {
|
|
4
4
|
Translations,
|
|
@@ -6,71 +6,71 @@ export enum ECacheContext {
|
|
|
6
6
|
WSAPI,
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
const WITH_REF_CACHE = [ECacheContext.Translations]
|
|
9
|
+
const WITH_REF_CACHE = [ECacheContext.Translations];
|
|
10
10
|
|
|
11
11
|
export class OCache {
|
|
12
|
-
private static cache: { [key: string]: NodeCache } = {}
|
|
12
|
+
private static cache: { [key: string]: NodeCache } = {};
|
|
13
13
|
|
|
14
14
|
private static init(cacheContext: ECacheContext) {
|
|
15
15
|
if (this.cache[cacheContext] === undefined) {
|
|
16
|
-
this.cache[cacheContext] = new NodeCache()
|
|
16
|
+
this.cache[cacheContext] = new NodeCache();
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
public static get<T>(oKey: any, cacheContext: ECacheContext): T | undefined {
|
|
21
|
-
const key = cacheContext.toString() + '_' + JSON.stringify(oKey)
|
|
21
|
+
const key = cacheContext.toString() + '_' + JSON.stringify(oKey);
|
|
22
22
|
|
|
23
|
-
this.init(cacheContext)
|
|
23
|
+
this.init(cacheContext);
|
|
24
24
|
|
|
25
|
-
return deepClone(this.cache[cacheContext].get(key))
|
|
25
|
+
return deepClone(this.cache[cacheContext].get(key));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
public static set(oKey: any, o: any, cacheContext: ECacheContext, ttlSeconds: number = 60) {
|
|
29
|
-
const key = cacheContext.toString() + '_' + JSON.stringify(oKey)
|
|
29
|
+
const key = cacheContext.toString() + '_' + JSON.stringify(oKey);
|
|
30
30
|
|
|
31
|
-
this.init(cacheContext)
|
|
31
|
+
this.init(cacheContext);
|
|
32
32
|
|
|
33
|
-
this.cache[cacheContext].set(key, deepClone(o), ttlSeconds)
|
|
33
|
+
this.cache[cacheContext].set(key, deepClone(o), ttlSeconds);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
public static async use<T>(oKey: any, cacheContext: ECacheContext, f: () => Promise<T>, ttlSeconds: number = 60) {
|
|
37
37
|
if (ttlSeconds <= 0) {
|
|
38
|
-
return await f()
|
|
38
|
+
return await f();
|
|
39
39
|
} else {
|
|
40
|
-
let o: T = OCache.get(oKey, cacheContext)
|
|
40
|
+
let o: T = OCache.get(oKey, cacheContext);
|
|
41
41
|
|
|
42
42
|
if (o === undefined) {
|
|
43
|
-
o = await f()
|
|
44
|
-
OCache.set(oKey, o, cacheContext, ttlSeconds)
|
|
43
|
+
o = await f();
|
|
44
|
+
OCache.set(oKey, o, cacheContext, ttlSeconds);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
return o
|
|
47
|
+
return o;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
public static async clear(cacheContext: ECacheContext, oKey: any) {
|
|
52
|
-
const key = cacheContext.toString() + '_' + JSON.stringify(oKey)
|
|
52
|
+
const key = cacheContext.toString() + '_' + JSON.stringify(oKey);
|
|
53
53
|
|
|
54
54
|
if (this.cache[cacheContext]) {
|
|
55
|
-
this.cache[cacheContext].remove(key)
|
|
55
|
+
this.cache[cacheContext].remove(key);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
public static async clearContext(cacheContext: ECacheContext) {
|
|
60
60
|
if (this.cache[cacheContext]) {
|
|
61
|
-
this.cache[cacheContext].flushAll()
|
|
61
|
+
this.cache[cacheContext].flushAll();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
public static async clearAll() {
|
|
66
|
-
this.cache = {}
|
|
66
|
+
this.cache = {};
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
const deepClone = (o: any) => {
|
|
71
71
|
if (o) {
|
|
72
|
-
return JSON.parse(JSON.stringify(o))
|
|
72
|
+
return JSON.parse(JSON.stringify(o));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
return o
|
|
76
|
-
}
|
|
75
|
+
return o;
|
|
76
|
+
};
|
|
@@ -21,14 +21,14 @@ export enum QuizAnswersValueType {
|
|
|
21
21
|
AwayEven = '2/even',
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
export const quizAnswerHomeTeamReplacementText = '{quiz_home_team}'
|
|
25
|
-
export const quizAnswerAwayTeamReplacementText = '{quiz_away_team}'
|
|
26
|
-
export const quizDrawReplacementText = '{quiz_draw}'
|
|
27
|
-
export const quizYesReplacementText = '{yes}'
|
|
28
|
-
export const quizNoReplacementText = '{no}'
|
|
29
|
-
export const quizOddReplacementText = '{odd}'
|
|
30
|
-
export const quizEvenReplacementText = '{even}'
|
|
31
|
-
export const quizOrReplacementText = '{or}'
|
|
24
|
+
export const quizAnswerHomeTeamReplacementText = '{quiz_home_team}';
|
|
25
|
+
export const quizAnswerAwayTeamReplacementText = '{quiz_away_team}';
|
|
26
|
+
export const quizDrawReplacementText = '{quiz_draw}';
|
|
27
|
+
export const quizYesReplacementText = '{yes}';
|
|
28
|
+
export const quizNoReplacementText = '{no}';
|
|
29
|
+
export const quizOddReplacementText = '{odd}';
|
|
30
|
+
export const quizEvenReplacementText = '{even}';
|
|
31
|
+
export const quizOrReplacementText = '{or}';
|
|
32
32
|
|
|
33
33
|
export const quizAnswersTrKeys = {
|
|
34
34
|
[quizDrawReplacementText]: 'quizAnswer_draw',
|
|
@@ -37,4 +37,4 @@ export const quizAnswersTrKeys = {
|
|
|
37
37
|
[quizOddReplacementText]: 'quizAnswer_odd',
|
|
38
38
|
[quizEvenReplacementText]: 'quizAnswer_even',
|
|
39
39
|
[quizOrReplacementText]: 'quizAnswer_or',
|
|
40
|
-
}
|
|
40
|
+
};
|
package/src/Quiz/MarketsInfo.ts
CHANGED
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
quizOddReplacementText,
|
|
9
9
|
quizOrReplacementText,
|
|
10
10
|
quizYesReplacementText,
|
|
11
|
-
} from './MarketsAnswers'
|
|
12
|
-
import { SAWGPMarketType } from './MarketsType'
|
|
11
|
+
} from './MarketsAnswers';
|
|
12
|
+
import { SAWGPMarketType } from './MarketsType';
|
|
13
13
|
|
|
14
14
|
const yesNoAnswers = [
|
|
15
15
|
{ text: quizYesReplacementText, value: QuizAnswersValueType.Yes },
|
|
16
16
|
{ text: quizNoReplacementText, value: QuizAnswersValueType.No },
|
|
17
|
-
]
|
|
17
|
+
];
|
|
18
18
|
|
|
19
19
|
const homeAwayAnswers = [
|
|
20
20
|
{ text: quizAnswerHomeTeamReplacementText, value: QuizAnswersValueType.HomeTeam },
|
|
21
21
|
{ text: quizAnswerAwayTeamReplacementText, value: QuizAnswersValueType.AwayTeam },
|
|
22
|
-
]
|
|
22
|
+
];
|
|
23
23
|
|
|
24
|
-
const homeAwayDrawAnswers = [...homeAwayAnswers, { text: quizDrawReplacementText, value: QuizAnswersValueType.Draw }]
|
|
24
|
+
const homeAwayDrawAnswers = [...homeAwayAnswers, { text: quizDrawReplacementText, value: QuizAnswersValueType.Draw }];
|
|
25
25
|
|
|
26
26
|
export const marketsInfo = [
|
|
27
27
|
{
|
|
@@ -41,15 +41,39 @@ export const marketsInfo = [
|
|
|
41
41
|
name: 'Halftime / Fulltime',
|
|
42
42
|
question: { text: 'Who will lead the first half and who will win the match ?', trKey: 'quizQuestion__HalftimeFulltime' },
|
|
43
43
|
answers: [
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
{
|
|
45
|
+
text: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,
|
|
46
|
+
value: QuizAnswersValueType.HomeTeamHomeTeam,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
text: `${quizAnswerHomeTeamReplacementText} / ${quizDrawReplacementText}`,
|
|
50
|
+
value: QuizAnswersValueType.HomeTeamDraw,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
text: `${quizAnswerHomeTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,
|
|
54
|
+
value: QuizAnswersValueType.HomeTeamAwayTeam,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
text: `${quizDrawReplacementText} / ${quizAnswerHomeTeamReplacementText}`,
|
|
58
|
+
value: QuizAnswersValueType.DrawHomeTeam,
|
|
59
|
+
},
|
|
48
60
|
{ text: `${quizDrawReplacementText} / ${quizDrawReplacementText}`, value: QuizAnswersValueType.DrawDraw },
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
{
|
|
62
|
+
text: `${quizDrawReplacementText} / ${quizAnswerAwayTeamReplacementText}`,
|
|
63
|
+
value: QuizAnswersValueType.DrawAwayTeam,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
text: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerHomeTeamReplacementText}`,
|
|
67
|
+
value: QuizAnswersValueType.AwayTeamHomeTeam,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
text: `${quizAnswerAwayTeamReplacementText} / ${quizDrawReplacementText}`,
|
|
71
|
+
value: QuizAnswersValueType.AwayTeamDraw,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
text: `${quizAnswerAwayTeamReplacementText} / ${quizAnswerAwayTeamReplacementText}`,
|
|
75
|
+
value: QuizAnswersValueType.AwayTeamAwayTeam,
|
|
76
|
+
},
|
|
53
77
|
],
|
|
54
78
|
},
|
|
55
79
|
{
|
|
@@ -69,9 +93,18 @@ export const marketsInfo = [
|
|
|
69
93
|
name: 'Double Chance',
|
|
70
94
|
question: { text: 'Who will win the match? Choose a combination:', trKey: 'quizQuestion_doubleChance' },
|
|
71
95
|
answers: [
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
96
|
+
{
|
|
97
|
+
text: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerHomeTeamReplacementText}`,
|
|
98
|
+
value: QuizAnswersValueType.HomeTeamDraw,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
text: `${quizAnswerHomeTeamReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,
|
|
102
|
+
value: QuizAnswersValueType.HomeTeamAwayTeam,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
text: `${quizDrawReplacementText} ${quizOrReplacementText} ${quizAnswerAwayTeamReplacementText}`,
|
|
106
|
+
value: QuizAnswersValueType.AwayTeamDraw,
|
|
107
|
+
},
|
|
75
108
|
],
|
|
76
109
|
},
|
|
77
110
|
{
|
|
@@ -131,7 +164,10 @@ export const marketsInfo = [
|
|
|
131
164
|
{
|
|
132
165
|
type: SAWGPMarketType.OddEven,
|
|
133
166
|
name: 'Odd/Even',
|
|
134
|
-
question: {
|
|
167
|
+
question: {
|
|
168
|
+
text: 'Is the sum of all points scored in the game going to be an odd number or even?',
|
|
169
|
+
trKey: 'quizQuestion_oddEven',
|
|
170
|
+
},
|
|
135
171
|
answers: [
|
|
136
172
|
{ text: quizOddReplacementText, value: QuizAnswersValueType.Odd },
|
|
137
173
|
{ text: quizEvenReplacementText, value: QuizAnswersValueType.Even },
|
|
@@ -140,7 +176,10 @@ export const marketsInfo = [
|
|
|
140
176
|
{
|
|
141
177
|
type: SAWGPMarketType.OddEvenHomeAway,
|
|
142
178
|
name: 'Odd/Even Home/Away',
|
|
143
|
-
question: {
|
|
179
|
+
question: {
|
|
180
|
+
text: 'Which team will win and what will be the sum of the points (Odd or Even)?',
|
|
181
|
+
trKey: 'quizQuestion_oddEvenHomeAway',
|
|
182
|
+
},
|
|
144
183
|
answers: [
|
|
145
184
|
{ text: `${quizAnswerHomeTeamReplacementText} - ${quizOddReplacementText}`, value: QuizAnswersValueType.HomeOdd },
|
|
146
185
|
{ text: `${quizAnswerHomeTeamReplacementText} - ${quizEvenReplacementText}`, value: QuizAnswersValueType.HomeEven },
|
|
@@ -189,17 +228,17 @@ export const marketsInfo = [
|
|
|
189
228
|
name: 'Player Two Wins One Set',
|
|
190
229
|
question: { text: 'Will Player Two win at least one set?', trKey: 'quizQuestion_playerTwoWinsOneSet' },
|
|
191
230
|
answers: yesNoAnswers,
|
|
192
|
-
|
|
193
|
-
|
|
231
|
+
},
|
|
232
|
+
{
|
|
194
233
|
type: SAWGPMarketType.CustomNonSport,
|
|
195
234
|
name: 'Custom question (non sport)',
|
|
196
235
|
question: null,
|
|
197
236
|
answers: null,
|
|
198
|
-
|
|
199
|
-
|
|
237
|
+
},
|
|
238
|
+
{
|
|
200
239
|
type: SAWGPMarketType.CustomSport,
|
|
201
240
|
name: 'Custom question (sport)',
|
|
202
241
|
question: null,
|
|
203
242
|
answers: null,
|
|
204
243
|
},
|
|
205
|
-
]
|
|
244
|
+
];
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { SAWGPMarketType } from './MarketsType'
|
|
2
|
-
import { QuizSportType } from './SportTypes'
|
|
1
|
+
import { SAWGPMarketType } from './MarketsType';
|
|
2
|
+
import { QuizSportType } from './SportTypes';
|
|
3
3
|
|
|
4
4
|
export const QuizMarketPerSport = {
|
|
5
|
-
[QuizSportType.Basketball]: [
|
|
5
|
+
[QuizSportType.Basketball]: [
|
|
6
|
+
SAWGPMarketType.One_Two,
|
|
7
|
+
SAWGPMarketType.Overtime,
|
|
8
|
+
SAWGPMarketType.OneXTwo,
|
|
9
|
+
SAWGPMarketType.OddEven,
|
|
10
|
+
SAWGPMarketType.OddEvenHomeAway,
|
|
11
|
+
SAWGPMarketType.DoubleChance,
|
|
12
|
+
],
|
|
6
13
|
[QuizSportType.Soccer]: [
|
|
7
14
|
SAWGPMarketType.OneXTwo,
|
|
8
15
|
SAWGPMarketType.OneXTwoHalftime,
|
|
@@ -29,4 +36,4 @@ export const QuizMarketPerSport = {
|
|
|
29
36
|
SAWGPMarketType.PlayerTwoWinsOneSet,
|
|
30
37
|
SAWGPMarketType.OddEven,
|
|
31
38
|
],
|
|
32
|
-
}
|
|
39
|
+
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
type TeamType = 'Home' | 'Away'
|
|
2
|
-
type CardType = 'Yellow' | 'Red'
|
|
3
|
-
type TimeType = 'FT' | '1st Half' | '2nd Half'
|
|
1
|
+
type TeamType = 'Home' | 'Away';
|
|
2
|
+
type CardType = 'Yellow' | 'Red';
|
|
3
|
+
type TimeType = 'FT' | '1st Half' | '2nd Half';
|
|
4
4
|
|
|
5
5
|
export type OverHalfFullTimeScoreType = {
|
|
6
|
-
home: number
|
|
7
|
-
away: number
|
|
8
|
-
}
|
|
6
|
+
home: number;
|
|
7
|
+
away: number;
|
|
8
|
+
};
|
|
9
9
|
|
|
10
10
|
export type CardScoreType = {
|
|
11
|
-
time: 'string'
|
|
12
|
-
type: CardType
|
|
13
|
-
player: string
|
|
14
|
-
}
|
|
11
|
+
time: 'string';
|
|
12
|
+
type: CardType;
|
|
13
|
+
player: string;
|
|
14
|
+
};
|
|
15
15
|
|
|
16
16
|
export type CornerScoreType = {
|
|
17
|
-
team: TeamType
|
|
18
|
-
timeType: TimeType
|
|
19
|
-
totalCount: number
|
|
20
|
-
}
|
|
17
|
+
team: TeamType;
|
|
18
|
+
timeType: TimeType;
|
|
19
|
+
totalCount: number;
|
|
20
|
+
};
|
|
21
21
|
|
|
22
22
|
export type GoalScoreType = {
|
|
23
|
-
team: TeamType
|
|
24
|
-
time: string
|
|
25
|
-
player: string
|
|
26
|
-
matchScore: OverHalfFullTimeScoreType
|
|
27
|
-
}
|
|
23
|
+
team: TeamType;
|
|
24
|
+
time: string;
|
|
25
|
+
player: string;
|
|
26
|
+
matchScore: OverHalfFullTimeScoreType;
|
|
27
|
+
};
|
|
28
28
|
|
|
29
29
|
export type SetsScoreType = {
|
|
30
|
-
set: number
|
|
31
|
-
setScore: OverHalfFullTimeScoreType
|
|
32
|
-
}
|
|
30
|
+
set: number;
|
|
31
|
+
setScore: OverHalfFullTimeScoreType;
|
|
32
|
+
};
|
package/src/Quiz/SportTypes.ts
CHANGED
package/src/Quiz/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './SportTypes'
|
|
2
|
-
export * from './MarketsType'
|
|
3
|
-
export * from './ScoreResultTypes'
|
|
4
|
-
export * from './MarketsInfo'
|
|
5
|
-
export * from './MarketsPerSport'
|
|
6
|
-
export * from './MarketsAnswers'
|
|
1
|
+
export * from './SportTypes';
|
|
2
|
+
export * from './MarketsType';
|
|
3
|
+
export * from './ScoreResultTypes';
|
|
4
|
+
export * from './MarketsInfo';
|
|
5
|
+
export * from './MarketsPerSport';
|
|
6
|
+
export * from './MarketsAnswers';
|