@mtgame/core 0.2.1 → 0.2.3

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.
@@ -1795,6 +1795,7 @@
1795
1795
  alias: 'alias',
1796
1796
  logo: 'logo',
1797
1797
  cover: 'cover',
1798
+ cover_mobile: 'coverMobile',
1798
1799
  preview_image: 'previewImage',
1799
1800
  city: 'city',
1800
1801
  sport: 'sport',
@@ -1819,6 +1820,7 @@
1819
1820
  relation: {
1820
1821
  logo: exports.File,
1821
1822
  cover: exports.File,
1823
+ coverMobile: exports.File,
1822
1824
  previewImage: exports.File,
1823
1825
  city: exports.City,
1824
1826
  sport: exports.Sport,
@@ -2960,6 +2962,110 @@
2960
2962
  })
2961
2963
  ], exports.TournamentDivision);
2962
2964
 
2965
+ var LeagueFieldBaseValue = /** @class */ (function (_super) {
2966
+ __extends(LeagueFieldBaseValue, _super);
2967
+ function LeagueFieldBaseValue() {
2968
+ return _super !== null && _super.apply(this, arguments) || this;
2969
+ }
2970
+ return LeagueFieldBaseValue;
2971
+ }(BaseModel));
2972
+
2973
+ exports.LeagueFieldTypes = void 0;
2974
+ (function (LeagueFieldTypes) {
2975
+ LeagueFieldTypes[LeagueFieldTypes["text"] = 1] = "text";
2976
+ LeagueFieldTypes[LeagueFieldTypes["select"] = 2] = "select";
2977
+ LeagueFieldTypes[LeagueFieldTypes["file"] = 3] = "file";
2978
+ })(exports.LeagueFieldTypes || (exports.LeagueFieldTypes = {}));
2979
+ var LeagueFieldBase = /** @class */ (function (_super) {
2980
+ __extends(LeagueFieldBase, _super);
2981
+ function LeagueFieldBase() {
2982
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
2983
+ _this._variantsMapping = {};
2984
+ _this._variants = [];
2985
+ return _this;
2986
+ }
2987
+ Object.defineProperty(LeagueFieldBase.prototype, "variants", {
2988
+ get: function () {
2989
+ return this._variants;
2990
+ },
2991
+ set: function (value) {
2992
+ this._variants = value;
2993
+ this._variantsMapping = value.reduce(function (acc, item) {
2994
+ var _a;
2995
+ return (Object.assign(Object.assign({}, acc), (_a = {}, _a[item.uuid] = item.name, _a)));
2996
+ }, {});
2997
+ },
2998
+ enumerable: false,
2999
+ configurable: true
3000
+ });
3001
+ LeagueFieldBase.prototype.getName = function (uuid) {
3002
+ return this._variantsMapping[uuid];
3003
+ };
3004
+ return LeagueFieldBase;
3005
+ }(BaseModel));
3006
+
3007
+ exports.LeagueTeamField = /** @class */ (function (_super) {
3008
+ __extends(LeagueTeamField, _super);
3009
+ function LeagueTeamField() {
3010
+ return _super !== null && _super.apply(this, arguments) || this;
3011
+ }
3012
+ LeagueTeamField.toFront = function (data) { };
3013
+ LeagueTeamField.toBack = function (data) { };
3014
+ return LeagueTeamField;
3015
+ }(LeagueFieldBase));
3016
+ __decorate([
3017
+ ToFrontHook
3018
+ ], exports.LeagueTeamField, "toFront", null);
3019
+ __decorate([
3020
+ ToBackHook
3021
+ ], exports.LeagueTeamField, "toBack", null);
3022
+ exports.LeagueTeamField = __decorate([
3023
+ ModelInstance({
3024
+ mappingFields: {
3025
+ id: 'id',
3026
+ league_id: 'leagueId',
3027
+ name: 'name',
3028
+ type: 'type',
3029
+ is_multiple: 'isMultiple',
3030
+ variants: 'variants',
3031
+ },
3032
+ relation: {
3033
+ type: enumField(exports.LeagueFieldTypes)
3034
+ }
3035
+ })
3036
+ ], exports.LeagueTeamField);
3037
+
3038
+ exports.LeagueTeamFieldValue = /** @class */ (function (_super) {
3039
+ __extends(LeagueTeamFieldValue, _super);
3040
+ function LeagueTeamFieldValue() {
3041
+ return _super !== null && _super.apply(this, arguments) || this;
3042
+ }
3043
+ LeagueTeamFieldValue.toFront = function (data) { };
3044
+ LeagueTeamFieldValue.toBack = function (data) { };
3045
+ return LeagueTeamFieldValue;
3046
+ }(LeagueFieldBaseValue));
3047
+ __decorate([
3048
+ ToFrontHook
3049
+ ], exports.LeagueTeamFieldValue, "toFront", null);
3050
+ __decorate([
3051
+ ToBackHook
3052
+ ], exports.LeagueTeamFieldValue, "toBack", null);
3053
+ exports.LeagueTeamFieldValue = __decorate([
3054
+ ModelInstance({
3055
+ mappingFields: {
3056
+ id: 'id',
3057
+ league_team_field_id: 'leagueTeamFieldId',
3058
+ league_team_field: 'leagueTeamField',
3059
+ value: 'value',
3060
+ file: 'file',
3061
+ },
3062
+ relation: {
3063
+ file: exports.File,
3064
+ leagueTeamField: exports.LeagueTeamField,
3065
+ }
3066
+ })
3067
+ ], exports.LeagueTeamFieldValue);
3068
+
2963
3069
  exports.TeamAdditionalData = /** @class */ (function () {
2964
3070
  function TeamAdditionalData() {
2965
3071
  }
@@ -3046,6 +3152,7 @@
3046
3152
  attack_bonuses: 'attackBonuses',
3047
3153
  defense_bonuses: 'defenseBonuses',
3048
3154
  team_additional_data: 'teamAdditionalData',
3155
+ field_values: 'fieldValues',
3049
3156
  },
3050
3157
  relation: {
3051
3158
  logo: exports.File,
@@ -3058,6 +3165,7 @@
3058
3165
  lastFiveGames: exports.Game,
3059
3166
  division: exports.TournamentDivision,
3060
3167
  teamAdditionalData: exports.TeamAdditionalData,
3168
+ fieldValues: listField(exports.LeagueTeamFieldValue),
3061
3169
  }
3062
3170
  })
