refactor: Break apart monolithic configuration schema (#1977)

[skip ci]
This commit is contained in:
Dermot Duffy
2025-03-22 15:06:11 -07:00
committed by GitHub
parent 92fc8dd844
commit d6225fefda
266 changed files with 2789 additions and 2562 deletions
@@ -0,0 +1,13 @@
import { z } from 'zod';
import { advancedCameraCardCustomActionsBaseSchema } from './base';
import { PTZ_ACTION_PHASES, PTZ_ACTIONS } from './ptz';
export const ptzMultiActionSchema = advancedCameraCardCustomActionsBaseSchema.extend({
advanced_camera_card_action: z.literal('ptz_multi'),
target_id: z.string().optional(),
ptz_action: z.enum(PTZ_ACTIONS).optional(),
ptz_phase: z.enum(PTZ_ACTION_PHASES).optional(),
ptz_preset: z.string().optional(),
});
export type PTZMultiActionConfig = z.infer<typeof ptzMultiActionSchema>;