volleyballsimtypes 0.0.419 → 0.0.420

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.
@@ -40,7 +40,7 @@ export type Match = Omit<DataProps<_Match>, 'sets' | 'homeTeam' | 'awayTeam' | '
40
40
  export type RallyEvent = DataProps<_RallyEvent> & {
41
41
  team?: Team;
42
42
  };
43
- export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthIteration' | 'declineProfile'> & {
43
+ export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthIteration' | 'declineProfile' | 'nickname'> & {
44
44
  -readonly [K in 'birthAge' | 'birthIteration' | 'declineProfile']?: DataProps<_Player>[K];
45
45
  } & {
46
46
  stats?: PerformanceStats;
@@ -48,6 +48,7 @@ export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthItera
48
48
  jerseyNumber: number;
49
49
  locked?: boolean;
50
50
  declineStatus?: DeclineStatus;
51
+ nickname?: string;
51
52
  };
52
53
  export interface StartingLineup {
53
54
  [CourtPosition.LEFT_FRONT]: string;
@@ -9,6 +9,7 @@ export interface PlayerAttributes {
9
9
  rarity: Rarity;
10
10
  first_name: string;
11
11
  last_name: string;
12
+ nickname?: string | null;
12
13
  country_id: string;
13
14
  birth_age: number;
14
15
  birth_iteration: number;
@@ -27,6 +28,7 @@ export declare class PlayerModel extends Model<PlayerAttributes, PlayerCreationA
27
28
  rarity: Rarity;
28
29
  first_name: string;
29
30
  last_name: string;
31
+ nickname: string | null;
30
32
  country_id: string;
31
33
  birth_age: number;
32
34
  birth_iteration: number;
@@ -32,6 +32,10 @@ class PlayerModel extends sequelize_1.Model {
32
32
  type: sequelize_1.DataTypes.STRING,
33
33
  allowNull: false
34
34
  },
35
+ nickname: {
36
+ type: sequelize_1.DataTypes.STRING(16),
37
+ allowNull: true
38
+ },
35
39
  country_id: {
36
40
  type: sequelize_1.DataTypes.UUID,
37
41
  allowNull: false,
@@ -17,6 +17,7 @@ function transformToAttributes(player) {
17
17
  country_id: player.country.id,
18
18
  first_name: player.name.first,
19
19
  last_name: player.name.last,
20
+ nickname: player.nickname ?? null,
20
21
  roles: player.roles,
21
22
  traits: player.traits,
22
23
  PerformanceStat: (0, _1.transformFromPerformanceStats)(player.stats, player.id),
@@ -80,6 +81,7 @@ function transformToObject(model, currentIteration) {
80
81
  first: model.first_name,
81
82
  last: model.last_name
82
83
  },
84
+ nickname: model.nickname ?? undefined,
83
85
  country: (0, _1.transformToCountry)(model.country),
84
86
  roles: model.roles,
85
87
  traits: model.traits,
@@ -25,6 +25,7 @@ export declare class Name {
25
25
  export declare class Player {
26
26
  readonly id: string;
27
27
  readonly name: Name;
28
+ readonly nickname?: string;
28
29
  readonly country: Country;
29
30
  readonly stats: PerformanceStats;
30
31
  readonly roles: Role[];
@@ -54,9 +54,10 @@ class Player {
54
54
  stats: performance_stats_1.PerformanceStats.create(result.data.stats)
55
55
  });
56
56
  }
57
- constructor({ id, name, country, stats, roles, traits, rarity, age, birthAge, birthIteration, declineProfile, boxScores, boxScoreTotals }) {
57
+ constructor({ id, name, nickname, country, stats, roles, traits, rarity, age, birthAge, birthIteration, declineProfile, boxScores, boxScoreTotals }) {
58
58
  this.id = id;
59
59
  this.name = name;
60
+ this.nickname = nickname;
60
61
  this.country = country;
61
62
  this.stats = stats;
62
63
  this.roles = roles;
@@ -14,6 +14,7 @@ export declare const PlayerInputSchema: z.ZodObject<{
14
14
  first: z.ZodString;
15
15
  last: z.ZodString;
16
16
  }, z.core.$strip>;
17
+ nickname: z.ZodOptional<z.ZodString>;
17
18
  country: z.ZodCustom<Country, Country>;
18
19
  stats: z.ZodObject<{
19
20
  attack: z.ZodNumber;
@@ -28,6 +28,7 @@ const BoxScoreTotalsInputSchema = zod_1.z.object({
28
28
  exports.PlayerInputSchema = zod_1.z.object({
29
29
  id: zod_1.z.uuid(),
30
30
  name: exports.NameInputSchema,
31
+ nickname: zod_1.z.string().max(16).optional(),
31
32
  country: countrySchema,
32
33
  stats: performance_stats_z_1.PerformanceStatsInputSchema,
33
34
  roles: zod_1.z.array(zod_1.z.enum(Object.values(role_1.RoleEnum))).min(1),
@@ -40,7 +40,7 @@ export type Match = Omit<DataProps<_Match>, 'sets' | 'homeTeam' | 'awayTeam' | '
40
40
  export type RallyEvent = DataProps<_RallyEvent> & {
41
41
  team?: Team;
42
42
  };
43
- export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthIteration' | 'declineProfile'> & {
43
+ export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthIteration' | 'declineProfile' | 'nickname'> & {
44
44
  -readonly [K in 'birthAge' | 'birthIteration' | 'declineProfile']?: DataProps<_Player>[K];
45
45
  } & {
46
46
  stats?: PerformanceStats;
@@ -48,6 +48,7 @@ export type Player = Omit<DataProps<_Player>, 'stats' | 'birthAge' | 'birthItera
48
48
  jerseyNumber: number;
49
49
  locked?: boolean;
50
50
  declineStatus?: DeclineStatus;
51
+ nickname?: string;
51
52
  };
52
53
  export interface StartingLineup {
53
54
  [CourtPosition.LEFT_FRONT]: string;
@@ -9,6 +9,7 @@ export interface PlayerAttributes {
9
9
  rarity: Rarity;
10
10
  first_name: string;
11
11
  last_name: string;
12
+ nickname?: string | null;
12
13
  country_id: string;
13
14
  birth_age: number;
14
15
  birth_iteration: number;
@@ -27,6 +28,7 @@ export declare class PlayerModel extends Model<PlayerAttributes, PlayerCreationA
27
28
  rarity: Rarity;
28
29
  first_name: string;
29
30
  last_name: string;
31
+ nickname: string | null;
30
32
  country_id: string;
31
33
  birth_age: number;
32
34
  birth_iteration: number;
@@ -29,6 +29,10 @@ export class PlayerModel extends Model {
29
29
  type: DataTypes.STRING,
30
30
  allowNull: false
31
31
  },
32
+ nickname: {
33
+ type: DataTypes.STRING(16),
34
+ allowNull: true
35
+ },
32
36
  country_id: {
33
37
  type: DataTypes.UUID,
34
38
  allowNull: false,
@@ -13,6 +13,7 @@ function transformToAttributes(player) {
13
13
  country_id: player.country.id,
14
14
  first_name: player.name.first,
15
15
  last_name: player.name.last,
16
+ nickname: player.nickname ?? null,
16
17
  roles: player.roles,
17
18
  traits: player.traits,
18
19
  PerformanceStat: transformFromPerformanceStats(player.stats, player.id),
@@ -76,6 +77,7 @@ function transformToObject(model, currentIteration) {
76
77
  first: model.first_name,
77
78
  last: model.last_name
78
79
  },
80
+ nickname: model.nickname ?? undefined,
79
81
  country: transformToCountry(model.country),
80
82
  roles: model.roles,
81
83
  traits: model.traits,
@@ -25,6 +25,7 @@ export declare class Name {
25
25
  export declare class Player {
26
26
  readonly id: string;
27
27
  readonly name: Name;
28
+ readonly nickname?: string;
28
29
  readonly country: Country;
29
30
  readonly stats: PerformanceStats;
30
31
  readonly roles: Role[];
@@ -49,9 +49,10 @@ export class Player {
49
49
  stats: PerformanceStats.create(result.data.stats)
50
50
  });
51
51
  }
52
- constructor({ id, name, country, stats, roles, traits, rarity, age, birthAge, birthIteration, declineProfile, boxScores, boxScoreTotals }) {
52
+ constructor({ id, name, nickname, country, stats, roles, traits, rarity, age, birthAge, birthIteration, declineProfile, boxScores, boxScoreTotals }) {
53
53
  this.id = id;
54
54
  this.name = name;
55
+ this.nickname = nickname;
55
56
  this.country = country;
56
57
  this.stats = stats;
57
58
  this.roles = roles;
@@ -14,6 +14,7 @@ export declare const PlayerInputSchema: z.ZodObject<{
14
14
  first: z.ZodString;
15
15
  last: z.ZodString;
16
16
  }, z.core.$strip>;
17
+ nickname: z.ZodOptional<z.ZodString>;
17
18
  country: z.ZodCustom<Country, Country>;
18
19
  stats: z.ZodObject<{
19
20
  attack: z.ZodNumber;
@@ -25,6 +25,7 @@ const BoxScoreTotalsInputSchema = z.object({
25
25
  export const PlayerInputSchema = z.object({
26
26
  id: z.uuid(),
27
27
  name: NameInputSchema,
28
+ nickname: z.string().max(16).optional(),
28
29
  country: countrySchema,
29
30
  stats: PerformanceStatsInputSchema,
30
31
  roles: z.array(z.enum(Object.values(RoleEnum))).min(1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.419",
3
+ "version": "0.0.420",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",