@mtgame/core 0.2.2 → 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.
@@ -2962,6 +2962,110 @@
2962
2962
  })
2963
2963
  ], exports.TournamentDivision);
2964
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
+
2965
3069
  exports.TeamAdditionalData = /** @class */ (function () {
2966
3070
  function TeamAdditionalData() {
2967
3071
  }
@@ -3048,6 +3152,7 @@
3048
3152
  attack_bonuses: 'attackBonuses',
3049
3153
  defense_bonuses: 'defenseBonuses',
3050
3154
  team_additional_data: 'teamAdditionalData',
3155
+ field_values: 'fieldValues',
3051
3156
  },
3052
3157
  relation: {
3053
3158
  logo: exports.File,
@@ -3060,6 +3165,7 @@
3060
3165
  lastFiveGames: exports.Game,
3061
3166
  division: exports.TournamentDivision,
3062
3167
  teamAdditionalData: exports.TeamAdditionalData,
3168
+ fieldValues: listField(exports.LeagueTeamFieldValue),
3063
3169
  }
3064
3170
  })
3065
3171
  ], exports.TournamentTeam);
@@ -3144,6 +3250,68 @@
3144
3250
  })
3145
3251
  ], exports.TournamentDisqualification);
3146
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
+
3147
3315
  var _a$i;
3148
3316
  exports.Qualification = void 0;
3149
3317
  (function (Qualification) {
@@ -3256,12 +3424,14 @@
3256
3424
  has_changes: 'hasChanges',
3257
3425
  rating: 'rating',
3258
3426
  qualification: 'qualification',
3427
+ field_values: 'fieldValues',
3259
3428
  },
3260
3429
  relation: {
3261
3430
  birthDate: DateField,
3262
3431
  photo: exports.File,
3263
3432
  user: exports.User,
3264
- qualification: enumField(exports.Qualification)
3433
+ qualification: enumField(exports.Qualification),
3434
+ fieldValues: listField(exports.LeaguePlayerFieldValue),
3265
3435
  }
3266
3436
  })
3267
3437
  ], exports.LeaguePlayer);
@@ -13629,6 +13799,8 @@
13629
13799
  exports.HockeyWorkHandLocalization = HockeyWorkHandLocalization;
13630
13800
  exports.HttpCookieInterceptor = HttpCookieInterceptor;
13631
13801
  exports.LeagueApi = LeagueApi;
13802
+ exports.LeagueFieldBase = LeagueFieldBase;
13803
+ exports.LeagueFieldBaseValue = LeagueFieldBaseValue;
13632
13804
  exports.LeagueNewsApi = LeagueNewsApi;
13633
13805
  exports.LeaguePlayerApi = LeaguePlayerApi;
13634
13806
  exports.LocalStorageEngine = LocalStorageEngine;