@mtgame/core 0.1.107 → 0.1.109

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.
@@ -11,6 +11,7 @@ import { LeaguePartner } from '../models/league-partner';
11
11
  import { LeagueCourt } from '../models/league-court';
12
12
  import { BannerLocation, LeagueBanner } from '../models/league-banner';
13
13
  import { LeagueDocument } from '../models/league-document';
14
+ import { TeamsAndUsers } from '../models/teams-and-users';
14
15
  export interface TournamentListFilters {
15
16
  statuses: TournamentStatuses[];
16
17
  }
@@ -30,4 +31,5 @@ export declare class LeagueApi {
30
31
  getCourts(leagueId: number): Promise<LeagueCourt[]>;
31
32
  getGraphicSettings(leagueId: number): Promise<any>;
32
33
  getDocuments(leagueId: number): Promise<LeagueDocument[]>;
34
+ searchTeamsAndUsers(leagueId: number, query: string): Promise<TeamsAndUsers>;
33
35
  }
@@ -3109,6 +3109,8 @@
3109
3109
  technical_fouls: 'technicalFouls',
3110
3110
  unsportsmanlike_fouls: 'unsportsmanlikeFouls',
3111
3111
  disqualification_fouls: 'disqualificationFouls',
3112
+ drawn_fouls: 'drawnFouls',
3113
+ player_efficiency: 'playerEfficiency',
3112
3114
  game_time: 'gameTime',
3113
3115
  newbie: 'newbie',
3114
3116
  rank: 'rank',
@@ -3253,6 +3255,8 @@
3253
3255
  technical_fouls: 'technicalFouls',
3254
3256
  unsportsmanlike_fouls: 'unsportsmanlikeFouls',
3255
3257
  disqualification_fouls: 'disqualificationFouls',
3258
+ drawn_fouls: 'drawnFouls',
3259
+ player_efficiency: 'playerEfficiency',
3256
3260
  updated_at: 'updatedAt',
3257
3261
  },
3258
3262
  relation: {
@@ -6715,6 +6719,30 @@
6715
6719
  })
6716
6720
  ], exports.LeagueDocument);
6717
6721
 
6722
+ exports.TeamsAndUsers = /** @class */ (function (_super) {
6723
+ __extends(TeamsAndUsers, _super);
6724
+ function TeamsAndUsers() {
6725
+ return _super !== null && _super.apply(this, arguments) || this;
6726
+ }
6727
+ TeamsAndUsers.toFront = function (data) { };
6728
+ TeamsAndUsers.toBack = function (data) { };
6729
+ return TeamsAndUsers;
6730
+ }(BaseModel));
6731
+ __decorate([
6732
+ ToFrontHook
6733
+ ], exports.TeamsAndUsers, "toFront", null);
6734
+ __decorate([
6735
+ ToBackHook
6736
+ ], exports.TeamsAndUsers, "toBack", null);
6737
+ exports.TeamsAndUsers = __decorate([
6738
+ ModelInstance({
6739
+ mappingFields: {
6740
+ teams: 'teams',
6741
+ leaguePlayers: 'leaguePlayers',
6742
+ }
6743
+ })
6744
+ ], exports.TeamsAndUsers);
6745
+
6718
6746
  var LeagueApi = /** @class */ (function () {
6719
6747
  function LeagueApi(httpClient, configService) {
6720
6748
  this.httpClient = httpClient;
@@ -6806,7 +6834,10 @@
6806
6834
  .set('size', size.toString())
6807
6835
  .set('not_closed', notClosed ? '1' : '')
6808
6836
  .set('include', include ? include.join(',') : '');
6809
- return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", { params: params, observe: 'response' })
6837
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/tournament_seasons/", {
6838
+ params: params,
6839
+ observe: 'response'
6840
+ })
6810
6841
  .pipe(operators.map(function (result) { return ({
6811
6842
  total: +result.headers.get('X-Page-Count'),
6812
6843
  data: exports.TournamentSeason.toFront(result.body)
@@ -6853,6 +6884,15 @@
6853
6884
  });
6854
6885
  });
6855
6886
  };
6887
+ LeagueApi.prototype.searchTeamsAndUsers = function (leagueId, query) {
6888
+ return __awaiter(this, void 0, void 0, function () {
6889
+ var params;
6890
+ return __generator(this, function (_a) {
6891
+ params = (new i1.HttpParams()).set('query', query);
6892
+ return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league/" + leagueId + "/team_and_user_search/", { params: params }).pipe(operators.map(function (result) { return exports.TeamsAndUsers.toFront(result); })).toPromise()];
6893
+ });
6894
+ });
6895
+ };
6856
6896
  return LeagueApi;
6857
6897
  }());
6858
6898
  LeagueApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LeagueApi_Factory() { return new LeagueApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: LeagueApi, providedIn: "root" });