@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.
- package/README.md +24 -0
- package/api/basketball-game-api.d.ts +17 -0
- package/api/league-api.d.ts +16 -0
- package/api/media-api.d.ts +24 -0
- package/api/notification-api.d.ts +4 -0
- package/api/notification-base-api.d.ts +22 -0
- package/api/org-notification-api.d.ts +4 -0
- package/api/paginated-response.interface.d.ts +4 -0
- package/api/public-api.d.ts +12 -0
- package/api/reference-api.d.ts +11 -0
- package/api/tournament-api.d.ts +64 -0
- package/api/tournament-join-api.d.ts +14 -0
- package/api/tournament-stage-api.d.ts +15 -0
- package/api/volleyball-game-api.d.ts +17 -0
- package/bundles/mtgame-core.umd.js +4785 -0
- package/bundles/mtgame-core.umd.js.map +1 -0
- package/bundles/mtgame-core.umd.min.js +16 -0
- package/bundles/mtgame-core.umd.min.js.map +1 -0
- package/esm2015/api/basketball-game-api.js +54 -0
- package/esm2015/api/league-api.js +60 -0
- package/esm2015/api/media-api.js +110 -0
- package/esm2015/api/notification-api.js +18 -0
- package/esm2015/api/notification-base-api.js +83 -0
- package/esm2015/api/org-notification-api.js +18 -0
- package/esm2015/api/paginated-response.interface.js +1 -0
- package/esm2015/api/public-api.js +12 -0
- package/esm2015/api/reference-api.js +40 -0
- package/esm2015/api/tournament-api.js +187 -0
- package/esm2015/api/tournament-join-api.js +51 -0
- package/esm2015/api/tournament-stage-api.js +56 -0
- package/esm2015/api/volleyball-game-api.js +54 -0
- package/esm2015/http-cookie.interceptor.js +34 -0
- package/esm2015/localization/basketball-game-log-types.js +26 -0
- package/esm2015/localization/overtime-types.js +7 -0
- package/esm2015/localization/public-api.js +7 -0
- package/esm2015/localization/team-event-type.js +6 -0
- package/esm2015/localization/team-user-role.js +7 -0
- package/esm2015/localization/user-profile.js +46 -0
- package/esm2015/localization/volleyball-game-log-types.js +25 -0
- package/esm2015/models/basketball-game-config.js +42 -0
- package/esm2015/models/basketball-game-log.js +109 -0
- package/esm2015/models/basketball-game-statistic.js +50 -0
- package/esm2015/models/basketball-game-team-statistic.js +27 -0
- package/esm2015/models/basketball-profile.js +43 -0
- package/esm2015/models/basketball-statistic.js +69 -0
- package/esm2015/models/city.js +22 -0
- package/esm2015/models/file.js +38 -0
- package/esm2015/models/game-invite.js +37 -0
- package/esm2015/models/game-log-base.js +1 -0
- package/esm2015/models/game-statistic-base.js +1 -0
- package/esm2015/models/game-timeline-stages.js +49 -0
- package/esm2015/models/game-user.js +32 -0
- package/esm2015/models/game.js +108 -0
- package/esm2015/models/league-court.js +24 -0
- package/esm2015/models/league.js +52 -0
- package/esm2015/models/media-item.js +40 -0
- package/esm2015/models/notification-settings.js +35 -0
- package/esm2015/models/notification.js +134 -0
- package/esm2015/models/organization.js +27 -0
- package/esm2015/models/playoff.js +78 -0
- package/esm2015/models/poll.js +132 -0
- package/esm2015/models/public-api.js +50 -0
- package/esm2015/models/sport.js +47 -0
- package/esm2015/models/team-event-invite.js +32 -0
- package/esm2015/models/team-event-type.js +6 -0
- package/esm2015/models/team-event.js +45 -0
- package/esm2015/models/team-invite-external.js +25 -0
- package/esm2015/models/team-invite.js +41 -0
- package/esm2015/models/team-user.js +39 -0
- package/esm2015/models/team.js +56 -0
- package/esm2015/models/tournament-disqualification.js +29 -0
- package/esm2015/models/tournament-event.js +38 -0
- package/esm2015/models/tournament-group.js +23 -0
- package/esm2015/models/tournament-invite.js +39 -0
- package/esm2015/models/tournament-join-team.js +55 -0
- package/esm2015/models/tournament-news.js +33 -0
- package/esm2015/models/tournament-stage-team.js +45 -0
- package/esm2015/models/tournament-stage.js +35 -0
- package/esm2015/models/tournament-team-user-invite.js +29 -0
- package/esm2015/models/tournament-team-user.js +49 -0
- package/esm2015/models/tournament-team.js +54 -0
- package/esm2015/models/tournament.js +161 -0
- package/esm2015/models/user-profile.js +24 -0
- package/esm2015/models/user.js +74 -0
- package/esm2015/models/util.js +208 -0
- package/esm2015/models/volleyball-game-config.js +40 -0
- package/esm2015/models/volleyball-game-log.js +139 -0
- package/esm2015/models/volleyball-game-statistic.js +50 -0
- package/esm2015/models/volleyball-game-team-statistic.js +27 -0
- package/esm2015/models/volleyball-profile.js +43 -0
- package/esm2015/models/volleyball-statistic.js +66 -0
- package/esm2015/mtgame-core.js +5 -0
- package/esm2015/public-api.js +8 -0
- package/esm2015/services/base.service.js +18 -0
- package/esm2015/services/centrifugo.service.js +107 -0
- package/esm2015/services/config.service.js +40 -0
- package/esm2015/services/public-api.js +4 -0
- package/esm2015/storage/local-storage-engine.js +18 -0
- package/esm2015/storage/public-api.js +4 -0
- package/esm2015/storage/storage-engine.js +61 -0
- package/esm2015/storage/store.js +63 -0
- package/esm2015/utils/array.js +18 -0
- package/esm2015/utils/component-destroyed.js +21 -0
- package/esm2015/utils/cookie.js +9 -0
- package/esm2015/utils/data.js +75 -0
- package/esm2015/utils/device.js +14 -0
- package/esm2015/utils/enum.js +7 -0
- package/esm2015/utils/errors.js +10 -0
- package/esm2015/utils/favicon.js +25 -0
- package/esm2015/utils/form.js +22 -0
- package/esm2015/utils/public-api.js +11 -0
- package/esm2015/utils/validators.js +47 -0
- package/esm5/api/basketball-game-api.js +65 -0
- package/esm5/api/league-api.js +70 -0
- package/esm5/api/media-api.js +125 -0
- package/esm5/api/notification-api.js +21 -0
- package/esm5/api/notification-base-api.js +109 -0
- package/esm5/api/org-notification-api.js +21 -0
- package/esm5/api/paginated-response.interface.js +1 -0
- package/esm5/api/public-api.js +12 -0
- package/esm5/api/reference-api.js +45 -0
- package/esm5/api/tournament-api.js +245 -0
- package/esm5/api/tournament-join-api.js +59 -0
- package/esm5/api/tournament-stage-api.js +65 -0
- package/esm5/api/volleyball-game-api.js +65 -0
- package/esm5/http-cookie.interceptor.js +35 -0
- package/esm5/localization/basketball-game-log-types.js +27 -0
- package/esm5/localization/overtime-types.js +8 -0
- package/esm5/localization/public-api.js +7 -0
- package/esm5/localization/team-event-type.js +7 -0
- package/esm5/localization/team-user-role.js +8 -0
- package/esm5/localization/user-profile.js +47 -0
- package/esm5/localization/volleyball-game-log-types.js +26 -0
- package/esm5/models/basketball-game-config.js +47 -0
- package/esm5/models/basketball-game-log.js +117 -0
- package/esm5/models/basketball-game-statistic.js +63 -0
- package/esm5/models/basketball-game-team-statistic.js +32 -0
- package/esm5/models/basketball-profile.js +48 -0
- package/esm5/models/basketball-statistic.js +78 -0
- package/esm5/models/city.js +27 -0
- package/esm5/models/file.js +41 -0
- package/esm5/models/game-invite.js +42 -0
- package/esm5/models/game-log-base.js +1 -0
- package/esm5/models/game-statistic-base.js +1 -0
- package/esm5/models/game-timeline-stages.js +57 -0
- package/esm5/models/game-user.js +37 -0
- package/esm5/models/game.js +134 -0
- package/esm5/models/league-court.js +29 -0
- package/esm5/models/league.js +69 -0
- package/esm5/models/media-item.js +49 -0
- package/esm5/models/notification-settings.js +40 -0
- package/esm5/models/notification.js +143 -0
- package/esm5/models/organization.js +32 -0
- package/esm5/models/playoff.js +91 -0
- package/esm5/models/poll.js +154 -0
- package/esm5/models/public-api.js +50 -0
- package/esm5/models/sport.js +52 -0
- package/esm5/models/team-event-invite.js +35 -0
- package/esm5/models/team-event-type.js +6 -0
- package/esm5/models/team-event.js +58 -0
- package/esm5/models/team-invite-external.js +30 -0
- package/esm5/models/team-invite.js +46 -0
- package/esm5/models/team-user.js +44 -0
- package/esm5/models/team.js +61 -0
- package/esm5/models/tournament-disqualification.js +34 -0
- package/esm5/models/tournament-event.js +43 -0
- package/esm5/models/tournament-group.js +28 -0
- package/esm5/models/tournament-invite.js +48 -0
- package/esm5/models/tournament-join-team.js +73 -0
- package/esm5/models/tournament-news.js +38 -0
- package/esm5/models/tournament-stage-team.js +54 -0
- package/esm5/models/tournament-stage.js +40 -0
- package/esm5/models/tournament-team-user-invite.js +34 -0
- package/esm5/models/tournament-team-user.js +66 -0
- package/esm5/models/tournament-team.js +63 -0
- package/esm5/models/tournament.js +176 -0
- package/esm5/models/user-profile.js +27 -0
- package/esm5/models/user.js +95 -0
- package/esm5/models/util.js +275 -0
- package/esm5/models/volleyball-game-config.js +49 -0
- package/esm5/models/volleyball-game-log.js +142 -0
- package/esm5/models/volleyball-game-statistic.js +71 -0
- package/esm5/models/volleyball-game-team-statistic.js +32 -0
- package/esm5/models/volleyball-profile.js +48 -0
- package/esm5/models/volleyball-statistic.js +71 -0
- package/esm5/mtgame-core.js +5 -0
- package/esm5/public-api.js +8 -0
- package/esm5/services/base.service.js +19 -0
- package/esm5/services/centrifugo.service.js +111 -0
- package/esm5/services/config.service.js +52 -0
- package/esm5/services/public-api.js +4 -0
- package/esm5/storage/local-storage-engine.js +25 -0
- package/esm5/storage/public-api.js +4 -0
- package/esm5/storage/storage-engine.js +77 -0
- package/esm5/storage/store.js +77 -0
- package/esm5/utils/array.js +18 -0
- package/esm5/utils/component-destroyed.js +21 -0
- package/esm5/utils/cookie.js +9 -0
- package/esm5/utils/data.js +79 -0
- package/esm5/utils/device.js +14 -0
- package/esm5/utils/enum.js +7 -0
- package/esm5/utils/errors.js +12 -0
- package/esm5/utils/favicon.js +47 -0
- package/esm5/utils/form.js +22 -0
- package/esm5/utils/public-api.js +11 -0
- package/esm5/utils/validators.js +49 -0
- package/fesm2015/mtgame-core.js +3749 -0
- package/fesm2015/mtgame-core.js.map +1 -0
- package/fesm5/mtgame-core.js +4455 -0
- package/fesm5/mtgame-core.js.map +1 -0
- package/http-cookie.interceptor.d.ts +10 -0
- package/localization/basketball-game-log-types.d.ts +25 -0
- package/localization/overtime-types.d.ts +6 -0
- package/localization/public-api.d.ts +6 -0
- package/localization/team-event-type.d.ts +5 -0
- package/localization/team-user-role.d.ts +6 -0
- package/localization/user-profile.d.ts +45 -0
- package/localization/volleyball-game-log-types.d.ts +24 -0
- package/models/basketball-game-config.d.ts +22 -0
- package/models/basketball-game-log.d.ts +52 -0
- package/models/basketball-game-statistic.d.ts +29 -0
- package/models/basketball-game-team-statistic.d.ts +8 -0
- package/models/basketball-profile.d.ts +20 -0
- package/models/basketball-statistic.d.ts +44 -0
- package/models/city.d.ts +7 -0
- package/models/file.d.ts +14 -0
- package/models/game-invite.d.ts +16 -0
- package/models/game-log-base.d.ts +10 -0
- package/models/game-statistic-base.d.ts +3 -0
- package/models/game-timeline-stages.d.ts +18 -0
- package/models/game-user.d.ts +12 -0
- package/models/game.d.ts +56 -0
- package/models/league-court.d.ts +9 -0
- package/models/league.d.ts +25 -0
- package/models/media-item.d.ts +15 -0
- package/models/notification-settings.d.ts +15 -0
- package/models/notification.d.ts +98 -0
- package/models/organization.d.ts +9 -0
- package/models/playoff.d.ts +25 -0
- package/models/poll.d.ts +46 -0
- package/models/public-api.d.ts +50 -0
- package/models/sport.d.ts +19 -0
- package/models/team-event-invite.d.ts +12 -0
- package/models/team-event-type.d.ts +4 -0
- package/models/team-event.d.ts +17 -0
- package/models/team-invite-external.d.ts +10 -0
- package/models/team-invite.d.ts +20 -0
- package/models/team-user.d.ts +18 -0
- package/models/team.d.ts +21 -0
- package/models/tournament-disqualification.d.ts +10 -0
- package/models/tournament-event.d.ts +16 -0
- package/models/tournament-group.d.ts +10 -0
- package/models/tournament-invite.d.ts +17 -0
- package/models/tournament-join-team.d.ts +19 -0
- package/models/tournament-news.d.ts +13 -0
- package/models/tournament-stage-team.d.ts +21 -0
- package/models/tournament-stage.d.ts +15 -0
- package/models/tournament-team-user-invite.d.ts +11 -0
- package/models/tournament-team-user.d.ts +22 -0
- package/models/tournament-team.d.ts +28 -0
- package/models/tournament.d.ts +87 -0
- package/models/user-profile.d.ts +8 -0
- package/models/user.d.ts +33 -0
- package/models/util.d.ts +49 -0
- package/models/volleyball-game-config.d.ts +17 -0
- package/models/volleyball-game-log.d.ts +54 -0
- package/models/volleyball-game-statistic.d.ts +28 -0
- package/models/volleyball-game-team-statistic.d.ts +8 -0
- package/models/volleyball-profile.d.ts +20 -0
- package/models/volleyball-statistic.d.ts +43 -0
- package/mtgame-core.d.ts +4 -0
- package/mtgame-core.metadata.json +1 -0
- package/package.json +23 -0
- package/public-api.d.ts +7 -0
- package/services/base.service.d.ts +5 -0
- package/services/centrifugo.service.d.ts +20 -0
- package/services/config.service.d.ts +11 -0
- package/services/public-api.d.ts +3 -0
- package/storage/local-storage-engine.d.ts +6 -0
- package/storage/public-api.d.ts +3 -0
- package/storage/storage-engine.d.ts +24 -0
- package/storage/store.d.ts +21 -0
- package/utils/array.d.ts +2 -0
- package/utils/component-destroyed.d.ts +7 -0
- package/utils/cookie.d.ts +1 -0
- package/utils/data.d.ts +6 -0
- package/utils/device.d.ts +1 -0
- package/utils/enum.d.ts +1 -0
- package/utils/errors.d.ts +1 -0
- package/utils/favicon.d.ts +9 -0
- package/utils/form.d.ts +2 -0
- package/utils/public-api.d.ts +10 -0
- 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,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,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
|
+
}
|