volleyballsimtypes 0.0.471 → 0.0.474

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.
Files changed (47) hide show
  1. package/dist/cjs/src/api/index.d.ts +2 -0
  2. package/dist/cjs/src/data/models/tactics.d.ts +2 -0
  3. package/dist/cjs/src/data/transformers/rally-event-injury.test.js +27 -0
  4. package/dist/cjs/src/data/transformers/rally-event.d.ts +1 -0
  5. package/dist/cjs/src/data/transformers/rally-event.js +16 -8
  6. package/dist/cjs/src/service/event/in-play-event.d.ts +1 -0
  7. package/dist/cjs/src/service/event/schemas/block.z.d.ts +1 -0
  8. package/dist/cjs/src/service/event/schemas/incident.z.d.ts +1 -0
  9. package/dist/cjs/src/service/event/schemas/incident.z.js +4 -1
  10. package/dist/cjs/src/service/event/schemas/reception.z.d.ts +1 -0
  11. package/dist/cjs/src/service/event/schemas/serve.z.d.ts +1 -0
  12. package/dist/cjs/src/service/event/schemas/set.z.d.ts +1 -0
  13. package/dist/cjs/src/service/event/schemas/spike.z.d.ts +1 -0
  14. package/dist/cjs/src/service/team/libero-sub.d.ts +4 -1
  15. package/dist/cjs/src/service/team/pinch-condition.d.ts +12 -2
  16. package/dist/cjs/src/service/team/pinch-condition.js +10 -2
  17. package/dist/cjs/src/service/team/schemas/designated-sub.z.d.ts +13 -1
  18. package/dist/cjs/src/service/team/schemas/designated-sub.z.js +3 -1
  19. package/dist/cjs/src/service/team/schemas/libero-sub.z.d.ts +94 -0
  20. package/dist/cjs/src/service/team/schemas/libero-sub.z.js +23 -6
  21. package/dist/cjs/src/service/team/schemas/libero-sub.z.test.js +33 -2
  22. package/dist/cjs/src/service/team/schemas/tactics.z.d.ts +68 -0
  23. package/dist/cjs/src/service/team/schemas/team.z.d.ts +68 -0
  24. package/dist/esm/src/api/index.d.ts +2 -0
  25. package/dist/esm/src/data/models/tactics.d.ts +2 -0
  26. package/dist/esm/src/data/transformers/rally-event-injury.test.js +29 -2
  27. package/dist/esm/src/data/transformers/rally-event.d.ts +1 -0
  28. package/dist/esm/src/data/transformers/rally-event.js +16 -8
  29. package/dist/esm/src/service/event/in-play-event.d.ts +1 -0
  30. package/dist/esm/src/service/event/schemas/block.z.d.ts +1 -0
  31. package/dist/esm/src/service/event/schemas/incident.z.d.ts +1 -0
  32. package/dist/esm/src/service/event/schemas/incident.z.js +4 -1
  33. package/dist/esm/src/service/event/schemas/reception.z.d.ts +1 -0
  34. package/dist/esm/src/service/event/schemas/serve.z.d.ts +1 -0
  35. package/dist/esm/src/service/event/schemas/set.z.d.ts +1 -0
  36. package/dist/esm/src/service/event/schemas/spike.z.d.ts +1 -0
  37. package/dist/esm/src/service/team/libero-sub.d.ts +4 -1
  38. package/dist/esm/src/service/team/pinch-condition.d.ts +12 -2
  39. package/dist/esm/src/service/team/pinch-condition.js +9 -1
  40. package/dist/esm/src/service/team/schemas/designated-sub.z.d.ts +13 -1
  41. package/dist/esm/src/service/team/schemas/designated-sub.z.js +4 -2
  42. package/dist/esm/src/service/team/schemas/libero-sub.z.d.ts +94 -0
  43. package/dist/esm/src/service/team/schemas/libero-sub.z.js +23 -6
  44. package/dist/esm/src/service/team/schemas/libero-sub.z.test.js +33 -2
  45. package/dist/esm/src/service/team/schemas/tactics.z.d.ts +68 -0
  46. package/dist/esm/src/service/team/schemas/team.z.d.ts +68 -0
  47. package/package.json +1 -1
@@ -4,14 +4,46 @@ export declare const LiberoSubModeSchema: z.ZodEnum<{
4
4
  NEVER: "NEVER";
5
5
  FATIGUE: "FATIGUE";
6
6
  ALWAYS: "ALWAYS";
7
+ CONDITIONS: "CONDITIONS";
7
8
  }>;
