volleyballsimtypes 0.0.42 → 0.0.43

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.
@@ -1,11 +1,12 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
- import type { MatchId, MatchModel, TournamentId, TournamentModel } from '.';
3
+ import type { MatchAttributes, MatchId, MatchModel, TournamentId, TournamentModel } from '.';
4
4
  export interface TournamentMatchAttributes {
5
5
  tournament_id: string;
6
6
  match_id: string;
7
7
  index: number;
8
8
  stage: TournamentStage;
9
+ match?: MatchAttributes;
9
10
  }
10
11
  export type TournamentStage = 'ROUND_OF_8' | 'QUARTERFINALS' | 'SEMIFINALS' | 'FINAL';
11
12
  export type TournamentMatchPk = 'match_id';
@@ -18,12 +18,12 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
18
18
  iteration: number;
19
19
  champion?: string;
20
20
  tournamentTeams: TeamModel[];
21
- tournamentMatches: TournamentMatchModel[];
22
21
  champion_Team: TeamModel;
23
22
  getChampion_Team: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
24
23
  setChampion_Team: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
25
24
  createChampion_Team: Sequelize.BelongsToCreateAssociationMixin<TeamModel>;
26
25
  TournamentMatches: TournamentMatchModel[];
26
+ tournamentMatches: TournamentMatchModel[];
27
27
  getTournamentMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchModel>;
28
28
  setTournamentMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
29
29
  addTournamentMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchModel, TournamentMatchId>;
@@ -1,7 +1,7 @@
1
1
  import { TournamentMatch } from '../../service';
2
2
  import { APITournamentMatch } from '../../routing';
3
3
  import { TournamentMatchAttributes, TournamentMatchModel } from '../models';
4
- declare function transformToAttributes(match: TournamentMatch, tournamentId: string): TournamentMatchAttributes;
4
+ declare function transformToAttributes(tournamentMatch: TournamentMatch, tournamentId: string): TournamentMatchAttributes;
5
5
  declare function transformToObject(model: TournamentMatchModel): TournamentMatch;
6
6
  declare function transformToAPIObject(model: TournamentMatchModel): APITournamentMatch;
7
7
  export { transformToObject as transformToTournamentMatch, transformToAPIObject as transformToAPITournamentMatch, transformToAttributes as transformFromTournamentMatch };
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.transformFromTournamentMatch = exports.transformToAPITournamentMatch = exports.transformToTournamentMatch = void 0;
4
4
  const service_1 = require("../../service");
5
5
  const _1 = require(".");
6
- function transformToAttributes(match, tournamentId) {
6
+ function transformToAttributes(tournamentMatch, tournamentId) {
7
7
  return {
8
8
  tournament_id: tournamentId,
9
- match_id: match.match.id,
10
- index: match.index,
11
- stage: (0, _1.transformFromStage)(match.stage)
9
+ match_id: tournamentMatch.match.id,
10
+ index: tournamentMatch.index,
11
+ stage: (0, _1.transformFromStage)(tournamentMatch.stage),
12
+ match: tournamentMatch.match != null ? (0, _1.transformFromMatch)(tournamentMatch.match) : undefined
12
13
  };
13
14
  }
14
15
  exports.transformFromTournamentMatch = transformToAttributes;
@@ -1,11 +1,12 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
- import type { MatchId, MatchModel, TournamentId, TournamentModel } from '.';
3
+ import type { MatchAttributes, MatchId, MatchModel, TournamentId, TournamentModel } from '.';
4
4
  export interface TournamentMatchAttributes {
5
5
  tournament_id: string;
6
6
  match_id: string;
7
7
  index: number;
8
8
  stage: TournamentStage;
9
+ match?: MatchAttributes;
9
10
  }
10
11
  export type TournamentStage = 'ROUND_OF_8' | 'QUARTERFINALS' | 'SEMIFINALS' | 'FINAL';
11
12
  export type TournamentMatchPk = 'match_id';
@@ -18,12 +18,12 @@ export declare class TournamentModel extends Model<TournamentAttributes, Tournam
18
18
  iteration: number;
19
19
  champion?: string;
20
20
  tournamentTeams: TeamModel[];
21
- tournamentMatches: TournamentMatchModel[];
22
21
  champion_Team: TeamModel;
23
22
  getChampion_Team: Sequelize.BelongsToGetAssociationMixin<TeamModel>;
24
23
  setChampion_Team: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>;
25
24
  createChampion_Team: Sequelize.BelongsToCreateAssociationMixin<TeamModel>;
26
25
  TournamentMatches: TournamentMatchModel[];
26
+ tournamentMatches: TournamentMatchModel[];
27
27
  getTournamentMatches: Sequelize.HasManyGetAssociationsMixin<TournamentMatchModel>;
28
28
  setTournamentMatches: Sequelize.HasManySetAssociationsMixin<TournamentMatchModel, TournamentMatchId>;
29
29
  addTournamentMatch: Sequelize.HasManyAddAssociationMixin<TournamentMatchModel, TournamentMatchId>;
@@ -1,7 +1,7 @@
1
1
  import { TournamentMatch } from '../../service';
2
2
  import { APITournamentMatch } from '../../routing';
3
3
  import { TournamentMatchAttributes, TournamentMatchModel } from '../models';
4
- declare function transformToAttributes(match: TournamentMatch, tournamentId: string): TournamentMatchAttributes;
4
+ declare function transformToAttributes(tournamentMatch: TournamentMatch, tournamentId: string): TournamentMatchAttributes;
5
5
  declare function transformToObject(model: TournamentMatchModel): TournamentMatch;
6
6
  declare function transformToAPIObject(model: TournamentMatchModel): APITournamentMatch;
7
7
  export { transformToObject as transformToTournamentMatch, transformToAPIObject as transformToAPITournamentMatch, transformToAttributes as transformFromTournamentMatch };
@@ -1,11 +1,12 @@
1
1
  import { TournamentMatch } from '../../service';
2
- import { transformFromStage, transformToMatch, transformToStage } from '.';
3
- function transformToAttributes(match, tournamentId) {
2
+ import { transformFromMatch, transformFromStage, transformToMatch, transformToStage } from '.';
3
+ function transformToAttributes(tournamentMatch, tournamentId) {
4
4
  return {
5
5
  tournament_id: tournamentId,
6
- match_id: match.match.id,
7
- index: match.index,
8
- stage: transformFromStage(match.stage)
6
+ match_id: tournamentMatch.match.id,
7
+ index: tournamentMatch.index,
8
+ stage: transformFromStage(tournamentMatch.stage),
9
+ match: tournamentMatch.match != null ? transformFromMatch(tournamentMatch.match) : undefined
9
10
  };
10
11
  }
11
12
  function transformToObject(model) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",