todo-widget: Add TODO for inbound/outbound data schema refactor.

This commit is contained in:
Lauryn Menard 2024-10-17 13:52:04 +02:00 committed by Tim Abbott
parent fde8b2d2e0
commit fa36c7ffde
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ const todo_widget_inbound_data = z.intersection(
z.record(z.string(), z.unknown()),
);
// TODO: This schema is being used to parse two completely
// different types of things (inbound and outbound data),
// which should be refactored so that the code here is
// clearer and less confusing.
const new_task_inbound_data_schema = z.object({
type: z.literal("new_task").optional(),
key: z.number().int().nonnegative().max(MAX_IDX),