@footballbingo/client 1.0.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/README.md +420 -0
- package/dist/FootballBingoClient.d.ts +88 -0
- package/dist/FootballBingoClient.js +100 -0
- package/dist/core/ApiError.d.ts +10 -0
- package/dist/core/ApiError.js +15 -0
- package/dist/core/ApiRequestOptions.d.ts +13 -0
- package/dist/core/ApiRequestOptions.js +2 -0
- package/dist/core/ApiResult.d.ts +7 -0
- package/dist/core/ApiResult.js +2 -0
- package/dist/core/BaseHttpRequest.d.ts +8 -0
- package/dist/core/BaseHttpRequest.js +9 -0
- package/dist/core/CancelablePromise.d.ts +20 -0
- package/dist/core/CancelablePromise.js +116 -0
- package/dist/core/FetchHttpRequest.d.ts +14 -0
- package/dist/core/FetchHttpRequest.js +20 -0
- package/dist/core/OpenAPI.d.ts +16 -0
- package/dist/core/OpenAPI.js +14 -0
- package/dist/core/request.d.ts +30 -0
- package/dist/core/request.js +294 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +139 -0
- package/dist/models/Achievement.d.ts +12 -0
- package/dist/models/Achievement.js +2 -0
- package/dist/models/ApiError.d.ts +2 -0
- package/dist/models/ApiError.js +2 -0
- package/dist/models/ApiErrorDTO.d.ts +9 -0
- package/dist/models/ApiErrorDTO.js +2 -0
- package/dist/models/ApiResponse.d.ts +2 -0
- package/dist/models/ApiResponse.js +2 -0
- package/dist/models/ApiResponseDTO.d.ts +10 -0
- package/dist/models/ApiResponseDTO.js +2 -0
- package/dist/models/BingoBoard.d.ts +8 -0
- package/dist/models/BingoBoard.js +2 -0
- package/dist/models/BingoGame.d.ts +19 -0
- package/dist/models/BingoGame.js +13 -0
- package/dist/models/BingoTile.d.ts +8 -0
- package/dist/models/BingoTile.js +2 -0
- package/dist/models/Challenge.d.ts +24 -0
- package/dist/models/Challenge.js +18 -0
- package/dist/models/ChatMessage.d.ts +17 -0
- package/dist/models/ChatMessage.js +12 -0
- package/dist/models/ChatSession.d.ts +13 -0
- package/dist/models/ChatSession.js +2 -0
- package/dist/models/CommunityChallengeDTO.d.ts +32 -0
- package/dist/models/CommunityChallengeDTO.js +19 -0
- package/dist/models/CompletedLine.d.ts +12 -0
- package/dist/models/CompletedLine.js +12 -0
- package/dist/models/CountryDTO.d.ts +5 -0
- package/dist/models/CountryDTO.js +2 -0
- package/dist/models/CreateChallengeRequestDTO.d.ts +22 -0
- package/dist/models/CreateChallengeRequestDTO.js +19 -0
- package/dist/models/CreatePredictionRequestDTO.d.ts +24 -0
- package/dist/models/CreatePredictionRequestDTO.js +12 -0
- package/dist/models/CurrencyTransaction.d.ts +27 -0
- package/dist/models/CurrencyTransaction.js +21 -0
- package/dist/models/DailyLoginRewardDTO.d.ts +13 -0
- package/dist/models/DailyLoginRewardDTO.js +2 -0
- package/dist/models/ErrorResponse.d.ts +5 -0
- package/dist/models/ErrorResponse.js +2 -0
- package/dist/models/FixtureDTO.d.ts +36 -0
- package/dist/models/FixtureDTO.js +16 -0
- package/dist/models/FixtureDetailDTO.d.ts +13 -0
- package/dist/models/FixtureDetailDTO.js +2 -0
- package/dist/models/GameChatMessageDTO.d.ts +20 -0
- package/dist/models/GameChatMessageDTO.js +13 -0
- package/dist/models/GetLeaderboardResponseDTO.d.ts +29 -0
- package/dist/models/GetLeaderboardResponseDTO.js +22 -0
- package/dist/models/GetUserInventoryResponseDTO.d.ts +28 -0
- package/dist/models/GetUserInventoryResponseDTO.js +2 -0
- package/dist/models/LeaderboardEntry.d.ts +10 -0
- package/dist/models/LeaderboardEntry.js +2 -0
- package/dist/models/LeaderboardResponseDTO.d.ts +26 -0
- package/dist/models/LeaderboardResponseDTO.js +13 -0
- package/dist/models/League.d.ts +7 -0
- package/dist/models/League.js +2 -0
- package/dist/models/LeagueDetailDTO.d.ts +17 -0
- package/dist/models/LeagueDetailDTO.js +2 -0
- package/dist/models/LineupDTO.d.ts +25 -0
- package/dist/models/LineupDTO.js +2 -0
- package/dist/models/LineupPrediction.d.ts +9 -0
- package/dist/models/LineupPrediction.js +2 -0
- package/dist/models/MatchEvent.d.ts +27 -0
- package/dist/models/MatchEvent.js +13 -0
- package/dist/models/NewsArticleDTO.d.ts +13 -0
- package/dist/models/NewsArticleDTO.js +2 -0
- package/dist/models/PaginationMeta.d.ts +2 -0
- package/dist/models/PaginationMeta.js +2 -0
- package/dist/models/PaginationMetaDTO.d.ts +7 -0
- package/dist/models/PaginationMetaDTO.js +2 -0
- package/dist/models/PlayerDTO.d.ts +18 -0
- package/dist/models/PlayerDTO.js +2 -0
- package/dist/models/PlayerStatisticsDTO.d.ts +25 -0
- package/dist/models/PlayerStatisticsDTO.js +2 -0
- package/dist/models/PredictionDTO.d.ts +31 -0
- package/dist/models/PredictionDTO.js +18 -0
- package/dist/models/PredictionWithLineupDTO.d.ts +8 -0
- package/dist/models/PredictionWithLineupDTO.js +2 -0
- package/dist/models/Pundit.d.ts +8 -0
- package/dist/models/Pundit.js +2 -0
- package/dist/models/Purchase.d.ts +16 -0
- package/dist/models/Purchase.js +12 -0
- package/dist/models/PurchaseResponseDTO.d.ts +25 -0
- package/dist/models/PurchaseResponseDTO.js +12 -0
- package/dist/models/Score.d.ts +4 -0
- package/dist/models/Score.js +2 -0
- package/dist/models/SendChatMessageRequestDTO.d.ts +12 -0
- package/dist/models/SendChatMessageRequestDTO.js +12 -0
- package/dist/models/ShareGameRequestDTO.d.ts +6 -0
- package/dist/models/ShareGameRequestDTO.js +2 -0
- package/dist/models/SharedGameDTO.d.ts +17 -0
- package/dist/models/SharedGameDTO.js +2 -0
- package/dist/models/StandingsDTO.d.ts +19 -0
- package/dist/models/StandingsDTO.js +2 -0
- package/dist/models/StoreItemDTO.d.ts +47 -0
- package/dist/models/StoreItemDTO.js +29 -0
- package/dist/models/TacticsBoardDTO.d.ts +32 -0
- package/dist/models/TacticsBoardDTO.js +2 -0
- package/dist/models/Team.d.ts +6 -0
- package/dist/models/Team.js +2 -0
- package/dist/models/TeamDetailDTO.d.ts +16 -0
- package/dist/models/TeamDetailDTO.js +2 -0
- package/dist/models/TeamStatisticsDTO.d.ts +12 -0
- package/dist/models/TeamStatisticsDTO.js +2 -0
- package/dist/models/TransactionHistoryDTO.d.ts +9 -0
- package/dist/models/TransactionHistoryDTO.js +2 -0
- package/dist/models/TransferDTO.d.ts +14 -0
- package/dist/models/TransferDTO.js +2 -0
- package/dist/models/TransferPlanDTO.d.ts +45 -0
- package/dist/models/TransferPlanDTO.js +12 -0
- package/dist/models/TrophyDTO.d.ts +6 -0
- package/dist/models/TrophyDTO.js +2 -0
- package/dist/models/UserDTO.d.ts +11 -0
- package/dist/models/UserDTO.js +2 -0
- package/dist/models/UserProfileDTO.d.ts +13 -0
- package/dist/models/UserProfileDTO.js +2 -0
- package/dist/models/UserPurchaseDTO.d.ts +26 -0
- package/dist/models/UserPurchaseDTO.js +19 -0
- package/dist/models/WalletBalance.d.ts +5 -0
- package/dist/models/WalletBalance.js +2 -0
- package/dist/models/WalletSummaryDTO.d.ts +16 -0
- package/dist/models/WalletSummaryDTO.js +2 -0
- package/dist/services/AchievementsDeprecatedService.d.ts +148 -0
- package/dist/services/AchievementsDeprecatedService.js +183 -0
- package/dist/services/AchievementsService.d.ts +204 -0
- package/dist/services/AchievementsService.js +197 -0
- package/dist/services/ActivitiesService.d.ts +27 -0
- package/dist/services/ActivitiesService.js +29 -0
- package/dist/services/AdminPurchasesService.d.ts +64 -0
- package/dist/services/AdminPurchasesService.js +109 -0
- package/dist/services/AdminService.d.ts +349 -0
- package/dist/services/AdminService.js +232 -0
- package/dist/services/AdminUsersService.d.ts +64 -0
- package/dist/services/AdminUsersService.js +103 -0
- package/dist/services/AiChatService.d.ts +70 -0
- package/dist/services/AiChatService.js +52 -0
- package/dist/services/ChallengesService.d.ts +215 -0
- package/dist/services/ChallengesService.js +215 -0
- package/dist/services/CommunityChallengesService.d.ts +111 -0
- package/dist/services/CommunityChallengesService.js +150 -0
- package/dist/services/CommunityGameChatService.d.ts +105 -0
- package/dist/services/CommunityGameChatService.js +150 -0
- package/dist/services/CommunityLineupsService.d.ts +197 -0
- package/dist/services/CommunityLineupsService.js +264 -0
- package/dist/services/CommunitySharedGamesService.d.ts +124 -0
- package/dist/services/CommunitySharedGamesService.js +172 -0
- package/dist/services/CommunityTacticsBoardsService.d.ts +230 -0
- package/dist/services/CommunityTacticsBoardsService.js +272 -0
- package/dist/services/CommunityTransferPlansService.d.ts +231 -0
- package/dist/services/CommunityTransferPlansService.js +291 -0
- package/dist/services/ContentCountriesService.d.ts +30 -0
- package/dist/services/ContentCountriesService.js +53 -0
- package/dist/services/ContentFixturesService.d.ts +51 -0
- package/dist/services/ContentFixturesService.js +88 -0
- package/dist/services/ContentLeaguesService.d.ts +32 -0
- package/dist/services/ContentLeaguesService.js +57 -0
- package/dist/services/ContentNewsService.d.ts +158 -0
- package/dist/services/ContentNewsService.js +255 -0
- package/dist/services/ContentOddsService.d.ts +81 -0
- package/dist/services/ContentOddsService.js +137 -0
- package/dist/services/ContentPlayersService.d.ts +64 -0
- package/dist/services/ContentPlayersService.js +104 -0
- package/dist/services/ContentStandingsService.d.ts +20 -0
- package/dist/services/ContentStandingsService.js +33 -0
- package/dist/services/ContentStatisticsService.d.ts +51 -0
- package/dist/services/ContentStatisticsService.js +83 -0
- package/dist/services/ContentTeamsService.d.ts +67 -0
- package/dist/services/ContentTeamsService.js +106 -0
- package/dist/services/ContentTransfersService.d.ts +23 -0
- package/dist/services/ContentTransfersService.js +38 -0
- package/dist/services/ContentTrophiesService.d.ts +23 -0
- package/dist/services/ContentTrophiesService.js +38 -0
- package/dist/services/DailyChallengeCompletionsDeprecatedService.d.ts +78 -0
- package/dist/services/DailyChallengeCompletionsDeprecatedService.js +130 -0
- package/dist/services/DailyChallengesDeprecatedService.d.ts +117 -0
- package/dist/services/DailyChallengesDeprecatedService.js +179 -0
- package/dist/services/DailyLoginService.d.ts +109 -0
- package/dist/services/DailyLoginService.js +111 -0
- package/dist/services/DailyStreaksDeprecatedService.d.ts +80 -0
- package/dist/services/DailyStreaksDeprecatedService.js +130 -0
- package/dist/services/EventPoolsService.d.ts +104 -0
- package/dist/services/EventPoolsService.js +118 -0
- package/dist/services/LeaderboardService.d.ts +18 -0
- package/dist/services/LeaderboardService.js +35 -0
- package/dist/services/NotificationsService.d.ts +143 -0
- package/dist/services/NotificationsService.js +159 -0
- package/dist/services/PredictionsService.d.ts +223 -0
- package/dist/services/PredictionsService.js +204 -0
- package/dist/services/ProgressionService.d.ts +163 -0
- package/dist/services/ProgressionService.js +149 -0
- package/dist/services/SponsorsService.d.ts +105 -0
- package/dist/services/SponsorsService.js +118 -0
- package/dist/services/StoreService.d.ts +92 -0
- package/dist/services/StoreService.js +147 -0
- package/dist/services/UserAchievementsDeprecatedService.d.ts +146 -0
- package/dist/services/UserAchievementsDeprecatedService.js +209 -0
- package/dist/services/UserActivitiesService.d.ts +48 -0
- package/dist/services/UserActivitiesService.js +65 -0
- package/dist/services/UsersService.d.ts +156 -0
- package/dist/services/UsersService.js +244 -0
- package/dist/services/WalletService.d.ts +31 -0
- package/dist/services/WalletService.js +53 -0
- package/package.json +37 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LeaderboardService = void 0;
|
|
4
|
+
class LeaderboardService {
|
|
5
|
+
constructor(httpRequest) {
|
|
6
|
+
this.httpRequest = httpRequest;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Get leaderboard rankings
|
|
10
|
+
* Retrieve leaderboard rankings for various categories and time periods. Supports multiple leaderboard types including bingo wins, predictions, content creators, XP levels, speed runs, high scores, and streaks.
|
|
11
|
+
* @param category Leaderboard category to retrieve
|
|
12
|
+
* @param period Time period for rankings
|
|
13
|
+
* @param limit Number of top entries to return
|
|
14
|
+
* @param streakType Streak type (only applicable for bingo-streaks category)
|
|
15
|
+
* @returns GetLeaderboardResponseDTO Leaderboard data retrieved successfully
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
getApiV1Leaderboard(category, period = 'week', limit = 10, streakType = 'current') {
|
|
19
|
+
return this.httpRequest.request({
|
|
20
|
+
method: 'GET',
|
|
21
|
+
url: '/api/v1/leaderboard',
|
|
22
|
+
query: {
|
|
23
|
+
'category': category,
|
|
24
|
+
'period': period,
|
|
25
|
+
'limit': limit,
|
|
26
|
+
'streakType': streakType,
|
|
27
|
+
},
|
|
28
|
+
errors: {
|
|
29
|
+
400: `Invalid parameters (category, period, limit, or streakType)`,
|
|
30
|
+
500: `Server error while fetching leaderboard`,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.LeaderboardService = LeaderboardService;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
2
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
3
|
+
export declare class NotificationsService {
|
|
4
|
+
readonly httpRequest: BaseHttpRequest;
|
|
5
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
6
|
+
/**
|
|
7
|
+
* Register device for push notifications
|
|
8
|
+
* Register a device token for push notifications. Supports iOS, Android, and web platforms.
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns any Device token registered successfully
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
postApiV1NotificationsRegister(requestBody: {
|
|
14
|
+
/**
|
|
15
|
+
* Device push notification token
|
|
16
|
+
*/
|
|
17
|
+
token: string;
|
|
18
|
+
/**
|
|
19
|
+
* Device platform
|
|
20
|
+
*/
|
|
21
|
+
platform: 'ios' | 'android' | 'web';
|
|
22
|
+
/**
|
|
23
|
+
* Optional device information
|
|
24
|
+
*/
|
|
25
|
+
deviceInfo?: {
|
|
26
|
+
model?: string;
|
|
27
|
+
osVersion?: string;
|
|
28
|
+
};
|
|
29
|
+
}): CancelablePromise<{
|
|
30
|
+
success?: boolean;
|
|
31
|
+
data?: {
|
|
32
|
+
message?: string;
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Update notification preferences
|
|
37
|
+
* Update user's notification preferences for different types of notifications
|
|
38
|
+
* @param requestBody
|
|
39
|
+
* @returns any Preferences updated successfully
|
|
40
|
+
* @throws ApiError
|
|
41
|
+
*/
|
|
42
|
+
putApiV1NotificationsPreferences(requestBody: {
|
|
43
|
+
gameStartReminders?: boolean;
|
|
44
|
+
gameResults?: boolean;
|
|
45
|
+
predictionResults?: boolean;
|
|
46
|
+
dailyChallenges?: boolean;
|
|
47
|
+
newsUpdates?: boolean;
|
|
48
|
+
achievements?: boolean;
|
|
49
|
+
leaderboardUpdates?: boolean;
|
|
50
|
+
multiplayerInvites?: boolean;
|
|
51
|
+
}): CancelablePromise<{
|
|
52
|
+
success?: boolean;
|
|
53
|
+
data?: {
|
|
54
|
+
message?: string;
|
|
55
|
+
preferences?: Record<string, any>;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Get notification preferences
|
|
60
|
+
* Retrieve the user's current notification preferences
|
|
61
|
+
* @returns any Preferences retrieved successfully
|
|
62
|
+
* @throws ApiError
|
|
63
|
+
*/
|
|
64
|
+
getApiV1NotificationsPreferences(): CancelablePromise<{
|
|
65
|
+
success?: boolean;
|
|
66
|
+
data?: {
|
|
67
|
+
preferences?: Record<string, any>;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Unsubscribe from push notifications
|
|
72
|
+
* Unsubscribe a specific device or all devices from push notifications
|
|
73
|
+
* @param requestBody
|
|
74
|
+
* @returns any Unsubscribed successfully
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
postApiV1NotificationsUnsubscribe(requestBody?: {
|
|
78
|
+
/**
|
|
79
|
+
* Specific device token to unsubscribe (omit to unsubscribe all devices)
|
|
80
|
+
*/
|
|
81
|
+
token?: string;
|
|
82
|
+
}): CancelablePromise<{
|
|
83
|
+
success?: boolean;
|
|
84
|
+
data?: {
|
|
85
|
+
message?: string;
|
|
86
|
+
};
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* Get notification history
|
|
90
|
+
* Retrieve the user's notification history with pagination
|
|
91
|
+
* @param limit Number of notifications to return
|
|
92
|
+
* @param offset Pagination offset
|
|
93
|
+
* @returns any Notification history retrieved successfully
|
|
94
|
+
* @throws ApiError
|
|
95
|
+
*/
|
|
96
|
+
getApiV1NotificationsHistory(limit?: number, offset?: number): CancelablePromise<{
|
|
97
|
+
success?: boolean;
|
|
98
|
+
data?: {
|
|
99
|
+
notifications?: Array<Record<string, any>>;
|
|
100
|
+
unreadCount?: number;
|
|
101
|
+
pagination?: Record<string, any>;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
/**
|
|
105
|
+
* Mark notification as read
|
|
106
|
+
* Mark a specific notification as read for the authenticated user
|
|
107
|
+
* @param id Notification ID
|
|
108
|
+
* @returns any Notification marked as read
|
|
109
|
+
* @throws ApiError
|
|
110
|
+
*/
|
|
111
|
+
putApiV1NotificationsRead(id: string): CancelablePromise<{
|
|
112
|
+
success?: boolean;
|
|
113
|
+
data?: {
|
|
114
|
+
message?: string;
|
|
115
|
+
};
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* Get unread notification count
|
|
119
|
+
* Get the count of unread notifications for the authenticated user
|
|
120
|
+
* @returns any Unread count retrieved successfully
|
|
121
|
+
* @throws ApiError
|
|
122
|
+
*/
|
|
123
|
+
getApiV1NotificationsUnreadCount(): CancelablePromise<{
|
|
124
|
+
success?: boolean;
|
|
125
|
+
data?: {
|
|
126
|
+
unreadCount?: number;
|
|
127
|
+
};
|
|
128
|
+
}>;
|
|
129
|
+
/**
|
|
130
|
+
* Send test notification
|
|
131
|
+
* Send a test notification to the authenticated user (for development/testing)
|
|
132
|
+
* @returns any Test notification sent
|
|
133
|
+
* @throws ApiError
|
|
134
|
+
*/
|
|
135
|
+
postApiV1NotificationsTest(): CancelablePromise<{
|
|
136
|
+
success?: boolean;
|
|
137
|
+
data?: {
|
|
138
|
+
sent?: number;
|
|
139
|
+
failed?: number;
|
|
140
|
+
message?: string;
|
|
141
|
+
};
|
|
142
|
+
}>;
|
|
143
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationsService = void 0;
|
|
4
|
+
class NotificationsService {
|
|
5
|
+
constructor(httpRequest) {
|
|
6
|
+
this.httpRequest = httpRequest;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Register device for push notifications
|
|
10
|
+
* Register a device token for push notifications. Supports iOS, Android, and web platforms.
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns any Device token registered successfully
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
postApiV1NotificationsRegister(requestBody) {
|
|
16
|
+
return this.httpRequest.request({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
url: '/api/v1/notifications/register',
|
|
19
|
+
body: requestBody,
|
|
20
|
+
mediaType: 'application/json',
|
|
21
|
+
errors: {
|
|
22
|
+
400: `Invalid request - missing token or invalid platform`,
|
|
23
|
+
401: `User not authenticated`,
|
|
24
|
+
500: `Server error while registering token`,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Update notification preferences
|
|
30
|
+
* Update user's notification preferences for different types of notifications
|
|
31
|
+
* @param requestBody
|
|
32
|
+
* @returns any Preferences updated successfully
|
|
33
|
+
* @throws ApiError
|
|
34
|
+
*/
|
|
35
|
+
putApiV1NotificationsPreferences(requestBody) {
|
|
36
|
+
return this.httpRequest.request({
|
|
37
|
+
method: 'PUT',
|
|
38
|
+
url: '/api/v1/notifications/preferences',
|
|
39
|
+
body: requestBody,
|
|
40
|
+
mediaType: 'application/json',
|
|
41
|
+
errors: {
|
|
42
|
+
400: `Invalid preference keys`,
|
|
43
|
+
401: `User not authenticated`,
|
|
44
|
+
500: `Server error`,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get notification preferences
|
|
50
|
+
* Retrieve the user's current notification preferences
|
|
51
|
+
* @returns any Preferences retrieved successfully
|
|
52
|
+
* @throws ApiError
|
|
53
|
+
*/
|
|
54
|
+
getApiV1NotificationsPreferences() {
|
|
55
|
+
return this.httpRequest.request({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
url: '/api/v1/notifications/preferences',
|
|
58
|
+
errors: {
|
|
59
|
+
401: `User not authenticated`,
|
|
60
|
+
500: `Server error`,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Unsubscribe from push notifications
|
|
66
|
+
* Unsubscribe a specific device or all devices from push notifications
|
|
67
|
+
* @param requestBody
|
|
68
|
+
* @returns any Unsubscribed successfully
|
|
69
|
+
* @throws ApiError
|
|
70
|
+
*/
|
|
71
|
+
postApiV1NotificationsUnsubscribe(requestBody) {
|
|
72
|
+
return this.httpRequest.request({
|
|
73
|
+
method: 'POST',
|
|
74
|
+
url: '/api/v1/notifications/unsubscribe',
|
|
75
|
+
body: requestBody,
|
|
76
|
+
mediaType: 'application/json',
|
|
77
|
+
errors: {
|
|
78
|
+
401: `User not authenticated`,
|
|
79
|
+
500: `Server error`,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get notification history
|
|
85
|
+
* Retrieve the user's notification history with pagination
|
|
86
|
+
* @param limit Number of notifications to return
|
|
87
|
+
* @param offset Pagination offset
|
|
88
|
+
* @returns any Notification history retrieved successfully
|
|
89
|
+
* @throws ApiError
|
|
90
|
+
*/
|
|
91
|
+
getApiV1NotificationsHistory(limit = 50, offset) {
|
|
92
|
+
return this.httpRequest.request({
|
|
93
|
+
method: 'GET',
|
|
94
|
+
url: '/api/v1/notifications/history',
|
|
95
|
+
query: {
|
|
96
|
+
'limit': limit,
|
|
97
|
+
'offset': offset,
|
|
98
|
+
},
|
|
99
|
+
errors: {
|
|
100
|
+
401: `User not authenticated`,
|
|
101
|
+
500: `Server error`,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Mark notification as read
|
|
107
|
+
* Mark a specific notification as read for the authenticated user
|
|
108
|
+
* @param id Notification ID
|
|
109
|
+
* @returns any Notification marked as read
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
putApiV1NotificationsRead(id) {
|
|
113
|
+
return this.httpRequest.request({
|
|
114
|
+
method: 'PUT',
|
|
115
|
+
url: '/api/v1/notifications/{id}/read',
|
|
116
|
+
path: {
|
|
117
|
+
'id': id,
|
|
118
|
+
},
|
|
119
|
+
errors: {
|
|
120
|
+
400: `Notification ID is required`,
|
|
121
|
+
401: `User not authenticated`,
|
|
122
|
+
500: `Server error`,
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get unread notification count
|
|
128
|
+
* Get the count of unread notifications for the authenticated user
|
|
129
|
+
* @returns any Unread count retrieved successfully
|
|
130
|
+
* @throws ApiError
|
|
131
|
+
*/
|
|
132
|
+
getApiV1NotificationsUnreadCount() {
|
|
133
|
+
return this.httpRequest.request({
|
|
134
|
+
method: 'GET',
|
|
135
|
+
url: '/api/v1/notifications/unread-count',
|
|
136
|
+
errors: {
|
|
137
|
+
401: `User not authenticated`,
|
|
138
|
+
500: `Server error`,
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Send test notification
|
|
144
|
+
* Send a test notification to the authenticated user (for development/testing)
|
|
145
|
+
* @returns any Test notification sent
|
|
146
|
+
* @throws ApiError
|
|
147
|
+
*/
|
|
148
|
+
postApiV1NotificationsTest() {
|
|
149
|
+
return this.httpRequest.request({
|
|
150
|
+
method: 'POST',
|
|
151
|
+
url: '/api/v1/notifications/test',
|
|
152
|
+
errors: {
|
|
153
|
+
401: `User not authenticated`,
|
|
154
|
+
500: `Server error`,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.NotificationsService = NotificationsService;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import type { CreatePredictionRequestDTO } from '../models/CreatePredictionRequestDTO';
|
|
2
|
+
import type { PredictionDTO } from '../models/PredictionDTO';
|
|
3
|
+
import type { PredictionWithLineupDTO } from '../models/PredictionWithLineupDTO';
|
|
4
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
6
|
+
export declare class PredictionsService {
|
|
7
|
+
readonly httpRequest: BaseHttpRequest;
|
|
8
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
9
|
+
/**
|
|
10
|
+
* Create or update prediction
|
|
11
|
+
* Submit a prediction for a fixture (score, first scorer, MOTM, lineup)
|
|
12
|
+
* @param requestBody
|
|
13
|
+
* @returns any Prediction saved successfully
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
postApiV1Predictions(requestBody: CreatePredictionRequestDTO): CancelablePromise<{
|
|
17
|
+
success?: boolean;
|
|
18
|
+
data?: {
|
|
19
|
+
prediction?: PredictionDTO;
|
|
20
|
+
message?: string;
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Get user's predictions
|
|
25
|
+
* Retrieve authenticated user's predictions with optional filters and pagination
|
|
26
|
+
* @param status Filter predictions by status
|
|
27
|
+
* @param fixtureId Filter by specific fixture ID
|
|
28
|
+
* @param date Filter by date (YYYY-MM-DD)
|
|
29
|
+
* @param limit Number of predictions to return
|
|
30
|
+
* @param page Page number for pagination
|
|
31
|
+
* @returns any Predictions retrieved successfully
|
|
32
|
+
* @throws ApiError
|
|
33
|
+
*/
|
|
34
|
+
getApiV1Predictions(status?: 'upcoming' | 'resolved' | 'all', fixtureId?: string, date?: string, limit?: number, page?: number): CancelablePromise<{
|
|
35
|
+
success?: boolean;
|
|
36
|
+
data?: {
|
|
37
|
+
predictions?: Array<PredictionWithLineupDTO>;
|
|
38
|
+
pagination?: {
|
|
39
|
+
page?: number;
|
|
40
|
+
limit?: number;
|
|
41
|
+
total?: number;
|
|
42
|
+
hasMore?: boolean;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Get prediction by fixture
|
|
48
|
+
* Retrieve authenticated user's prediction for a specific fixture
|
|
49
|
+
* @param fixtureId The fixture ID
|
|
50
|
+
* @returns any Prediction retrieved successfully
|
|
51
|
+
* @throws ApiError
|
|
52
|
+
*/
|
|
53
|
+
getApiV1Predictions1(fixtureId: string): CancelablePromise<{
|
|
54
|
+
success?: boolean;
|
|
55
|
+
data?: {
|
|
56
|
+
prediction?: PredictionWithLineupDTO;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Delete a prediction
|
|
61
|
+
* Delete user's prediction for a specific fixture (only allowed before fixture locks)
|
|
62
|
+
* @param fixtureId The fixture ID
|
|
63
|
+
* @returns any Prediction deleted successfully
|
|
64
|
+
* @throws ApiError
|
|
65
|
+
*/
|
|
66
|
+
deleteApiV1Predictions(fixtureId: string): CancelablePromise<{
|
|
67
|
+
success?: boolean;
|
|
68
|
+
message?: string;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Get user statistics
|
|
72
|
+
* Retrieve authenticated user's prediction statistics and performance metrics
|
|
73
|
+
* @returns any User statistics retrieved successfully
|
|
74
|
+
* @throws ApiError
|
|
75
|
+
*/
|
|
76
|
+
getApiV1PredictionsStats(): CancelablePromise<{
|
|
77
|
+
success?: boolean;
|
|
78
|
+
stats?: {
|
|
79
|
+
/**
|
|
80
|
+
* Total number of predictions made
|
|
81
|
+
*/
|
|
82
|
+
totalPredictions?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Number of resolved predictions
|
|
85
|
+
*/
|
|
86
|
+
resolvedPredictions?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Number of exact score predictions
|
|
89
|
+
*/
|
|
90
|
+
correctScores?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Number of correct result predictions
|
|
93
|
+
*/
|
|
94
|
+
correctResults?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Number of correct first scorer predictions
|
|
97
|
+
*/
|
|
98
|
+
correctFirstScorer?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Number of correct MOTM predictions
|
|
101
|
+
*/
|
|
102
|
+
correctMOTM?: number;
|
|
103
|
+
totalLineupPredictions?: number;
|
|
104
|
+
perfectLineups?: number;
|
|
105
|
+
avgLineupAccuracy?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Overall prediction accuracy percentage
|
|
108
|
+
*/
|
|
109
|
+
accuracy?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Exact score accuracy percentage
|
|
112
|
+
*/
|
|
113
|
+
scoreAccuracy?: number;
|
|
114
|
+
avgPointsPerPrediction?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Total points earned
|
|
117
|
+
*/
|
|
118
|
+
totalPoints?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Current correct prediction streak
|
|
121
|
+
*/
|
|
122
|
+
currentStreak?: number;
|
|
123
|
+
/**
|
|
124
|
+
* Longest correct prediction streak
|
|
125
|
+
*/
|
|
126
|
+
longestStreak?: number;
|
|
127
|
+
lastCorrectAt?: string | null;
|
|
128
|
+
/**
|
|
129
|
+
* User's global ranking
|
|
130
|
+
*/
|
|
131
|
+
globalRank?: number | null;
|
|
132
|
+
};
|
|
133
|
+
}>;
|
|
134
|
+
/**
|
|
135
|
+
* Get prediction leaderboard
|
|
136
|
+
* Retrieve global prediction leaderboard with optional filters (public endpoint, personalized if authenticated)
|
|
137
|
+
* @param timeframe Leaderboard timeframe
|
|
138
|
+
* @param limit Number of entries to return
|
|
139
|
+
* @param metric Leaderboard ranking metric
|
|
140
|
+
* @returns any Leaderboard retrieved successfully
|
|
141
|
+
* @throws ApiError
|
|
142
|
+
*/
|
|
143
|
+
getApiV1PredictionsLeaderboard(timeframe?: 'all' | 'month' | 'week', limit?: number, metric?: 'points' | 'accuracy' | 'streak'): CancelablePromise<{
|
|
144
|
+
success?: boolean;
|
|
145
|
+
leaderboard?: Array<{
|
|
146
|
+
rank?: number;
|
|
147
|
+
userId?: string;
|
|
148
|
+
username?: string;
|
|
149
|
+
avatar?: string;
|
|
150
|
+
score?: number;
|
|
151
|
+
accuracy?: number;
|
|
152
|
+
totalPredictions?: number;
|
|
153
|
+
}>;
|
|
154
|
+
/**
|
|
155
|
+
* Current user's ranking (if authenticated)
|
|
156
|
+
*/
|
|
157
|
+
userRank?: Record<string, any> | null;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* Get community predictions for fixture
|
|
161
|
+
* Retrieve aggregated community predictions for a specific fixture (public endpoint, personalized if authenticated)
|
|
162
|
+
* @param fixtureId The fixture ID
|
|
163
|
+
* @returns any Community predictions retrieved successfully
|
|
164
|
+
* @throws ApiError
|
|
165
|
+
*/
|
|
166
|
+
getApiV1PredictionsFixtureCommunity(fixtureId: string): CancelablePromise<{
|
|
167
|
+
success?: boolean;
|
|
168
|
+
fixtureId?: string;
|
|
169
|
+
totalPredictions?: number;
|
|
170
|
+
resultDistribution?: {
|
|
171
|
+
home?: number;
|
|
172
|
+
away?: number;
|
|
173
|
+
draw?: number;
|
|
174
|
+
};
|
|
175
|
+
averageScorePrediction?: {
|
|
176
|
+
home?: number;
|
|
177
|
+
away?: number;
|
|
178
|
+
};
|
|
179
|
+
topPredictedScorers?: Array<{
|
|
180
|
+
playerId?: string;
|
|
181
|
+
playerName?: string;
|
|
182
|
+
count?: number;
|
|
183
|
+
}>;
|
|
184
|
+
/**
|
|
185
|
+
* Current user's prediction (if authenticated)
|
|
186
|
+
*/
|
|
187
|
+
userPrediction?: PredictionDTO;
|
|
188
|
+
}>;
|
|
189
|
+
/**
|
|
190
|
+
* Generate share token
|
|
191
|
+
* Generate a shareable token for user's prediction to share with others
|
|
192
|
+
* @param fixtureId The fixture ID
|
|
193
|
+
* @returns any Share token generated successfully
|
|
194
|
+
* @throws ApiError
|
|
195
|
+
*/
|
|
196
|
+
postApiV1PredictionsShare(fixtureId: string): CancelablePromise<{
|
|
197
|
+
success?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Unique token for sharing prediction
|
|
200
|
+
*/
|
|
201
|
+
shareToken?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Full URL for sharing
|
|
204
|
+
*/
|
|
205
|
+
shareUrl?: string;
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Get shared prediction
|
|
209
|
+
* Retrieve a publicly shared prediction using its share token (public endpoint)
|
|
210
|
+
* @param shareToken The share token
|
|
211
|
+
* @returns any Shared prediction retrieved successfully
|
|
212
|
+
* @throws ApiError
|
|
213
|
+
*/
|
|
214
|
+
getApiV1PredictionsShared(shareToken: string): CancelablePromise<{
|
|
215
|
+
success?: boolean;
|
|
216
|
+
prediction?: PredictionDTO;
|
|
217
|
+
user?: {
|
|
218
|
+
username?: string;
|
|
219
|
+
avatar?: string;
|
|
220
|
+
level?: number;
|
|
221
|
+
};
|
|
222
|
+
}>;
|
|
223
|
+
}
|