( schema: PrimitiveSchemaDefinition, )
| 291 | * Check if a schema is a date or date-time format that supports NL parsing |
| 292 | */ |
| 293 | export function isDateTimeSchema( |
| 294 | schema: PrimitiveSchemaDefinition, |
| 295 | ): schema is StringSchema & { format: 'date' | 'date-time' } { |
| 296 | return ( |
| 297 | schema.type === 'string' && |
| 298 | 'format' in schema && |
| 299 | (schema.format === 'date' || schema.format === 'date-time') |
| 300 | ) |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * Async validation that attempts NL date/time parsing via Haiku |
no outgoing calls
no test coverage detected