@mtgame/core 0.0.1

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.
Files changed (293) hide show
  1. package/README.md +24 -0
  2. package/api/basketball-game-api.d.ts +17 -0
  3. package/api/league-api.d.ts +16 -0
  4. package/api/media-api.d.ts +24 -0
  5. package/api/notification-api.d.ts +4 -0
  6. package/api/notification-base-api.d.ts +22 -0
  7. package/api/org-notification-api.d.ts +4 -0
  8. package/api/paginated-response.interface.d.ts +4 -0
  9. package/api/public-api.d.ts +12 -0
  10. package/api/reference-api.d.ts +11 -0
  11. package/api/tournament-api.d.ts +64 -0
  12. package/api/tournament-join-api.d.ts +14 -0
  13. package/api/tournament-stage-api.d.ts +15 -0
  14. package/api/volleyball-game-api.d.ts +17 -0
  15. package/bundles/mtgame-core.umd.js +4785 -0
  16. package/bundles/mtgame-core.umd.js.map +1 -0
  17. package/bundles/mtgame-core.umd.min.js +16 -0
  18. package/bundles/mtgame-core.umd.min.js.map +1 -0
  19. package/esm2015/api/basketball-game-api.js +54 -0
  20. package/esm2015/api/league-api.js +60 -0
  21. package/esm2015/api/media-api.js +110 -0
  22. package/esm2015/api/notification-api.js +18 -0
  23. package/esm2015/api/notification-base-api.js +83 -0
  24. package/esm2015/api/org-notification-api.js +18 -0
  25. package/esm2015/api/paginated-response.interface.js +1 -0
  26. package/esm2015/api/public-api.js +12 -0
  27. package/esm2015/api/reference-api.js +40 -0
  28. package/esm2015/api/tournament-api.js +187 -0
  29. package/esm2015/api/tournament-join-api.js +51 -0
  30. package/esm2015/api/tournament-stage-api.js +56 -0
  31. package/esm2015/api/volleyball-game-api.js +54 -0
  32. package/esm2015/http-cookie.interceptor.js +34 -0
  33. package/esm2015/localization/basketball-game-log-types.js +26 -0
  34. package/esm2015/localization/overtime-types.js +7 -0
  35. package/esm2015/localization/public-api.js +7 -0
  36. package/esm2015/localization/team-event-type.js +6 -0
  37. package/esm2015/localization/team-user-role.js +7 -0
  38. package/esm2015/localization/user-profile.js +46 -0
  39. package/esm2015/localization/volleyball-game-log-types.js +25 -0
  40. package/esm2015/models/basketball-game-config.js +42 -0
  41. package/esm2015/models/basketball-game-log.js +109 -0
  42. package/esm2015/models/basketball-game-statistic.js +50 -0
  43. package/esm2015/models/basketball-game-team-statistic.js +27 -0
  44. package/esm2015/models/basketball-profile.js +43 -0
  45. package/esm2015/models/basketball-statistic.js +69 -0
  46. package/esm2015/models/city.js +22 -0
  47. package/esm2015/models/file.js +38 -0
  48. package/esm2015/models/game-invite.js +37 -0
  49. package/esm2015/models/game-log-base.js +1 -0
  50. package/esm2015/models/game-statistic-base.js +1 -0
  51. package/esm2015/models/game-timeline-stages.js +49 -0
  52. package/esm2015/models/game-user.js +32 -0
  53. package/esm2015/models/game.js +108 -0
  54. package/esm2015/models/league-court.js +24 -0
  55. package/esm2015/models/league.js +52 -0
  56. package/esm2015/models/media-item.js +40 -0
  57. package/esm2015/models/notification-settings.js +35 -0
  58. package/esm2015/models/notification.js +134 -0
  59. package/esm2015/models/organization.js +27 -0
  60. package/esm2015/models/playoff.js +78 -0
  61. package/esm2015/models/poll.js +132 -0
  62. package/esm2015/models/public-api.js +50 -0
  63. package/esm2015/models/sport.js +47 -0
  64. package/esm2015/models/team-event-invite.js +32 -0
  65. package/esm2015/models/team-event-type.js +6 -0
  66. package/esm2015/models/team-event.js +45 -0
  67. package/esm2015/models/team-invite-external.js +25 -0
  68. package/esm2015/models/team-invite.js +41 -0
  69. package/esm2015/models/team-user.js +39 -0
  70. package/esm2015/models/team.js +56 -0
  71. package/esm2015/models/tournament-disqualification.js +29 -0
  72. package/esm2015/models/tournament-event.js +38 -0
  73. package/esm2015/models/tournament-group.js +23 -0
  74. package/esm2015/models/tournament-invite.js +39 -0
  75. package/esm2015/models/tournament-join-team.js +55 -0
  76. package/esm2015/models/tournament-news.js +33 -0
  77. package/esm2015/models/tournament-stage-team.js +45 -0
  78. package/esm2015/models/tournament-stage.js +35 -0
  79. package/esm2015/models/tournament-team-user-invite.js +29 -0
  80. package/esm2015/models/tournament-team-user.js +49 -0
  81. package/esm2015/models/tournament-team.js +54 -0
  82. package/esm2015/models/tournament.js +161 -0
  83. package/esm2015/models/user-profile.js +24 -0
  84. package/esm2015/models/user.js +74 -0
  85. package/esm2015/models/util.js +208 -0
  86. package/esm2015/models/volleyball-game-config.js +40 -0
  87. package/esm2015/models/volleyball-game-log.js +139 -0
  88. package/esm2015/models/volleyball-game-statistic.js +50 -0
  89. package/esm2015/models/volleyball-game-team-statistic.js +27 -0
  90. package/esm2015/models/volleyball-profile.js +43 -0
  91. package/esm2015/models/volleyball-statistic.js +66 -0
  92. package/esm2015/mtgame-core.js +5 -0
  93. package/esm2015/public-api.js +8 -0
  94. package/esm2015/services/base.service.js +18 -0
  95. package/esm2015/services/centrifugo.service.js +107 -0
  96. package/esm2015/services/config.service.js +40 -0
  97. package/esm2015/services/public-api.js +4 -0
  98. package/esm2015/storage/local-storage-engine.js +18 -0
  99. package/esm2015/storage/public-api.js +4 -0
  100. package/esm2015/storage/storage-engine.js +61 -0
  101. package/esm2015/storage/store.js +63 -0
  102. package/esm2015/utils/array.js +18 -0
  103. package/esm2015/utils/component-destroyed.js +21 -0
  104. package/esm2015/utils/cookie.js +9 -0
  105. package/esm2015/utils/data.js +75 -0
  106. package/esm2015/utils/device.js +14 -0
  107. package/esm2015/utils/enum.js +7 -0
  108. package/esm2015/utils/errors.js +10 -0
  109. package/esm2015/utils/favicon.js +25 -0
  110. package/esm2015/utils/form.js +22 -0
  111. package/esm2015/utils/public-api.js +11 -0
  112. package/esm2015/utils/validators.js +47 -0
  113. package/esm5/api/basketball-game-api.js +65 -0
  114. package/esm5/api/league-api.js +70 -0
  115. package/esm5/api/media-api.js +125 -0
  116. package/esm5/api/notification-api.js +21 -0
  117. package/esm5/api/notification-base-api.js +109 -0
  118. package/esm5/api/org-notification-api.js +21 -0
  119. package/esm5/api/paginated-response.interface.js +1 -0
  120. package/esm5/api/public-api.js +12 -0
  121. package/esm5/api/reference-api.js +45 -0
  122. package/esm5/api/tournament-api.js +245 -0
  123. package/esm5/api/tournament-join-api.js +59 -0
  124. package/esm5/api/tournament-stage-api.js +65 -0
  125. package/esm5/api/volleyball-game-api.js +65 -0
  126. package/esm5/http-cookie.interceptor.js +35 -0
  127. package/esm5/localization/basketball-game-log-types.js +27 -0
  128. package/esm5/localization/overtime-types.js +8 -0
  129. package/esm5/localization/public-api.js +7 -0
  130. package/esm5/localization/team-event-type.js +7 -0
  131. package/esm5/localization/team-user-role.js +8 -0
  132. package/esm5/localization/user-profile.js +47 -0
  133. package/esm5/localization/volleyball-game-log-types.js +26 -0
  134. package/esm5/models/basketball-game-config.js +47 -0
  135. package/esm5/models/basketball-game-log.js +117 -0
  136. package/esm5/models/basketball-game-statistic.js +63 -0
  137. package/esm5/models/basketball-game-team-statistic.js +32 -0
  138. package/esm5/models/basketball-profile.js +48 -0
  139. package/esm5/models/basketball-statistic.js +78 -0
  140. package/esm5/models/city.js +27 -0
  141. package/esm5/models/file.js +41 -0
  142. package/esm5/models/game-invite.js +42 -0
  143. package/esm5/models/game-log-base.js +1 -0
  144. package/esm5/models/game-statistic-base.js +1 -0
  145. package/esm5/models/game-timeline-stages.js +57 -0
  146. package/esm5/models/game-user.js +37 -0
  147. package/esm5/models/game.js +134 -0
  148. package/esm5/models/league-court.js +29 -0
  149. package/esm5/models/league.js +69 -0
  150. package/esm5/models/media-item.js +49 -0
  151. package/esm5/models/notification-settings.js +40 -0
  152. package/esm5/models/notification.js +143 -0
  153. package/esm5/models/organization.js +32 -0
  154. package/esm5/models/playoff.js +91 -0
  155. package/esm5/models/poll.js +154 -0
  156. package/esm5/models/public-api.js +50 -0
  157. package/esm5/models/sport.js +52 -0
  158. package/esm5/models/team-event-invite.js +35 -0
  159. package/esm5/models/team-event-type.js +6 -0
  160. package/esm5/models/team-event.js +58 -0
  161. package/esm5/models/team-invite-external.js +30 -0
  162. package/esm5/models/team-invite.js +46 -0
  163. package/esm5/models/team-user.js +44 -0
  164. package/esm5/models/team.js +61 -0
  165. package/esm5/models/tournament-disqualification.js +34 -0
  166. package/esm5/models/tournament-event.js +43 -0
  167. package/esm5/models/tournament-group.js +28 -0
  168. package/esm5/models/tournament-invite.js +48 -0
  169. package/esm5/models/tournament-join-team.js +73 -0
  170. package/esm5/models/tournament-news.js +38 -0
  171. package/esm5/models/tournament-stage-team.js +54 -0
  172. package/esm5/models/tournament-stage.js +40 -0
  173. package/esm5/models/tournament-team-user-invite.js +34 -0
  174. package/esm5/models/tournament-team-user.js +66 -0
  175. package/esm5/models/tournament-team.js +63 -0
  176. package/esm5/models/tournament.js +176 -0
  177. package/esm5/models/user-profile.js +27 -0
  178. package/esm5/models/user.js +95 -0
  179. package/esm5/models/util.js +275 -0
  180. package/esm5/models/volleyball-game-config.js +49 -0
  181. package/esm5/models/volleyball-game-log.js +142 -0
  182. package/esm5/models/volleyball-game-statistic.js +71 -0
  183. package/esm5/models/volleyball-game-team-statistic.js +32 -0
  184. package/esm5/models/volleyball-profile.js +48 -0
  185. package/esm5/models/volleyball-statistic.js +71 -0
  186. package/esm5/mtgame-core.js +5 -0
  187. package/esm5/public-api.js +8 -0
  188. package/esm5/services/base.service.js +19 -0
  189. package/esm5/services/centrifugo.service.js +111 -0
  190. package/esm5/services/config.service.js +52 -0
  191. package/esm5/services/public-api.js +4 -0
  192. package/esm5/storage/local-storage-engine.js +25 -0
  193. package/esm5/storage/public-api.js +4 -0
  194. package/esm5/storage/storage-engine.js +77 -0
  195. package/esm5/storage/store.js +77 -0
  196. package/esm5/utils/array.js +18 -0
  197. package/esm5/utils/component-destroyed.js +21 -0
  198. package/esm5/utils/cookie.js +9 -0
  199. package/esm5/utils/data.js +79 -0
  200. package/esm5/utils/device.js +14 -0
  201. package/esm5/utils/enum.js +7 -0
  202. package/esm5/utils/errors.js +12 -0
  203. package/esm5/utils/favicon.js +47 -0
  204. package/esm5/utils/form.js +22 -0
  205. package/esm5/utils/public-api.js +11 -0
  206. package/esm5/utils/validators.js +49 -0
  207. package/fesm2015/mtgame-core.js +3749 -0
  208. package/fesm2015/mtgame-core.js.map +1 -0
  209. package/fesm5/mtgame-core.js +4455 -0
  210. package/fesm5/mtgame-core.js.map +1 -0
  211. package/http-cookie.interceptor.d.ts +10 -0
  212. package/localization/basketball-game-log-types.d.ts +25 -0
  213. package/localization/overtime-types.d.ts +6 -0
  214. package/localization/public-api.d.ts +6 -0
  215. package/localization/team-event-type.d.ts +5 -0
  216. package/localization/team-user-role.d.ts +6 -0
  217. package/localization/user-profile.d.ts +45 -0
  218. package/localization/volleyball-game-log-types.d.ts +24 -0
  219. package/models/basketball-game-config.d.ts +22 -0
  220. package/models/basketball-game-log.d.ts +52 -0
  221. package/models/basketball-game-statistic.d.ts +29 -0
  222. package/models/basketball-game-team-statistic.d.ts +8 -0
  223. package/models/basketball-profile.d.ts +20 -0
  224. package/models/basketball-statistic.d.ts +44 -0
  225. package/models/city.d.ts +7 -0
  226. package/models/file.d.ts +14 -0
  227. package/models/game-invite.d.ts +16 -0
  228. package/models/game-log-base.d.ts +10 -0
  229. package/models/game-statistic-base.d.ts +3 -0
  230. package/models/game-timeline-stages.d.ts +18 -0
  231. package/models/game-user.d.ts +12 -0
  232. package/models/game.d.ts +56 -0
  233. package/models/league-court.d.ts +9 -0
  234. package/models/league.d.ts +25 -0
  235. package/models/media-item.d.ts +15 -0
  236. package/models/notification-settings.d.ts +15 -0
  237. package/models/notification.d.ts +98 -0
  238. package/models/organization.d.ts +9 -0
  239. package/models/playoff.d.ts +25 -0
  240. package/models/poll.d.ts +46 -0
  241. package/models/public-api.d.ts +50 -0
  242. package/models/sport.d.ts +19 -0
  243. package/models/team-event-invite.d.ts +12 -0
  244. package/models/team-event-type.d.ts +4 -0
  245. package/models/team-event.d.ts +17 -0
  246. package/models/team-invite-external.d.ts +10 -0
  247. package/models/team-invite.d.ts +20 -0
  248. package/models/team-user.d.ts +18 -0
  249. package/models/team.d.ts +21 -0
  250. package/models/tournament-disqualification.d.ts +10 -0
  251. package/models/tournament-event.d.ts +16 -0
  252. package/models/tournament-group.d.ts +10 -0
  253. package/models/tournament-invite.d.ts +17 -0
  254. package/models/tournament-join-team.d.ts +19 -0
  255. package/models/tournament-news.d.ts +13 -0
  256. package/models/tournament-stage-team.d.ts +21 -0
  257. package/models/tournament-stage.d.ts +15 -0
  258. package/models/tournament-team-user-invite.d.ts +11 -0
  259. package/models/tournament-team-user.d.ts +22 -0
  260. package/models/tournament-team.d.ts +28 -0
  261. package/models/tournament.d.ts +87 -0
  262. package/models/user-profile.d.ts +8 -0
  263. package/models/user.d.ts +33 -0
  264. package/models/util.d.ts +49 -0
  265. package/models/volleyball-game-config.d.ts +17 -0
  266. package/models/volleyball-game-log.d.ts +54 -0
  267. package/models/volleyball-game-statistic.d.ts +28 -0
  268. package/models/volleyball-game-team-statistic.d.ts +8 -0
  269. package/models/volleyball-profile.d.ts +20 -0
  270. package/models/volleyball-statistic.d.ts +43 -0
  271. package/mtgame-core.d.ts +4 -0
  272. package/mtgame-core.metadata.json +1 -0
  273. package/package.json +23 -0
  274. package/public-api.d.ts +7 -0
  275. package/services/base.service.d.ts +5 -0
  276. package/services/centrifugo.service.d.ts +20 -0
  277. package/services/config.service.d.ts +11 -0
  278. package/services/public-api.d.ts +3 -0
  279. package/storage/local-storage-engine.d.ts +6 -0
  280. package/storage/public-api.d.ts +3 -0
  281. package/storage/storage-engine.d.ts +24 -0
  282. package/storage/store.d.ts +21 -0
  283. package/utils/array.d.ts +2 -0
  284. package/utils/component-destroyed.d.ts +7 -0
  285. package/utils/cookie.d.ts +1 -0
  286. package/utils/data.d.ts +6 -0
  287. package/utils/device.d.ts +1 -0
  288. package/utils/enum.d.ts +1 -0
  289. package/utils/errors.d.ts +1 -0
  290. package/utils/favicon.d.ts +9 -0
  291. package/utils/form.d.ts +2 -0
  292. package/utils/public-api.d.ts +10 -0
  293. package/utils/validators.d.ts +25 -0
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # Core
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.11.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project core` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project core`.
8
+ > Note: Don't forget to add `--project core` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build core` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build core`, go to the dist folder `cd dist/core` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test core` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -0,0 +1,17 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Game } from '../models/game';
3
+ import { GameUser } from '../models/game-user';
4
+ import { ConfigService } from '../services/config.service';
5
+ import { BasketballGameTeamStatistic } from '../models/basketball-game-team-statistic';
6
+ import { BasketballGameStatistic } from '../models/basketball-game-statistic';
7
+ import { BasketballGameLog } from '../models/basketball-game-log';
8
+ export declare class BasketballGameApi {
9
+ private httpClient;
10
+ private configService;
11
+ constructor(httpClient: HttpClient, configService: ConfigService);
12
+ getById(gameId: number): Promise<Game>;
13
+ getUsers(gameId: number): Promise<GameUser[]>;
14
+ getTeamStatistic(gameId: number): Promise<BasketballGameTeamStatistic>;
15
+ getUserStatistic(gameId: number): Promise<BasketballGameStatistic[]>;
16
+ getLogs(gameId: number): Promise<BasketballGameLog[]>;
17
+ }
@@ -0,0 +1,16 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { League } from '../models/league';
3
+ import { Tournament } from '../models/tournament';
4
+ import { ConfigService } from '../services/config.service';
5
+ import { TournamentEventsListFilter } from './tournament-api';
6
+ import { PaginatedResponse } from './paginated-response.interface';
7
+ import { TournamentEvent } from '../models/tournament-event';
8
+ export declare class LeagueApi {
9
+ private httpClient;
10
+ private configService;
11
+ constructor(httpClient: HttpClient, configService: ConfigService);
12
+ getByAlias(alias: string): Promise<League>;
13
+ getByDomain(domain: string): Promise<League>;
14
+ getTournaments(leagueId: number): Promise<Tournament[]>;
15
+ getEvents(leagueId: number, page: number, size: number, filters?: TournamentEventsListFilter): Promise<PaginatedResponse<TournamentEvent[]>>;
16
+ }
@@ -0,0 +1,24 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { MediaItem } from '../models/media-item';
3
+ import { Game, GameStatuses } from '../models/game';
4
+ import { PaginatedResponse } from './paginated-response.interface';
5
+ import { ConfigService } from '../services/config.service';
6
+ export interface GameMediaFilters {
7
+ tournamentStageId?: number;
8
+ tournamentTour?: number;
9
+ teamId?: number;
10
+ playoffStage?: number;
11
+ playoffId?: number;
12
+ status?: GameStatuses;
13
+ }
14
+ export declare class MediaApi {
15
+ private httpClient;
16
+ private configService;
17
+ constructor(httpClient: HttpClient, configService: ConfigService);
18
+ getMedia(mediaId: number): Promise<MediaItem>;
19
+ getTournamentGameMedia(tournamentId: number, page: number, size: number, filters?: GameMediaFilters): Promise<PaginatedResponse<Game[]>>;
20
+ getLeagueGameMedia(leagueId: number, page: number, size: number, filters?: GameMediaFilters): Promise<PaginatedResponse<Game[]>>;
21
+ getGameMediaById(gameId: number): Promise<Game>;
22
+ getGameMedia(gameId: number): Promise<MediaItem[]>;
23
+ createZip(mediaIds: number[]): Promise<any>;
24
+ }
@@ -0,0 +1,4 @@
1
+ import { NotificationBaseApi } from './notification-base-api';
2
+ export declare class NotificationApi extends NotificationBaseApi {
3
+ protected apiUrl: string;
4
+ }
@@ -0,0 +1,22 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Notification } from '../models/notification';
3
+ import { NotificationSettings } from '../models/notification-settings';
4
+ import { PaginatedResponse } from './paginated-response.interface';
5
+ import { ConfigService } from '../services/config.service';
6
+ export interface NotificationFilters {
7
+ protected?: boolean;
8
+ not_viewed?: boolean;
9
+ important?: boolean;
10
+ }
11
+ export declare class NotificationBaseApi {
12
+ private httpClient;
13
+ private configService;
14
+ protected apiUrl: string;
15
+ constructor(httpClient: HttpClient, configService: ConfigService);
16
+ getCount(): Promise<number>;
17
+ getList(page: number, size: number, filters?: NotificationFilters): Promise<PaginatedResponse<Notification[]>>;
18
+ markViewed(notificationId: number, viewed: boolean): Promise<Notification>;
19
+ markAllViewed(): Promise<Notification[]>;
20
+ getNotificationSettings(): Promise<NotificationSettings>;
21
+ updateNotificationSettings(data: NotificationSettings): Promise<NotificationSettings>;
22
+ }
@@ -0,0 +1,4 @@
1
+ import { NotificationBaseApi } from './notification-base-api';
2
+ export declare class OrgNotificationApi extends NotificationBaseApi {
3
+ protected apiUrl: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface PaginatedResponse<T> {
2
+ total: number;
3
+ data: T;
4
+ }
@@ -0,0 +1,12 @@
1
+ export { BasketballGameApi } from './basketball-game-api';
2
+ export { LeagueApi } from './league-api';
3
+ export { MediaApi, GameMediaFilters } from './media-api';
4
+ export * from './notification-api';
5
+ export * from './notification-base-api';
6
+ export * from './org-notification-api';
7
+ export { PaginatedResponse } from './paginated-response.interface';
8
+ export { ReferenceApi } from './reference-api';
9
+ export { TournamentApi, TournamentGamesFilters, TournamentEventsListFilter, StatisticGroupByTypes, StatisticFilters } from './tournament-api';
10
+ export { TournamentJoinApi } from './tournament-join-api';
11
+ export { TournamentStageApi } from './tournament-stage-api';
12
+ export { VolleyballGameApi } from './volleyball-game-api';
@@ -0,0 +1,11 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ConfigService } from '../services/config.service';
3
+ import { City } from '../models/city';
4
+ import { Sport } from '../models/sport';
5
+ export declare class ReferenceApi {
6
+ private httpClient;
7
+ private configService;
8
+ constructor(httpClient: HttpClient, configService: ConfigService);
9
+ getCities(): Promise<City[]>;
10
+ getSports(): Promise<Sport[]>;
11
+ }
@@ -0,0 +1,64 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Tournament } from '../models/tournament';
3
+ import { TournamentNews } from '../models/tournament-news';
4
+ import { Game, GameStatuses } from '../models/game';
5
+ import { GameTimelineStages } from '../models/game-timeline-stages';
6
+ import { TournamentTeam } from '../models/tournament-team';
7
+ import { TournamentStage } from '../models/tournament-stage';
8
+ import { Playoff } from '../models/playoff';
9
+ import { PaginatedResponse } from './paginated-response.interface';
10
+ import { BasketballStatistic } from '../models/basketball-statistic';
11
+ import { VolleyballStatistic } from '../models/volleyball-statistic';
12
+ import { TournamentTeamUser } from '../models/tournament-team-user';
13
+ import { TournamentStageTeam } from '../models/tournament-stage-team';
14
+ import { TournamentEvent, TournamentEventTypes } from '../models/tournament-event';
15
+ import { ConfigService } from '../services/config.service';
16
+ export interface TournamentGamesFilters {
17
+ tournamentStageId?: number;
18
+ tournamentTour?: number;
19
+ teamId?: number;
20
+ playoffStage?: number;
21
+ playoffId?: number;
22
+ status?: GameStatuses;
23
+ }
24
+ export declare type StatisticGroupByTypes = 'team' | 'user' | 'team_user' | 'tournament_team' | 'tournament_team_user' | 'month' | 'win_loses';
25
+ export interface StatisticFilters {
26
+ tournament_id?: number;
27
+ tournament_team_id?: number;
28
+ tournament_team_user_id?: number;
29
+ team_id?: number;
30
+ team_user_id?: number;
31
+ user_id?: number;
32
+ tournament_stage_id?: number;
33
+ tournament_tour?: number;
34
+ playoff_stage?: number;
35
+ playoff_id?: number;
36
+ date_from?: string;
37
+ date_to?: string;
38
+ per_game?: boolean;
39
+ group_by: StatisticGroupByTypes;
40
+ }
41
+ export interface TournamentEventsListFilter {
42
+ event?: TournamentEventTypes;
43
+ search?: string;
44
+ }
45
+ export declare class TournamentApi {
46
+ private httpClient;
47
+ private configService;
48
+ constructor(httpClient: HttpClient, configService: ConfigService);
49
+ getByAlias(alias: string): Promise<Tournament>;
50
+ getNews(tournamentId: number): Promise<TournamentNews[]>;
51
+ getEvents(tournamentId: number, page: number, size: number, filters?: TournamentEventsListFilter): Promise<PaginatedResponse<TournamentEvent[]>>;
52
+ getTournamentStages(tournamentId: number): Promise<TournamentStage[]>;
53
+ getPlayoff(tournamentId: number): Promise<Playoff[]>;
54
+ getPlayoffGames(playoffId: number): Promise<Game[]>;
55
+ getGamesStages(tournamentId: number): Promise<GameTimelineStages>;
56
+ getGames(tournamentId: number, page: number, size: number, filters?: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
57
+ getTeams(tournamentId: number): Promise<TournamentTeam[]>;
58
+ getStageTeams(tournamentId: number): Promise<TournamentStageTeam[]>;
59
+ getTeamById(tournamentTeamId: number): Promise<TournamentTeam>;
60
+ getUserById(userId: number): Promise<TournamentTeamUser>;
61
+ getUserGames(tournamentUserId: number): Promise<Game[]>;
62
+ getBasketballStatistic(filters?: StatisticFilters): Promise<BasketballStatistic[]>;
63
+ getVolleyballStatistic(filters?: StatisticFilters): Promise<VolleyballStatistic[]>;
64
+ }
@@ -0,0 +1,14 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { TournamentJoinTeam } from '../models/tournament-join-team';
3
+ import { TeamUser } from '../models/team-user';
4
+ import { TournamentTeamUserInvite } from '../models/tournament-team-user-invite';
5
+ import { TournamentInvite } from '../models/tournament-invite';
6
+ import { ConfigService } from '../services/config.service';
7
+ export declare class TournamentJoinApi {
8
+ private httpClient;
9
+ private configService;
10
+ constructor(httpClient: HttpClient, configService: ConfigService);
11
+ getTeamsForJoin(tournamentId: number): Promise<TournamentJoinTeam[]>;
12
+ getTeamUsers(teamId: number): Promise<TeamUser[]>;
13
+ joinTournament(tournamentId: number, teamId: number, invites: TournamentTeamUserInvite[]): Promise<TournamentInvite>;
14
+ }
@@ -0,0 +1,15 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { TournamentStage } from '../models/tournament-stage';
3
+ import { TournamentGroup } from '../models/tournament-group';
4
+ import { Playoff } from '../models/playoff';
5
+ import { TournamentStageTeam } from '../models/tournament-stage-team';
6
+ import { ConfigService } from '../services/config.service';
7
+ export declare class TournamentStageApi {
8
+ private httpClient;
9
+ private configService;
10
+ constructor(httpClient: HttpClient, configService: ConfigService);
11
+ getById(id: number): Promise<TournamentStage>;
12
+ getGroups(stageId: number): Promise<TournamentGroup[]>;
13
+ getPlayoffs(stageId: number): Promise<Playoff[]>;
14
+ getTeams(stageId: number): Promise<TournamentStageTeam[]>;
15
+ }
@@ -0,0 +1,17 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Game } from '../models/game';
3
+ import { GameUser } from '../models/game-user';
4
+ import { VolleyballGameTeamStatistic } from '../models/volleyball-game-team-statistic';
5
+ import { VolleyballGameStatistic } from '../models/volleyball-game-statistic';
6
+ import { VolleyballGameLog } from '../models/volleyball-game-log';
7
+ import { ConfigService } from '../services/config.service';
8
+ export declare class VolleyballGameApi {
9
+ private httpClient;
10
+ private configService;
11
+ constructor(httpClient: HttpClient, configService: ConfigService);
12
+ getById(gameId: number): Promise<Game>;
13
+ getUsers(gameId: number): Promise<GameUser[]>;
14
+ getTeamStatistic(gameId: number): Promise<VolleyballGameTeamStatistic>;
15
+ getUserStatistic(gameId: number): Promise<VolleyballGameStatistic[]>;
16
+ getLogs(gameId: number): Promise<VolleyballGameLog[]>;
17
+ }