8
9
  export declare const LiberoSetSubConfigSchema: z.ZodObject<{
9
10
  mode: z.ZodEnum<{
10
11
  NEVER: "NEVER";
11
12
  FATIGUE: "FATIGUE";
12
13
  ALWAYS: "ALWAYS";
14
+ CONDITIONS: "CONDITIONS";
13
15
  }>;
14
16
  fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
17
+ conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
21
+ margin: z.ZodNumber;
22
+ opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
25
+ margin: z.ZodNumber;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
28
+ direction: z.ZodEnum<typeof import("..").ScoreDirection>;
29
+ points: z.ZodNumber;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
32
+ rotations: z.ZodNumber;
33
+ }, z.core.$strip>, z.ZodObject<{
34
+ type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
35
+ set: z.ZodNumber;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
38
+ score: z.ZodNumber;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
41
+ score: z.ZodNumber;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
44
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
45
+ }, z.core.$strip>], "type">>>;
46
+ conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
15
47
  }, z.core.$strip>;
16
48
  export declare const LiberoSubConfigSchema: z.ZodObject<{
17
49
  sets: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -19,13 +51,75 @@ export declare const LiberoSubConfigSchema: z.ZodObject<{
19
51
  NEVER: "NEVER";
20
52
  FATIGUE: "FATIGUE";
21
53
  ALWAYS: "ALWAYS";
54
+ CONDITIONS: "CONDITIONS";
22
55
  }>;
23
56
  fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
57
+ conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
58
+ type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
61
+ margin: z.ZodNumber;
62
+ opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
65
+ margin: z.ZodNumber;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
68
+ direction: z.ZodEnum<typeof import("..").ScoreDirection>;
69
+ points: z.ZodNumber;
70
+ }, z.core.$strip>, z.ZodObject<{
71
+ type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
72
+ rotations: z.ZodNumber;
73
+ }, z.core.$strip>, z.ZodObject<{
74
+ type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
75
+ set: z.ZodNumber;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
78
+ score: z.ZodNumber;
79
+ }, z.core.$strip>, z.ZodObject<{
80
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
81
+ score: z.ZodNumber;
82
+ }, z.core.$strip>, z.ZodObject<{
83
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
84
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
85
+ }, z.core.$strip>], "type">>>;
86
+ conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
24
87
  }, z.core.$strip>>>;
25
88
  mode: z.ZodEnum<{
26
89
  NEVER: "NEVER";
27
90
  FATIGUE: "FATIGUE";
28
91
  ALWAYS: "ALWAYS";
92
+ CONDITIONS: "CONDITIONS";
29
93
  }>;
30
94
  fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
95
+ conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
96
+ type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
99
+ margin: z.ZodNumber;
100
+ opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
101
+ }, z.core.$strip>, z.ZodObject<{
102
+ type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
103
+ margin: z.ZodNumber;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
106
+ direction: z.ZodEnum<typeof import("..").ScoreDirection>;
107
+ points: z.ZodNumber;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
110
+ rotations: z.ZodNumber;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
113
+ set: z.ZodNumber;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
116
+ score: z.ZodNumber;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
119
+ score: z.ZodNumber;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
122
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
123
+ }, z.core.$strip>], "type">>>;
124
+ conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
31
125
  }, z.core.$strip>;
@@ -1,17 +1,34 @@
1
1
  import { z } from 'zod';
2
2
  import { EnergyBand } from '../energy-band';
3
- export const LiberoSubModeSchema = z.enum(['NEVER', 'FATIGUE', 'ALWAYS']);
4
- // Fields shared by the all-sets config and each per-set config. Unlike a designated sub there is no bench or
5
- // pinch condition here (the swapped-in player is always the dedicated `secondLibero`), so there is nothing to
6
- // cross-validate.
3
+ import { ConditionLogicSchema, PinchConditionSchema } from './designated-sub.z';
4
+ export const LiberoSubModeSchema = z.enum(['NEVER', 'FATIGUE', 'ALWAYS', 'CONDITIONS']);
5
+ // Fields shared by the all-sets config and each per-set config. The swapped-in player is always the dedicated
6
+ // `secondLibero`, so there is no bench to validate; the CONDITIONS mode reuses the pinch-server condition
7
+ // catalog (PinchConditionSchema, which includes the libero-only PHASE condition) + ALL/ANY logic.
7
8
  const liberoSetSubConfigShape = {
8
9
  mode: LiberoSubModeSchema,
9
10
  // fatigue mode only (absent => the team default `substitutionBand`):
10
- fatigueBand: z.nativeEnum(EnergyBand).optional()
11
+ fatigueBand: z.nativeEnum(EnergyBand).optional(),
12
+ // conditions mode only:
13
+ conditions: z.array(PinchConditionSchema).optional(),
14
+ conditionLogic: ConditionLogicSchema.optional()
11
15
  };
