@smartico/public-api 0.0.154 → 0.0.155
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 +12 -0
- package/dist/Base/ProtocolRequest.d.ts +1 -1
- package/dist/Base/ProtocolResponse.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchRequest.d.ts +1 -1
- package/dist/Core/CheckSegmentMatchResponse.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoRequest.d.ts +1 -1
- package/dist/Core/GetAchievementsUserInfoResponse.d.ts +1 -1
- package/dist/Core/GetLabelInfoRequest.d.ts +1 -1
- package/dist/Core/GetLabelInfoResponse.d.ts +1 -1
- package/dist/Core/GetTranslationsRequest.d.ts +2 -2
- package/dist/Core/GetTranslationsResponse.d.ts +1 -1
- package/dist/Core/ResponseIdentify.d.ts +2 -2
- package/dist/CustomSections/GetCustomSectionsRequest.d.ts +1 -1
- package/dist/CustomSections/GetCustomSectionsResponse.d.ts +2 -2
- package/dist/CustomSections/UICustomSection.d.ts +2 -2
- package/dist/GResponse.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesRequest.d.ts +1 -1
- package/dist/Inbox/GetInboxMessagesResponse.d.ts +3 -3
- package/dist/Inbox/InboxMessage.d.ts +2 -2
- package/dist/Inbox/MarkInboxMessageDeletedRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageDeletedResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageReadResponse.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredRequest.d.ts +1 -1
- package/dist/Inbox/MarkInboxMessageStarredResponse.d.ts +1 -1
- package/dist/Inbox/index.d.ts +8 -8
- package/dist/Jackpots/GetJackpotsPotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsPotsResponse.d.ts +2 -2
- package/dist/Jackpots/GetJackpotsRequest.d.ts +1 -1
- package/dist/Jackpots/GetJackpotsResponse.d.ts +2 -2
- package/dist/Jackpots/JackpotDetails.d.ts +6 -6
- package/dist/Jackpots/JackpotWinPush.d.ts +3 -3
- package/dist/Jackpots/JackpotsOptinRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptinResponse.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutRequest.d.ts +1 -1
- package/dist/Jackpots/JackpotsOptoutResponse.d.ts +1 -1
- package/dist/Leaderboard/GetLeaderBoardsRequest.d.ts +2 -2
- package/dist/Leaderboard/GetLeaderBoardsResponse.d.ts +2 -2
- package/dist/Leaderboard/LeaderBoardDetails.d.ts +3 -3
- package/dist/Leaderboard/LeaderBoards.d.ts +2 -2
- package/dist/Leaderboard/index.d.ts +6 -6
- package/dist/Level/GetLevelMapResponse.d.ts +3 -3
- package/dist/Level/Level.d.ts +1 -1
- package/dist/MiniGames/SAWAcknowledgeSpinPushRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinRequest.d.ts +1 -1
- package/dist/MiniGames/SAWDoSpinResponse.d.ts +2 -2
- package/dist/MiniGames/SAWEventSawPush.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesRequest.d.ts +1 -1
- package/dist/MiniGames/SAWGetTemplatesResponse.d.ts +3 -3
- package/dist/MiniGames/SAWPrize.d.ts +2 -2
- package/dist/MiniGames/SAWPrizeDropAknowledgeRequest.d.ts +3 -1
- package/dist/MiniGames/SAWPrizeDropAknowledgeResponse.d.ts +1 -1
- package/dist/MiniGames/SAWPrizeDropWinPush.d.ts +4 -3
- package/dist/MiniGames/SAWPrizeUI.d.ts +2 -2
- package/dist/MiniGames/SAWSpinsCountPush.d.ts +1 -1
- package/dist/MiniGames/SAWTemplate.d.ts +4 -4
- package/dist/MiniGames/SAWTemplateUI.d.ts +1 -1
- package/dist/MiniGames/SAWUtils.d.ts +1 -1
- package/dist/MiniGames/index.d.ts +24 -22
- package/dist/Missions/AchClaimPrizeRequest.d.ts +1 -1
- package/dist/Missions/AchClaimPrizeResponse.d.ts +1 -1
- package/dist/Missions/AchievementCategory.d.ts +2 -2
- package/dist/Missions/AchievementOptinRequest.d.ts +1 -1
- package/dist/Missions/AchievementOptinResponse.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesRequest.d.ts +1 -1
- package/dist/Missions/GetAchCategoriesResponse.d.ts +2 -2
- package/dist/Missions/GetAchievementMapRequest.d.ts +1 -1
- package/dist/Missions/GetAchievementMapResponse.d.ts +2 -2
- package/dist/Missions/GetRelatedAchTourRequest.d.ts +1 -1
- package/dist/Missions/GetRelatedAchTourResponse.d.ts +3 -3
- package/dist/Missions/ReloadAchievementsEvent.d.ts +2 -2
- package/dist/Missions/UserAchievement.d.ts +7 -7
- package/dist/Missions/UserAchievementTask.d.ts +2 -2
- package/dist/Missions/index.d.ts +13 -13
- package/dist/Quiz/MarketsInfo.d.ts +2 -2
- package/dist/Quiz/MarketsPerSport.d.ts +1 -1
- package/dist/SmarticoAPI.d.ts +8 -8
- package/dist/SmarticoLib/index.d.ts +39 -39
- package/dist/Store/BuyStoreItemRequest.d.ts +1 -1
- package/dist/Store/BuyStoreItemResponse.d.ts +1 -1
- package/dist/Store/GetCategoriesStoreResponse.d.ts +2 -2
- package/dist/Store/GetStoreHistoryRequest.d.ts +1 -1
- package/dist/Store/GetStoreHistoryResponse.d.ts +2 -2
- package/dist/Store/GetStoreItemsResponse.d.ts +2 -2
- package/dist/Store/StoreCategory.d.ts +2 -2
- package/dist/Store/StoreItem.d.ts +3 -3
- package/dist/Store/StoreItemPurchased.d.ts +2 -2
- package/dist/Store/index.d.ts +10 -10
- package/dist/Tournaments/GetTournamentInfoRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentInfoResponse.d.ts +5 -5
- package/dist/Tournaments/GetTournamentsRequest.d.ts +1 -1
- package/dist/Tournaments/GetTournamentsResponse.d.ts +2 -2
- package/dist/Tournaments/Tournament.d.ts +8 -8
- package/dist/Tournaments/TournamentPrize.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterRequest.d.ts +1 -1
- package/dist/Tournaments/TournamentRegisterResponse.d.ts +2 -2
- package/dist/Tournaments/TournamentUtils.d.ts +3 -3
- package/dist/Tournaments/index.d.ts +16 -16
- package/dist/WSAPI/WSAPI.d.ts +65 -65
- package/dist/WSAPI/WSAPITypes.d.ts +18 -18
- package/dist/index.js +76 -78
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +103 -103
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Base/AchRelatedGame.ts +13 -13
- package/src/Base/ClassId.ts +118 -121
- package/src/Base/ProtocolMessage.ts +6 -7
- package/src/Base/ProtocolRequest.ts +4 -5
- package/src/Base/ProtocolResponse.ts +3 -5
- package/src/CookieStore.ts +10 -11
- package/src/Core/ActivityTypeLimited.ts +17 -18
- package/src/Core/CheckSegmentMatchRequest.ts +2 -3
- package/src/Core/CheckSegmentMatchResponse.ts +6 -6
- package/src/Core/CoreUtils.ts +37 -39
- package/src/Core/GetAchievementsUserInfoRequest.ts +2 -4
- package/src/Core/GetAchievementsUserInfoResponse.ts +4 -4
- package/src/Core/GetLabelInfoRequest.ts +2 -4
- package/src/Core/GetLabelInfoResponse.ts +4 -4
- package/src/Core/GetTranslationsRequest.ts +5 -7
- package/src/Core/GetTranslationsResponse.ts +3 -5
- package/src/Core/PublicLabelSettings.ts +29 -30
- package/src/Core/PublicProperties.ts +7 -7
- package/src/Core/ResponseIdentify.ts +12 -12
- package/src/Core/TranslationArea.ts +8 -9
- package/src/Core/index.ts +1 -1
- package/src/CustomSections/AchCustomSection.ts +20 -20
- package/src/CustomSections/GetCustomSectionsRequest.ts +2 -4
- package/src/CustomSections/GetCustomSectionsResponse.ts +4 -5
- package/src/CustomSections/UICustomSection.ts +30 -29
- package/src/CustomSections/index.ts +4 -4
- package/src/ErrorCodes.ts +11 -12
- package/src/GResponse.ts +5 -5
- package/src/ILogger.ts +6 -10
- package/src/Inbox/GetInboxMessagesRequest.ts +4 -5
- package/src/Inbox/GetInboxMessagesResponse.ts +15 -17
- package/src/Inbox/InboxMessage.ts +31 -33
- package/src/Inbox/InboxMessageType.ts +9 -9
- package/src/Inbox/MarkInboxMessageDeletedRequest.ts +3 -3
- package/src/Inbox/MarkInboxMessageDeletedResponse.ts +3 -3
- package/src/Inbox/MarkInboxMessageReadRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageReadResponse.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredRequest.ts +4 -5
- package/src/Inbox/MarkInboxMessageStarredResponse.ts +4 -5
- package/src/Inbox/index.ts +10 -10
- package/src/IntUtils.ts +72 -85
- package/src/Jackpots/GetJackpotsPotsRequest.ts +3 -3
- package/src/Jackpots/GetJackpotsPotsResponse.ts +3 -5
- package/src/Jackpots/GetJackpotsRequest.ts +4 -6
- package/src/Jackpots/GetJackpotsResponse.ts +5 -7
- package/src/Jackpots/JackPotWinner.ts +11 -12
- package/src/Jackpots/JackpotContributionType.ts +3 -4
- package/src/Jackpots/JackpotDetails.ts +31 -31
- package/src/Jackpots/JackpotHtmlTemplate.ts +3 -3
- package/src/Jackpots/JackpotPot.ts +11 -12
- package/src/Jackpots/JackpotPublicMeta.ts +16 -16
- package/src/Jackpots/JackpotType.ts +2 -5
- package/src/Jackpots/JackpotWinPush.ts +6 -6
- package/src/Jackpots/JackpotsOptinRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptinResponse.ts +2 -4
- package/src/Jackpots/JackpotsOptoutRequest.ts +3 -5
- package/src/Jackpots/JackpotsOptoutResponse.ts +2 -4
- package/src/Jackpots/index.ts +16 -16
- package/src/Leaderboard/GetLeaderBoardsRequest.ts +8 -9
- package/src/Leaderboard/GetLeaderBoardsResponse.ts +4 -6
- package/src/Leaderboard/LeaderBoardDetails.ts +11 -12
- package/src/Leaderboard/LeaderBoardPeriodType.ts +3 -3
- package/src/Leaderboard/LeaderBoardPosition.ts +9 -10
- package/src/Leaderboard/LeaderBoardPublicMeta.ts +3 -4
- package/src/Leaderboard/LeaderBoards.ts +42 -42
- package/src/Leaderboard/index.ts +6 -6
- package/src/Level/GetLevelMapResponse.ts +18 -21
- package/src/Level/Level.ts +10 -11
- package/src/Level/LevelPublicMeta.ts +17 -17
- package/src/Level/index.ts +3 -3
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +3 -4
- package/src/MiniGames/SAWAcknowledgeType.ts +3 -4
- package/src/MiniGames/SAWAskForUsername.ts +3 -4
- package/src/MiniGames/SAWBuyInType.ts +15 -13
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +3 -3
- package/src/MiniGames/SAWDoAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWDoSpinRequest.ts +3 -5
- package/src/MiniGames/SAWDoSpinResponse.ts +10 -11
- package/src/MiniGames/SAWEventSawPush.ts +3 -4
- package/src/MiniGames/SAWGameType.ts +23 -21
- package/src/MiniGames/SAWGetTemplatesRequest.ts +3 -3
- package/src/MiniGames/SAWGetTemplatesResponse.ts +53 -65
- package/src/MiniGames/SAWPrize.ts +11 -12
- package/src/MiniGames/SAWPrizeDropAknowledgeRequest.ts +5 -3
- package/src/MiniGames/SAWPrizeDropAknowledgeResponse.ts +3 -3
- package/src/MiniGames/SAWPrizeDropWinPush.ts +9 -8
- package/src/MiniGames/SAWPrizeType.ts +23 -22
- package/src/MiniGames/SAWPrizeUI.ts +17 -17
- package/src/MiniGames/SAWSpinErrorCode.ts +15 -16
- package/src/MiniGames/SAWSpinsCountPush.ts +4 -4
- package/src/MiniGames/SAWTemplate.ts +29 -29
- package/src/MiniGames/SAWTemplateUI.ts +45 -47
- package/src/MiniGames/SAWUtils.ts +23 -26
- package/src/MiniGames/SAWWinSoundType.ts +10 -11
- package/src/MiniGames/index.ts +24 -22
- package/src/Missions/AchCategoryPublicMeta.ts +2 -3
- package/src/Missions/AchClaimPrizeRequest.ts +4 -5
- package/src/Missions/AchClaimPrizeResponse.ts +3 -4
- package/src/Missions/AchievementCategory.ts +14 -15
- package/src/Missions/AchievementOptinRequest.ts +3 -5
- package/src/Missions/AchievementOptinResponse.ts +2 -4
- package/src/Missions/AchievementPublicMeta.ts +19 -20
- package/src/Missions/AchievementStatus.ts +7 -8
- package/src/Missions/AchievementTaskPublicMeta.ts +2 -3
- package/src/Missions/AchievementTaskType.ts +2 -2
- package/src/Missions/AchievementType.ts +2 -3
- package/src/Missions/GetAchCategoriesRequest.ts +2 -4
- package/src/Missions/GetAchCategoriesResponse.ts +4 -5
- package/src/Missions/GetAchievementMapRequest.ts +2 -4
- package/src/Missions/GetAchievementMapResponse.ts +3 -5
- package/src/Missions/GetRelatedAchTourRequest.ts +3 -4
- package/src/Missions/GetRelatedAchTourResponse.ts +5 -7
- package/src/Missions/ReloadAchievementsEvent.ts +5 -5
- package/src/Missions/ScheduledMissionType.ts +4 -5
- package/src/Missions/UserAchievement.ts +104 -108
- package/src/Missions/UserAchievementTask.ts +13 -15
- package/src/Missions/index.ts +19 -19
- package/src/NodeCache.ts +44 -49
- package/src/OCache.ts +51 -57
- package/src/Quiz/MarketsAnswers.ts +34 -34
- package/src/Quiz/MarketsInfo.ts +184 -177
- package/src/Quiz/MarketsPerSport.ts +30 -37
- package/src/Quiz/MarketsType.ts +28 -28
- package/src/Quiz/ScoreResultTypes.ts +18 -18
- package/src/Quiz/SportTypes.ts +4 -4
- package/src/Quiz/index.ts +6 -6
- package/src/SmarticoAPI.ts +769 -730
- package/src/SmarticoLib/index.ts +1053 -1069
- package/src/Store/BuyStoreItemErrorCode.ts +10 -10
- package/src/Store/BuyStoreItemRequest.ts +2 -2
- package/src/Store/BuyStoreItemResponse.ts +2 -3
- package/src/Store/GetCategoriesStoreResponse.ts +3 -8
- package/src/Store/GetStoreHistoryRequest.ts +3 -3
- package/src/Store/GetStoreHistoryResponse.ts +4 -4
- package/src/Store/GetStoreItemsResponse.ts +3 -4
- package/src/Store/StoreCategory.ts +14 -15
- package/src/Store/StoreCategoryPublicMeta.ts +2 -3
- package/src/Store/StoreItem.ts +32 -33
- package/src/Store/StoreItemPublicMeta.ts +10 -10
- package/src/Store/StoreItemPurchased.ts +40 -40
- package/src/Store/StoreItemType.ts +20 -19
- package/src/Store/index.ts +13 -13
- package/src/Tournaments/GetTournamentInfoRequest.ts +2 -3
- package/src/Tournaments/GetTournamentInfoResponse.ts +45 -48
- package/src/Tournaments/GetTournamentsRequest.ts +2 -4
- package/src/Tournaments/GetTournamentsResponse.ts +7 -14
- package/src/Tournaments/Tournament.ts +109 -115
- package/src/Tournaments/TournamentInstanceStatus.ts +17 -18
- package/src/Tournaments/TournamentPlayer.ts +7 -8
- package/src/Tournaments/TournamentPrize.ts +9 -10
- package/src/Tournaments/TournamentPublicMeta.ts +26 -26
- package/src/Tournaments/TournamentRegisterRequest.ts +2 -3
- package/src/Tournaments/TournamentRegisterResponse.ts +3 -7
- package/src/Tournaments/TournamentRegistrationError.ts +9 -9
- package/src/Tournaments/TournamentRegistrationStatus.ts +25 -27
- package/src/Tournaments/TournamentRegistrationType.ts +15 -16
- package/src/Tournaments/TournamentType.ts +3 -4
- package/src/Tournaments/TournamentUtils.ts +90 -89
- package/src/Tournaments/index.ts +16 -16
- package/src/WSAPI/WSAPI.ts +781 -763
- package/src/WSAPI/WSAPITypes.ts +574 -586
- package/src/index.ts +15 -15
|
@@ -1,120 +1,114 @@
|
|
|
1
|
-
import {TournamentRegistrationType, TournamentRegistrationTypeGetName} from
|
|
2
|
-
import {TournamentInstanceStatus} from
|
|
3
|
-
import { TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed } from
|
|
4
|
-
import { TournamentType } from
|
|
5
|
-
import { TournamentPublicMeta } from
|
|
6
|
-
import { TTournament } from
|
|
7
|
-
import { TournamentPlayer, TournamentPrize, TournamentUtils } from
|
|
8
|
-
import { IntUtils } from
|
|
9
|
-
import { AchRelatedGame } from
|
|
1
|
+
import { TournamentRegistrationType, TournamentRegistrationTypeGetName } from './TournamentRegistrationType'
|
|
2
|
+
import { TournamentInstanceStatus } from './TournamentInstanceStatus'
|
|
3
|
+
import { TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed } from './TournamentRegistrationStatus'
|
|
4
|
+
import { TournamentType } from './TournamentType'
|
|
5
|
+
import { TournamentPublicMeta } from './TournamentPublicMeta'
|
|
6
|
+
import { TTournament } from '../WSAPI/WSAPITypes'
|
|
7
|
+
import { TournamentPlayer, TournamentPrize, TournamentUtils } from '.'
|
|
8
|
+
import { IntUtils } from '../IntUtils'
|
|
9
|
+
import { AchRelatedGame } from '../Base/AchRelatedGame'
|
|
10
10
|
|
|
11
11
|
export interface Tournament {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
related_games?: AchRelatedGame[];
|
|
12
|
+
/** ID of tournament template */
|
|
13
|
+
tournamentId?: number
|
|
14
|
+
/** ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run */
|
|
15
|
+
tournamentInstanceId?: number
|
|
16
|
+
/** Type of the tournament. For now only SCHEDULED is support */
|
|
17
|
+
tournamentType?: TournamentType
|
|
18
|
+
/** Meta information about tournament that should be used to build UI */
|
|
19
|
+
publicMeta?: TournamentPublicMeta
|
|
20
|
+
/** Cost of registration in the tournament in gamification points */
|
|
21
|
+
buyInAmount?: number
|
|
22
|
+
/** Not in use */
|
|
23
|
+
prizePool?: number
|
|
24
|
+
/** The time when tournament is going to start */
|
|
25
|
+
startTime?: string
|
|
26
|
+
/** The time when tournament is going to finish */
|
|
27
|
+
endTime?: string
|
|
28
|
+
/** The time when tournament is going to start, epoch */
|
|
29
|
+
startTimeTs?: number
|
|
30
|
+
/** The time when tournament is going to finish, epoch */
|
|
31
|
+
endTimeTs?: number
|
|
32
|
+
/** Number of users registered in the tournament */
|
|
33
|
+
registrationCount?: number
|
|
34
|
+
/** Not in use */
|
|
35
|
+
totalCount?: number
|
|
36
|
+
/** Type of registration in the tournament */
|
|
37
|
+
registrationType?: TournamentRegistrationType
|
|
38
|
+
/** Status of registration in the tournament for current user */
|
|
39
|
+
tournamentRegistrationStatus?: TournamentRegistrationStatus
|
|
40
|
+
/** Status of tournament instance */
|
|
41
|
+
tournamentInstanceStatus?: TournamentInstanceStatus
|
|
42
|
+
/** flag indicating if current user is registered in the tournament */
|
|
43
|
+
isUserRegistered?: boolean
|
|
44
|
+
/** Indicator if tournament allows later registration, when tournament is already started */
|
|
45
|
+
allowLateRegistration?: boolean
|
|
46
|
+
/** Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start */
|
|
47
|
+
playersMinCount?: number
|
|
48
|
+
/** Maximum number of participant for this tournament. When reached, new users won't be able to register */
|
|
49
|
+
playersMaxCount?: number
|
|
50
|
+
/** Tournament duration in millisecnnds */
|
|
51
|
+
durationMs?: number
|
|
52
|
+
/** prizes structure */
|
|
53
|
+
prizeStructure?: {
|
|
54
|
+
prizes: TournamentPrize[]
|
|
55
|
+
}
|
|
56
|
+
/** Information about current user */
|
|
57
|
+
tournamentPlayer?: TournamentPlayer
|
|
58
|
+
|
|
59
|
+
/** List of casino games (or other types of entities) related to the tournament */
|
|
60
|
+
related_games?: AchRelatedGame[]
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return x;
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
|
|
63
|
+
export const TournamentItemsTransform = (items: Tournament[]): TTournament[] => {
|
|
64
|
+
return items
|
|
65
|
+
.filter((r) => r.tournamentId >= 1)
|
|
66
|
+
.map((r) => {
|
|
67
|
+
const x: TTournament = {
|
|
68
|
+
instance_id: r.tournamentInstanceId,
|
|
69
|
+
tournament_id: r.tournamentId,
|
|
70
|
+
name: r.publicMeta.name,
|
|
71
|
+
description: r.publicMeta.description,
|
|
72
|
+
segment_dont_match_message: r.publicMeta.segment_dont_match_message,
|
|
73
|
+
image1: r.publicMeta.image_url,
|
|
74
|
+
image2: r.publicMeta.image_url2,
|
|
75
|
+
image2_mobile: r.publicMeta.image_url2_mobile,
|
|
76
|
+
prize_pool_short: r.publicMeta.prize_pool_short,
|
|
77
|
+
custom_price_text: r.publicMeta.custom_price_text,
|
|
78
|
+
custom_section_id: r.publicMeta.custom_section_id,
|
|
79
|
+
custom_data: IntUtils.JsonOrText(r.publicMeta.custom_data),
|
|
80
|
+
is_featured: r.publicMeta.featured,
|
|
81
|
+
ribbon: r.publicMeta.label_tag === 'custom' ? r.publicMeta.custom_label_tag : r.publicMeta.label_tag,
|
|
82
|
+
priority: r.publicMeta.position,
|
|
83
|
+
|
|
84
|
+
start_time: r.startTimeTs,
|
|
85
|
+
end_time: r.endTimeTs,
|
|
86
|
+
registration_count: r.registrationCount,
|
|
87
|
+
is_user_registered: r.isUserRegistered,
|
|
88
|
+
players_min_count: r.playersMinCount,
|
|
89
|
+
players_max_count: r.playersMaxCount,
|
|
90
|
+
registration_status: TournamentRegistrationStatusNamed(r.tournamentRegistrationStatus),
|
|
91
|
+
|
|
92
|
+
registration_type: TournamentRegistrationTypeGetName(r.registrationType),
|
|
93
|
+
registration_cost_points: r.buyInAmount,
|
|
94
|
+
duration_ms: r.durationMs,
|
|
95
|
+
|
|
96
|
+
is_active: TournamentUtils.isActive(r),
|
|
97
|
+
is_can_register: TournamentUtils.isCanRegister(r),
|
|
98
|
+
is_cancelled: TournamentUtils.isCancelled(r),
|
|
99
|
+
is_finished: TournamentUtils.isFinished(r),
|
|
100
|
+
is_in_progress: TournamentUtils.isInProgress(r),
|
|
101
|
+
is_upcoming: TournamentUtils.isUpcoming(r),
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (r.prizeStructure) {
|
|
105
|
+
x.prizes = r.prizeStructure.prizes.map((p) => TournamentUtils.getPrizeTransformed(p))
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (r.tournamentPlayer) {
|
|
109
|
+
x.me = TournamentUtils.getPlayerTransformed(r.tournamentPlayer, true)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return x
|
|
113
|
+
})
|
|
119
114
|
}
|
|
120
|
-
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
export enum TournamentInstanceStatus {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
FINALIZING = 7,
|
|
2
|
+
PUBLISHED = 1,
|
|
3
|
+
REGISTER = 2,
|
|
4
|
+
STARTED = 3,
|
|
5
|
+
FINISHED = 4,
|
|
6
|
+
CANCELLED = 5,
|
|
7
|
+
FAILED = 6,
|
|
8
|
+
FINALIZING = 7,
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
export const TournamentInstanceStatusName = (s: TournamentInstanceStatus): string => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
12
|
+
return {
|
|
13
|
+
[TournamentInstanceStatus.PUBLISHED]: 'PUBLISHED',
|
|
14
|
+
[TournamentInstanceStatus.REGISTER]: 'REGISTER',
|
|
15
|
+
[TournamentInstanceStatus.STARTED]: 'STARTED',
|
|
16
|
+
[TournamentInstanceStatus.FINISHED]: 'FINISHED',
|
|
17
|
+
[TournamentInstanceStatus.CANCELLED]: 'CANCELLED',
|
|
18
|
+
[TournamentInstanceStatus.FAILED]: 'FAILED',
|
|
19
|
+
[TournamentInstanceStatus.FINALIZING]: 'FINALIZING',
|
|
20
|
+
}[s]
|
|
21
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export interface TournamentPlayer {
|
|
2
|
+
userAltName: string
|
|
3
|
+
position: number
|
|
4
|
+
scores: number
|
|
5
|
+
isMe: boolean
|
|
6
|
+
userId: number
|
|
7
|
+
avatar_id: string
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
position: number;
|
|
5
|
-
scores: number;
|
|
6
|
-
isMe: boolean;
|
|
7
|
-
userId: number;
|
|
8
|
-
avatar_id: string;
|
|
9
|
-
|
|
10
|
-
avatar_url?: string;
|
|
9
|
+
avatar_url?: string
|
|
11
10
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ActivityTypeLimited } from
|
|
1
|
+
import { ActivityTypeLimited } from '../Core/ActivityTypeLimited'
|
|
2
2
|
|
|
3
3
|
export interface TournamentPrize {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
4
|
+
name: string
|
|
5
|
+
description: string
|
|
6
|
+
image_url: string
|
|
7
|
+
place_from: number
|
|
8
|
+
place_to: number
|
|
9
|
+
type: ActivityTypeLimited
|
|
10
|
+
points: number
|
|
11
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
export interface TournamentPublicMeta {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
/** Name of tournament */
|
|
3
|
+
name?: string
|
|
4
|
+
/** 1st image */
|
|
5
|
+
image_url?: string
|
|
6
|
+
/** 2nd image */
|
|
7
|
+
image_url2?: string
|
|
8
|
+
/** 2nd image for mobile */
|
|
9
|
+
image_url2_mobile?: string
|
|
10
|
+
/** Description, html capable */
|
|
11
|
+
description?: string
|
|
12
|
+
/** Short explanation of prize pool */
|
|
13
|
+
prize_pool_short?: string
|
|
14
|
+
/** Message to show when user is not matching to the segment allowed to register (error code 30005 in registration response) */
|
|
15
|
+
segment_dont_match_message?: string
|
|
16
|
+
/** Short explanation of registration price */
|
|
17
|
+
custom_price_text?: string
|
|
18
|
+
/** Indicator if the scores of other users should be shown in the leaderboard of tournament */
|
|
19
|
+
show_other_users_score?: boolean
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
custom_section_id?: number
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
only_in_custom_section?: boolean
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
label_tag?: string
|
|
26
|
+
custom_label_tag?: string
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
featured?: boolean
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
position?: number
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
// custom data as string or JSON string that can be used in UIWidget
|
|
33
|
+
custom_data?: string
|
|
34
34
|
}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { ProtocolResponse } from
|
|
2
|
-
import { TournamentRegistrationError } from
|
|
1
|
+
import { ProtocolResponse } from '../Base/ProtocolResponse'
|
|
2
|
+
import { TournamentRegistrationError } from './TournamentRegistrationError'
|
|
3
3
|
|
|
4
4
|
export interface TournamentRegisterResponse extends ProtocolResponse {
|
|
5
|
-
|
|
6
|
-
errCode?: TournamentRegistrationError;
|
|
5
|
+
errCode?: TournamentRegistrationError
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export enum TournamentRegistrationError {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
NO_ERROR = 0,
|
|
3
|
+
TOURNAMENT_INSTANCE_NOT_FOUND = 30001,
|
|
4
|
+
TOURNAMENT_REGISTRATION_NOT_ENOUGH_POINTS = 30002,
|
|
5
|
+
TOURNAMENT_INSTANCE_NOT_IN_STATE = 30003,
|
|
6
|
+
TOURNAMENT_ALREADY_REGISTERED = 30004,
|
|
7
|
+
TOURNAMENT_USER_DONT_MATCH_CONDITIONS = 30005,
|
|
8
|
+
TOURNAMENT_USER_NOT_REGISTERED = 30006,
|
|
9
|
+
TOURNAMENT_CANT_CHANGE_REGISTRATION_STATUS = 30007,
|
|
10
|
+
TOURNAMENT_MAX_REGISTRATIONS_REACHED = 30008,
|
|
11
11
|
}
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
2
|
export enum TournamentRegistrationStatus {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
QUALIFIED_PENDING_REGISTRATION = 6
|
|
3
|
+
NOT_REGISTERED = 0,
|
|
4
|
+
REGISTERED = 1,
|
|
5
|
+
FINISHED = 2,
|
|
6
|
+
PENDING = 3,
|
|
7
|
+
CANCELLED = 4,
|
|
8
|
+
REGISTERED_PENDING_QUALIFICATION = 5,
|
|
9
|
+
QUALIFIED_PENDING_REGISTRATION = 6,
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export enum TournamentRegistrationStatusName {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
NOT_REGISTERED = 'NOT_REGISTERED',
|
|
14
|
+
REGISTERED = 'REGISTERED',
|
|
15
|
+
FINISHED = 'FINISHED',
|
|
16
|
+
PENDING = 'PENDING',
|
|
17
|
+
CANCELLED = 'CANCELLED',
|
|
18
|
+
REGISTERED_PENDING_QUALIFICATION = 'REGISTERED_PENDING_QUALIFICATION',
|
|
19
|
+
QUALIFIED_PENDING_REGISTRATION = 'QUALIFIED_PENDING_REGISTRATION',
|
|
20
|
+
UNKNOWN = 'UNKNOWN',
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
/** @hidden */
|
|
25
24
|
export const TournamentRegistrationStatusNamed = (type: TournamentRegistrationStatus): TournamentRegistrationStatusName => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
25
|
+
return ({
|
|
26
|
+
[TournamentRegistrationStatus.CANCELLED]: TournamentRegistrationStatusName.CANCELLED,
|
|
27
|
+
[TournamentRegistrationStatus.FINISHED]: TournamentRegistrationStatusName.FINISHED,
|
|
28
|
+
[TournamentRegistrationStatus.NOT_REGISTERED]: TournamentRegistrationStatusName.NOT_REGISTERED,
|
|
29
|
+
[TournamentRegistrationStatus.PENDING]: TournamentRegistrationStatusName.PENDING,
|
|
30
|
+
[TournamentRegistrationStatus.QUALIFIED_PENDING_REGISTRATION]: TournamentRegistrationStatusName.QUALIFIED_PENDING_REGISTRATION,
|
|
31
|
+
[TournamentRegistrationStatus.REGISTERED]: TournamentRegistrationStatusName.REGISTERED,
|
|
32
|
+
[TournamentRegistrationStatus.REGISTERED_PENDING_QUALIFICATION]: TournamentRegistrationStatusName.REGISTERED_PENDING_QUALIFICATION,
|
|
33
|
+
}[type] || TournamentRegistrationStatusName.UNKNOWN) as TournamentRegistrationStatusName
|
|
34
|
+
}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
2
|
export enum TournamentRegistrationType {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// BUY_IN_CASH = 5???,
|
|
3
|
+
AUTO = 1,
|
|
4
|
+
OPT_IN = 2,
|
|
5
|
+
BUY_IN_POINTS = 3,
|
|
6
|
+
MANUAL_APPROVAL = 4,
|
|
7
|
+
REQUIRES_QUALIFICATION = 5,
|
|
8
|
+
// BUY_IN_CASH = 5???,
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
export type TournamentRegistrationTypeName = 'AUTO' | 'OPT_IN' | 'BUY_IN_POINTS' | 'MANUAL_APPROVAL' | 'REQUIRES_QUALIFICATION' | 'UNKNOWN'
|
|
11
|
+
export type TournamentRegistrationTypeName = 'AUTO' | 'OPT_IN' | 'BUY_IN_POINTS' | 'MANUAL_APPROVAL' | 'REQUIRES_QUALIFICATION' | 'UNKNOWN'
|
|
13
12
|
|
|
14
13
|
/** @hidden */
|
|
15
14
|
export const TournamentRegistrationTypeGetName = (type: TournamentRegistrationType): TournamentRegistrationTypeName => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
15
|
+
return ({
|
|
16
|
+
[TournamentRegistrationType.AUTO]: 'AUTO',
|
|
17
|
+
[TournamentRegistrationType.BUY_IN_POINTS]: 'BUY_IN_POINTS',
|
|
18
|
+
[TournamentRegistrationType.MANUAL_APPROVAL]: 'MANUAL_APPROVAL',
|
|
19
|
+
[TournamentRegistrationType.OPT_IN]: 'OPT_IN',
|
|
20
|
+
[TournamentRegistrationType.REQUIRES_QUALIFICATION]: 'REQUIRES_QUALIFICATION',
|
|
21
|
+
}[type] || 'UNKNOWN') as any as TournamentRegistrationTypeName
|
|
22
|
+
}
|