3063
3171
  ], exports.TournamentTeam);
@@ -3142,6 +3250,68 @@
3142
3250
  })
3143
3251
  ], exports.TournamentDisqualification);
3144
3252
 
3253
+ exports.LeaguePlayerField = /** @class */ (function (_super) {
3254
+ __extends(LeaguePlayerField, _super);
3255
+ function LeaguePlayerField() {
3256
+ return _super !== null && _super.apply(this, arguments) || this;
3257
+ }
3258
+ LeaguePlayerField.toFront = function (data) { };
3259
+ LeaguePlayerField.toBack = function (data) { };
3260
+ return LeaguePlayerField;
3261
+ }(LeagueFieldBase));
3262
+ __decorate([
3263
+ ToFrontHook
3264
+ ], exports.LeaguePlayerField, "toFront", null);
3265
+ __decorate([
3266
+ ToBackHook
3267
+ ], exports.LeaguePlayerField, "toBack", null);
3268
+ exports.LeaguePlayerField = __decorate([
3269
+ ModelInstance({
3270
+ mappingFields: {
3271
+ id: 'id',
3272
+ league_id: 'leagueId',
3273
+ name: 'name',
3274
+ type: 'type',
3275
+ is_multiple: 'isMultiple',
3276
+ variants: 'variants',
3277
+ },
3278
+ relation: {
3279
+ type: enumField(exports.LeagueFieldTypes)
3280
+ }
3281
+ })
3282
+ ], exports.LeaguePlayerField);
3283
+
3284
+ exports.LeaguePlayerFieldValue = /** @class */ (function (_super) {
3285
+ __extends(LeaguePlayerFieldValue, _super);
3286
+ function LeaguePlayerFieldValue() {
3287
+ return _super !== null && _super.apply(this, arguments) || this;
3288
+ }
3289
+ LeaguePlayerFieldValue.toFront = function (data) { };
3290
+ LeaguePlayerFieldValue.toBack = function (data) { };
3291
+ return LeaguePlayerFieldValue;
3292
+ }(LeagueFieldBaseValue));
3293
+ __decorate([
3294
+ ToFrontHook
3295
+ ], exports.LeaguePlayerFieldValue, "toFront", null);
3296
+ __decorate([
3297
+ ToBackHook
3298
+ ], exports.LeaguePlayerFieldValue, "toBack", null);
3299
+ exports.LeaguePlayerFieldValue = __decorate([
3300
+ ModelInstance({
3301
+ mappingFields: {
3302
+ id: 'id',
3303
+ league_player_field_id: 'leaguePlayerFieldId',
3304
+ league_player_field: 'leaguePlayerField',
3305
+ value: 'value',
3306
+ file: 'file',
3307
+ },
3308
+ relation: {
3309
+ file: exports.File,
3310
+ leaguePlayerField: exports.LeaguePlayerField
3311
+ }
3312
+ })
3313
+ ], exports.LeaguePlayerFieldValue);
3314
+
3145
3315
  var _a$i;
3146
3316
  exports.Qualification = void 0;
3147
3317
  (function (Qualification) {
@@ -3254,12 +3424,14 @@
3254
3424
  has_changes: 'hasChanges',
3255
3425
  rating: 'rating',
3256
3426
  qualification: 'qualification',
3427
+ field_values: 'fieldValues',
3257
3428
  },
3258
3429
  relation: {
3259
3430
  birthDate: DateField,
3260
3431
  photo: exports.File,
3261
3432
  user: exports.User,
3262
- qualification: enumField(exports.Qualification)
3433
+ qualification: enumField(exports.Qualification),
3434
+ fieldValues: listField(exports.LeaguePlayerFieldValue),
3263
3435
  }
3264
3436
  })
3265
3437
  ], exports.LeaguePlayer);
@@ -13627,6 +13799,8 @@
13627
13799
  exports.HockeyWorkHandLocalization = HockeyWorkHandLocalization;
13628
13800
  exports.HttpCookieInterceptor = HttpCookieInterceptor;
13629
13801
  exports.LeagueApi = LeagueApi;
13802
+ exports.LeagueFieldBase = LeagueFieldBase;
13803
+ exports.LeagueFieldBaseValue = LeagueFieldBaseValue;
13630
13804
  exports.LeagueNewsApi = LeagueNewsApi;
13631
13805
  exports.LeaguePlayerApi = LeaguePlayerApi;
13632
13806
  exports.LocalStorageEngine = LocalStorageEngine;