volleyballsimtypes 0.0.523 → 0.0.525
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/dist/cjs/src/api/index.d.ts +16 -0
- package/dist/cjs/src/data/init-models.js +35 -0
- package/dist/cjs/src/data/models/competition.d.ts +1 -1
- package/dist/cjs/src/data/models/competition.js +1 -1
- package/dist/cjs/src/data/models/index.d.ts +6 -0
- package/dist/cjs/src/data/models/index.js +6 -0
- package/dist/cjs/src/data/models/jersey-badge.d.ts +1 -1
- package/dist/cjs/src/data/models/jersey-badge.js +1 -1
- package/dist/cjs/src/data/models/match-input-snapshot.d.ts +19 -0
- package/dist/cjs/src/data/models/match-input-snapshot.js +34 -0
- package/dist/cjs/src/data/models/national-team-claim.d.ts +21 -0
- package/dist/cjs/src/data/models/national-team-claim.js +36 -0
- package/dist/cjs/src/data/models/national-team.d.ts +22 -0
- package/dist/cjs/src/data/models/national-team.js +31 -0
- package/dist/cjs/src/data/models/wnl-callup.d.ts +31 -0
- package/dist/cjs/src/data/models/wnl-callup.js +45 -0
- package/dist/cjs/src/data/models/wnl-season.d.ts +24 -0
- package/dist/cjs/src/data/models/wnl-season.js +34 -0
- package/dist/cjs/src/data/models/wnl-squad.d.ts +40 -0
- package/dist/cjs/src/data/models/wnl-squad.js +59 -0
- package/dist/cjs/src/service/match/index.d.ts +1 -0
- package/dist/cjs/src/service/match/index.js +8 -0
- package/dist/cjs/src/service/match/match-generator.d.ts +5 -1
- package/dist/cjs/src/service/match/match-generator.js +6 -4
- package/dist/cjs/src/service/notification/catalog/en.json +29 -0
- package/dist/cjs/src/service/notification/catalog/es.json +29 -0
- package/dist/cjs/src/service/notification/catalog/fr.json +29 -0
- package/dist/cjs/src/service/notification/catalog/it.json +29 -0
- package/dist/cjs/src/service/notification/catalog/pl.json +29 -0
- package/dist/cjs/src/service/notification/catalog/pt-BR.json +29 -0
- package/dist/cjs/src/service/notification/catalog/tr.json +29 -0
- package/dist/cjs/src/service/notification/notification-type.d.ts +1 -1
- package/dist/cjs/src/service/notification/notification-type.js +8 -1
- package/dist/cjs/src/service/notification/notification.test.js +18 -0
- package/dist/cjs/src/service/notification/payloads.d.ts +7 -1
- package/dist/cjs/src/service/notification/registry.d.ts +5 -1
- package/dist/cjs/src/service/notification/registry.js +90 -3
- package/dist/cjs/src/service/premium/premium-tier.d.ts +2 -0
- package/dist/cjs/src/service/premium/premium-tier.js +8 -1
- package/dist/esm/src/api/index.d.ts +16 -0
- package/dist/esm/src/data/init-models.js +36 -1
- package/dist/esm/src/data/models/competition.d.ts +1 -1
- package/dist/esm/src/data/models/competition.js +1 -1
- package/dist/esm/src/data/models/index.d.ts +6 -0
- package/dist/esm/src/data/models/index.js +6 -0
- package/dist/esm/src/data/models/jersey-badge.d.ts +1 -1
- package/dist/esm/src/data/models/jersey-badge.js +1 -1
- package/dist/esm/src/data/models/match-input-snapshot.d.ts +19 -0
- package/dist/esm/src/data/models/match-input-snapshot.js +30 -0
- package/dist/esm/src/data/models/national-team-claim.d.ts +21 -0
- package/dist/esm/src/data/models/national-team-claim.js +32 -0
- package/dist/esm/src/data/models/national-team.d.ts +22 -0
- package/dist/esm/src/data/models/national-team.js +27 -0
- package/dist/esm/src/data/models/wnl-callup.d.ts +31 -0
- package/dist/esm/src/data/models/wnl-callup.js +41 -0
- package/dist/esm/src/data/models/wnl-season.d.ts +24 -0
- package/dist/esm/src/data/models/wnl-season.js +30 -0
- package/dist/esm/src/data/models/wnl-squad.d.ts +40 -0
- package/dist/esm/src/data/models/wnl-squad.js +55 -0
- package/dist/esm/src/service/match/index.d.ts +1 -0
- package/dist/esm/src/service/match/index.js +3 -0
- package/dist/esm/src/service/match/match-generator.d.ts +5 -1
- package/dist/esm/src/service/match/match-generator.js +6 -4
- package/dist/esm/src/service/notification/catalog/en.json +29 -0
- package/dist/esm/src/service/notification/catalog/es.json +29 -0
- package/dist/esm/src/service/notification/catalog/fr.json +29 -0
- package/dist/esm/src/service/notification/catalog/it.json +29 -0
- package/dist/esm/src/service/notification/catalog/pl.json +29 -0
- package/dist/esm/src/service/notification/catalog/pt-BR.json +29 -0
- package/dist/esm/src/service/notification/catalog/tr.json +29 -0
- package/dist/esm/src/service/notification/notification-type.d.ts +1 -1
- package/dist/esm/src/service/notification/notification-type.js +8 -1
- package/dist/esm/src/service/notification/notification.test.js +19 -1
- package/dist/esm/src/service/notification/payloads.d.ts +7 -1
- package/dist/esm/src/service/notification/registry.d.ts +5 -1
- package/dist/esm/src/service/notification/registry.js +88 -3
- package/dist/esm/src/service/premium/premium-tier.d.ts +2 -0
- package/dist/esm/src/service/premium/premium-tier.js +6 -0
- package/package.json +1 -1
|
@@ -70,6 +70,8 @@ export type ChampionBadgeSpec = {
|
|
|
70
70
|
region: ChampionRegion;
|
|
71
71
|
} | {
|
|
72
72
|
type: 'wcc';
|
|
73
|
+
} | {
|
|
74
|
+
type: 'wnl';
|
|
73
75
|
};
|
|
74
76
|
export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthIteration' | 'declineProfile' | 'nickname' | 'injuryProneProfile' | 'injury'> & {
|
|
75
77
|
-readonly [K in 'birthAge' | 'birthIteration']?: DataProps<_Player>[K];
|
|
@@ -83,6 +85,7 @@ export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthItera
|
|
|
83
85
|
nickname?: string;
|
|
84
86
|
jerseyConfig?: JerseyConfig;
|
|
85
87
|
championBadge?: ChampionBadgeSpec;
|
|
88
|
+
nationalFlagAlpha2?: string;
|
|
86
89
|
};
|
|
87
90
|
export interface StartingLineup {
|
|
88
91
|
[CourtPosition.LEFT_FRONT]: string;
|
|
@@ -189,6 +192,12 @@ export type Team = Omit<DataProps<_Team>, 'roster' | '_rating' | 'rating' | 'tac
|
|
|
189
192
|
};
|
|
190
193
|
nationalCountryName?: string;
|
|
191
194
|
isEvent?: boolean;
|
|
195
|
+
isNational?: boolean;
|
|
196
|
+
nationalManager?: {
|
|
197
|
+
displayName: string;
|
|
198
|
+
teamId: string;
|
|
199
|
+
teamShortName: string;
|
|
200
|
+
};
|
|
192
201
|
};
|
|
193
202
|
export type Standing = DataProps<_Standing> & {
|
|
194
203
|
position: number;
|
|
@@ -255,4 +264,11 @@ export type TotalBoxScore = Omit<DataProps<BoxScore>, 'misc' | 'playerId' | 'mat
|
|
|
255
264
|
setsPlayed: number;
|
|
256
265
|
matchesPlayed: number;
|
|
257
266
|
};
|
|
267
|
+
national?: {
|
|
268
|
+
alpha2: string;
|
|
269
|
+
matchesPlayed: number;
|
|
270
|
+
matchesWon: number;
|
|
271
|
+
pointsPlayed: number;
|
|
272
|
+
pointsWon: number;
|
|
273
|
+
};
|
|
258
274
|
};
|
|
@@ -61,10 +61,16 @@ function initModels(sequelize) {
|
|
|
61
61
|
const PlayerTeam = models_1.PlayerTeamModel.initModel(sequelize);
|
|
62
62
|
const RetiredPlayer = models_1.RetiredPlayerModel.initModel(sequelize);
|
|
63
63
|
const Rally = models_1.RallyModel.initModel(sequelize);
|
|
64
|
+
const MatchInputSnapshot = models_1.MatchInputSnapshotModel.initModel(sequelize);
|
|
64
65
|
const PromotionMatch = models_1.PromotionMatchModel.initModel(sequelize);
|
|
65
66
|
const Friendly = models_1.FriendlyModel.initModel(sequelize);
|
|
66
67
|
const RegionQualifier = models_1.RegionQualifierModel.initModel(sequelize);
|
|
67
68
|
const NationalCountry = models_1.NationalCountryModel.initModel(sequelize);
|
|
69
|
+
const NationalTeam = models_1.NationalTeamModel.initModel(sequelize);
|
|
70
|
+
const NationalTeamClaim = models_1.NationalTeamClaimModel.initModel(sequelize);
|
|
71
|
+
const WnlSquad = models_1.WnlSquadModel.initModel(sequelize);
|
|
72
|
+
const WnlCallup = models_1.WnlCallupModel.initModel(sequelize);
|
|
73
|
+
const WnlSeason = models_1.WnlSeasonModel.initModel(sequelize);
|
|
68
74
|
const Team = models_1.TeamModel.initModel(sequelize);
|
|
69
75
|
const TeamReplacement = models_1.TeamReplacementModel.initModel(sequelize);
|
|
70
76
|
const LegacyTeamFlag = models_1.LegacyTeamFlagModel.initModel(sequelize);
|
|
@@ -162,6 +168,8 @@ function initModels(sequelize) {
|
|
|
162
168
|
Match.hasOne(CompetitionMatch, { as: 'CompetitionMatch', foreignKey: 'match_id' });
|
|
163
169
|
Match.hasOne(MatchResult, { as: 'MatchResult', foreignKey: 'match_id' });
|
|
164
170
|
Match.hasOne(Friendly, { as: 'Friendly', foreignKey: 'match_id' });
|
|
171
|
+
Match.hasOne(MatchInputSnapshot, { as: 'MatchInputSnapshot', foreignKey: 'match_id' });
|
|
172
|
+
MatchInputSnapshot.belongsTo(Match, { as: 'Match', foreignKey: 'match_id' });
|
|
165
173
|
MatchResult.belongsTo(Match, { as: 'Match', foreignKey: 'match_id' });
|
|
166
174
|
MatchResult.belongsTo(Team, { as: 'Winner', foreignKey: 'winner_team_id' });
|
|
167
175
|
MatchRating.belongsTo(Match, { as: 'match', foreignKey: 'match_id' });
|
|
@@ -228,6 +236,28 @@ function initModels(sequelize) {
|
|
|
228
236
|
Competition.hasOne(NationalCountry, { as: 'NationalCountry', foreignKey: 'competition_id' });
|
|
229
237
|
Country.hasMany(NationalCountry, { as: 'NationalCountries', foreignKey: 'country_id' });
|
|
230
238
|
Iteration.hasMany(NationalCountry, { as: 'NationalCountries', foreignKey: 'iteration' });
|
|
239
|
+
// National teams (WNL). The registry maps a country to its permanent active=false national Team; the claim links a
|
|
240
|
+
// Tier-2 manager to it; per-edition squad + callup + season rows hang off the WNL league Competition.
|
|
241
|
+
NationalTeam.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
|
|
242
|
+
NationalTeam.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
243
|
+
Country.hasOne(NationalTeam, { as: 'NationalTeam', foreignKey: 'country_id' });
|
|
244
|
+
Team.hasOne(NationalTeam, { as: 'NationalTeam', foreignKey: 'team_id' });
|
|
245
|
+
NationalTeam.hasOne(NationalTeamClaim, { as: 'claim', foreignKey: 'country_id' });
|
|
246
|
+
NationalTeamClaim.belongsTo(NationalTeam, { as: 'nationalTeam', foreignKey: 'country_id' });
|
|
247
|
+
NationalTeamClaim.belongsTo(AuthUser, { as: 'user', foreignKey: 'user_id' });
|
|
248
|
+
AuthUser.hasOne(NationalTeamClaim, { as: 'NationalTeamClaim', foreignKey: 'user_id' });
|
|
249
|
+
WnlSquad.belongsTo(Competition, { as: 'competition', foreignKey: 'competition_id' });
|
|
250
|
+
WnlSquad.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
|
|
251
|
+
WnlSquad.belongsTo(Team, { as: 'team', foreignKey: 'team_id' });
|
|
252
|
+
WnlSquad.belongsTo(AuthUser, { as: 'manager', foreignKey: 'manager_user_id' });
|
|
253
|
+
Competition.hasMany(WnlSquad, { as: 'WnlSquads', foreignKey: 'competition_id' });
|
|
254
|
+
WnlCallup.belongsTo(Competition, { as: 'competition', foreignKey: 'competition_id' });
|
|
255
|
+
WnlCallup.belongsTo(Player, { as: 'player', foreignKey: 'player_id' });
|
|
256
|
+
WnlCallup.belongsTo(Country, { as: 'country', foreignKey: 'country_id' });
|
|
257
|
+
Competition.hasMany(WnlCallup, { as: 'WnlCallups', foreignKey: 'competition_id' });
|
|
258
|
+
WnlSeason.belongsTo(Competition, { as: 'competition', foreignKey: 'competition_id' });
|
|
259
|
+
WnlSeason.belongsTo(Competition, { as: 'finalsCompetition', foreignKey: 'finals_competition_id' });
|
|
260
|
+
Competition.hasOne(WnlSeason, { as: 'WnlSeason', foreignKey: 'competition_id' });
|
|
231
261
|
VPER.belongsTo(Player, { as: 'Player', foreignKey: 'player_id' });
|
|
232
262
|
VPER.belongsTo(Match, { as: 'Match', foreignKey: 'match_id' });
|
|
233
263
|
Team.hasOne(Coach, { as: 'Coach', foreignKey: 'team_id' });
|
|
@@ -351,6 +381,11 @@ function initModels(sequelize) {
|
|
|
351
381
|
Friendly,
|
|
352
382
|
RegionQualifier,
|
|
353
383
|
NationalCountry,
|
|
384
|
+
NationalTeam,
|
|
385
|
+
NationalTeamClaim,
|
|
386
|
+
WnlSquad,
|
|
387
|
+
WnlCallup,
|
|
388
|
+
WnlSeason,
|
|
354
389
|
Rally,
|
|
355
390
|
Team,
|
|
356
391
|
TeamReplacement,
|
|
@@ -21,7 +21,7 @@ export interface CompetitionAttributes {
|
|
|
21
21
|
LowerPromotionMatches?: PromotionMatchAttributes[];
|
|
22
22
|
}
|
|
23
23
|
export type CompetitionPk = 'competition_id';
|
|
24
|
-
export type CompetitionType = 'LEAGUE' | 'TOURNAMENT' | 'QUALIFIER' | 'NATIONAL' | 'EVENT';
|
|
24
|
+
export type CompetitionType = 'LEAGUE' | 'TOURNAMENT' | 'QUALIFIER' | 'NATIONAL' | 'EVENT' | 'WNL' | 'WNLF';
|
|
25
25
|
export type CompetitionId = CompetitionModel[CompetitionPk];
|
|
26
26
|
export type CompetitionCreationAttributes = CompetitionAttributes;
|
|
27
27
|
export declare class CompetitionModel extends Model<CompetitionAttributes, CompetitionCreationAttributes> implements CompetitionAttributes {
|
|
@@ -21,7 +21,7 @@ class CompetitionModel extends sequelize_1.Model {
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
type: {
|
|
24
|
-
type: sequelize_1.DataTypes.ENUM('LEAGUE', 'TOURNAMENT', 'QUALIFIER', 'NATIONAL', 'EVENT'),
|
|
24
|
+
type: sequelize_1.DataTypes.ENUM('LEAGUE', 'TOURNAMENT', 'QUALIFIER', 'NATIONAL', 'EVENT', 'WNL', 'WNLF'),
|
|
25
25
|
allowNull: false
|
|
26
26
|
},
|
|
27
27
|
status: {
|
|
@@ -27,10 +27,16 @@ export * from './player-decline-log';
|
|
|
27
27
|
export * from './player-team';
|
|
28
28
|
export * from './retired-player';
|
|
29
29
|
export * from './rally';
|
|
30
|
+
export * from './match-input-snapshot';
|
|
30
31
|
export * from './promotion-match';
|
|
31
32
|
export * from './friendly';
|
|
32
33
|
export * from './region-qualifier';
|
|
33
34
|
export * from './national-country';
|
|
35
|
+
export * from './national-team';
|
|
36
|
+
export * from './national-team-claim';
|
|
37
|
+
export * from './wnl-squad';
|
|
38
|
+
export * from './wnl-callup';
|
|
39
|
+
export * from './wnl-season';
|
|
34
40
|
export * from './coach';
|
|
35
41
|
export * from './scout';
|
|
36
42
|
export * from './physician';
|
|
@@ -43,10 +43,16 @@ __exportStar(require("./player-decline-log"), exports);
|
|
|
43
43
|
__exportStar(require("./player-team"), exports);
|
|
44
44
|
__exportStar(require("./retired-player"), exports);
|
|
45
45
|
__exportStar(require("./rally"), exports);
|
|
46
|
+
__exportStar(require("./match-input-snapshot"), exports);
|
|
46
47
|
__exportStar(require("./promotion-match"), exports);
|
|
47
48
|
__exportStar(require("./friendly"), exports);
|
|
48
49
|
__exportStar(require("./region-qualifier"), exports);
|
|
49
50
|
__exportStar(require("./national-country"), exports);
|
|
51
|
+
__exportStar(require("./national-team"), exports);
|
|
52
|
+
__exportStar(require("./national-team-claim"), exports);
|
|
53
|
+
__exportStar(require("./wnl-squad"), exports);
|
|
54
|
+
__exportStar(require("./wnl-callup"), exports);
|
|
55
|
+
__exportStar(require("./wnl-season"), exports);
|
|
50
56
|
__exportStar(require("./coach"), exports);
|
|
51
57
|
__exportStar(require("./scout"), exports);
|
|
52
58
|
__exportStar(require("./physician"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Sequelize from 'sequelize';
|
|
2
2
|
import { Model } from 'sequelize';
|
|
3
3
|
import { CompetitionId, CompetitionModel, TeamId, TeamModel } from '.';
|
|
4
|
-
export type JerseyBadgeKind = 'LEAGUE' | 'NATIONALS' | 'REGIONALS' | 'WCC';
|
|
4
|
+
export type JerseyBadgeKind = 'LEAGUE' | 'NATIONALS' | 'REGIONALS' | 'WCC' | 'WNL';
|
|
5
5
|
export interface JerseyBadgeAttributes {
|
|
6
6
|
competition_id: string;
|
|
7
7
|
team_id: string;
|
|
@@ -23,7 +23,7 @@ class JerseyBadgeModel extends sequelize_1.Model {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
badge: {
|
|
26
|
-
type: sequelize_1.DataTypes.ENUM('LEAGUE', 'NATIONALS', 'REGIONALS', 'WCC'),
|
|
26
|
+
type: sequelize_1.DataTypes.ENUM('LEAGUE', 'NATIONALS', 'REGIONALS', 'WCC', 'WNL'),
|
|
27
27
|
allowNull: false
|
|
28
28
|
},
|
|
29
29
|
region: {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model } from 'sequelize';
|
|
3
|
+
import { MatchId, MatchModel } from '.';
|
|
4
|
+
export interface MatchInputSnapshotAttributes {
|
|
5
|
+
match_id: string;
|
|
6
|
+
snapshot: object;
|
|
7
|
+
}
|
|
8
|
+
export type MatchInputSnapshotPk = 'match_id';
|
|
9
|
+
export type MatchInputSnapshotId = MatchInputSnapshotModel[MatchInputSnapshotPk];
|
|
10
|
+
export type MatchInputSnapshotCreationAttributes = MatchInputSnapshotAttributes;
|
|
11
|
+
export declare class MatchInputSnapshotModel extends Model<MatchInputSnapshotAttributes, MatchInputSnapshotCreationAttributes> implements MatchInputSnapshotAttributes {
|
|
12
|
+
match_id: string;
|
|
13
|
+
snapshot: object;
|
|
14
|
+
Match: MatchModel;
|
|
15
|
+
getMatch: Sequelize.BelongsToGetAssociationMixin<MatchModel>;
|
|
16
|
+
setMatch: Sequelize.BelongsToSetAssociationMixin<MatchModel, MatchId>;
|
|
17
|
+
createMatch: Sequelize.BelongsToCreateAssociationMixin<MatchModel>;
|
|
18
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof MatchInputSnapshotModel;
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MatchInputSnapshotModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class MatchInputSnapshotModel extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return MatchInputSnapshotModel.init({
|
|
8
|
+
match_id: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
references: {
|
|
13
|
+
model: 'Match',
|
|
14
|
+
key: 'match_id'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
snapshot: {
|
|
18
|
+
type: sequelize_1.DataTypes.JSONB,
|
|
19
|
+
allowNull: false
|
|
20
|
+
}
|
|
21
|
+
}, {
|
|
22
|
+
sequelize,
|
|
23
|
+
tableName: 'MatchInputSnapshot',
|
|
24
|
+
schema: 'public',
|
|
25
|
+
timestamps: false,
|
|
26
|
+
indexes: [{
|
|
27
|
+
name: 'MatchInputSnapshot_pk',
|
|
28
|
+
unique: true,
|
|
29
|
+
fields: [{ name: 'match_id' }]
|
|
30
|
+
}]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.MatchInputSnapshotModel = MatchInputSnapshotModel;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import { AuthUserId, AuthUserModel } from '.';
|
|
4
|
+
export interface NationalTeamClaimAttributes {
|
|
5
|
+
country_id: string;
|
|
6
|
+
user_id: string;
|
|
7
|
+
claimed_at: Date;
|
|
8
|
+
}
|
|
9
|
+
export type NationalTeamClaimPk = 'country_id';
|
|
10
|
+
export type NationalTeamClaimId = NationalTeamClaimModel[NationalTeamClaimPk];
|
|
11
|
+
export type NationalTeamClaimOptionalAttributes = 'claimed_at';
|
|
12
|
+
export type NationalTeamClaimCreationAttributes = Optional<NationalTeamClaimAttributes, NationalTeamClaimOptionalAttributes>;
|
|
13
|
+
export declare class NationalTeamClaimModel extends Model<NationalTeamClaimAttributes, NationalTeamClaimCreationAttributes> implements NationalTeamClaimAttributes {
|
|
14
|
+
country_id: string;
|
|
15
|
+
user_id: string;
|
|
16
|
+
claimed_at: Date;
|
|
17
|
+
user: AuthUserModel;
|
|
18
|
+
getUser: Sequelize.BelongsToGetAssociationMixin<AuthUserModel>;
|
|
19
|
+
setUser: Sequelize.BelongsToSetAssociationMixin<AuthUserModel, AuthUserId>;
|
|
20
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof NationalTeamClaimModel;
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NationalTeamClaimModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class NationalTeamClaimModel extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return NationalTeamClaimModel.init({
|
|
8
|
+
country_id: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
references: { model: 'NationalTeam', key: 'country_id' }
|
|
13
|
+
},
|
|
14
|
+
user_id: {
|
|
15
|
+
type: sequelize_1.DataTypes.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
references: { model: 'AuthUser', key: 'user_id' }
|
|
18
|
+
},
|
|
19
|
+
claimed_at: {
|
|
20
|
+
type: sequelize_1.DataTypes.DATE,
|
|
21
|
+
allowNull: false,
|
|
22
|
+
defaultValue: sequelize_1.DataTypes.NOW
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
sequelize,
|
|
26
|
+
tableName: 'NationalTeamClaim',
|
|
27
|
+
schema: 'public',
|
|
28
|
+
timestamps: false,
|
|
29
|
+
indexes: [
|
|
30
|
+
{ name: 'NationalTeamClaim_pk', unique: true, fields: [{ name: 'country_id' }] },
|
|
31
|
+
{ name: 'NationalTeamClaim_user_id_uq', unique: true, fields: [{ name: 'user_id' }] }
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.NationalTeamClaimModel = NationalTeamClaimModel;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model } from 'sequelize';
|
|
3
|
+
import { CountryId, CountryModel, TeamAttributes, TeamId, TeamModel } from '.';
|
|
4
|
+
export interface NationalTeamAttributes {
|
|
5
|
+
country_id: string;
|
|
6
|
+
team_id: string;
|
|
7
|
+
team?: TeamAttributes;
|
|
8
|
+
}
|
|
9
|
+
export type NationalTeamPk = 'country_id';
|
|
10
|
+
export type NationalTeamId = NationalTeamModel[NationalTeamPk];
|
|
11
|
+
export type NationalTeamCreationAttributes = NationalTeamAttributes;
|
|
12
|
+
export declare class NationalTeamModel extends Model<NationalTeamAttributes, NationalTeamCreationAttributes> implements NationalTeamAttributes {
|
|
13
|
+
country_id: string;
|
|
14
|
+
team_id: string;
|
|
15
|
+
country: CountryModel;
|
|
16
|
+
getCountry: Sequelize.BelongsToGetAssociationMixin<CountryModel>;
|
|
17
|
+
setCountry: Sequelize.BelongsToSetAssociationMixin<CountryModel, CountryId>;
|
|
18
|
+
team: TeamModel;
|
|
19
|
+
getTeam: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
20
|
+
setTeam: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
21
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof NationalTeamModel;
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NationalTeamModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class NationalTeamModel extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return NationalTeamModel.init({
|
|
8
|
+
country_id: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
references: { model: 'Country', key: 'country_id' }
|
|
13
|
+
},
|
|
14
|
+
team_id: {
|
|
15
|
+
type: sequelize_1.DataTypes.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
references: { model: 'Team', key: 'team_id' }
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
sequelize,
|
|
21
|
+
tableName: 'NationalTeam',
|
|
22
|
+
schema: 'public',
|
|
23
|
+
timestamps: false,
|
|
24
|
+
indexes: [
|
|
25
|
+
{ name: 'NationalTeam_pk', unique: true, fields: [{ name: 'country_id' }] },
|
|
26
|
+
{ name: 'NationalTeam_team_id_uq', unique: true, fields: [{ name: 'team_id' }] }
|
|
27
|
+
]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.NationalTeamModel = NationalTeamModel;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model } from 'sequelize';
|
|
3
|
+
import { CompetitionId, CompetitionModel, CountryId, CountryModel, PlayerId, PlayerModel } from '.';
|
|
4
|
+
export type WnlCallupRole = 'SELECTION' | 'BACKUP';
|
|
5
|
+
export interface WnlCallupAttributes {
|
|
6
|
+
competition_id: string;
|
|
7
|
+
player_id: string;
|
|
8
|
+
country_id: string;
|
|
9
|
+
role: WnlCallupRole;
|
|
10
|
+
slot_order: number;
|
|
11
|
+
}
|
|
12
|
+
export type WnlCallupPk = 'competition_id' | 'player_id';
|
|
13
|
+
export type WnlCallupId = WnlCallupModel[WnlCallupPk];
|
|
14
|
+
export type WnlCallupCreationAttributes = WnlCallupAttributes;
|
|
15
|
+
export declare class WnlCallupModel extends Model<WnlCallupAttributes, WnlCallupCreationAttributes> implements WnlCallupAttributes {
|
|
16
|
+
competition_id: string;
|
|
17
|
+
player_id: string;
|
|
18
|
+
country_id: string;
|
|
19
|
+
role: WnlCallupRole;
|
|
20
|
+
slot_order: number;
|
|
21
|
+
competition: CompetitionModel;
|
|
22
|
+
getCompetition: Sequelize.BelongsToGetAssociationMixin<CompetitionModel>;
|
|
23
|
+
setCompetition: Sequelize.BelongsToSetAssociationMixin<CompetitionModel, CompetitionId>;
|
|
24
|
+
player: PlayerModel;
|
|
25
|
+
getPlayer: Sequelize.BelongsToGetAssociationMixin<PlayerModel>;
|
|
26
|
+
setPlayer: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>;
|
|
27
|
+
country: CountryModel;
|
|
28
|
+
getCountry: Sequelize.BelongsToGetAssociationMixin<CountryModel>;
|
|
29
|
+
setCountry: Sequelize.BelongsToSetAssociationMixin<CountryModel, CountryId>;
|
|
30
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof WnlCallupModel;
|
|
31
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WnlCallupModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class WnlCallupModel extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return WnlCallupModel.init({
|
|
8
|
+
competition_id: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
references: { model: 'Competition', key: 'competition_id' }
|
|
13
|
+
},
|
|
14
|
+
player_id: {
|
|
15
|
+
type: sequelize_1.DataTypes.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true,
|
|
18
|
+
references: { model: 'Player', key: 'player_id' }
|
|
19
|
+
},
|
|
20
|
+
country_id: {
|
|
21
|
+
type: sequelize_1.DataTypes.UUID,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
references: { model: 'Country', key: 'country_id' }
|
|
24
|
+
},
|
|
25
|
+
role: {
|
|
26
|
+
type: sequelize_1.DataTypes.ENUM('SELECTION', 'BACKUP'),
|
|
27
|
+
allowNull: false
|
|
28
|
+
},
|
|
29
|
+
slot_order: {
|
|
30
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
31
|
+
allowNull: false
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
sequelize,
|
|
35
|
+
tableName: 'WnlCallup',
|
|
36
|
+
schema: 'public',
|
|
37
|
+
timestamps: false,
|
|
38
|
+
indexes: [
|
|
39
|
+
{ name: 'WnlCallup_pk', unique: true, fields: [{ name: 'competition_id' }, { name: 'player_id' }] },
|
|
40
|
+
{ name: 'WnlCallup_competition_country_idx', fields: [{ name: 'competition_id' }, { name: 'country_id' }] }
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.WnlCallupModel = WnlCallupModel;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import { CompetitionId, CompetitionModel } from '.';
|
|
4
|
+
export interface WnlSeasonAttributes {
|
|
5
|
+
competition_id: string;
|
|
6
|
+
season_index: number;
|
|
7
|
+
finals_competition_id: string | null;
|
|
8
|
+
}
|
|
9
|
+
export type WnlSeasonPk = 'competition_id';
|
|
10
|
+
export type WnlSeasonId = WnlSeasonModel[WnlSeasonPk];
|
|
11
|
+
export type WnlSeasonOptionalAttributes = 'finals_competition_id';
|
|
12
|
+
export type WnlSeasonCreationAttributes = Optional<WnlSeasonAttributes, WnlSeasonOptionalAttributes>;
|
|
13
|
+
export declare class WnlSeasonModel extends Model<WnlSeasonAttributes, WnlSeasonCreationAttributes> implements WnlSeasonAttributes {
|
|
14
|
+
competition_id: string;
|
|
15
|
+
season_index: number;
|
|
16
|
+
finals_competition_id: string | null;
|
|
17
|
+
competition: CompetitionModel;
|
|
18
|
+
getCompetition: Sequelize.BelongsToGetAssociationMixin<CompetitionModel>;
|
|
19
|
+
setCompetition: Sequelize.BelongsToSetAssociationMixin<CompetitionModel, CompetitionId>;
|
|
20
|
+
finalsCompetition: CompetitionModel;
|
|
21
|
+
getFinalsCompetition: Sequelize.BelongsToGetAssociationMixin<CompetitionModel>;
|
|
22
|
+
setFinalsCompetition: Sequelize.BelongsToSetAssociationMixin<CompetitionModel, CompetitionId>;
|
|
23
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof WnlSeasonModel;
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WnlSeasonModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class WnlSeasonModel extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return WnlSeasonModel.init({
|
|
8
|
+
competition_id: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
references: { model: 'Competition', key: 'competition_id' }
|
|
13
|
+
},
|
|
14
|
+
season_index: {
|
|
15
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
16
|
+
allowNull: false
|
|
17
|
+
},
|
|
18
|
+
finals_competition_id: {
|
|
19
|
+
type: sequelize_1.DataTypes.UUID,
|
|
20
|
+
allowNull: true,
|
|
21
|
+
references: { model: 'Competition', key: 'competition_id' }
|
|
22
|
+
}
|
|
23
|
+
}, {
|
|
24
|
+
sequelize,
|
|
25
|
+
tableName: 'WnlSeason',
|
|
26
|
+
schema: 'public',
|
|
27
|
+
timestamps: false,
|
|
28
|
+
indexes: [
|
|
29
|
+
{ name: 'WnlSeason_pk', unique: true, fields: [{ name: 'competition_id' }] }
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.WnlSeasonModel = WnlSeasonModel;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import { AuthUserId, AuthUserModel, CompetitionId, CompetitionModel, CountryId, CountryModel, TeamId, TeamModel } from '.';
|
|
4
|
+
export interface WnlSquadAttributes {
|
|
5
|
+
competition_id: string;
|
|
6
|
+
country_id: string;
|
|
7
|
+
team_id: string;
|
|
8
|
+
manager_user_id: string | null;
|
|
9
|
+
manager_name: string | null;
|
|
10
|
+
auto: boolean;
|
|
11
|
+
finalized: boolean;
|
|
12
|
+
finalized_at: Date | null;
|
|
13
|
+
}
|
|
14
|
+
export type WnlSquadPk = 'competition_id' | 'country_id';
|
|
15
|
+
export type WnlSquadId = WnlSquadModel[WnlSquadPk];
|
|
16
|
+
export type WnlSquadOptionalAttributes = 'manager_user_id' | 'manager_name' | 'auto' | 'finalized' | 'finalized_at';
|
|
17
|
+
export type WnlSquadCreationAttributes = Optional<WnlSquadAttributes, WnlSquadOptionalAttributes>;
|
|
18
|
+
export declare class WnlSquadModel extends Model<WnlSquadAttributes, WnlSquadCreationAttributes> implements WnlSquadAttributes {
|
|
19
|
+
competition_id: string;
|
|
20
|
+
country_id: string;
|
|
21
|
+
team_id: string;
|
|
22
|
+
manager_user_id: string | null;
|
|
23
|
+
manager_name: string | null;
|
|
24
|
+
auto: boolean;
|
|
25
|
+
finalized: boolean;
|
|
26
|
+
finalized_at: Date | null;
|
|
27
|
+
competition: CompetitionModel;
|
|
28
|
+
getCompetition: Sequelize.BelongsToGetAssociationMixin<CompetitionModel>;
|
|
29
|
+
setCompetition: Sequelize.BelongsToSetAssociationMixin<CompetitionModel, CompetitionId>;
|
|
30
|
+
country: CountryModel;
|
|
31
|
+
getCountry: Sequelize.BelongsToGetAssociationMixin<CountryModel>;
|
|
32
|
+
setCountry: Sequelize.BelongsToSetAssociationMixin<CountryModel, CountryId>;
|
|
33
|
+
team: TeamModel;
|
|
34
|
+
getTeam: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
|
|
35
|
+
setTeam: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
|
|
36
|
+
manager: AuthUserModel;
|
|
37
|
+
getManager: Sequelize.BelongsToGetAssociationMixin<AuthUserModel>;
|
|
38
|
+
setManager: Sequelize.BelongsToSetAssociationMixin<AuthUserModel, AuthUserId>;
|
|
39
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof WnlSquadModel;
|
|
40
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WnlSquadModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
class WnlSquadModel extends sequelize_1.Model {
|
|
6
|
+
static initModel(sequelize) {
|
|
7
|
+
return WnlSquadModel.init({
|
|
8
|
+
competition_id: {
|
|
9
|
+
type: sequelize_1.DataTypes.UUID,
|
|
10
|
+
allowNull: false,
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
references: { model: 'Competition', key: 'competition_id' }
|
|
13
|
+
},
|
|
14
|
+
country_id: {
|
|
15
|
+
type: sequelize_1.DataTypes.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true,
|
|
18
|
+
references: { model: 'Country', key: 'country_id' }
|
|
19
|
+
},
|
|
20
|
+
team_id: {
|
|
21
|
+
type: sequelize_1.DataTypes.UUID,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
references: { model: 'Team', key: 'team_id' }
|
|
24
|
+
},
|
|
25
|
+
manager_user_id: {
|
|
26
|
+
type: sequelize_1.DataTypes.UUID,
|
|
27
|
+
allowNull: true,
|
|
28
|
+
references: { model: 'AuthUser', key: 'user_id' }
|
|
29
|
+
},
|
|
30
|
+
manager_name: {
|
|
31
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
32
|
+
allowNull: true
|
|
33
|
+
},
|
|
34
|
+
auto: {
|
|
35
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
36
|
+
allowNull: false,
|
|
37
|
+
defaultValue: false
|
|
38
|
+
},
|
|
39
|
+
finalized: {
|
|
40
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
defaultValue: false
|
|
43
|
+
},
|
|
44
|
+
finalized_at: {
|
|
45
|
+
type: sequelize_1.DataTypes.DATE,
|
|
46
|
+
allowNull: true
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
sequelize,
|
|
50
|
+
tableName: 'WnlSquad',
|
|
51
|
+
schema: 'public',
|
|
52
|
+
timestamps: false,
|
|
53
|
+
indexes: [
|
|
54
|
+
{ name: 'WnlSquad_pk', unique: true, fields: [{ name: 'competition_id' }, { name: 'country_id' }] }
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.WnlSquadModel = WnlSquadModel;
|
|
@@ -13,10 +13,18 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.MatchGenerator = void 0;
|
|
17
21
|
__exportStar(require("./box-score"), exports);
|
|
18
22
|
__exportStar(require("./match"), exports);
|
|
19
23
|
__exportStar(require("./match-generator"), exports);
|
|
24
|
+
// The default export (the class itself) is not surfaced by `export *`; re-export it by name so consumers (e.g. the
|
|
25
|
+
// engine's WNL scheduler) can call MatchGenerator.generateMatches with custom spacing/start-hour options.
|
|
26
|
+
var match_generator_1 = require("./match-generator");
|
|
27
|
+
Object.defineProperty(exports, "MatchGenerator", { enumerable: true, get: function () { return __importDefault(match_generator_1).default; } });
|
|
20
28
|
__exportStar(require("./match-rating"), exports);
|
|
21
29
|
__exportStar(require("./match-set"), exports);
|
|
22
30
|
__exportStar(require("./rally"), exports);
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Team } from '../team';
|
|
2
2
|
import { Match } from './match';
|
|
3
|
+
export interface GenerateMatchesOptions {
|
|
4
|
+
spacingMinutes?: number;
|
|
5
|
+
startHourUTC?: number;
|
|
6
|
+
}
|
|
3
7
|
export default class MatchGenerator {
|
|
4
|
-
static generateMatches(teams: Team[], baseDate: Date): Match[];
|
|
8
|
+
static generateMatches(teams: Team[], baseDate: Date, options?: GenerateMatchesOptions): Match[];
|
|
5
9
|
}
|