12
- export const LiberoSetSubConfigSchema = z.object(liberoSetSubConfigShape);
16
+ // CONDITIONS mode needs at least one condition (mirrors the designated-sub pinch refine).
17
+ function refineConditions(data, ctx) {
18
+ if (data.mode !== 'CONDITIONS')
19
+ return;
20
+ if (data.conditions == null || data.conditions.length === 0) {
21
+ ctx.addIssue({ code: 'custom', message: 'LIBERO_CONDITIONS_REQUIRE_A_CONDITION', path: ['conditions'] });
22
+ }
23
+ }
24
+ export const LiberoSetSubConfigSchema = z.object(liberoSetSubConfigShape).superRefine(refineConditions);
13
25
  export const LiberoSubConfigSchema = z.object({
14
26
  ...liberoSetSubConfigShape,
15
27
  // Optional per-set overrides (index 0 = set 1 ... index 4 = set 5); absent => the flat config for all sets.
16
28
  sets: z.array(LiberoSetSubConfigSchema).max(5).optional()
29
+ }).superRefine((data, ctx) => {
30
+ // The flat config is the fallback for any set a partial `sets` array doesn't cover, so validate it whenever
31
+ // `sets` is absent or covers fewer than 5 sets (each present per-set config is validated by its own schema).
32
+ if (data.sets == null || data.sets.length < 5)
33
+ refineConditions(data, ctx);
17
34
  });
@@ -1,9 +1,10 @@
1
1
  import { describe, it, expect } from '@jest/globals';
2
2
  import { LiberoSetSubConfigSchema, LiberoSubConfigSchema, LiberoSubModeSchema } from './libero-sub.z';
3
3
  import { EnergyBand } from '../energy-band';
