@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,264 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommunityLineupsService = void 0;
|
|
4
|
+
class CommunityLineupsService {
|
|
5
|
+
constructor(httpRequest) {
|
|
6
|
+
this.httpRequest = httpRequest;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Create a new lineup
|
|
10
|
+
* Create a lineup with custom formation and players. Works for both authenticated and anonymous users. Anonymous lineups can later be claimed by authenticated users.
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns any Lineup created successfully
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
postApiV1CommunityLineups(requestBody) {
|
|
16
|
+
return this.httpRequest.request({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
url: '/api/v1/community/lineups',
|
|
19
|
+
body: requestBody,
|
|
20
|
+
mediaType: 'application/json',
|
|
21
|
+
errors: {
|
|
22
|
+
400: `Validation error - missing required fields`,
|
|
23
|
+
500: `Server error while creating lineup`,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get user's lineups
|
|
29
|
+
* Retrieve all lineups created by the authenticated user with pagination and sorting options
|
|
30
|
+
* @param limit Number of lineups to return
|
|
31
|
+
* @param offset Number of lineups to skip
|
|
32
|
+
* @param sortBy Field to sort by
|
|
33
|
+
* @param sortOrder Sort order
|
|
34
|
+
* @returns any User's lineups retrieved successfully
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
getApiV1CommunityLineups(limit = 20, offset, sortBy = 'createdAt', sortOrder = 'desc') {
|
|
38
|
+
return this.httpRequest.request({
|
|
39
|
+
method: 'GET',
|
|
40
|
+
url: '/api/v1/community/lineups',
|
|
41
|
+
query: {
|
|
42
|
+
'limit': limit,
|
|
43
|
+
'offset': offset,
|
|
44
|
+
'sortBy': sortBy,
|
|
45
|
+
'sortOrder': sortOrder,
|
|
46
|
+
},
|
|
47
|
+
errors: {
|
|
48
|
+
401: `Authentication required`,
|
|
49
|
+
500: `Server error while fetching lineups`,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get lineup by ID
|
|
55
|
+
* Retrieve a specific lineup by its ID. Returns public lineups or lineups owned by the authenticated user.
|
|
56
|
+
* @param id Lineup ID
|
|
57
|
+
* @returns any Lineup retrieved successfully
|
|
58
|
+
* @throws ApiError
|
|
59
|
+
*/
|
|
60
|
+
getApiV1CommunityLineups1(id) {
|
|
61
|
+
return this.httpRequest.request({
|
|
62
|
+
method: 'GET',
|
|
63
|
+
url: '/api/v1/community/lineups/{id}',
|
|
64
|
+
path: {
|
|
65
|
+
'id': id,
|
|
66
|
+
},
|
|
67
|
+
errors: {
|
|
68
|
+
400: `Lineup ID is required`,
|
|
69
|
+
403: `Permission denied - lineup is private`,
|
|
70
|
+
404: `Lineup not found`,
|
|
71
|
+
500: `Server error while fetching lineup`,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Update lineup
|
|
77
|
+
* Update an existing lineup. Only the owner can update their lineup.
|
|
78
|
+
* @param id Lineup ID
|
|
79
|
+
* @param requestBody
|
|
80
|
+
* @returns any Lineup updated successfully
|
|
81
|
+
* @throws ApiError
|
|
82
|
+
*/
|
|
83
|
+
putApiV1CommunityLineups(id, requestBody) {
|
|
84
|
+
return this.httpRequest.request({
|
|
85
|
+
method: 'PUT',
|
|
86
|
+
url: '/api/v1/community/lineups/{id}',
|
|
87
|
+
path: {
|
|
88
|
+
'id': id,
|
|
89
|
+
},
|
|
90
|
+
body: requestBody,
|
|
91
|
+
mediaType: 'application/json',
|
|
92
|
+
errors: {
|
|
93
|
+
400: `Invalid lineup ID`,
|
|
94
|
+
401: `Authentication required`,
|
|
95
|
+
403: `Permission denied - not the owner`,
|
|
96
|
+
404: `Lineup not found`,
|
|
97
|
+
500: `Server error while updating lineup`,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Delete lineup
|
|
103
|
+
* Delete a lineup. Only the owner can delete their lineup.
|
|
104
|
+
* @param id Lineup ID
|
|
105
|
+
* @returns void
|
|
106
|
+
* @throws ApiError
|
|
107
|
+
*/
|
|
108
|
+
deleteApiV1CommunityLineups(id) {
|
|
109
|
+
return this.httpRequest.request({
|
|
110
|
+
method: 'DELETE',
|
|
111
|
+
url: '/api/v1/community/lineups/{id}',
|
|
112
|
+
path: {
|
|
113
|
+
'id': id,
|
|
114
|
+
},
|
|
115
|
+
errors: {
|
|
116
|
+
400: `Invalid lineup ID`,
|
|
117
|
+
401: `Authentication required`,
|
|
118
|
+
403: `Permission denied - not the owner`,
|
|
119
|
+
404: `Lineup not found`,
|
|
120
|
+
500: `Server error while deleting lineup`,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get lineup by share token
|
|
126
|
+
* Retrieve a public lineup using its unique share token. This endpoint is accessible without authentication for public lineups.
|
|
127
|
+
* @param shareToken Unique share token for the lineup
|
|
128
|
+
* @returns any Lineup retrieved successfully
|
|
129
|
+
* @throws ApiError
|
|
130
|
+
*/
|
|
131
|
+
getApiV1CommunityLineupsShare(shareToken) {
|
|
132
|
+
return this.httpRequest.request({
|
|
133
|
+
method: 'GET',
|
|
134
|
+
url: '/api/v1/community/lineups/share/{shareToken}',
|
|
135
|
+
path: {
|
|
136
|
+
'shareToken': shareToken,
|
|
137
|
+
},
|
|
138
|
+
errors: {
|
|
139
|
+
400: `Share token is required`,
|
|
140
|
+
404: `Lineup not found or is private`,
|
|
141
|
+
500: `Server error while fetching lineup`,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Claim anonymous lineup
|
|
147
|
+
* Claim ownership of an anonymous lineup. Allows authenticated users to take ownership of lineups they created while not logged in.
|
|
148
|
+
* @param id Lineup ID
|
|
149
|
+
* @returns any Lineup claimed successfully
|
|
150
|
+
* @throws ApiError
|
|
151
|
+
*/
|
|
152
|
+
postApiV1CommunityLineupsClaim(id) {
|
|
153
|
+
return this.httpRequest.request({
|
|
154
|
+
method: 'POST',
|
|
155
|
+
url: '/api/v1/community/lineups/{id}/claim',
|
|
156
|
+
path: {
|
|
157
|
+
'id': id,
|
|
158
|
+
},
|
|
159
|
+
errors: {
|
|
160
|
+
400: `Invalid lineup ID or validation error`,
|
|
161
|
+
401: `Authentication required`,
|
|
162
|
+
403: `Lineup already has an owner`,
|
|
163
|
+
404: `Lineup not found`,
|
|
164
|
+
500: `Server error while claiming lineup`,
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Browse public lineups
|
|
170
|
+
* Search and filter public lineups with pagination and sorting. Supports filtering by formation, mode, and search text.
|
|
171
|
+
* @param search Search text for lineup title or description
|
|
172
|
+
* @param formation Filter by formation ID
|
|
173
|
+
* @param mode Filter by lineup mode
|
|
174
|
+
* @param sortBy Field to sort by
|
|
175
|
+
* @param sortOrder Sort order
|
|
176
|
+
* @param limit Number of lineups per page
|
|
177
|
+
* @param offset Number of lineups to skip
|
|
178
|
+
* @returns any Lineups retrieved successfully
|
|
179
|
+
* @throws ApiError
|
|
180
|
+
*/
|
|
181
|
+
getApiV1CommunityLineupsBrowse(search, formation, mode, sortBy = 'createdAt', sortOrder = 'desc', limit = 20, offset) {
|
|
182
|
+
return this.httpRequest.request({
|
|
183
|
+
method: 'GET',
|
|
184
|
+
url: '/api/v1/community/lineups/browse',
|
|
185
|
+
query: {
|
|
186
|
+
'search': search,
|
|
187
|
+
'formation': formation,
|
|
188
|
+
'mode': mode,
|
|
189
|
+
'sortBy': sortBy,
|
|
190
|
+
'sortOrder': sortOrder,
|
|
191
|
+
'limit': limit,
|
|
192
|
+
'offset': offset,
|
|
193
|
+
},
|
|
194
|
+
errors: {
|
|
195
|
+
500: `Server error while browsing lineups`,
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Get trending lineups
|
|
201
|
+
* Retrieve the most viewed lineups in the last 7 days
|
|
202
|
+
* @param limit Number of trending lineups to return
|
|
203
|
+
* @returns any Trending lineups retrieved successfully
|
|
204
|
+
* @throws ApiError
|
|
205
|
+
*/
|
|
206
|
+
getApiV1CommunityLineupsTrending(limit = 10) {
|
|
207
|
+
return this.httpRequest.request({
|
|
208
|
+
method: 'GET',
|
|
209
|
+
url: '/api/v1/community/lineups/trending',
|
|
210
|
+
query: {
|
|
211
|
+
'limit': limit,
|
|
212
|
+
},
|
|
213
|
+
errors: {
|
|
214
|
+
500: `Server error while fetching trending lineups`,
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Get popular lineups
|
|
220
|
+
* Retrieve the most viewed lineups of all time
|
|
221
|
+
* @param limit Number of popular lineups to return
|
|
222
|
+
* @returns any Popular lineups retrieved successfully
|
|
223
|
+
* @throws ApiError
|
|
224
|
+
*/
|
|
225
|
+
getApiV1CommunityLineupsPopular(limit = 10) {
|
|
226
|
+
return this.httpRequest.request({
|
|
227
|
+
method: 'GET',
|
|
228
|
+
url: '/api/v1/community/lineups/popular',
|
|
229
|
+
query: {
|
|
230
|
+
'limit': limit,
|
|
231
|
+
},
|
|
232
|
+
errors: {
|
|
233
|
+
500: `Server error while fetching popular lineups`,
|
|
234
|
+
},
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Export lineup as image
|
|
239
|
+
* Export a lineup as an SVG image or data URL. Optional authentication to access private lineups.
|
|
240
|
+
* @param id Lineup ID
|
|
241
|
+
* @param format Export format
|
|
242
|
+
* @returns any Lineup exported successfully
|
|
243
|
+
* @throws ApiError
|
|
244
|
+
*/
|
|
245
|
+
getApiV1CommunityLineupsExport(id, format = 'svg') {
|
|
246
|
+
return this.httpRequest.request({
|
|
247
|
+
method: 'GET',
|
|
248
|
+
url: '/api/v1/community/lineups/{id}/export',
|
|
249
|
+
path: {
|
|
250
|
+
'id': id,
|
|
251
|
+
},
|
|
252
|
+
query: {
|
|
253
|
+
'format': format,
|
|
254
|
+
},
|
|
255
|
+
errors: {
|
|
256
|
+
400: `Invalid lineup ID or format`,
|
|
257
|
+
403: `Permission denied - lineup is private`,
|
|
258
|
+
404: `Lineup not found`,
|
|
259
|
+
500: `Server error while exporting lineup`,
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
exports.CommunityLineupsService = CommunityLineupsService;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ApiResponseDTO } from '../models/ApiResponseDTO';
|
|
2
|
+
import type { SharedGameDTO } from '../models/SharedGameDTO';
|
|
3
|
+
import type { ShareGameRequestDTO } from '../models/ShareGameRequestDTO';
|
|
4
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
6
|
+
export declare class CommunitySharedGamesService {
|
|
7
|
+
readonly httpRequest: BaseHttpRequest;
|
|
8
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
9
|
+
/**
|
|
10
|
+
* Create a shared game entry
|
|
11
|
+
* Creates a new shared game record (admin/internal use)
|
|
12
|
+
* @param requestBody
|
|
13
|
+
* @returns any Shared game created successfully
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
postApiV1CommunitySharedGames(requestBody: ShareGameRequestDTO): CancelablePromise<(ApiResponseDTO & {
|
|
17
|
+
data?: SharedGameDTO;
|
|
18
|
+
})>;
|
|
19
|
+
/**
|
|
20
|
+
* List all shared games
|
|
21
|
+
* Retrieves a list of all shared games
|
|
22
|
+
* @returns any Shared games retrieved successfully
|
|
23
|
+
* @throws ApiError
|
|
24
|
+
*/
|
|
25
|
+
getApiV1CommunitySharedGames(): CancelablePromise<{
|
|
26
|
+
success?: boolean;
|
|
27
|
+
data?: Array<SharedGameDTO>;
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* Get shared game by ID
|
|
31
|
+
* Retrieves a specific shared game by ID
|
|
32
|
+
* @param id Shared game ID
|
|
33
|
+
* @returns any Shared game retrieved successfully
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
getApiV1CommunitySharedGames1(id: string): CancelablePromise<(ApiResponseDTO & {
|
|
37
|
+
data?: SharedGameDTO;
|
|
38
|
+
})>;
|
|
39
|
+
/**
|
|
40
|
+
* Update a shared game
|
|
41
|
+
* Updates an existing shared game
|
|
42
|
+
* @param id Shared game ID
|
|
43
|
+
* @param requestBody
|
|
44
|
+
* @returns any Shared game updated successfully
|
|
45
|
+
* @throws ApiError
|
|
46
|
+
*/
|
|
47
|
+
putApiV1CommunitySharedGames(id: string, requestBody: ShareGameRequestDTO): CancelablePromise<(ApiResponseDTO & {
|
|
48
|
+
data?: SharedGameDTO;
|
|
49
|
+
})>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete a shared game
|
|
52
|
+
* Deletes a shared game
|
|
53
|
+
* @param id Shared game ID
|
|
54
|
+
* @returns any Shared game deleted successfully
|
|
55
|
+
* @throws ApiError
|
|
56
|
+
*/
|
|
57
|
+
deleteApiV1CommunitySharedGames(id: string): CancelablePromise<{
|
|
58
|
+
success?: boolean;
|
|
59
|
+
data?: {
|
|
60
|
+
message?: string;
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* Share a game
|
|
65
|
+
* Creates a shareable public link for a game
|
|
66
|
+
* @param gameId Game ID to share
|
|
67
|
+
* @param requestBody
|
|
68
|
+
* @returns any Game shared successfully
|
|
69
|
+
* @throws ApiError
|
|
70
|
+
*/
|
|
71
|
+
postApiV1CommunityGamesShare(gameId: string, requestBody?: {
|
|
72
|
+
/**
|
|
73
|
+
* Optional message to include with the share
|
|
74
|
+
*/
|
|
75
|
+
message?: string;
|
|
76
|
+
}): CancelablePromise<{
|
|
77
|
+
success?: boolean;
|
|
78
|
+
data?: {
|
|
79
|
+
publicUrl?: string;
|
|
80
|
+
};
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Get shared game by public ID
|
|
84
|
+
* Retrieves a shared game using its public ID and increments visit count
|
|
85
|
+
* @param publicId Public ID of the shared game
|
|
86
|
+
* @returns any Shared game retrieved successfully
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
getApiV1CommunityShared(publicId: string): CancelablePromise<{
|
|
90
|
+
success?: boolean;
|
|
91
|
+
data?: {
|
|
92
|
+
/**
|
|
93
|
+
* Public ID
|
|
94
|
+
*/
|
|
95
|
+
id?: string;
|
|
96
|
+
gameId?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Username of the user who shared
|
|
99
|
+
*/
|
|
100
|
+
sharedBy?: string;
|
|
101
|
+
boardSize?: number;
|
|
102
|
+
markedTiles?: Array<number>;
|
|
103
|
+
tiles?: Array<Record<string, any>>;
|
|
104
|
+
message?: string | null;
|
|
105
|
+
eventPool?: string | null;
|
|
106
|
+
createdAt?: string;
|
|
107
|
+
expiresAt?: string | null;
|
|
108
|
+
};
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* Create challenge game from shared game
|
|
112
|
+
* Creates a new game from a shared game to compete against the original player
|
|
113
|
+
* @param publicId Public ID of the shared game
|
|
114
|
+
* @returns any Challenge game created successfully
|
|
115
|
+
* @throws ApiError
|
|
116
|
+
*/
|
|
117
|
+
postApiV1CommunitySharedChallenge(publicId: string): CancelablePromise<{
|
|
118
|
+
success?: boolean;
|
|
119
|
+
data?: {
|
|
120
|
+
message?: string;
|
|
121
|
+
gameId?: string;
|
|
122
|
+
};
|
|
123
|
+
}>;
|
|
124
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommunitySharedGamesService = void 0;
|
|
4
|
+
class CommunitySharedGamesService {
|
|
5
|
+
constructor(httpRequest) {
|
|
6
|
+
this.httpRequest = httpRequest;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Create a shared game entry
|
|
10
|
+
* Creates a new shared game record (admin/internal use)
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns any Shared game created successfully
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
postApiV1CommunitySharedGames(requestBody) {
|
|
16
|
+
return this.httpRequest.request({
|
|
17
|
+
method: 'POST',
|
|
18
|
+
url: '/api/v1/community/shared-games',
|
|
19
|
+
body: requestBody,
|
|
20
|
+
mediaType: 'application/json',
|
|
21
|
+
errors: {
|
|
22
|
+
500: `Internal server error`,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* List all shared games
|
|
28
|
+
* Retrieves a list of all shared games
|
|
29
|
+
* @returns any Shared games retrieved successfully
|
|
30
|
+
* @throws ApiError
|
|
31
|
+
*/
|
|
32
|
+
getApiV1CommunitySharedGames() {
|
|
33
|
+
return this.httpRequest.request({
|
|
34
|
+
method: 'GET',
|
|
35
|
+
url: '/api/v1/community/shared-games',
|
|
36
|
+
errors: {
|
|
37
|
+
500: `Internal server error`,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get shared game by ID
|
|
43
|
+
* Retrieves a specific shared game by ID
|
|
44
|
+
* @param id Shared game ID
|
|
45
|
+
* @returns any Shared game retrieved successfully
|
|
46
|
+
* @throws ApiError
|
|
47
|
+
*/
|
|
48
|
+
getApiV1CommunitySharedGames1(id) {
|
|
49
|
+
return this.httpRequest.request({
|
|
50
|
+
method: 'GET',
|
|
51
|
+
url: '/api/v1/community/shared-games/{id}',
|
|
52
|
+
path: {
|
|
53
|
+
'id': id,
|
|
54
|
+
},
|
|
55
|
+
errors: {
|
|
56
|
+
404: `Shared game not found`,
|
|
57
|
+
500: `Internal server error`,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Update a shared game
|
|
63
|
+
* Updates an existing shared game
|
|
64
|
+
* @param id Shared game ID
|
|
65
|
+
* @param requestBody
|
|
66
|
+
* @returns any Shared game updated successfully
|
|
67
|
+
* @throws ApiError
|
|
68
|
+
*/
|
|
69
|
+
putApiV1CommunitySharedGames(id, requestBody) {
|
|
70
|
+
return this.httpRequest.request({
|
|
71
|
+
method: 'PUT',
|
|
72
|
+
url: '/api/v1/community/shared-games/{id}',
|
|
73
|
+
path: {
|
|
74
|
+
'id': id,
|
|
75
|
+
},
|
|
76
|
+
body: requestBody,
|
|
77
|
+
mediaType: 'application/json',
|
|
78
|
+
errors: {
|
|
79
|
+
404: `Shared game not found`,
|
|
80
|
+
500: `Internal server error`,
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Delete a shared game
|
|
86
|
+
* Deletes a shared game
|
|
87
|
+
* @param id Shared game ID
|
|
88
|
+
* @returns any Shared game deleted successfully
|
|
89
|
+
* @throws ApiError
|
|
90
|
+
*/
|
|
91
|
+
deleteApiV1CommunitySharedGames(id) {
|
|
92
|
+
return this.httpRequest.request({
|
|
93
|
+
method: 'DELETE',
|
|
94
|
+
url: '/api/v1/community/shared-games/{id}',
|
|
95
|
+
path: {
|
|
96
|
+
'id': id,
|
|
97
|
+
},
|
|
98
|
+
errors: {
|
|
99
|
+
404: `Shared game not found`,
|
|
100
|
+
500: `Internal server error`,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Share a game
|
|
106
|
+
* Creates a shareable public link for a game
|
|
107
|
+
* @param gameId Game ID to share
|
|
108
|
+
* @param requestBody
|
|
109
|
+
* @returns any Game shared successfully
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
postApiV1CommunityGamesShare(gameId, requestBody) {
|
|
113
|
+
return this.httpRequest.request({
|
|
114
|
+
method: 'POST',
|
|
115
|
+
url: '/api/v1/community/games/{gameId}/share',
|
|
116
|
+
path: {
|
|
117
|
+
'gameId': gameId,
|
|
118
|
+
},
|
|
119
|
+
body: requestBody,
|
|
120
|
+
mediaType: 'application/json',
|
|
121
|
+
errors: {
|
|
122
|
+
400: `Bad request - invalid game ID`,
|
|
123
|
+
401: `Unauthorized - authentication required`,
|
|
124
|
+
500: `Internal server error`,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get shared game by public ID
|
|
130
|
+
* Retrieves a shared game using its public ID and increments visit count
|
|
131
|
+
* @param publicId Public ID of the shared game
|
|
132
|
+
* @returns any Shared game retrieved successfully
|
|
133
|
+
* @throws ApiError
|
|
134
|
+
*/
|
|
135
|
+
getApiV1CommunityShared(publicId) {
|
|
136
|
+
return this.httpRequest.request({
|
|
137
|
+
method: 'GET',
|
|
138
|
+
url: '/api/v1/community/shared/{publicId}',
|
|
139
|
+
path: {
|
|
140
|
+
'publicId': publicId,
|
|
141
|
+
},
|
|
142
|
+
errors: {
|
|
143
|
+
400: `Bad request - public ID required`,
|
|
144
|
+
404: `Shared game not found or expired`,
|
|
145
|
+
500: `Internal server error`,
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Create challenge game from shared game
|
|
151
|
+
* Creates a new game from a shared game to compete against the original player
|
|
152
|
+
* @param publicId Public ID of the shared game
|
|
153
|
+
* @returns any Challenge game created successfully
|
|
154
|
+
* @throws ApiError
|
|
155
|
+
*/
|
|
156
|
+
postApiV1CommunitySharedChallenge(publicId) {
|
|
157
|
+
return this.httpRequest.request({
|
|
158
|
+
method: 'POST',
|
|
159
|
+
url: '/api/v1/community/shared/{publicId}/challenge',
|
|
160
|
+
path: {
|
|
161
|
+
'publicId': publicId,
|
|
162
|
+
},
|
|
163
|
+
errors: {
|
|
164
|
+
400: `Bad request - invalid public ID`,
|
|
165
|
+
401: `Unauthorized - authentication required`,
|
|
166
|
+
404: `Shared game not found or expired`,
|
|
167
|
+
500: `Internal server error`,
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
exports.CommunitySharedGamesService = CommunitySharedGamesService;
|