volleyballsimtypes 0.0.193 → 0.0.195

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.
@@ -5,6 +5,7 @@ export interface DivisionAttributes {
5
5
  division_id: string;
6
6
  league_id: string;
7
7
  tier: number;
8
+ subdivision: number;
8
9
  name: string;
9
10
  DivisionSeasons?: DivisionSeasonAttributes[];
10
11
  Teams?: TeamAttributes[];
@@ -16,6 +17,7 @@ export declare class DivisionModel extends Model<DivisionAttributes, DivisionCre
16
17
  division_id: string;
17
18
  league_id: string;
18
19
  tier: number;
20
+ subdivision: number;
19
21
  name: string;
20
22
  league: LeagueModel;
21
23
  getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
@@ -22,6 +22,10 @@ class DivisionModel extends sequelize_1.Model {
22
22
  type: sequelize_1.DataTypes.INTEGER,
23
23
  allowNull: false
24
24
  },
25
+ subdivision: {
26
+ type: sequelize_1.DataTypes.INTEGER,
27
+ allowNull: false
28
+ },
25
29
  name: {
26
30
  type: sequelize_1.DataTypes.STRING,
27
31
  allowNull: false,
@@ -14,6 +14,7 @@ function transformToAttributes(division) {
14
14
  division_id: division.id,
15
15
  league_id: division.leagueId,
16
16
  tier: division.tier,
17
+ subdivision: division.subdivision,
17
18
  name: division.name,
18
19
  DivisionSeasons,
19
20
  Teams
@@ -25,6 +26,7 @@ function transformToObject(model) {
25
26
  id: model.division_id,
26
27
  name: model.name,
27
28
  tier: model.tier,
29
+ subdivision: model.subdivision,
28
30
  leagueId: model.league_id,
29
31
  seasons: (model.DivisionSeasons ?? []).map((ds) => (0, season_1.transformToSeason)(ds.competition)),
30
32
  teams: model.Teams != null ? model.Teams.map(team_1.transformToTeam) : undefined
@@ -15,6 +15,10 @@ function transformToAttributes(season) {
15
15
  team_id: season.champion?.id
16
16
  }
17
17
  : undefined;
18
+ const DivisionSeason = {
19
+ competition_id: season.id,
20
+ division_id: season.divisionId
21
+ };
18
22
  return {
19
23
  competition_id: season.id,
20
24
  type: 'LEAGUE',
@@ -22,7 +26,8 @@ function transformToAttributes(season) {
22
26
  CompetitionChampion: champion,
23
27
  CompetitionMatches: matches,
24
28
  CompetitionTeams: teams,
25
- status: season.status
29
+ status: season.status,
30
+ DivisionSeason
26
31
  };
27
32
  }
28
33
  exports.transformFromSeason = transformToAttributes;
@@ -33,7 +38,8 @@ function transformToObject(model) {
33
38
  iteration: (0, _1.transformToIteration)(model.Iteration),
34
39
  teams: model.Teams != null ? model.Teams.map(_1.transformToTeam) : [],
35
40
  champion: model.CompetitionChampion != null ? (0, _1.transformToTeam)(model.CompetitionChampion.team) : undefined,
36
- status: model.status
41
+ status: model.status,
42
+ divisionId: model.DivisionSeason.division_id
37
43
  });
38
44
  }
39
45
  exports.transformToSeason = transformToObject;
@@ -4,6 +4,7 @@ interface DivisionOpts {
4
4
  readonly id: string;
5
5
  readonly name: string;
6
6
  readonly tier: number;
7
+ readonly subdivision: number;
7
8
  readonly leagueId: string;
8
9
  readonly seasons: Season[];
9
10
  readonly teams?: Team[];
@@ -12,9 +13,10 @@ export declare class Division {
12
13
  readonly id: string;
13
14
  readonly name: string;
14
15
  readonly tier: number;
16
+ readonly subdivision: number;
15
17
  readonly leagueId: string;
16
18
  readonly seasons: Season[];
17
19
  readonly teams?: Team[];
18
- constructor({ id, name, tier, seasons, teams, leagueId }: DivisionOpts);
20
+ constructor({ id, name, tier, subdivision, seasons, teams, leagueId }: DivisionOpts);
19
21
  }
20
22
  export {};
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Division = void 0;
4
4
  class Division {
5
- constructor({ id, name, tier, seasons, teams, leagueId }) {
5
+ constructor({ id, name, tier, subdivision, seasons, teams, leagueId }) {
6
6
  this.id = id;
7
7
  this.name = name;
8
8
  this.tier = tier;
9
+ this.subdivision = subdivision;
9
10
  this.leagueId = leagueId;
10
11
  this.seasons = seasons;
11
12
  this.teams = teams;
@@ -8,6 +8,7 @@ interface SeasonOpts {
8
8
  readonly teams: Team[];
9
9
  readonly matches: Match[];
10
10
  readonly iteration: Iteration;
11
+ readonly divisionId: string;
11
12
  readonly champion?: Team;
12
13
  readonly status: StatusEnum;
13
14
  }
@@ -16,10 +17,11 @@ export declare class Season {
16
17
  readonly teams: Team[];
17
18
  readonly matches: Match[];
18
19
  readonly iteration: Iteration;
20
+ readonly divisionId: string;
19
21
  readonly standings: Standing[];
20
22
  readonly status: StatusEnum;
21
23
  champion?: Team;
22
- constructor({ id, iteration, teams, matches, champion, status }: SeasonOpts);
24
+ constructor({ id, iteration, teams, matches, champion, status, divisionId }: SeasonOpts);
23
25
  calculateStandings(): Standing[];
24
26
  updateStandings(): void;
25
27
  }
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Season = void 0;
4
4
  const standing_1 = require("./standing");
5
5
  class Season {
6
- constructor({ id, iteration, teams, matches, champion, status }) {
6
+ constructor({ id, iteration, teams, matches, champion, status, divisionId }) {
7
7
  this.id = id;
8
8
  this.teams = teams;
9
9
  this.matches = matches;
10
10
  this.iteration = iteration;
11
+ this.divisionId = divisionId;
11
12
  this.champion = champion;
12
13
  this.standings = this.calculateStandings();
13
14
  this.status = status;
@@ -5,6 +5,7 @@ export interface DivisionAttributes {
5
5
  division_id: string;
6
6
  league_id: string;
7
7
  tier: number;
8
+ subdivision: number;
8
9
  name: string;
9
10
  DivisionSeasons?: DivisionSeasonAttributes[];
10
11
  Teams?: TeamAttributes[];
@@ -16,6 +17,7 @@ export declare class DivisionModel extends Model<DivisionAttributes, DivisionCre
16
17
  division_id: string;
17
18
  league_id: string;
18
19
  tier: number;
20
+ subdivision: number;
19
21
  name: string;
20
22
  league: LeagueModel;
21
23
  getLeague: Sequelize.BelongsToGetAssociationMixin<LeagueModel>;
@@ -19,6 +19,10 @@ export class DivisionModel extends Model {
19
19
  type: DataTypes.INTEGER,
20
20
  allowNull: false
21
21
  },
22
+ subdivision: {
23
+ type: DataTypes.INTEGER,
24
+ allowNull: false
25
+ },
22
26
  name: {
23
27
  type: DataTypes.STRING,
24
28
  allowNull: false,
@@ -11,6 +11,7 @@ function transformToAttributes(division) {
11
11
  division_id: division.id,
12
12
  league_id: division.leagueId,
13
13
  tier: division.tier,
14
+ subdivision: division.subdivision,
14
15
  name: division.name,
15
16
  DivisionSeasons,
16
17
  Teams
@@ -21,6 +22,7 @@ function transformToObject(model) {
21
22
  id: model.division_id,
22
23
  name: model.name,
23
24
  tier: model.tier,
25
+ subdivision: model.subdivision,
24
26
  leagueId: model.league_id,
25
27
  seasons: (model.DivisionSeasons ?? []).map((ds) => transformToSeason(ds.competition)),
26
28
  teams: model.Teams != null ? model.Teams.map(transformToTeam) : undefined
@@ -12,6 +12,10 @@ function transformToAttributes(season) {
12
12
  team_id: season.champion?.id
13
13
  }
14
14
  : undefined;
15
+ const DivisionSeason = {
16
+ competition_id: season.id,
17
+ division_id: season.divisionId
18
+ };
15
19
  return {
16
20
  competition_id: season.id,
17
21
  type: 'LEAGUE',
@@ -19,7 +23,8 @@ function transformToAttributes(season) {
19
23
  CompetitionChampion: champion,
20
24
  CompetitionMatches: matches,
21
25
  CompetitionTeams: teams,
22
- status: season.status
26
+ status: season.status,
27
+ DivisionSeason
23
28
  };
24
29
  }
25
30
  function transformToObject(model) {
@@ -29,7 +34,8 @@ function transformToObject(model) {
29
34
  iteration: transformToIteration(model.Iteration),
30
35
  teams: model.Teams != null ? model.Teams.map(transformToTeam) : [],
31
36
  champion: model.CompetitionChampion != null ? transformToTeam(model.CompetitionChampion.team) : undefined,
32
- status: model.status
37
+ status: model.status,
38
+ divisionId: model.DivisionSeason.division_id
33
39
  });
34
40
  }
35
41
  export { transformToObject as transformToSeason, transformToAttributes as transformFromSeason };
@@ -4,6 +4,7 @@ interface DivisionOpts {
4
4
  readonly id: string;
5
5
  readonly name: string;
6
6
  readonly tier: number;
7
+ readonly subdivision: number;
7
8
  readonly leagueId: string;
8
9
  readonly seasons: Season[];
9
10
  readonly teams?: Team[];
@@ -12,9 +13,10 @@ export declare class Division {
12
13
  readonly id: string;
13
14
  readonly name: string;
14
15
  readonly tier: number;
16
+ readonly subdivision: number;
15
17
  readonly leagueId: string;
16
18
  readonly seasons: Season[];
17
19
  readonly teams?: Team[];
18
- constructor({ id, name, tier, seasons, teams, leagueId }: DivisionOpts);
20
+ constructor({ id, name, tier, subdivision, seasons, teams, leagueId }: DivisionOpts);
19
21
  }
20
22
  export {};
@@ -1,8 +1,9 @@
1
1
  export class Division {
2
- constructor({ id, name, tier, seasons, teams, leagueId }) {
2
+ constructor({ id, name, tier, subdivision, seasons, teams, leagueId }) {
3
3
  this.id = id;
4
4
  this.name = name;
5
5
  this.tier = tier;
6
+ this.subdivision = subdivision;
6
7
  this.leagueId = leagueId;
7
8
  this.seasons = seasons;
8
9
  this.teams = teams;
@@ -8,6 +8,7 @@ interface SeasonOpts {
8
8
  readonly teams: Team[];
9
9
  readonly matches: Match[];
10
10
  readonly iteration: Iteration;
11
+ readonly divisionId: string;
11
12
  readonly champion?: Team;
12
13
  readonly status: StatusEnum;
13
14
  }
@@ -16,10 +17,11 @@ export declare class Season {
16
17
  readonly teams: Team[];
17
18
  readonly matches: Match[];
18
19
  readonly iteration: Iteration;
20
+ readonly divisionId: string;
19
21
  readonly standings: Standing[];
20
22
  readonly status: StatusEnum;
21
23
  champion?: Team;
22
- constructor({ id, iteration, teams, matches, champion, status }: SeasonOpts);
24
+ constructor({ id, iteration, teams, matches, champion, status, divisionId }: SeasonOpts);
23
25
  calculateStandings(): Standing[];
24
26
  updateStandings(): void;
25
27
  }
@@ -1,10 +1,11 @@
1
1
  import { Standing } from './standing';
2
2
  export class Season {
3
- constructor({ id, iteration, teams, matches, champion, status }) {
3
+ constructor({ id, iteration, teams, matches, champion, status, divisionId }) {
4
4
  this.id = id;
5
5
  this.teams = teams;
6
6
  this.matches = matches;
7
7
  this.iteration = iteration;
8
+ this.divisionId = divisionId;
8
9
  this.champion = champion;
9
10
  this.standings = this.calculateStandings();
10
11
  this.status = status;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.193",
3
+ "version": "0.0.195",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",