4
+ import { MatchPhase, PinchConditionType } from '../pinch-condition';
4
5
  describe('LiberoSubModeSchema', () => {
5
- it('accepts NEVER, FATIGUE and ALWAYS', () => {
6
- for (const mode of ['NEVER', 'FATIGUE', 'ALWAYS']) {
6
+ it('accepts NEVER, FATIGUE, ALWAYS and CONDITIONS', () => {
7
+ for (const mode of ['NEVER', 'FATIGUE', 'ALWAYS', 'CONDITIONS']) {
7
8
  expect(LiberoSubModeSchema.safeParse(mode).success).toBe(true);
8
9
  }
9
10
  });
@@ -21,6 +22,36 @@ describe('LiberoSetSubConfigSchema', () => {
21
22
  it('rejects an unknown band', () => {
22
23
  expect(LiberoSetSubConfigSchema.safeParse({ mode: 'FATIGUE', fatigueBand: 'SLEEPY' }).success).toBe(false);
23
24
  });
25
+ it('accepts CONDITIONS with a PHASE condition (serve/receive split)', () => {
26
+ const res = LiberoSetSubConfigSchema.safeParse({
27
+ mode: 'CONDITIONS',
28
+ conditionLogic: 'ALL',
29
+ conditions: [{ type: PinchConditionType.PHASE, phase: MatchPhase.RECEIVING }]
30
+ });
31
+ expect(res.success).toBe(true);
32
+ });
33
+ it('accepts CONDITIONS mixing a pinch condition and a PHASE condition', () => {
34
+ const res = LiberoSetSubConfigSchema.safeParse({
35
+ mode: 'CONDITIONS',
36
+ conditionLogic: 'ANY',
37
+ conditions: [
38
+ { type: PinchConditionType.MIN_OWN_SCORE, score: 20 },
39
+ { type: PinchConditionType.PHASE, phase: MatchPhase.SERVING }
40
+ ]
41
+ });
42
+ expect(res.success).toBe(true);
43
+ });
44
+ it('rejects CONDITIONS mode with no conditions', () => {
45
+ expect(LiberoSetSubConfigSchema.safeParse({ mode: 'CONDITIONS' }).success).toBe(false);
46
+ expect(LiberoSetSubConfigSchema.safeParse({ mode: 'CONDITIONS', conditions: [] }).success).toBe(false);
47
+ });
48
+ it('rejects an invalid PHASE value', () => {
49
+ const res = LiberoSetSubConfigSchema.safeParse({
50
+ mode: 'CONDITIONS',
51
+ conditions: [{ type: PinchConditionType.PHASE, phase: 'ATTACKING' }]
52
+ });
53
+ expect(res.success).toBe(false);
54
+ });
24
55
  });
25
56
  describe('LiberoSubConfigSchema', () => {
26
57
  it('accepts a flat config with no per-set overrides', () => {
@@ -50,6 +50,9 @@ export declare const TacticsInputSchema: z.ZodObject<{
50
50
  }, z.core.$strip>, z.ZodObject<{
51
51
  type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
52
52
  score: z.ZodNumber;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
55
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
53
56
  }, z.core.$strip>], "type">>>;
54
57
  conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
55
58
  }, z.core.$strip>>>;
@@ -86,6 +89,9 @@ export declare const TacticsInputSchema: z.ZodObject<{
86
89
  }, z.core.$strip>, z.ZodObject<{
87
90
  type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
88
91
  score: z.ZodNumber;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
94
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
89
95
  }, z.core.$strip>], "type">>>;
90
96
  conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
91
97
  starter: z.ZodCustom<Player, Player>;
@@ -98,15 +104,77 @@ export declare const TacticsInputSchema: z.ZodObject<{
98
104
  NEVER: "NEVER";
99
105
  FATIGUE: "FATIGUE";
100
106
  ALWAYS: "ALWAYS";
107
+ CONDITIONS: "CONDITIONS";
101
108
  }>;
102
109
  fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
110
+ conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
111
+ type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
114
+ margin: z.ZodNumber;
115
+ opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
116
+ }, z.core.$strip>, z.ZodObject<{
117
+ type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
118
+ margin: z.ZodNumber;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
121
+ direction: z.ZodEnum<typeof import("..").ScoreDirection>;
122
+ points: z.ZodNumber;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
125
+ rotations: z.ZodNumber;
126
+ }, z.core.$strip>, z.ZodObject<{
127
+ type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
128
+ set: z.ZodNumber;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
131
+ score: z.ZodNumber;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
134
+ score: z.ZodNumber;
135
+ }, z.core.$strip>, z.ZodObject<{
136
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
137
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
138
+ }, z.core.$strip>], "type">>>;
139
+ conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
103
140
  }, z.core.$strip>>>;
104
141
  mode: z.ZodEnum<{
105
142
  NEVER: "NEVER";
106
143
  FATIGUE: "FATIGUE";
107
144
  ALWAYS: "ALWAYS";
145
+ CONDITIONS: "CONDITIONS";
108
146
  }>;
109
147
  fatigueBand: z.ZodOptional<z.ZodEnum<typeof EnergyBand>>;
148
+ conditions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
149
+ type: z.ZodLiteral<import("..").PinchConditionType.ASAP>;
150
+ }, z.core.$strip>, z.ZodObject<{
151
+ type: z.ZodLiteral<import("..").PinchConditionType.TEAM_SET_POINT>;
152
+ margin: z.ZodNumber;
153
+ opponent: z.ZodEnum<typeof import("..").OpponentRelation>;
154
+ }, z.core.$strip>, z.ZodObject<{
155
+ type: z.ZodLiteral<import("..").PinchConditionType.OPPONENT_SET_POINT>;
156
+ margin: z.ZodNumber;
157
+ }, z.core.$strip>, z.ZodObject<{
158
+ type: z.ZodLiteral<import("..").PinchConditionType.SCORE_DIFF>;
159
+ direction: z.ZodEnum<typeof import("..").ScoreDirection>;
160
+ points: z.ZodNumber;
161
+ }, z.core.$strip>, z.ZodObject<{
162
+ type: z.ZodLiteral<import("..").PinchConditionType.AFTER_ROTATIONS>;
163
+ rotations: z.ZodNumber;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ type: z.ZodLiteral<import("..").PinchConditionType.FROM_SET>;
166
+ set: z.ZodNumber;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OWN_SCORE>;
169
+ score: z.ZodNumber;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ type: z.ZodLiteral<import("..").PinchConditionType.MIN_OPPONENT_SCORE>;
172
+ score: z.ZodNumber;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ type: z.ZodLiteral<import("..").PinchConditionType.PHASE>;
175
+ phase: z.ZodEnum<typeof import("..").MatchPhase>;
176
+ }, z.core.$strip>], "type">>>;
177
+ conditionLogic: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"ALL">, z.ZodLiteral<"ANY">]>>;
110
178
  }, z.core.$strip>>;
111
179
  liberoReplacementSets: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodCustom<Player, Player>>>>;
112
180
  rotationSystem: z.ZodDefault<z.ZodEnum<typeof RotationSystemEnum>>;
@@ -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>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.471",
3
+ "version": "0.0.474",
4
4
  "description": "vbsim types",
5
5
  "main": "./dist/cjs/src/index.js",
6
6
  "module": "./dist/esm/src/index.js",