import type { FieldSpec } from './validate.ts' import { KINDS, PRIORITIES } from './store.ts' export const byField: FieldSpec = { type: 'string', required: true, maxLength: 80 } export const idField: FieldSpec = { type: 'string', required: true, maxLength: 20 } export const titleField: FieldSpec = { type: 'string', maxLength: 300 } export const notesField: FieldSpec = { type: 'string', maxLength: 5000, allowEmpty: true } export const dueField: FieldSpec = { type: 'string', maxLength: 40 } export const priorityField: FieldSpec = { type: 'enum', values: PRIORITIES } export const kindField: FieldSpec = { type: 'enum', values: KINDS } export const tagsField: FieldSpec = { type: 'stringArray', maxItems: 20 } export const ctxField: FieldSpec = { type: 'string', maxLength: 120 } export const tzField: FieldSpec = { type: 'string', maxLength: 64 }