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.
- package/dist/cjs/src/api/index.d.ts +2 -1
- package/dist/cjs/src/data/models/player.d.ts +2 -0
- package/dist/cjs/src/data/models/player.js +4 -0
- package/dist/cjs/src/data/transformers/player.js +2 -0
- package/dist/cjs/src/service/player/player.d.ts +1 -0
- package/dist/cjs/src/service/player/player.js +2 -1
- package/dist/cjs/src/service/player/schemas/player.z.d.ts +1 -0
- package/dist/cjs/src/service/player/schemas/player.z.js +1 -0
- package/dist/esm/src/api/index.d.ts +2 -1
- package/dist/esm/src/data/models/player.d.ts +2 -0
- package/dist/esm/src/data/models/player.js +4 -0
- package/dist/esm/src/data/transformers/player.js +2 -0
- package/dist/esm/src/service/player/player.d.ts +1 -0
- package/dist/esm/src/service/player/player.js +2 -1
- package/dist/esm/src/service/player/schemas/player.z.d.ts +1 -0
- package/dist/esm/src/service/player/schemas/player.z.js +1 -0
- package/package.json +1 -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;
|
|
@@ -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,
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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,
|
|
@@ -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;
|
|
@@ -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),
|