@mtgame/core 0.0.77 → 0.1.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/api/league-api.d.ts +7 -3
- package/api/media-api.d.ts +6 -9
- package/api/tournament-api.d.ts +44 -5
- package/bundles/mtgame-core.umd.js +290 -88
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/league-api.js +27 -8
- package/esm2015/api/media-api.js +31 -41
- package/esm2015/api/tournament-api.js +115 -6
- package/esm2015/api/tournament-season-api.js +4 -22
- package/esm2015/models/base-statistic.js +1 -1
- package/esm2015/models/public-api.js +37 -37
- package/esm2015/models/tournament-season.js +2 -1
- package/esm2015/models/tournament-team.js +3 -1
- package/esm2015/mtgame-core.js +2 -3
- package/esm5/api/league-api.js +32 -8
- package/esm5/api/media-api.js +31 -41
- package/esm5/api/tournament-api.js +222 -21
- package/esm5/api/tournament-season-api.js +4 -22
- package/esm5/models/base-statistic.js +1 -1
- package/esm5/models/public-api.js +37 -37
- package/esm5/models/tournament-season.js +2 -1
- package/esm5/models/tournament-team.js +3 -1
- package/esm5/mtgame-core.js +2 -3
- package/fesm2015/mtgame-core.js +173 -72
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +285 -87
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/base-statistic.d.ts +1 -0
- package/models/public-api.d.ts +37 -37
- package/models/tournament-team.d.ts +1 -0
- package/mtgame-core.d.ts +1 -2
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/league-api.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { League } from '../models/league';
|
|
3
|
-
import { Tournament } from '../models/tournament';
|
|
3
|
+
import { Tournament, TournamentStatuses } from '../models/tournament';
|
|
4
4
|
import { ConfigService } from '../services/config.service';
|
|
5
5
|
import { TournamentEventsListFilter, TournamentGamesFilters } from './tournament-api';
|
|
6
6
|
import { PaginatedResponse } from './paginated-response.interface';
|
|
@@ -10,18 +10,22 @@ import { Game } from '../models/game';
|
|
|
10
10
|
import { LeaguePartner } from '../models/league-partner';
|
|
11
11
|
import { LeagueCourt } from '../models/league-court';
|
|
12
12
|
import { BannerLocation, LeagueBanner } from '../models/league-banner';
|
|
13
|
+
export interface TournamentListFilters {
|
|
14
|
+
statuses: TournamentStatuses[];
|
|
15
|
+
}
|
|
13
16
|
export declare class LeagueApi {
|
|
14
17
|
private httpClient;
|
|
15
18
|
private configService;
|
|
16
19
|
constructor(httpClient: HttpClient, configService: ConfigService);
|
|
17
20
|
getByAlias(alias: string): Promise<League>;
|
|
18
21
|
getByDomain(domain: string): Promise<League>;
|
|
19
|
-
getTournaments(leagueId: number): Promise<Tournament[]>;
|
|
22
|
+
getTournaments(leagueId: number, filters?: TournamentListFilters): Promise<Tournament[]>;
|
|
20
23
|
getEvents(leagueId: number, page: number, size: number, filters?: TournamentEventsListFilter): Promise<PaginatedResponse<TournamentEvent[]>>;
|
|
21
24
|
getTournamentSeasons(leagueId: number): Promise<TournamentSeason[]>;
|
|
22
25
|
getGames(leagueId: number, page: number, size: number, filters: TournamentGamesFilters): Promise<PaginatedResponse<Game[]>>;
|
|
23
|
-
getSeasons(leagueId: number, notClosed?: boolean): Promise<TournamentSeason[]
|
|
26
|
+
getSeasons(leagueId: number, page?: number, size?: number, notClosed?: boolean, include?: string[]): Promise<PaginatedResponse<TournamentSeason[]>>;
|
|
24
27
|
getPartners(leagueId: number): Promise<LeaguePartner[]>;
|
|
25
28
|
getBanners(leagueId: number, location?: BannerLocation): Promise<LeagueBanner[]>;
|
|
26
29
|
getCourts(leagueId: number): Promise<LeagueCourt[]>;
|
|
30
|
+
getGraphicSettings(leagueId: number): Promise<any>;
|
|
27
31
|
}
|
package/api/media-api.d.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
1
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
2
2
|
import { MediaItem } from '../models/media-item';
|
|
3
|
-
import { Game
|
|
3
|
+
import { Game } from '../models/game';
|
|
4
4
|
import { PaginatedResponse } from './paginated-response.interface';
|
|
5
5
|
import { ConfigService } from '../services/config.service';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
teamId?: number;
|
|
10
|
-
playoffStage?: number;
|
|
11
|
-
playoffId?: number;
|
|
12
|
-
status?: GameStatuses;
|
|
6
|
+
import { TournamentGamesFilters } from './tournament-api';
|
|
7
|
+
export interface GameMediaFilters extends TournamentGamesFilters {
|
|
8
|
+
mediaCount?: number;
|
|
13
9
|
}
|
|
14
10
|
export interface MediaFilters {
|
|
15
11
|
mediaType?: 'photo' | 'video' | 'live_video';
|
|
@@ -29,3 +25,4 @@ export declare class MediaApi {
|
|
|
29
25
|
createZip(mediaIds: number[]): Promise<any>;
|
|
30
26
|
downloadMedia(mediaId: number): Promise<any>;
|
|
31
27
|
}
|
|
28
|
+
export declare function applyGameMediaFilters(filters: GameMediaFilters, params: HttpParams): HttpParams;
|
package/api/tournament-api.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface TournamentGamesFilters {
|
|
|
29
29
|
statuses?: GameStatuses[];
|
|
30
30
|
tournamentCourtId?: number;
|
|
31
31
|
userId?: number;
|
|
32
|
+
query?: string;
|
|
32
33
|
}
|
|
33
34
|
export declare type StatisticGroupByTypes = 'team' | 'user' | 'team_user' | 'tournament_team' | 'tournament_team_user' | 'month' | 'win_loses';
|
|
34
35
|
export interface StatisticFilters {
|
|
@@ -46,8 +47,29 @@ export interface StatisticFilters {
|
|
|
46
47
|
playoff_id?: number;
|
|
47
48
|
date_from?: string;
|
|
48
49
|
date_to?: string;
|
|
50
|
+
query?: string;
|
|
49
51
|
per_game?: boolean;
|
|
50
52
|
group_by: StatisticGroupByTypes;
|
|
53
|
+
order_by?: string;
|
|
54
|
+
page?: number;
|
|
55
|
+
size?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface StatisticLeadersFilters {
|
|
58
|
+
tournament_id?: number;
|
|
59
|
+
tournament_ids?: number[];
|
|
60
|
+
tournament_season_id?: number;
|
|
61
|
+
tournament_team_id?: number;
|
|
62
|
+
team_id?: number;
|
|
63
|
+
tournament_stage_id?: number;
|
|
64
|
+
tournament_tour?: number;
|
|
65
|
+
playoff_stage?: number;
|
|
66
|
+
playoff_id?: number;
|
|
67
|
+
date_from?: string;
|
|
68
|
+
date_to?: string;
|
|
69
|
+
per_game?: boolean;
|
|
70
|
+
group_by: StatisticGroupByTypes;
|
|
71
|
+
size?: number;
|
|
72
|
+
fields: string[];
|
|
51
73
|
}
|
|
52
74
|
export interface TournamentEventsListFilter {
|
|
53
75
|
event?: TournamentEventTypes;
|
|
@@ -72,14 +94,31 @@ export declare class TournamentApi {
|
|
|
72
94
|
getTeamById(tournamentTeamId: number): Promise<TournamentTeam>;
|
|
73
95
|
getUserById(userId: number): Promise<TournamentTeamUser>;
|
|
74
96
|
getUserGames(tournamentUserId: number): Promise<Game[]>;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
97
|
+
getBasketballStatisticLeaders(filters: StatisticLeadersFilters): Promise<{
|
|
98
|
+
[key: string]: BasketballStatistic[];
|
|
99
|
+
}>;
|
|
100
|
+
getVolleyballStatisticLeaders(filters: StatisticLeadersFilters): Promise<{
|
|
101
|
+
[key: string]: VolleyballStatistic[];
|
|
102
|
+
}>;
|
|
103
|
+
getHockeyStatisticLeaders(filters: StatisticLeadersFilters): Promise<{
|
|
104
|
+
[key: string]: HockeyStatistic[];
|
|
105
|
+
}>;
|
|
106
|
+
getFootballStatisticLeaders(filters: StatisticLeadersFilters): Promise<{
|
|
107
|
+
[key: string]: FootballStatistic[];
|
|
108
|
+
}>;
|
|
109
|
+
getHandballStatisticLeaders(filters: StatisticLeadersFilters): Promise<{
|
|
110
|
+
[key: string]: HandballStatistic[];
|
|
111
|
+
}>;
|
|
112
|
+
getBasketballStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<BasketballStatistic[]>>;
|
|
113
|
+
getVolleyballStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<VolleyballStatistic[]>>;
|
|
114
|
+
getHockeyStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<HockeyStatistic[]>>;
|
|
115
|
+
getFootballStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<FootballStatistic[]>>;
|
|
116
|
+
getHandballStatistic(filters?: StatisticFilters): Promise<PaginatedResponse<HandballStatistic[]>>;
|
|
80
117
|
getTournamentTeamUsers(tournamentTeamId: number): Promise<TournamentTeamUser[]>;
|
|
81
118
|
myPermission(tournamentId: number): Promise<LeagueUserPermissions[]>;
|
|
82
119
|
getTournamentTeamTournaments(tournamentTeamId: number): Promise<Tournament[]>;
|
|
83
120
|
getTournamentUserTournaments(tournamentTeamUserId: number): Promise<Tournament[]>;
|
|
84
121
|
}
|
|
85
122
|
export declare function applyGamesFilters(filters: TournamentGamesFilters, params: HttpParams): HttpParams;
|
|
123
|
+
export declare function applyStatisticFilters(filters: StatisticFilters, params: HttpParams): HttpParams;
|
|
124
|
+
export declare function applyStatisticLeadersFilters(filters: StatisticLeadersFilters, params: HttpParams): HttpParams;
|