@battle-racing/br-common-lib 4.4.0 → 4.6.0
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/domains/command/Command.schema.d.ts +76 -10
- package/dist/domains/command/Command.schema.js +17 -3
- package/dist/domains/command/Command.types.d.ts +3 -1
- package/dist/domains/damage/Damage.schema.d.ts +2 -2
- package/dist/domains/flow/Flow.schema.d.ts +39 -6
- package/dist/domains/hardware/KartHardwareState.schema.js +8 -8
- package/dist/domains/hardware/KartHardwareState.types.d.ts +3 -0
- package/dist/domains/hardware/KartHardwareState.types.js +2 -0
- package/dist/domains/hardware/ModuleStatus.schema.d.ts +28 -0
- package/dist/domains/hardware/ModuleStatus.schema.js +4 -0
- package/dist/domains/hardware/ballSensor/BallSensor.const.d.ts +5 -0
- package/dist/domains/hardware/ballSensor/BallSensor.const.js +6 -1
- package/dist/domains/hardware/ballSensor/BallSensor.schema.d.ts +5 -0
- package/dist/domains/hardware/ballSensor/BallSensor.schema.js +2 -1
- package/dist/domains/hardware/ballSensor/BallSensor.types.d.ts +2 -1
- package/dist/domains/hardware/flag/Flag.const.d.ts +7 -0
- package/dist/domains/hardware/flag/Flag.const.js +8 -1
- package/dist/domains/hardware/flag/Flag.schema.d.ts +11 -4
- package/dist/domains/hardware/flag/Flag.schema.js +5 -2
- package/dist/domains/hardware/flag/Flag.types.d.ts +2 -1
- package/dist/domains/hardware/index.d.ts +1 -0
- package/dist/domains/hardware/index.js +2 -1
- package/dist/domains/hardware/lights/Lights.const.d.ts +4 -0
- package/dist/domains/hardware/lights/Lights.const.js +5 -1
- package/dist/domains/hardware/lights/Lights.schema.d.ts +16 -0
- package/dist/domains/hardware/lights/Lights.schema.js +5 -1
- package/dist/domains/hardware/lights/Lights.types.d.ts +3 -1
- package/dist/domains/hardware/rgb/RGB.const.d.ts +4 -0
- package/dist/domains/hardware/rgb/RGB.const.js +5 -1
- package/dist/domains/hardware/rgb/RGB.schema.d.ts +4 -0
- package/dist/domains/hardware/rgb/RGB.schema.js +2 -1
- package/dist/domains/hardware/rgb/RGB.types.d.ts +2 -1
- package/dist/domains/hardware/sound/Sound.const.d.ts +3 -0
- package/dist/domains/hardware/sound/Sound.const.js +4 -1
- package/dist/domains/hardware/sound/Sound.schema.d.ts +3 -0
- package/dist/domains/hardware/sound/Sound.schema.js +2 -1
- package/dist/domains/hardware/sound/Sound.types.d.ts +2 -1
- package/dist/domains/hardware/steering-wheel/SteeringWheel.const.d.ts +4 -0
- package/dist/domains/hardware/steering-wheel/SteeringWheel.const.js +7 -0
- package/dist/domains/hardware/steering-wheel/SteeringWheel.schema.d.ts +4 -0
- package/dist/domains/hardware/steering-wheel/SteeringWheel.schema.js +3 -1
- package/dist/domains/hardware/steering-wheel/SteeringWheel.types.d.ts +2 -1
- package/dist/domains/player/Player.schema.d.ts +2 -4
- package/dist/domains/player/Player.schema.js +3 -6
- package/dist/domains/powerUp/PowerUp.schema.d.ts +117 -18
- package/dist/domains/racingTeam/RacingTeam.schema.d.ts +77 -3
- package/dist/domains/racingTeam/RacingTeam.schema.js +18 -4
- package/dist/domains/racingTeam/RacingTeam.types.d.ts +4 -1
- package/dist/domains/session/Session.schema.d.ts +5 -0
- package/dist/domains/session/Session.schema.js +4 -1
- package/dist/domains/socket/index.d.ts +1 -0
- package/dist/domains/socket/index.js +1 -0
- package/dist/domains/socket/screen/SocketScreenServerToClientEventsParams.d.ts +14 -0
- package/dist/domains/socket/screen/SocketScreenServerToClientEventsParams.js +2 -0
- package/dist/domains/socket/screen/index.d.ts +1 -0
- package/dist/domains/socket/screen/index.js +17 -0
- package/dist/domains/ticketing/Ticketing.schema.d.ts +4 -0
- package/dist/domains/ticketing/Ticketing.schema.js +2 -0
- package/dist/domains/user/User.schema.d.ts +65 -6
- package/dist/domains/user/User.schema.js +52 -11
- package/dist/domains/user/User.types.d.ts +7 -1
- package/docs/TICKETING_AND_PURCHASE_FLOW.md +110 -0
- package/package.json +1 -1
- package/src/domains/command/Command.schema.ts +30 -12
- package/src/domains/command/Command.types.ts +4 -0
- package/src/domains/hardware/KartHardwareState.schema.ts +4 -4
- package/src/domains/hardware/KartHardwareState.types.ts +4 -0
- package/src/domains/hardware/ModuleStatus.schema.ts +4 -0
- package/src/domains/hardware/ballSensor/BallSensor.const.ts +6 -0
- package/src/domains/hardware/ballSensor/BallSensor.schema.ts +3 -1
- package/src/domains/hardware/ballSensor/BallSensor.types.ts +2 -0
- package/src/domains/hardware/flag/Flag.const.ts +8 -0
- package/src/domains/hardware/flag/Flag.schema.ts +6 -2
- package/src/domains/hardware/flag/Flag.types.ts +2 -0
- package/src/domains/hardware/index.ts +2 -1
- package/src/domains/hardware/lights/Lights.const.ts +5 -0
- package/src/domains/hardware/lights/Lights.schema.ts +7 -1
- package/src/domains/hardware/lights/Lights.types.ts +9 -1
- package/src/domains/hardware/rgb/RGB.const.ts +5 -0
- package/src/domains/hardware/rgb/RGB.schema.ts +3 -1
- package/src/domains/hardware/rgb/RGB.types.ts +2 -0
- package/src/domains/hardware/sound/Sound.const.ts +4 -0
- package/src/domains/hardware/sound/Sound.schema.ts +3 -1
- package/src/domains/hardware/sound/Sound.types.ts +3 -1
- package/src/domains/hardware/steering-wheel/SteeringWheel.const.ts +4 -0
- package/src/domains/hardware/steering-wheel/SteeringWheel.schema.ts +3 -0
- package/src/domains/hardware/steering-wheel/SteeringWheel.types.ts +3 -1
- package/src/domains/player/Player.schema.ts +2 -6
- package/src/domains/racingTeam/RacingTeam.schema.ts +20 -3
- package/src/domains/racingTeam/RacingTeam.types.ts +7 -0
- package/src/domains/session/Session.schema.ts +4 -0
- package/src/domains/socket/index.ts +1 -0
- package/src/domains/socket/screen/SocketScreenServerToClientEventsParams.ts +19 -0
- package/src/domains/socket/screen/index.ts +1 -0
- package/src/domains/ticketing/Ticketing.schema.ts +2 -0
- package/src/domains/user/User.schema.ts +60 -13
- package/src/domains/user/User.types.ts +17 -1
|
@@ -169,7 +169,7 @@ export declare const flagModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
169
169
|
front: z.ZodBoolean;
|
|
170
170
|
back: z.ZodBoolean;
|
|
171
171
|
}, z.core.$strip>;
|
|
172
|
-
mediaSourceName: z.ZodEnum<{
|
|
172
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
173
173
|
readonly HEART_00: "heart_00";
|
|
174
174
|
readonly HEART_01: "heart_01";
|
|
175
175
|
readonly HEART_02: "heart_02";
|
|
@@ -231,7 +231,7 @@ export declare const flagModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
231
231
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
232
232
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
233
233
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
234
|
-
}>;
|
|
234
|
+
}>]>;
|
|
235
235
|
}, z.core.$strip>;
|
|
236
236
|
}, z.core.$strip>, z.ZodObject<{
|
|
237
237
|
module: z.ZodLiteral<"flag">;
|
|
@@ -243,7 +243,7 @@ export declare const flagModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
243
243
|
front: z.ZodBoolean;
|
|
244
244
|
back: z.ZodBoolean;
|
|
245
245
|
}, z.core.$strip>;
|
|
246
|
-
mediaSourceName: z.ZodEnum<{
|
|
246
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
247
247
|
readonly HEART_00: "heart_00";
|
|
248
248
|
readonly HEART_01: "heart_01";
|
|
249
249
|
readonly HEART_02: "heart_02";
|
|
@@ -305,7 +305,7 @@ export declare const flagModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
305
305
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
306
306
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
307
307
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
308
|
-
}>;
|
|
308
|
+
}>]>;
|
|
309
309
|
}, z.core.$strip>;
|
|
310
310
|
}, z.core.$strip>]>;
|
|
311
311
|
export declare const rgbModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -620,7 +620,40 @@ export declare const steeringWheelModuleCommandSchema: z.ZodUnion<readonly [z.Zo
|
|
|
620
620
|
module: z.ZodLiteral<"steeringWheel">;
|
|
621
621
|
action: z.ZodLiteral<"turnLedOff">;
|
|
622
622
|
}, z.core.$strip>]>;
|
|
623
|
-
export declare const
|
|
623
|
+
export declare const emergencyModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
624
|
+
module: z.ZodLiteral<"emergency">;
|
|
625
|
+
action: z.ZodLiteral<"activate">;
|
|
626
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
627
|
+
module: z.ZodLiteral<"emergency">;
|
|
628
|
+
action: z.ZodLiteral<"deactivate">;
|
|
629
|
+
}, z.core.$strip>]>;
|
|
630
|
+
export declare const lightsModuleCommandSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
631
|
+
module: z.ZodLiteral<"lights">;
|
|
632
|
+
action: z.ZodLiteral<"showColor">;
|
|
633
|
+
params: z.ZodObject<{
|
|
634
|
+
address: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodLiteral<"all">]>;
|
|
635
|
+
timeDuration: z.ZodNumber;
|
|
636
|
+
color: z.ZodString;
|
|
637
|
+
}, z.core.$strip>;
|
|
638
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
639
|
+
module: z.ZodLiteral<"lights">;
|
|
640
|
+
action: z.ZodLiteral<"showEffect">;
|
|
641
|
+
params: z.ZodObject<{
|
|
642
|
+
addresses: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodLiteral<"all">]>;
|
|
643
|
+
effect: z.ZodEnum<{
|
|
644
|
+
readonly SHOW_UV_COLOR: "SHOW_UV_COLOR";
|
|
645
|
+
readonly POWER_OFF: "POWER_OFF";
|
|
646
|
+
readonly START_GAME: "START_GAME";
|
|
647
|
+
readonly GAME_OVER: "GAME_OVER";
|
|
648
|
+
readonly FINAL_LAP: "FINAL_LAP";
|
|
649
|
+
readonly YELLOW_FLAG: "YELLOW_FLAG";
|
|
650
|
+
readonly RED_FLAG: "RED_FLAG";
|
|
651
|
+
readonly PULSE: "PULSE";
|
|
652
|
+
}>;
|
|
653
|
+
timeDuration: z.ZodNumber;
|
|
654
|
+
}, z.core.$strip>;
|
|
655
|
+
}, z.core.$strip>]>;
|
|
656
|
+
export declare const allCommandsConfigSchema: z.ZodIntersection<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
624
657
|
module: z.ZodLiteral<"ballSensorDiskThrower">;
|
|
625
658
|
action: z.ZodLiteral<"activateSensor">;
|
|
626
659
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -703,7 +736,7 @@ export declare const allCommandsConfigSchema: z.ZodUnion<readonly [z.ZodUnion<re
|
|
|
703
736
|
front: z.ZodBoolean;
|
|
704
737
|
back: z.ZodBoolean;
|
|
705
738
|
}, z.core.$strip>;
|
|
706
|
-
mediaSourceName: z.ZodEnum<{
|
|
739
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
707
740
|
readonly HEART_00: "heart_00";
|
|
708
741
|
readonly HEART_01: "heart_01";
|
|
709
742
|
readonly HEART_02: "heart_02";
|
|
@@ -765,7 +798,7 @@ export declare const allCommandsConfigSchema: z.ZodUnion<readonly [z.ZodUnion<re
|
|
|
765
798
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
766
799
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
767
800
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
768
|
-
}>;
|
|
801
|
+
}>]>;
|
|
769
802
|
}, z.core.$strip>;
|
|
770
803
|
}, z.core.$strip>, z.ZodObject<{
|
|
771
804
|
module: z.ZodLiteral<"flag">;
|
|
@@ -777,7 +810,7 @@ export declare const allCommandsConfigSchema: z.ZodUnion<readonly [z.ZodUnion<re
|
|
|
777
810
|
front: z.ZodBoolean;
|
|
778
811
|
back: z.ZodBoolean;
|
|
779
812
|
}, z.core.$strip>;
|
|
780
|
-
mediaSourceName: z.ZodEnum<{
|
|
813
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
781
814
|
readonly HEART_00: "heart_00";
|
|
782
815
|
readonly HEART_01: "heart_01";
|
|
783
816
|
readonly HEART_02: "heart_02";
|
|
@@ -839,7 +872,7 @@ export declare const allCommandsConfigSchema: z.ZodUnion<readonly [z.ZodUnion<re
|
|
|
839
872
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
840
873
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
841
874
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
842
|
-
}>;
|
|
875
|
+
}>]>;
|
|
843
876
|
}, z.core.$strip>;
|
|
844
877
|
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
845
878
|
module: z.ZodLiteral<"rgb">;
|
|
@@ -1199,4 +1232,37 @@ export declare const allCommandsConfigSchema: z.ZodUnion<readonly [z.ZodUnion<re
|
|
|
1199
1232
|
}>;
|
|
1200
1233
|
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>]>>;
|
|
1201
1234
|
}, z.core.$strip>;
|
|
1202
|
-
}, z.core.$strip
|
|
1235
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
1236
|
+
module: z.ZodLiteral<"emergency">;
|
|
1237
|
+
action: z.ZodLiteral<"activate">;
|
|
1238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1239
|
+
module: z.ZodLiteral<"emergency">;
|
|
1240
|
+
action: z.ZodLiteral<"deactivate">;
|
|
1241
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
1242
|
+
module: z.ZodLiteral<"lights">;
|
|
1243
|
+
action: z.ZodLiteral<"showColor">;
|
|
1244
|
+
params: z.ZodObject<{
|
|
1245
|
+
address: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodLiteral<"all">]>;
|
|
1246
|
+
timeDuration: z.ZodNumber;
|
|
1247
|
+
color: z.ZodString;
|
|
1248
|
+
}, z.core.$strip>;
|
|
1249
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1250
|
+
module: z.ZodLiteral<"lights">;
|
|
1251
|
+
action: z.ZodLiteral<"showEffect">;
|
|
1252
|
+
params: z.ZodObject<{
|
|
1253
|
+
addresses: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodLiteral<"all">]>;
|
|
1254
|
+
effect: z.ZodEnum<{
|
|
1255
|
+
readonly SHOW_UV_COLOR: "SHOW_UV_COLOR";
|
|
1256
|
+
readonly POWER_OFF: "POWER_OFF";
|
|
1257
|
+
readonly START_GAME: "START_GAME";
|
|
1258
|
+
readonly GAME_OVER: "GAME_OVER";
|
|
1259
|
+
readonly FINAL_LAP: "FINAL_LAP";
|
|
1260
|
+
readonly YELLOW_FLAG: "YELLOW_FLAG";
|
|
1261
|
+
readonly RED_FLAG: "RED_FLAG";
|
|
1262
|
+
readonly PULSE: "PULSE";
|
|
1263
|
+
}>;
|
|
1264
|
+
timeDuration: z.ZodNumber;
|
|
1265
|
+
}, z.core.$strip>;
|
|
1266
|
+
}, z.core.$strip>]>]>, z.ZodObject<{
|
|
1267
|
+
params: z.ZodOptional<z.ZodUnknown>;
|
|
1268
|
+
}, z.core.$strip>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.allCommandsConfigSchema = exports.steeringWheelModuleCommandSchema = exports.screenModuleCommandSchema = exports.rightStarFrontLaserModuleCommandSchema = exports.leftStarBackLaserModuleCommandSchema = exports.rgbModuleCommandSchema = exports.flagModuleCommandSchema = exports.diskSensorBallShooterModuleCommandSchema = exports.ballSensorDiskThrowerModuleCommandSchema = exports.soundModuleCommandSchema = exports.playSoundActionCommandOptionsSchema = exports.speedModuleCommandSchema = exports.changeSpeedActionCommandOptionsSchema = void 0;
|
|
3
|
+
exports.allCommandsConfigSchema = exports.lightsModuleCommandSchema = exports.emergencyModuleCommandSchema = exports.steeringWheelModuleCommandSchema = exports.screenModuleCommandSchema = exports.rightStarFrontLaserModuleCommandSchema = exports.leftStarBackLaserModuleCommandSchema = exports.rgbModuleCommandSchema = exports.flagModuleCommandSchema = exports.diskSensorBallShooterModuleCommandSchema = exports.ballSensorDiskThrowerModuleCommandSchema = exports.soundModuleCommandSchema = exports.playSoundActionCommandOptionsSchema = exports.speedModuleCommandSchema = exports.changeSpeedActionCommandOptionsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const hardware_1 = require("../hardware");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
@@ -126,8 +126,19 @@ exports.steeringWheelModuleCommandSchema = zod_1.z.union([
|
|
|
126
126
|
zod_1.z.object({ module: zod_1.z.literal('steeringWheel'), action: zod_1.z.literal('turnLedOn') }),
|
|
127
127
|
zod_1.z.object({ module: zod_1.z.literal('steeringWheel'), action: zod_1.z.literal('turnLedOff') }),
|
|
128
128
|
]);
|
|
129
|
+
// --- Emergency ---
|
|
130
|
+
exports.emergencyModuleCommandSchema = zod_1.z.union([
|
|
131
|
+
zod_1.z.object({ module: zod_1.z.literal('emergency'), action: zod_1.z.literal('activate') }),
|
|
132
|
+
zod_1.z.object({ module: zod_1.z.literal('emergency'), action: zod_1.z.literal('deactivate') }),
|
|
133
|
+
]);
|
|
134
|
+
// --- Lights ---
|
|
135
|
+
exports.lightsModuleCommandSchema = zod_1.z.union([
|
|
136
|
+
zod_1.z.object({ module: zod_1.z.literal('lights'), action: zod_1.z.literal('showColor'), params: hardware_1.showLightsColorParamsSchema }),
|
|
137
|
+
zod_1.z.object({ module: zod_1.z.literal('lights'), action: zod_1.z.literal('showEffect'), params: hardware_1.showLightsEffectParamsSchema }),
|
|
138
|
+
]);
|
|
129
139
|
// --- All Commands Union ---
|
|
130
|
-
exports.allCommandsConfigSchema = zod_1.z
|
|
140
|
+
exports.allCommandsConfigSchema = zod_1.z
|
|
141
|
+
.union([
|
|
131
142
|
exports.ballSensorDiskThrowerModuleCommandSchema,
|
|
132
143
|
exports.diskSensorBallShooterModuleCommandSchema,
|
|
133
144
|
exports.flagModuleCommandSchema,
|
|
@@ -138,4 +149,7 @@ exports.allCommandsConfigSchema = zod_1.z.union([
|
|
|
138
149
|
exports.screenModuleCommandSchema,
|
|
139
150
|
exports.steeringWheelModuleCommandSchema,
|
|
140
151
|
exports.soundModuleCommandSchema,
|
|
141
|
-
|
|
152
|
+
exports.emergencyModuleCommandSchema,
|
|
153
|
+
exports.lightsModuleCommandSchema,
|
|
154
|
+
])
|
|
155
|
+
.and(zod_1.z.object({ params: zod_1.z.unknown().optional() }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { allCommandsConfigSchema, ballSensorDiskThrowerModuleCommandSchema, changeSpeedActionCommandOptionsSchema, diskSensorBallShooterModuleCommandSchema, flagModuleCommandSchema, leftStarBackLaserModuleCommandSchema, playSoundActionCommandOptionsSchema, rgbModuleCommandSchema, rightStarFrontLaserModuleCommandSchema, screenModuleCommandSchema, soundModuleCommandSchema, speedModuleCommandSchema, steeringWheelModuleCommandSchema } from './Command.schema';
|
|
2
|
+
import { allCommandsConfigSchema, ballSensorDiskThrowerModuleCommandSchema, changeSpeedActionCommandOptionsSchema, diskSensorBallShooterModuleCommandSchema, emergencyModuleCommandSchema, flagModuleCommandSchema, leftStarBackLaserModuleCommandSchema, lightsModuleCommandSchema, playSoundActionCommandOptionsSchema, rgbModuleCommandSchema, rightStarFrontLaserModuleCommandSchema, screenModuleCommandSchema, soundModuleCommandSchema, speedModuleCommandSchema, steeringWheelModuleCommandSchema } from './Command.schema';
|
|
3
3
|
export type ChangeSpeedActionCommandOptions = z.infer<typeof changeSpeedActionCommandOptionsSchema>;
|
|
4
4
|
export type PlaySoundActionCommandOptions = z.infer<typeof playSoundActionCommandOptionsSchema>;
|
|
5
5
|
export type BallSensorDiskThrowerModuleCommands = z.infer<typeof ballSensorDiskThrowerModuleCommandSchema>;
|
|
@@ -12,4 +12,6 @@ export type RightStarFrontLaserModuleCommands = z.infer<typeof rightStarFrontLas
|
|
|
12
12
|
export type ScreenModuleCommands = z.infer<typeof screenModuleCommandSchema>;
|
|
13
13
|
export type SteeringWheelModuleCommands = z.infer<typeof steeringWheelModuleCommandSchema>;
|
|
14
14
|
export type SoundModuleCommands = z.infer<typeof soundModuleCommandSchema>;
|
|
15
|
+
export type EmergencyModuleCommands = z.infer<typeof emergencyModuleCommandSchema>;
|
|
16
|
+
export type LightsModuleCommands = z.infer<typeof lightsModuleCommandSchema>;
|
|
15
17
|
export type AllCommandsConfig = z.infer<typeof allCommandsConfigSchema>;
|
|
@@ -82,7 +82,7 @@ export declare const damageSchema: z.ZodObject<{
|
|
|
82
82
|
readonly WAIT_EFFECT: "Wait Effect";
|
|
83
83
|
}>;
|
|
84
84
|
amount: z.ZodNumber;
|
|
85
|
-
flagMediaName: z.ZodEnum<{
|
|
85
|
+
flagMediaName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
86
86
|
readonly HEART_00: "heart_00";
|
|
87
87
|
readonly HEART_01: "heart_01";
|
|
88
88
|
readonly HEART_02: "heart_02";
|
|
@@ -144,5 +144,5 @@ export declare const damageSchema: z.ZodObject<{
|
|
|
144
144
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
145
145
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
146
146
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
147
|
-
}>;
|
|
147
|
+
}>]>;
|
|
148
148
|
}, z.core.$strip>;
|
|
@@ -3,7 +3,7 @@ export declare const flowSchema: z.ZodObject<{
|
|
|
3
3
|
id: z.ZodNumber;
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
description: z.ZodOptional<z.ZodString>;
|
|
6
|
-
commands: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
6
|
+
commands: z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
7
7
|
module: z.ZodLiteral<"ballSensorDiskThrower">;
|
|
8
8
|
action: z.ZodLiteral<"activateSensor">;
|
|
9
9
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -86,7 +86,7 @@ export declare const flowSchema: z.ZodObject<{
|
|
|
86
86
|
front: z.ZodBoolean;
|
|
87
87
|
back: z.ZodBoolean;
|
|
88
88
|
}, z.core.$strip>;
|
|
89
|
-
mediaSourceName: z.ZodEnum<{
|
|
89
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
90
90
|
readonly HEART_00: "heart_00";
|
|
91
91
|
readonly HEART_01: "heart_01";
|
|
92
92
|
readonly HEART_02: "heart_02";
|
|
@@ -148,7 +148,7 @@ export declare const flowSchema: z.ZodObject<{
|
|
|
148
148
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
149
149
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
150
150
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
151
|
-
}>;
|
|
151
|
+
}>]>;
|
|
152
152
|
}, z.core.$strip>;
|
|
153
153
|
}, z.core.$strip>, z.ZodObject<{
|
|
154
154
|
module: z.ZodLiteral<"flag">;
|
|
@@ -160,7 +160,7 @@ export declare const flowSchema: z.ZodObject<{
|
|
|
160
160
|
front: z.ZodBoolean;
|
|
161
161
|
back: z.ZodBoolean;
|
|
162
162
|
}, z.core.$strip>;
|
|
163
|
-
mediaSourceName: z.ZodEnum<{
|
|
163
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
164
164
|
readonly HEART_00: "heart_00";
|
|
165
165
|
readonly HEART_01: "heart_01";
|
|
166
166
|
readonly HEART_02: "heart_02";
|
|
@@ -222,7 +222,7 @@ export declare const flowSchema: z.ZodObject<{
|
|
|
222
222
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
223
223
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
224
224
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
225
|
-
}>;
|
|
225
|
+
}>]>;
|
|
226
226
|
}, z.core.$strip>;
|
|
227
227
|
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
228
228
|
module: z.ZodLiteral<"rgb">;
|
|
@@ -582,5 +582,38 @@ export declare const flowSchema: z.ZodObject<{
|
|
|
582
582
|
}>;
|
|
583
583
|
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>]>>;
|
|
584
584
|
}, z.core.$strip>;
|
|
585
|
-
}, z.core.$strip
|
|
585
|
+
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
586
|
+
module: z.ZodLiteral<"emergency">;
|
|
587
|
+
action: z.ZodLiteral<"activate">;
|
|
588
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
589
|
+
module: z.ZodLiteral<"emergency">;
|
|
590
|
+
action: z.ZodLiteral<"deactivate">;
|
|
591
|
+
}, z.core.$strip>]>, z.ZodUnion<readonly [z.ZodObject<{
|
|
592
|
+
module: z.ZodLiteral<"lights">;
|
|
593
|
+
action: z.ZodLiteral<"showColor">;
|
|
594
|
+
params: z.ZodObject<{
|
|
595
|
+
address: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodLiteral<"all">]>;
|
|
596
|
+
timeDuration: z.ZodNumber;
|
|
597
|
+
color: z.ZodString;
|
|
598
|
+
}, z.core.$strip>;
|
|
599
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
600
|
+
module: z.ZodLiteral<"lights">;
|
|
601
|
+
action: z.ZodLiteral<"showEffect">;
|
|
602
|
+
params: z.ZodObject<{
|
|
603
|
+
addresses: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodLiteral<"all">]>;
|
|
604
|
+
effect: z.ZodEnum<{
|
|
605
|
+
readonly SHOW_UV_COLOR: "SHOW_UV_COLOR";
|
|
606
|
+
readonly POWER_OFF: "POWER_OFF";
|
|
607
|
+
readonly START_GAME: "START_GAME";
|
|
608
|
+
readonly GAME_OVER: "GAME_OVER";
|
|
609
|
+
readonly FINAL_LAP: "FINAL_LAP";
|
|
610
|
+
readonly YELLOW_FLAG: "YELLOW_FLAG";
|
|
611
|
+
readonly RED_FLAG: "RED_FLAG";
|
|
612
|
+
readonly PULSE: "PULSE";
|
|
613
|
+
}>;
|
|
614
|
+
timeDuration: z.ZodNumber;
|
|
615
|
+
}, z.core.$strip>;
|
|
616
|
+
}, z.core.$strip>]>]>, z.ZodObject<{
|
|
617
|
+
params: z.ZodOptional<z.ZodUnknown>;
|
|
618
|
+
}, z.core.$strip>>>;
|
|
586
619
|
}, z.core.$strip>;
|
|
@@ -3,27 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.kartHardwareStateSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Checkpoint_schema_1 = require("../checkpoint/Checkpoint.schema");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
6
|
+
const flag_1 = require("./flag");
|
|
7
|
+
const rgb_1 = require("./rgb");
|
|
8
|
+
const screen_1 = require("./screen");
|
|
9
|
+
const speed_1 = require("./speed");
|
|
10
10
|
exports.kartHardwareStateSchema = zod_1.z.object({
|
|
11
11
|
speed: zod_1.z
|
|
12
12
|
.object({
|
|
13
|
-
status:
|
|
13
|
+
status: speed_1.speedStatusSchema,
|
|
14
14
|
current: zod_1.z.number(),
|
|
15
15
|
configured: zod_1.z.number(),
|
|
16
16
|
})
|
|
17
17
|
.nullable(),
|
|
18
|
-
rgb:
|
|
18
|
+
rgb: rgb_1.rgbStatusSchema.nullable(),
|
|
19
19
|
flag: zod_1.z
|
|
20
20
|
.object({
|
|
21
|
-
status:
|
|
21
|
+
status: flag_1.flagStatusSchema,
|
|
22
22
|
checkpointType: Checkpoint_schema_1.checkpointTypeSchema.nullable(),
|
|
23
23
|
checkpointAddress: zod_1.z.number().nullable(),
|
|
24
24
|
})
|
|
25
25
|
.nullable(),
|
|
26
|
-
screen:
|
|
26
|
+
screen: screen_1.screenStatusSchema.nullable(),
|
|
27
27
|
isConnectedToServer: zod_1.z.boolean(),
|
|
28
28
|
isSteeringWheelPressed: zod_1.z.boolean(),
|
|
29
29
|
});
|
|
@@ -116,4 +116,32 @@ export declare const moduleStatusSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
116
116
|
readonly IN_EMERGENCY: "In Emergency";
|
|
117
117
|
readonly UNKNOWN: "Unknown";
|
|
118
118
|
}>;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
latestView: z.ZodEnum<{
|
|
121
|
+
readonly HOME: "Home";
|
|
122
|
+
readonly COUNTDOWN: "Countdown";
|
|
123
|
+
readonly RACE: "Race";
|
|
124
|
+
readonly GAME_SUMMARY: "GameSummary";
|
|
125
|
+
readonly INSTRUCTION_VIDEO: "InstructionVideo";
|
|
126
|
+
readonly BATTLE: "Battle";
|
|
127
|
+
readonly DEBUG: "Debug";
|
|
128
|
+
}>;
|
|
129
|
+
screenStatus: z.ZodEnum<{
|
|
130
|
+
readonly ACTIVATED: "Activated";
|
|
131
|
+
readonly DEACTIVATED: "Deactivated";
|
|
132
|
+
readonly UNKNOWN: "Unknown";
|
|
133
|
+
readonly ERROR: "Error";
|
|
134
|
+
readonly DEBUG: "Debug";
|
|
135
|
+
}>;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
currentEffect: z.ZodNullable<z.ZodEnum<{
|
|
138
|
+
readonly SHOW_UV_COLOR: "SHOW_UV_COLOR";
|
|
139
|
+
readonly POWER_OFF: "POWER_OFF";
|
|
140
|
+
readonly START_GAME: "START_GAME";
|
|
141
|
+
readonly GAME_OVER: "GAME_OVER";
|
|
142
|
+
readonly FINAL_LAP: "FINAL_LAP";
|
|
143
|
+
readonly YELLOW_FLAG: "YELLOW_FLAG";
|
|
144
|
+
readonly RED_FLAG: "RED_FLAG";
|
|
145
|
+
readonly PULSE: "PULSE";
|
|
146
|
+
}>>;
|
|
119
147
|
}, z.core.$strip>]>;
|
|
@@ -6,9 +6,11 @@ const ballSensor_1 = require("./ballSensor");
|
|
|
6
6
|
const diskSensor_1 = require("./diskSensor");
|
|
7
7
|
const emergency_1 = require("./emergency");
|
|
8
8
|
const flag_1 = require("./flag");
|
|
9
|
+
const lights_1 = require("./lights");
|
|
9
10
|
const ModuleName_const_1 = require("./ModuleName.const");
|
|
10
11
|
const rgb_1 = require("./rgb");
|
|
11
12
|
const speed_1 = require("./speed");
|
|
13
|
+
const screen_1 = require("./screen");
|
|
12
14
|
const star_laser_1 = require("./star-laser");
|
|
13
15
|
const steering_wheel_1 = require("./steering-wheel");
|
|
14
16
|
exports.moduleNameSchema = zod_1.z.enum(ModuleName_const_1.MODULE_NAME);
|
|
@@ -21,4 +23,6 @@ exports.moduleStatusSchema = zod_1.z.union([
|
|
|
21
23
|
star_laser_1.starLaserModuleStatusSchema,
|
|
22
24
|
steering_wheel_1.steeringWheelModuleStatusSchema,
|
|
23
25
|
emergency_1.emergencyModuleStatusSchema,
|
|
26
|
+
screen_1.screenModuleStatusSchema,
|
|
27
|
+
lights_1.lightsModuleStatusSchema,
|
|
24
28
|
]);
|
|
@@ -10,3 +10,8 @@ export declare const BALL_SENSOR_STATUS: {
|
|
|
10
10
|
readonly SENSOR_HIT: "Sensor Hit";
|
|
11
11
|
readonly UNKNOWN: "Unknown";
|
|
12
12
|
};
|
|
13
|
+
export declare const DISK_THROWER_COMMAND: {
|
|
14
|
+
readonly ACTIVATE_THROWER: "Activate Thrower";
|
|
15
|
+
readonly DEACTIVATE_THROWER: "Deactivate Thrower";
|
|
16
|
+
readonly THROW_DISK: "Throw Disk";
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BALL_SENSOR_STATUS = exports.BALL_SENSOR_COMMAND = void 0;
|
|
3
|
+
exports.DISK_THROWER_COMMAND = exports.BALL_SENSOR_STATUS = exports.BALL_SENSOR_COMMAND = void 0;
|
|
4
4
|
exports.BALL_SENSOR_COMMAND = {
|
|
5
5
|
DEACTIVATE_SENSOR: 'Deactivate Sensor',
|
|
6
6
|
ACTIVATE_SENSOR: 'Activate Sensor',
|
|
@@ -13,3 +13,8 @@ exports.BALL_SENSOR_STATUS = {
|
|
|
13
13
|
SENSOR_HIT: 'Sensor Hit',
|
|
14
14
|
UNKNOWN: 'Unknown',
|
|
15
15
|
};
|
|
16
|
+
exports.DISK_THROWER_COMMAND = {
|
|
17
|
+
ACTIVATE_THROWER: 'Activate Thrower',
|
|
18
|
+
DEACTIVATE_THROWER: 'Deactivate Thrower',
|
|
19
|
+
THROW_DISK: 'Throw Disk',
|
|
20
|
+
};
|
|
@@ -4,6 +4,11 @@ export declare const ballSensorCommandSchema: z.ZodEnum<{
|
|
|
4
4
|
readonly ACTIVATE_SENSOR: "Activate Sensor";
|
|
5
5
|
readonly CONFIGURE_MODULE: "Configure Module";
|
|
6
6
|
}>;
|
|
7
|
+
export declare const diskThrowerCommandSchema: z.ZodEnum<{
|
|
8
|
+
readonly ACTIVATE_THROWER: "Activate Thrower";
|
|
9
|
+
readonly DEACTIVATE_THROWER: "Deactivate Thrower";
|
|
10
|
+
readonly THROW_DISK: "Throw Disk";
|
|
11
|
+
}>;
|
|
7
12
|
export declare const ballSensorStatusSchema: z.ZodEnum<{
|
|
8
13
|
readonly SENSOR_STANDBY: "Sensor Standby";
|
|
9
14
|
readonly SENSOR_DEACTIVATED: "Sensor Deactivated";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ballSensorDiskThrowerModuleStatusSchema = exports.configureBallSensorDiskThrowerModuleOptionsSchema = exports.ballSensorStatusSchema = exports.ballSensorCommandSchema = void 0;
|
|
3
|
+
exports.ballSensorDiskThrowerModuleStatusSchema = exports.configureBallSensorDiskThrowerModuleOptionsSchema = exports.ballSensorStatusSchema = exports.diskThrowerCommandSchema = exports.ballSensorCommandSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const BallSensor_const_1 = require("./BallSensor.const");
|
|
6
6
|
exports.ballSensorCommandSchema = zod_1.z.enum(BallSensor_const_1.BALL_SENSOR_COMMAND);
|
|
7
|
+
exports.diskThrowerCommandSchema = zod_1.z.enum(BallSensor_const_1.DISK_THROWER_COMMAND);
|
|
7
8
|
exports.ballSensorStatusSchema = zod_1.z.enum(BallSensor_const_1.BALL_SENSOR_STATUS);
|
|
8
9
|
exports.configureBallSensorDiskThrowerModuleOptionsSchema = zod_1.z.object({
|
|
9
10
|
waitTimeAfterHit: zod_1.z.number().min(1).max(25),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ballSensorCommandSchema, ballSensorDiskThrowerModuleStatusSchema, ballSensorStatusSchema, configureBallSensorDiskThrowerModuleOptionsSchema } from './BallSensor.schema';
|
|
2
|
+
import { ballSensorCommandSchema, ballSensorDiskThrowerModuleStatusSchema, ballSensorStatusSchema, configureBallSensorDiskThrowerModuleOptionsSchema, diskThrowerCommandSchema } from './BallSensor.schema';
|
|
3
3
|
export type BallSensorCommand = z.infer<typeof ballSensorCommandSchema>;
|
|
4
|
+
export type DiskThrowerCommand = z.infer<typeof diskThrowerCommandSchema>;
|
|
4
5
|
export type BallSensorStatus = z.infer<typeof ballSensorStatusSchema>;
|
|
5
6
|
export type ConfigureBallSensorDiskThrowerModuleOptions = z.infer<typeof configureBallSensorDiskThrowerModuleOptionsSchema>;
|
|
6
7
|
export type BallSensorDiskThrowerModuleStatus = z.infer<typeof ballSensorDiskThrowerModuleStatusSchema>;
|
|
@@ -71,3 +71,10 @@ export declare const FLAG_MEDIA_NAME: {
|
|
|
71
71
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
72
72
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
73
73
|
};
|
|
74
|
+
export declare const FLAG_ACTION_COMMAND: {
|
|
75
|
+
readonly ACTIVATE: "Activate";
|
|
76
|
+
readonly DEACTIVATE: "Deactivate";
|
|
77
|
+
readonly SHOW_MEDIA_INDEFINITELY: "Show Media Indefinitely";
|
|
78
|
+
readonly SHOW_MEDIA_TEMPORARILY: "Show Media Temporarily";
|
|
79
|
+
readonly CONFIGURE: "Configure";
|
|
80
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FLAG_MEDIA_NAME = exports.FLAG_STATUS = void 0;
|
|
3
|
+
exports.FLAG_ACTION_COMMAND = exports.FLAG_MEDIA_NAME = exports.FLAG_STATUS = void 0;
|
|
4
4
|
exports.FLAG_STATUS = {
|
|
5
5
|
ACTIVATED: 'Activated',
|
|
6
6
|
DEACTIVATED: 'Deactivated',
|
|
@@ -79,3 +79,10 @@ exports.FLAG_MEDIA_NAME = {
|
|
|
79
79
|
STATIC_BEATING_HEART: 'static_beating_heart',
|
|
80
80
|
STATIC_SPEED_PAD: 'static_speed_pad',
|
|
81
81
|
};
|
|
82
|
+
exports.FLAG_ACTION_COMMAND = {
|
|
83
|
+
ACTIVATE: 'Activate',
|
|
84
|
+
DEACTIVATE: 'Deactivate',
|
|
85
|
+
SHOW_MEDIA_INDEFINITELY: 'Show Media Indefinitely',
|
|
86
|
+
SHOW_MEDIA_TEMPORARILY: 'Show Media Temporarily',
|
|
87
|
+
CONFIGURE: 'Configure',
|
|
88
|
+
};
|
|
@@ -9,7 +9,14 @@ export declare const flagStatusSchema: z.ZodEnum<{
|
|
|
9
9
|
readonly SHOWING_IMAGE: "Showing Image";
|
|
10
10
|
readonly SHOWING_ANIMATION: "Showing Animation";
|
|
11
11
|
}>;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const flagActionCommandSchema: z.ZodEnum<{
|
|
13
|
+
readonly ACTIVATE: "Activate";
|
|
14
|
+
readonly DEACTIVATE: "Deactivate";
|
|
15
|
+
readonly SHOW_MEDIA_INDEFINITELY: "Show Media Indefinitely";
|
|
16
|
+
readonly SHOW_MEDIA_TEMPORARILY: "Show Media Temporarily";
|
|
17
|
+
readonly CONFIGURE: "Configure";
|
|
18
|
+
}>;
|
|
19
|
+
export declare const flagMediaNameSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
13
20
|
readonly HEART_00: "heart_00";
|
|
14
21
|
readonly HEART_01: "heart_01";
|
|
15
22
|
readonly HEART_02: "heart_02";
|
|
@@ -71,7 +78,7 @@ export declare const flagMediaNameSchema: z.ZodEnum<{
|
|
|
71
78
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
72
79
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
73
80
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
74
|
-
}>;
|
|
81
|
+
}>]>;
|
|
75
82
|
export declare const flagModuleStatusSchema: z.ZodObject<{
|
|
76
83
|
flagStatus: z.ZodEnum<{
|
|
77
84
|
readonly ACTIVATED: "Activated";
|
|
@@ -118,7 +125,7 @@ export declare const flagShowMediaOptionsSchema: z.ZodObject<{
|
|
|
118
125
|
front: z.ZodBoolean;
|
|
119
126
|
back: z.ZodBoolean;
|
|
120
127
|
}, z.core.$strip>;
|
|
121
|
-
mediaSourceName: z.ZodEnum<{
|
|
128
|
+
mediaSourceName: z.ZodUnion<readonly [z.ZodNumber, z.ZodEnum<{
|
|
122
129
|
readonly HEART_00: "heart_00";
|
|
123
130
|
readonly HEART_01: "heart_01";
|
|
124
131
|
readonly HEART_02: "heart_02";
|
|
@@ -180,5 +187,5 @@ export declare const flagShowMediaOptionsSchema: z.ZodObject<{
|
|
|
180
187
|
readonly STATIC_FIREBALL: "static_fireball";
|
|
181
188
|
readonly STATIC_BEATING_HEART: "static_beating_heart";
|
|
182
189
|
readonly STATIC_SPEED_PAD: "static_speed_pad";
|
|
183
|
-
}>;
|
|
190
|
+
}>]>;
|
|
184
191
|
}, z.core.$strip>;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flagShowMediaOptionsSchema = exports.flagConfigurationOptionsSchema = exports.flagModuleStatusSchema = exports.flagMediaNameSchema = exports.flagStatusSchema = void 0;
|
|
3
|
+
exports.flagShowMediaOptionsSchema = exports.flagConfigurationOptionsSchema = exports.flagModuleStatusSchema = exports.flagMediaNameSchema = exports.flagActionCommandSchema = exports.flagStatusSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const color_1 = require("../../color");
|
|
6
6
|
const checkpoint_1 = require("../../checkpoint");
|
|
7
7
|
const Flag_const_1 = require("./Flag.const");
|
|
8
8
|
exports.flagStatusSchema = zod_1.z.enum(Flag_const_1.FLAG_STATUS);
|
|
9
|
-
exports.
|
|
9
|
+
exports.flagActionCommandSchema = zod_1.z.enum(Flag_const_1.FLAG_ACTION_COMMAND);
|
|
10
|
+
exports.flagMediaNameSchema = zod_1.z
|
|
11
|
+
.union([zod_1.z.number().min(0).max(255), zod_1.z.enum(Flag_const_1.FLAG_MEDIA_NAME)])
|
|
12
|
+
.describe('The Media source could be the name of the icon on Flag Module or a number to render');
|
|
10
13
|
exports.flagModuleStatusSchema = zod_1.z.object({
|
|
11
14
|
flagStatus: exports.flagStatusSchema,
|
|
12
15
|
lastCheckpointAddress: zod_1.z.number(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { flagConfigurationOptionsSchema, flagMediaNameSchema, flagModuleStatusSchema, flagShowMediaOptionsSchema, flagStatusSchema } from './Flag.schema';
|
|
2
|
+
import { flagConfigurationOptionsSchema, flagMediaNameSchema, flagModuleStatusSchema, flagShowMediaOptionsSchema, flagStatusSchema, flagActionCommandSchema } from './Flag.schema';
|
|
3
3
|
export type FlagStatus = z.infer<typeof flagStatusSchema>;
|
|
4
|
+
export type FlagActionCommand = z.infer<typeof flagActionCommandSchema>;
|
|
4
5
|
export type FlagMediaName = z.infer<typeof flagMediaNameSchema>;
|
|
5
6
|
export type FlagModuleStatus = z.infer<typeof flagModuleStatusSchema>;
|
|
6
7
|
export type FlagConfigurationOptions = z.infer<typeof flagConfigurationOptionsSchema>;
|
|
@@ -9,6 +9,7 @@ export * from './ModuleName.const';
|
|
|
9
9
|
export * from './ModuleStatus.schema';
|
|
10
10
|
export * from './ModuleStatus.types';
|
|
11
11
|
export * from './KartHardwareState.schema';
|
|
12
|
+
export * from './KartHardwareState.types';
|
|
12
13
|
export * from './rgb';
|
|
13
14
|
export * from './screen';
|
|
14
15
|
export * from './sound';
|
|
@@ -24,7 +24,8 @@ __exportStar(require("./lights"), exports);
|
|
|
24
24
|
__exportStar(require("./ModuleName.const"), exports);
|
|
25
25
|
__exportStar(require("./ModuleStatus.schema"), exports);
|
|
26
26
|
__exportStar(require("./ModuleStatus.types"), exports);
|
|
27
|
-
__exportStar(require("./KartHardwareState.schema"), exports);
|
|
27
|
+
__exportStar(require("./KartHardwareState.schema"), exports);
|
|
28
|
+
__exportStar(require("./KartHardwareState.types"), exports);
|
|
28
29
|
__exportStar(require("./rgb"), exports);
|
|
29
30
|
__exportStar(require("./screen"), exports);
|
|
30
31
|
__exportStar(require("./sound"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LIGHTS_EFFECT = void 0;
|
|
3
|
+
exports.LIGHTS_ACTION_COMMAND = exports.LIGHTS_EFFECT = void 0;
|
|
4
4
|
exports.LIGHTS_EFFECT = {
|
|
5
5
|
SHOW_UV_COLOR: 'SHOW_UV_COLOR',
|
|
6
6
|
POWER_OFF: 'POWER_OFF',
|
|
@@ -12,3 +12,7 @@ exports.LIGHTS_EFFECT = {
|
|
|
12
12
|
RED_FLAG: 'RED_FLAG',
|
|
13
13
|
PULSE: 'PULSE',
|
|
14
14
|
};
|
|
15
|
+
exports.LIGHTS_ACTION_COMMAND = {
|
|
16
|
+
SHOW_COLOR: 'ShowColor',
|
|
17
|
+
SHOW_EFFECT: 'ShowEffect',
|
|
18
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const lightsActionCommandSchema: z.ZodEnum<{
|
|
3
|
+
readonly SHOW_COLOR: "ShowColor";
|
|
4
|
+
readonly SHOW_EFFECT: "ShowEffect";
|
|
5
|
+
}>;
|
|
2
6
|
export declare const lightsEffectSchema: z.ZodEnum<{
|
|
3
7
|
readonly SHOW_UV_COLOR: "SHOW_UV_COLOR";
|
|
4
8
|
readonly POWER_OFF: "POWER_OFF";
|
|
@@ -28,3 +32,15 @@ export declare const showLightsEffectParamsSchema: z.ZodObject<{
|
|
|
28
32
|
}>;
|
|
29
33
|
timeDuration: z.ZodNumber;
|
|
30
34
|
}, z.core.$strip>;
|
|
35
|
+
export declare const lightsModuleStatusSchema: z.ZodObject<{
|
|
36
|
+
currentEffect: z.ZodNullable<z.ZodEnum<{
|
|
37
|
+
readonly SHOW_UV_COLOR: "SHOW_UV_COLOR";
|
|
38
|
+
readonly POWER_OFF: "POWER_OFF";
|
|
39
|
+
readonly START_GAME: "START_GAME";
|
|
40
|
+
readonly GAME_OVER: "GAME_OVER";
|
|
41
|
+
readonly FINAL_LAP: "FINAL_LAP";
|
|
42
|
+
readonly YELLOW_FLAG: "YELLOW_FLAG";
|
|
43
|
+
readonly RED_FLAG: "RED_FLAG";
|
|
44
|
+
readonly PULSE: "PULSE";
|
|
45
|
+
}>>;
|
|
46
|
+
}, z.core.$strip>;
|