volleyballsimtypes 0.0.475 → 0.0.477
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 +9 -1
- package/dist/cjs/src/data/models/auth-session.d.ts +5 -1
- package/dist/cjs/src/data/models/auth-session.js +8 -0
- package/dist/cjs/src/data/models/tactics.d.ts +9 -1
- package/dist/cjs/src/data/transformers/tactics.js +50 -11
- package/dist/cjs/src/data/transformers/tactics.test.js +67 -0
- package/dist/cjs/src/service/team/designated-sub.d.ts +5 -0
- package/dist/cjs/src/service/team/schemas/designated-sub.z.d.ts +109 -0
- package/dist/cjs/src/service/team/schemas/designated-sub.z.js +15 -3
- package/dist/cjs/src/service/team/schemas/designated-sub.z.test.js +73 -0
- package/dist/cjs/src/service/team/schemas/injury-replacement.z.test.js +11 -2
- package/dist/cjs/src/service/team/schemas/libero-sub.z.d.ts +4 -4
- package/dist/cjs/src/service/team/schemas/tactics.z.d.ts +72 -2
- package/dist/cjs/src/service/team/schemas/tactics.z.js +5 -4
- package/dist/cjs/src/service/team/schemas/team.z.d.ts +72 -2
- package/dist/esm/src/api/index.d.ts +9 -1
- package/dist/esm/src/data/models/auth-session.d.ts +5 -1
- package/dist/esm/src/data/models/auth-session.js +8 -0
- package/dist/esm/src/data/models/tactics.d.ts +9 -1
- package/dist/esm/src/data/transformers/tactics.js +50 -11
- package/dist/esm/src/data/transformers/tactics.test.js +67 -0
- package/dist/esm/src/service/team/designated-sub.d.ts +5 -0
- package/dist/esm/src/service/team/schemas/designated-sub.z.d.ts +109 -0
- package/dist/esm/src/service/team/schemas/designated-sub.z.js +14 -2
- package/dist/esm/src/service/team/schemas/designated-sub.z.test.js +73 -0
- package/dist/esm/src/service/team/schemas/injury-replacement.z.test.js +11 -2
- package/dist/esm/src/service/team/schemas/libero-sub.z.d.ts +4 -4
- package/dist/esm/src/service/team/schemas/tactics.z.d.ts +72 -2
- package/dist/esm/src/service/team/schemas/tactics.z.js +5 -4
- package/dist/esm/src/service/team/schemas/team.z.d.ts +72 -2
- package/package.json +1 -1
|
@@ -38,6 +38,10 @@ export declare const SubModeSchema: z.ZodEnum<{
|
|
|
38
38
|
FATIGUE: "FATIGUE";
|
|
39
39
|
PINCH: "PINCH";
|
|
40
40
|
}>;
|
|
41
|
+
export declare const SubBackModeSchema: z.ZodEnum<{
|
|
42
|
+
FATIGUE: "FATIGUE";
|
|
43
|
+
CONDITIONS: "CONDITIONS";
|
|
44
|
+
}>;
|
|
41
45
|
export declare const SetSubConfigSchema: z.ZodObject<{
|
|
42
46
|
mode: z.ZodEnum<{
|
|
43
47
|
NEVER: "NEVER";
|
|
@@ -77,6 +81,41 @@ export declare const SetSubConfigSchema: z.ZodObject<{
|
|
|
77
81
|
phase: z.ZodEnum<typeof MatchPhase>;
|
|
78
82
|
}, z.core.$strip>], "type">>>;
|
|
79
83
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
84
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
FATIGUE: "FATIGUE";
|
|
87
|
+
CONDITIONS: "CONDITIONS";
|
|
88
|
+
}>>;
|
|
89
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
90
|
+
type: z.ZodLiteral<PinchConditionType.ASAP>;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<PinchConditionType.TEAM_SET_POINT>;
|
|
93
|
+
margin: z.ZodNumber;
|
|
94
|
+
opponent: z.ZodEnum<typeof OpponentRelation>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
type: z.ZodLiteral<PinchConditionType.OPPONENT_SET_POINT>;
|
|
97
|
+
margin: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<PinchConditionType.SCORE_DIFF>;
|
|
100
|
+
direction: z.ZodEnum<typeof ScoreDirection>;
|
|
101
|
+
points: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<PinchConditionType.AFTER_ROTATIONS>;
|
|
104
|
+
rotations: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
type: z.ZodLiteral<PinchConditionType.FROM_SET>;
|
|
107
|
+
set: z.ZodNumber;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
type: z.ZodLiteral<PinchConditionType.MIN_OWN_SCORE>;
|
|
110
|
+
score: z.ZodNumber;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
type: z.ZodLiteral<PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
113
|
+
score: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
type: z.ZodLiteral<PinchConditionType.PHASE>;
|
|
116
|
+
phase: z.ZodEnum<typeof MatchPhase>;
|
|
117
|
+
}, z.core.$strip>], "type">>>;
|
|
118
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
80
119
|
}, z.core.$strip>;
|
|
81
120
|
export declare const DesignatedSubSchema: z.ZodObject<{
|
|
82
121
|
sets: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -118,6 +157,41 @@ export declare const DesignatedSubSchema: z.ZodObject<{
|
|
|
118
157
|
phase: z.ZodEnum<typeof MatchPhase>;
|
|
119
158
|
}, z.core.$strip>], "type">>>;
|
|
120
159
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
160
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
FATIGUE: "FATIGUE";
|
|
163
|
+
CONDITIONS: "CONDITIONS";
|
|
164
|
+
}>>;
|
|
165
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<PinchConditionType.ASAP>;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<PinchConditionType.TEAM_SET_POINT>;
|
|
169
|
+
margin: z.ZodNumber;
|
|
170
|
+
opponent: z.ZodEnum<typeof OpponentRelation>;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
type: z.ZodLiteral<PinchConditionType.OPPONENT_SET_POINT>;
|
|
173
|
+
margin: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
175
|
+
type: z.ZodLiteral<PinchConditionType.SCORE_DIFF>;
|
|
176
|
+
direction: z.ZodEnum<typeof ScoreDirection>;
|
|
177
|
+
points: z.ZodNumber;
|
|
178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
179
|
+
type: z.ZodLiteral<PinchConditionType.AFTER_ROTATIONS>;
|
|
180
|
+
rotations: z.ZodNumber;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<PinchConditionType.FROM_SET>;
|
|
183
|
+
set: z.ZodNumber;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
type: z.ZodLiteral<PinchConditionType.MIN_OWN_SCORE>;
|
|
186
|
+
score: z.ZodNumber;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
type: z.ZodLiteral<PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
189
|
+
score: z.ZodNumber;
|
|
190
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
191
|
+
type: z.ZodLiteral<PinchConditionType.PHASE>;
|
|
192
|
+
phase: z.ZodEnum<typeof MatchPhase>;
|
|
193
|
+
}, z.core.$strip>], "type">>>;
|
|
194
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
121
195
|
}, z.core.$strip>>>;
|
|
122
196
|
mode: z.ZodEnum<{
|
|
123
197
|
NEVER: "NEVER";
|
|
@@ -157,5 +231,40 @@ export declare const DesignatedSubSchema: z.ZodObject<{
|
|
|
157
231
|
phase: z.ZodEnum<typeof MatchPhase>;
|
|
158
232
|
}, z.core.$strip>], "type">>>;
|
|
159
233
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
234
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
235
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
FATIGUE: "FATIGUE";
|
|
237
|
+
CONDITIONS: "CONDITIONS";
|
|
238
|
+
}>>;
|
|
239
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
240
|
+
type: z.ZodLiteral<PinchConditionType.ASAP>;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
type: z.ZodLiteral<PinchConditionType.TEAM_SET_POINT>;
|
|
243
|
+
margin: z.ZodNumber;
|
|
244
|
+
opponent: z.ZodEnum<typeof OpponentRelation>;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<PinchConditionType.OPPONENT_SET_POINT>;
|
|
247
|
+
margin: z.ZodNumber;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<PinchConditionType.SCORE_DIFF>;
|
|
250
|
+
direction: z.ZodEnum<typeof ScoreDirection>;
|
|
251
|
+
points: z.ZodNumber;
|
|
252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
+
type: z.ZodLiteral<PinchConditionType.AFTER_ROTATIONS>;
|
|
254
|
+
rotations: z.ZodNumber;
|
|
255
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
256
|
+
type: z.ZodLiteral<PinchConditionType.FROM_SET>;
|
|
257
|
+
set: z.ZodNumber;
|
|
258
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
259
|
+
type: z.ZodLiteral<PinchConditionType.MIN_OWN_SCORE>;
|
|
260
|
+
score: z.ZodNumber;
|
|
261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
262
|
+
type: z.ZodLiteral<PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
263
|
+
score: z.ZodNumber;
|
|
264
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
265
|
+
type: z.ZodLiteral<PinchConditionType.PHASE>;
|
|
266
|
+
phase: z.ZodEnum<typeof MatchPhase>;
|
|
267
|
+
}, z.core.$strip>], "type">>>;
|
|
268
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
160
269
|
starter: z.ZodCustom<Player, Player>;
|
|
161
270
|
}, z.core.$strip>;
|
|
@@ -20,6 +20,7 @@ export const PinchConditionSchema = z.discriminatedUnion('type', [
|
|
|
20
20
|
]);
|
|
21
21
|
export const ConditionLogicSchema = z.union([z.literal('ALL'), z.literal('ANY')]);
|
|
22
22
|
export const SubModeSchema = z.enum(['FATIGUE', 'PINCH', 'NEVER']);
|
|
23
|
+
export const SubBackModeSchema = z.enum(['FATIGUE', 'CONDITIONS']);
|
|
23
24
|
// Fields shared by the all-sets config and each per-set config.
|
|
24
25
|
const setSubConfigShape = {
|
|
25
26
|
mode: SubModeSchema,
|
|
@@ -27,9 +28,16 @@ const setSubConfigShape = {
|
|
|
27
28
|
fatigueBand: z.nativeEnum(EnergyBand).optional(),
|
|
28
29
|
benchFatigueBand: z.nativeEnum(EnergyBand).optional(),
|
|
29
30
|
conditions: z.array(PinchConditionSchema).optional(),
|
|
30
|
-
conditionLogic: ConditionLogicSchema.optional()
|
|
31
|
+
conditionLogic: ConditionLogicSchema.optional(),
|
|
32
|
+
// pinch ("Conditions") mode. true = serve-and-return pinch server; false/absent = regular conditional sub.
|
|
33
|
+
pinchServer: z.boolean().optional(),
|
|
34
|
+
// a regular conditional sub's sub-back trigger + its condition set (subBackMode === 'CONDITIONS').
|
|
35
|
+
subBackMode: SubBackModeSchema.optional(),
|
|
36
|
+
subBackConditions: z.array(PinchConditionSchema).optional(),
|
|
37
|
+
subBackConditionLogic: ConditionLogicSchema.optional()
|
|
31
38
|
};
|
|
32
|
-
// Pinch mode needs a designated bench player
|
|
39
|
+
// Pinch ("Conditions") mode needs a designated bench player and at least one sub-in condition. A regular
|
|
40
|
+
// conditional sub (pinchServer !== true) with a CONDITIONS sub-back also needs at least one sub-back condition.
|
|
33
41
|
function refinePinch(data, ctx) {
|
|
34
42
|
if (data.mode !== 'PINCH')
|
|
35
43
|
return;
|
|
@@ -39,6 +47,10 @@ function refinePinch(data, ctx) {
|
|
|
39
47
|
if (data.conditions == null || data.conditions.length === 0) {
|
|
40
48
|
ctx.addIssue({ code: 'custom', message: 'PINCH_SERVER_REQUIRES_CONDITIONS', path: ['conditions'] });
|
|
41
49
|
}
|
|
50
|
+
if (data.pinchServer !== true && data.subBackMode === 'CONDITIONS' &&
|
|
51
|
+
(data.subBackConditions == null || data.subBackConditions.length === 0)) {
|
|
52
|
+
ctx.addIssue({ code: 'custom', message: 'CONDITIONAL_SUB_BACK_REQUIRES_CONDITIONS', path: ['subBackConditions'] });
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
export const SetSubConfigSchema = z.object(setSubConfigShape).superRefine(refinePinch);
|
|
44
56
|
export const DesignatedSubSchema = z.object({
|
|
@@ -216,4 +216,77 @@ describe('DesignatedSubSchema', () => {
|
|
|
216
216
|
});
|
|
217
217
|
expect(res.success).toBe(false);
|
|
218
218
|
});
|
|
219
|
+
it('accepts a pinch-mode entry marked as a pinch server (serve-and-return)', () => {
|
|
220
|
+
const res = DesignatedSubSchema.safeParse({
|
|
221
|
+
starter,
|
|
222
|
+
bench,
|
|
223
|
+
mode: 'PINCH',
|
|
224
|
+
conditions: [{ type: PinchConditionType.ASAP }],
|
|
225
|
+
pinchServer: true
|
|
226
|
+
});
|
|
227
|
+
expect(res.success).toBe(true);
|
|
228
|
+
});
|
|
229
|
+
it('accepts a regular conditional sub (pinchServer false) with a tiredness sub-back', () => {
|
|
230
|
+
const res = DesignatedSubSchema.safeParse({
|
|
231
|
+
starter,
|
|
232
|
+
bench,
|
|
233
|
+
mode: 'PINCH',
|
|
234
|
+
conditions: [{ type: PinchConditionType.SCORE_DIFF, direction: ScoreDirection.TRAILING, points: 3 }],
|
|
235
|
+
pinchServer: false,
|
|
236
|
+
subBackMode: 'FATIGUE',
|
|
237
|
+
benchFatigueBand: EnergyBand.TIRED
|
|
238
|
+
});
|
|
239
|
+
expect(res.success).toBe(true);
|
|
240
|
+
});
|
|
241
|
+
it('accepts a regular conditional sub with a condition-based sub-back', () => {
|
|
242
|
+
const res = DesignatedSubSchema.safeParse({
|
|
243
|
+
starter,
|
|
244
|
+
bench,
|
|
245
|
+
mode: 'PINCH',
|
|
246
|
+
conditions: [{ type: PinchConditionType.SCORE_DIFF, direction: ScoreDirection.TRAILING, points: 3 }],
|
|
247
|
+
pinchServer: false,
|
|
248
|
+
subBackMode: 'CONDITIONS',
|
|
249
|
+
subBackConditions: [{ type: PinchConditionType.TEAM_SET_POINT, margin: 2, opponent: OpponentRelation.EITHER }],
|
|
250
|
+
subBackConditionLogic: 'ANY'
|
|
251
|
+
});
|
|
252
|
+
expect(res.success).toBe(true);
|
|
253
|
+
});
|
|
254
|
+
it('rejects a condition-based sub-back with no sub-back conditions', () => {
|
|
255
|
+
const res = DesignatedSubSchema.safeParse({
|
|
256
|
+
starter,
|
|
257
|
+
bench,
|
|
258
|
+
mode: 'PINCH',
|
|
259
|
+
conditions: [{ type: PinchConditionType.ASAP }],
|
|
260
|
+
pinchServer: false,
|
|
261
|
+
subBackMode: 'CONDITIONS',
|
|
262
|
+
subBackConditions: []
|
|
263
|
+
});
|
|
264
|
+
expect(res.success).toBe(false);
|
|
265
|
+
if (!res.success) {
|
|
266
|
+
expect(res.error.issues.some(issue => issue.message === 'CONDITIONAL_SUB_BACK_REQUIRES_CONDITIONS')).toBe(true);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
it('does not require sub-back conditions for a pinch server even under subBackMode CONDITIONS', () => {
|
|
270
|
+
// A pinch server never uses a sub-back rule (it serve-reverts), so the condition requirement is skipped.
|
|
271
|
+
const res = DesignatedSubSchema.safeParse({
|
|
272
|
+
starter,
|
|
273
|
+
bench,
|
|
274
|
+
mode: 'PINCH',
|
|
275
|
+
conditions: [{ type: PinchConditionType.ASAP }],
|
|
276
|
+
pinchServer: true,
|
|
277
|
+
subBackMode: 'CONDITIONS'
|
|
278
|
+
});
|
|
279
|
+
expect(res.success).toBe(true);
|
|
280
|
+
});
|
|
281
|
+
it('rejects an invalid subBackMode', () => {
|
|
282
|
+
const res = DesignatedSubSchema.safeParse({
|
|
283
|
+
starter,
|
|
284
|
+
bench,
|
|
285
|
+
mode: 'PINCH',
|
|
286
|
+
conditions: [{ type: PinchConditionType.ASAP }],
|
|
287
|
+
pinchServer: false,
|
|
288
|
+
subBackMode: 'WHENEVER'
|
|
289
|
+
});
|
|
290
|
+
expect(res.success).toBe(false);
|
|
291
|
+
});
|
|
219
292
|
});
|
|
@@ -47,8 +47,17 @@ describe('TacticsInputSchema — injuryReplacements (owner rules 2026-07-03)', (
|
|
|
47
47
|
expect(res.data.replaceKnockedImmediately).toEqual({ [p1.id]: false, [p3.id]: true });
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
it('
|
|
51
|
-
|
|
50
|
+
it('accepts a libero-keyed replaceKnockedImmediately map', () => {
|
|
51
|
+
const res = TacticsInputSchema.safeParse(baseInput({
|
|
52
|
+
replaceKnockedImmediately: { [libero.id]: false }
|
|
53
|
+
}));
|
|
54
|
+
expect(res.success).toBe(true);
|
|
55
|
+
if (res.success) {
|
|
56
|
+
expect(res.data.replaceKnockedImmediately).toEqual({ [libero.id]: false });
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
it('rejects a replaceKnockedImmediately key that is not a court starter or the libero', () => {
|
|
60
|
+
for (const outsider of [benchA, reserveA]) {
|
|
52
61
|
const res = TacticsInputSchema.safeParse(baseInput({
|
|
53
62
|
replaceKnockedImmediately: { [outsider.id]: false }
|
|
54
63
|
}));
|
|
@@ -3,15 +3,15 @@ import { EnergyBand } from '../energy-band';
|
|
|
3
3
|
export declare const LiberoSubModeSchema: z.ZodEnum<{
|
|
4
4
|
NEVER: "NEVER";
|
|
5
5
|
FATIGUE: "FATIGUE";
|
|
6
|
-
ALWAYS: "ALWAYS";
|
|
7
6
|
CONDITIONS: "CONDITIONS";
|
|
7
|
+
ALWAYS: "ALWAYS";
|
|
8
8
|
}>;
|
|
9
9
|
export declare const LiberoSetSubConfigSchema: z.ZodObject<{
|
|
10
10
|
mode: z.ZodEnum<{
|
|
11
11
|
NEVER: "NEVER";
|
|
12
12
|
FATIGUE: "FATIGUE";
|
|
13
|
-
ALWAYS: "ALWAYS";
|
|
14
13
|
CONDITIONS: "CONDITIONS";
|
|
14
|
+
ALWAYS: "ALWAYS";
|
|
15
15
|
}>;
|
|
16
16
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
|
|
17
17
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -50,8 +50,8 @@ export declare const LiberoSubConfigSchema: z.ZodObject<{
|
|
|
50
50
|
mode: z.ZodEnum<{
|
|
51
51
|
NEVER: "NEVER";
|
|
52
52
|
FATIGUE: "FATIGUE";
|
|
53
|
-
ALWAYS: "ALWAYS";
|
|
54
53
|
CONDITIONS: "CONDITIONS";
|
|
54
|
+
ALWAYS: "ALWAYS";
|
|
55
55
|
}>;
|
|
56
56
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
|
|
57
57
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -88,8 +88,8 @@ export declare const LiberoSubConfigSchema: z.ZodObject<{
|
|
|
88
88
|
mode: z.ZodEnum<{
|
|
89
89
|
NEVER: "NEVER";
|
|
90
90
|
FATIGUE: "FATIGUE";
|
|
91
|
-
ALWAYS: "ALWAYS";
|
|
92
91
|
CONDITIONS: "CONDITIONS";
|
|
92
|
+
ALWAYS: "ALWAYS";
|
|
93
93
|
}>;
|
|
94
94
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
|
|
95
95
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -55,6 +55,41 @@ export declare const TacticsInputSchema: z.ZodObject<{
|
|
|
55
55
|
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
56
56
|
}, z.core.$strip>], "type">>>;
|
|
57
57
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
58
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
FATIGUE: "FATIGUE";
|
|
61
|
+
CONDITIONS: "CONDITIONS";
|
|
62
|
+
}>>;
|
|
63
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
64
|
+
type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
|
|
65
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
+
type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
|
|
67
|
+
margin: z.ZodNumber;
|
|
68
|
+
opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
|
|
71
|
+
margin: z.ZodNumber;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
|
|
74
|
+
direction: z.ZodEnum<typeof import("..").ScoreDirection>;
|
|
75
|
+
points: z.ZodNumber;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
|
|
78
|
+
rotations: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
|
|
81
|
+
set: z.ZodNumber;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
|
|
84
|
+
score: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
87
|
+
score: z.ZodNumber;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
90
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
91
|
+
}, z.core.$strip>], "type">>>;
|
|
92
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
58
93
|
}, z.core.$strip>>>;
|
|
59
94
|
mode: z.ZodEnum<{
|
|
60
95
|
NEVER: "NEVER";
|
|
@@ -94,6 +129,41 @@ export declare const TacticsInputSchema: z.ZodObject<{
|
|
|
94
129
|
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
95
130
|
}, z.core.$strip>], "type">>>;
|
|
96
131
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
132
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
FATIGUE: "FATIGUE";
|
|
135
|
+
CONDITIONS: "CONDITIONS";
|
|
136
|
+
}>>;
|
|
137
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
138
|
+
type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
|
|
141
|
+
margin: z.ZodNumber;
|
|
142
|
+
opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
|
|
145
|
+
margin: z.ZodNumber;
|
|
146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
|
|
148
|
+
direction: z.ZodEnum<typeof import("..").ScoreDirection>;
|
|
149
|
+
points: z.ZodNumber;
|
|
150
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
+
type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
|
|
152
|
+
rotations: z.ZodNumber;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
|
|
155
|
+
set: z.ZodNumber;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
|
|
158
|
+
score: z.ZodNumber;
|
|
159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
161
|
+
score: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
164
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
165
|
+
}, z.core.$strip>], "type">>>;
|
|
166
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
97
167
|
starter: z.ZodCustom<Player, Player>;
|
|
98
168
|
}, z.core.$strip>>>;
|
|
99
169
|
substitutionBand: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<typeof EnergyBand>, z.ZodLiteral<"NEVER">]>>;
|
|
@@ -103,8 +173,8 @@ export declare const TacticsInputSchema: z.ZodObject<{
|
|
|
103
173
|
mode: z.ZodEnum<{
|
|
104
174
|
NEVER: "NEVER";
|
|
105
175
|
FATIGUE: "FATIGUE";
|
|
106
|
-
ALWAYS: "ALWAYS";
|
|
107
176
|
CONDITIONS: "CONDITIONS";
|
|
177
|
+
ALWAYS: "ALWAYS";
|
|
108
178
|
}>;
|
|
109
179
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
|
|
110
180
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -141,8 +211,8 @@ export declare const TacticsInputSchema: z.ZodObject<{
|
|
|
141
211
|
mode: z.ZodEnum<{
|
|
142
212
|
NEVER: "NEVER";
|
|
143
213
|
FATIGUE: "FATIGUE";
|
|
144
|
-
ALWAYS: "ALWAYS";
|
|
145
214
|
CONDITIONS: "CONDITIONS";
|
|
215
|
+
ALWAYS: "ALWAYS";
|
|
146
216
|
}>;
|
|
147
217
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
|
|
148
218
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -195,10 +195,11 @@ export const TacticsInputSchema = z.object({
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
// Per-
|
|
199
|
-
//
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
// Per-player knock toggle: every key must be a court starter OR the starting libero. The libero may carry its
|
|
199
|
+
// own key so the user can choose to keep a lightly knocked libero on court (owner 2026-07-06). Bench/reserve
|
|
200
|
+
// players still follow the slot they occupy, so they never carry their own key.
|
|
201
|
+
for (const knockedId of Object.keys(data.replaceKnockedImmediately)) {
|
|
202
|
+
if (!starterIds.has(knockedId) && knockedId !== libero?.id) {
|
|
202
203
|
ctx.addIssue({ code: 'custom', message: 'REPLACE_KNOCKED_KEY_NOT_A_STARTER', path: ['replaceKnockedImmediately'] });
|
|
203
204
|
}
|
|
204
205
|
}
|
|
@@ -63,6 +63,41 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
63
63
|
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
64
64
|
}, z.core.$strip>], "type">>>;
|
|
65
65
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
66
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
FATIGUE: "FATIGUE";
|
|
69
|
+
CONDITIONS: "CONDITIONS";
|
|
70
|
+
}>>;
|
|
71
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
|
|
75
|
+
margin: z.ZodNumber;
|
|
76
|
+
opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
|
|
77
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
78
|
+
type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
|
|
79
|
+
margin: z.ZodNumber;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
|
|
82
|
+
direction: z.ZodEnum<typeof import("..").ScoreDirection>;
|
|
83
|
+
points: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
|
|
86
|
+
rotations: z.ZodNumber;
|
|
87
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
|
|
89
|
+
set: z.ZodNumber;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
|
|
92
|
+
score: z.ZodNumber;
|
|
93
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
94
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
95
|
+
score: z.ZodNumber;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
98
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
99
|
+
}, z.core.$strip>], "type">>>;
|
|
100
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
66
101
|
}, z.core.$strip>>>;
|
|
67
102
|
mode: z.ZodEnum<{
|
|
68
103
|
NEVER: "NEVER";
|
|
@@ -102,6 +137,41 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
102
137
|
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
103
138
|
}, z.core.$strip>], "type">>>;
|
|
104
139
|
conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
140
|
+
pinchServer: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
subBackMode: z.ZodOptional<z.ZodEnum<{
|
|
142
|
+
FATIGUE: "FATIGUE";
|
|
143
|
+
CONDITIONS: "CONDITIONS";
|
|
144
|
+
}>>;
|
|
145
|
+
subBackConditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
|
+
type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
|
|
147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
|
|
149
|
+
margin: z.ZodNumber;
|
|
150
|
+
opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
|
|
151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
|
|
153
|
+
margin: z.ZodNumber;
|
|
154
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
155
|
+
type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
|
|
156
|
+
direction: z.ZodEnum<typeof import("..").ScoreDirection>;
|
|
157
|
+
points: z.ZodNumber;
|
|
158
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
159
|
+
type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
|
|
160
|
+
rotations: z.ZodNumber;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
|
|
163
|
+
set: z.ZodNumber;
|
|
164
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
165
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
|
|
166
|
+
score: z.ZodNumber;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
|
|
169
|
+
score: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
|
|
172
|
+
phase: z.ZodEnum<typeof import("..").MatchPhase>;
|
|
173
|
+
}, z.core.$strip>], "type">>>;
|
|
174
|
+
subBackConditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
|
|
105
175
|
starter: z.ZodCustom<Player, Player>;
|
|
106
176
|
}, z.core.$strip>>>;
|
|
107
177
|
substitutionBand: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<typeof import("..").EnergyBand>, z.ZodLiteral<"NEVER">]>>;
|
|
@@ -111,8 +181,8 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
111
181
|
mode: z.ZodEnum<{
|
|
112
182
|
NEVER: "NEVER";
|
|
113
183
|
FATIGUE: "FATIGUE";
|
|
114
|
-
ALWAYS: "ALWAYS";
|
|
115
184
|
CONDITIONS: "CONDITIONS";
|
|
185
|
+
ALWAYS: "ALWAYS";
|
|
116
186
|
}>;
|
|
117
187
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof import("..").EnergyBand>>;
|
|
118
188
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -149,8 +219,8 @@ export declare const TeamInputSchema: z.ZodObject<{
|
|
|
149
219
|
mode: z.ZodEnum<{
|
|
150
220
|
NEVER: "NEVER";
|
|
151
221
|
FATIGUE: "FATIGUE";
|
|
152
|
-
ALWAYS: "ALWAYS";
|
|
153
222
|
CONDITIONS: "CONDITIONS";
|
|
223
|
+
ALWAYS: "ALWAYS";
|
|
154
224
|
}>;
|
|
155
225
|
fatigueBand: z.ZodOptional<z.ZodEnum<typeof import("..").EnergyBand>>;
|
|
156
226
|
conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|