volleyballsimtypes 0.0.473 → 0.0.475
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 +8 -0
- package/dist/cjs/src/data/models/tactics.d.ts +10 -1
- package/dist/cjs/src/data/models/tactics.js +4 -0
- package/dist/cjs/src/data/transformers/tactics.js +66 -2
- package/dist/cjs/src/data/transformers/tactics.test.js +44 -0
- package/dist/cjs/src/service/team/index.d.ts +1 -0
- package/dist/cjs/src/service/team/index.js +1 -0
- package/dist/cjs/src/service/team/libero-injury.d.ts +6 -0
- package/dist/cjs/src/service/team/libero-injury.js +2 -0
- package/dist/cjs/src/service/team/libero-sub.d.ts +4 -1
- package/dist/cjs/src/service/team/pinch-condition.d.ts +12 -2
- package/dist/cjs/src/service/team/pinch-condition.js +10 -2
- package/dist/cjs/src/service/team/schemas/designated-sub.z.d.ts +13 -1
- package/dist/cjs/src/service/team/schemas/designated-sub.z.js +3 -1
- package/dist/cjs/src/service/team/schemas/libero-injury.z.test.d.ts +1 -0
- package/dist/cjs/src/service/team/schemas/libero-injury.z.test.js +71 -0
- package/dist/cjs/src/service/team/schemas/libero-sub.z.d.ts +94 -0
- package/dist/cjs/src/service/team/schemas/libero-sub.z.js +23 -6
- package/dist/cjs/src/service/team/schemas/libero-sub.z.test.js +33 -2
- package/dist/cjs/src/service/team/schemas/tactics.z.d.ts +73 -0
- package/dist/cjs/src/service/team/schemas/tactics.z.js +41 -1
- package/dist/cjs/src/service/team/schemas/team.z.d.ts +73 -0
- package/dist/cjs/src/service/team/tactics.d.ts +3 -0
- package/dist/cjs/src/service/team/tactics.js +2 -1
- package/dist/esm/src/api/index.d.ts +8 -0
- package/dist/esm/src/data/models/tactics.d.ts +10 -1
- package/dist/esm/src/data/models/tactics.js +4 -0
- package/dist/esm/src/data/transformers/tactics.js +66 -2
- package/dist/esm/src/data/transformers/tactics.test.js +44 -0
- package/dist/esm/src/service/team/index.d.ts +1 -0
- package/dist/esm/src/service/team/index.js +1 -0
- package/dist/esm/src/service/team/libero-injury.d.ts +6 -0
- package/dist/esm/src/service/team/libero-injury.js +1 -0
- package/dist/esm/src/service/team/libero-sub.d.ts +4 -1
- package/dist/esm/src/service/team/pinch-condition.d.ts +12 -2
- package/dist/esm/src/service/team/pinch-condition.js +9 -1
- package/dist/esm/src/service/team/schemas/designated-sub.z.d.ts +13 -1
- package/dist/esm/src/service/team/schemas/designated-sub.z.js +4 -2
- package/dist/esm/src/service/team/schemas/libero-injury.z.test.d.ts +1 -0
- package/dist/esm/src/service/team/schemas/libero-injury.z.test.js +69 -0
- package/dist/esm/src/service/team/schemas/libero-sub.z.d.ts +94 -0
- package/dist/esm/src/service/team/schemas/libero-sub.z.js +23 -6
- package/dist/esm/src/service/team/schemas/libero-sub.z.test.js +33 -2
- package/dist/esm/src/service/team/schemas/tactics.z.d.ts +73 -0
- package/dist/esm/src/service/team/schemas/tactics.z.js +41 -1
- package/dist/esm/src/service/team/schemas/team.z.d.ts +73 -0
- package/dist/esm/src/service/team/tactics.d.ts +3 -0
- package/dist/esm/src/service/team/tactics.js +2 -1
- package/package.json +1 -1
|
@@ -58,6 +58,9 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
58
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
59
59
|
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
60
60
|
score: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
63
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
61
64
|
}, z.core.$strip>], "type">>>;
|
|
62
65
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
63
66
|
}, z.core.$strip>>>;
|
|
@@ -94,6 +97,9 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
94
97
|
}, z.core.$strip>, z.ZodObject<{
|
|
95
98
|
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
96
99
|
score: z.ZodNumber;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
102
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
97
103
|
}, z.core.$strip>], "type">>>;
|
|
98
104
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
99
105
|
starter: z.ZodCustom<Player, Player>;
|
|
@@ -106,15 +112,77 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
106
112
|
NEVER: "NEVER";
|
|
107
113
|
FATIGUE: "FATIGUE";
|
|
108
114
|
ALWAYS: "ALWAYS";
|
|
115
|
+
CONDITIONS: "CONDITIONS";
|
|
109
116
|
}>;
|
|
110
117
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof import("..").EnergyBand>>;
|
|
118
|
+
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
119
|
+
type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
|
|
120
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
121
|
+
type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
|
|
122
|
+
margin: z.ZodNumber;
|
|
123
|
+
opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
|
|
126
|
+
margin: z.ZodNumber;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
|
|
129
|
+
direction: z.ZodEnum<typeof import("..").ScoreDirection>;
|
|
130
|
+
points: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
|
|
133
|
+
rotations: z.ZodNumber;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
|
|
136
|
+
set: z.ZodNumber;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
|
|
139
|
+
score: z.ZodNumber;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
142
|
+
score: z.ZodNumber;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
145
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
146
|
+
}, z.core.$strip>], "type">>>;
|
|
147
|
+
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
111
148
|
}, z.core.$strip>>>;
|
|
112
149
|
mode: z.ZodEnum<{
|
|
113
150
|
NEVER: "NEVER";
|
|
114
151
|
FATIGUE: "FATIGUE";
|
|
115
152
|
ALWAYS: "ALWAYS";
|
|
153
|
+
CONDITIONS: "CONDITIONS";
|
|
116
154
|
}>;
|
|
117
155
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof import("..").EnergyBand>>;
|
|
156
|
+
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
157
|
+
type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
|
|
160
|
+
margin: z.ZodNumber;
|
|
161
|
+
opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
|
|
164
|
+
margin: z.ZodNumber;
|
|
165
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
|
|
167
|
+
direction: z.ZodEnum<typeof import("..").ScoreDirection>;
|
|
168
|
+
points: z.ZodNumber;
|
|
169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
|
|
171
|
+
rotations: z.ZodNumber;
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
|
|
174
|
+
set: z.ZodNumber;
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
|
|
177
|
+
score: z.ZodNumber;
|
|
178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
179
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
180
|
+
score: z.ZodNumber;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
183
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
184
|
+
}, z.core.$strip>], "type">>>;
|
|
185
|
+
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
118
186
|
}, z.core.$strip>>;
|
|
119
187
|
liberoReplacementSets: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodCustom<Player, Player>>>>;
|
|
120
188
|
rotationSystem: z.ZodDefault<z.ZodEnum<typeof import("..").RotationSystemEnum>>;
|
|
@@ -137,6 +205,11 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
137
205
|
replacement: z.ZodCustom<Player, Player>;
|
|
138
206
|
benchBackfill: z.ZodOptional<z.ZodCustom<Player, Player>>;
|
|
139
207
|
}, z.core.$strip>>>;
|
|
208
|
+
liberoInjury: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
preMatchReplacement: z.ZodOptional<z.ZodCustom<Player, Player>>;
|
|
210
|
+
secondLiberoBackfill: z.ZodOptional<z.ZodCustom<Player, Player>>;
|
|
211
|
+
inMatchDesignate: z.ZodOptional<z.ZodCustom<Player, Player>>;
|
|
212
|
+
}, z.core.$strip>>;
|
|
140
213
|
}, z.core.$strip>>;
|
|
141
214
|
}, z.core.$strip>;
|
|
142
215
|
export type TeamInput = z.infer<typeof TeamInputSchema>;
|
|
@@ -6,6 +6,7 @@ import { SubBand } from './energy-band';
|
|
|
6
6
|
import { RotationSystemEnum } from './rotation-system';
|
|
7
7
|
import { OffensivePreference } from './offensive-preference';
|
|
8
8
|
import { InjuryReplacement } from './injury-replacement';
|
|
9
|
+
import { LiberoInjuryConfig } from './libero-injury';
|
|
9
10
|
export interface StartingLineup {
|
|
10
11
|
readonly [CourtPosition.LEFT_FRONT]: Player;
|
|
11
12
|
readonly [CourtPosition.MIDDLE_FRONT]: Player;
|
|
@@ -36,6 +37,7 @@ export interface TacticsOpts {
|
|
|
36
37
|
readonly offensivePreferenceSets?: OffensivePreference[][];
|
|
37
38
|
readonly replaceKnockedImmediately: Record<string, boolean>;
|
|
38
39
|
readonly injuryReplacements: InjuryReplacement[];
|
|
40
|
+
readonly liberoInjury?: LiberoInjuryConfig;
|
|
39
41
|
}
|
|
40
42
|
export declare class Tactics {
|
|
41
43
|
readonly lineup: StartingLineup;
|
|
@@ -53,6 +55,7 @@ export declare class Tactics {
|
|
|
53
55
|
readonly offensivePreferenceSets?: OffensivePreference[][];
|
|
54
56
|
readonly replaceKnockedImmediately: Record<string, boolean>;
|
|
55
57
|
readonly injuryReplacements: InjuryReplacement[];
|
|
58
|
+
readonly liberoInjury?: LiberoInjuryConfig;
|
|
56
59
|
static create(input: unknown): Tactics;
|
|
57
60
|
private constructor();
|
|
58
61
|
findPlayerInLineup(id: string): CourtPosition | undefined;
|
|
@@ -15,7 +15,7 @@ export class Tactics {
|
|
|
15
15
|
}
|
|
16
16
|
return new Tactics(result.data);
|
|
17
17
|
}
|
|
18
|
-
constructor({ lineup, liberoReplacements, receiveRotationOffset = false, designatedSubs = [], substitutionBand = EnergyBand.TIRED, secondLibero, liberoSub, liberoReplacementSets, rotationSystem = RotationSystemEnum.SIX_ZERO, designatedSetters = [], offensivePreferences = [], systemSets, offensivePreferenceSets, replaceKnockedImmediately = {}, injuryReplacements = [] }) {
|
|
18
|
+
constructor({ lineup, liberoReplacements, receiveRotationOffset = false, designatedSubs = [], substitutionBand = EnergyBand.TIRED, secondLibero, liberoSub, liberoReplacementSets, rotationSystem = RotationSystemEnum.SIX_ZERO, designatedSetters = [], offensivePreferences = [], systemSets, offensivePreferenceSets, replaceKnockedImmediately = {}, injuryReplacements = [], liberoInjury }) {
|
|
19
19
|
this.lineup = lineup;
|
|
20
20
|
this.liberoReplacements = liberoReplacements;
|
|
21
21
|
this.receiveRotationOffset = receiveRotationOffset;
|
|
@@ -31,6 +31,7 @@ export class Tactics {
|
|
|
31
31
|
this.offensivePreferenceSets = offensivePreferenceSets;
|
|
32
32
|
this.replaceKnockedImmediately = replaceKnockedImmediately;
|
|
33
33
|
this.injuryReplacements = injuryReplacements;
|
|
34
|
+
this.liberoInjury = liberoInjury;
|
|
34
35
|
}
|
|
35
36
|
findPlayerInLineup(id) {
|
|
36
37
|
if (this.lineup.bench.some(p => p.id === id))
|