import { z } from 'zod'; type ProjectStatus = "all" | "started" | "on-hold" | "completed"; type TimeType = "day" | "days" | "week" | "month" | "year"; declare const VALID_STATUSES: ProjectStatus[]; declare const VALID_TIME_TYPES: TimeType[]; declare const labelSchemaLiteral: { readonly title: "label"; readonly version: 0; readonly primaryKey: "id"; readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly projectId: { readonly type: "string"; readonly maxLength: 100; }; readonly type: { readonly type: "string"; readonly enum: readonly ["status", "priority"]; readonly maxLength: 50; }; readonly name: { readonly type: "string"; readonly maxLength: 200; }; readonly color: { readonly type: "string"; readonly maxLength: 50; }; readonly order: { readonly type: "number"; readonly default: 0; readonly minimum: 0; readonly multipleOf: 1; }; readonly description: { readonly type: "string"; readonly maxLength: 500; readonly default: ""; }; readonly createdAt: { readonly type: "number"; }; readonly updatedAt: { readonly type: "number"; }; readonly createdBy: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 200; }; readonly image: { readonly type: "string"; readonly maxLength: 500; }; }; readonly required: readonly ["id", "name"]; }; readonly updatedBy: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 200; }; readonly image: { readonly type: "string"; readonly maxLength: 500; }; }; readonly required: readonly ["id", "name"]; }; }; readonly required: readonly ["id", "projectId", "type", "name", "order", "createdAt", "updatedAt", "createdBy", "updatedBy"]; }; type IsEqual = (() => T extends A ? 1 : 2) extends () => T extends B ? 1 : 2 ? true : false; type Assert = T; declare const taskSchemaLiteral: { readonly title: "task"; readonly version: 0; readonly primaryKey: "id"; readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly projectId: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 500; }; readonly statusId: { readonly type: "string"; readonly maxLength: 100; readonly ref: "label"; }; readonly priorityId: { readonly type: "string"; readonly maxLength: 100; readonly ref: "label"; }; readonly parentTaskId: { readonly type: readonly ["string", "null"]; readonly maxLength: 100; readonly default: null; }; readonly isSubtask: { readonly type: "boolean"; readonly default: false; }; readonly taskOrder: { readonly type: "number"; readonly default: 0; readonly minimum: 0; readonly multipleOf: 1; }; readonly startDate: { readonly type: "number"; }; readonly endDate: { readonly type: readonly ["number", "null"]; }; readonly description: { readonly type: "string"; readonly maxLength: 2000; readonly default: ""; }; readonly acceptanceCriteria: { readonly type: "array"; readonly default: readonly []; readonly items: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly text: { readonly type: "string"; readonly maxLength: 500; }; readonly checked: { readonly type: "boolean"; readonly default: false; }; readonly order: { readonly type: "number"; readonly default: 0; readonly minimum: 0; }; }; readonly required: readonly ["id", "text", "checked", "order"]; }; }; readonly checklist: { readonly type: "array"; readonly default: readonly []; readonly items: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly text: { readonly type: "string"; readonly maxLength: 500; }; readonly checked: { readonly type: "boolean"; readonly default: false; }; readonly order: { readonly type: "number"; readonly default: 0; readonly minimum: 0; }; }; readonly required: readonly ["id", "text", "checked", "order"]; }; }; readonly completed: { readonly type: "boolean"; readonly default: false; }; readonly refUrls: { readonly type: "array"; readonly default: readonly []; readonly items: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly url: { readonly type: "string"; readonly maxLength: 1000; }; readonly title: { readonly type: "string"; readonly maxLength: 255; }; readonly type: { readonly type: "string"; readonly enum: readonly ["figma", "task", "external"]; }; readonly taskId: { readonly type: "string"; readonly maxLength: 100; }; }; readonly required: readonly ["id", "url", "type"]; }; }; readonly labelsTags: { readonly type: "array"; readonly default: readonly []; readonly items: { readonly type: "object"; readonly properties: { readonly value: { readonly type: "string"; readonly maxLength: 200; }; readonly label: { readonly type: "string"; readonly maxLength: 200; }; readonly color: { readonly type: "string"; readonly maxLength: 100; }; }; readonly required: readonly ["value", "label", "color"]; }; }; readonly attachments: { readonly type: "array"; readonly default: readonly []; readonly items: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 255; }; readonly url: { readonly type: "string"; readonly maxLength: 1000; }; readonly size: { readonly type: "string"; readonly maxLength: 50; }; readonly type: { readonly type: "string"; readonly maxLength: 100; }; }; readonly required: readonly ["id", "name", "url", "size"]; }; }; readonly assignedTo: { readonly type: "array"; readonly default: readonly []; readonly items: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 200; }; readonly image: { readonly type: "string"; readonly maxLength: 500; }; }; readonly required: readonly ["id", "name"]; }; }; readonly createdAt: { readonly type: "number"; }; readonly updatedAt: { readonly type: "number"; }; readonly createdBy: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 200; }; readonly image: { readonly type: "string"; readonly maxLength: 500; }; }; readonly required: readonly ["id", "name"]; }; readonly updatedBy: { readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly name: { readonly type: "string"; readonly maxLength: 200; }; readonly image: { readonly type: "string"; readonly maxLength: 500; }; }; readonly required: readonly ["id", "name"]; }; }; readonly required: readonly ["id", "projectId", "name", "statusId", "priorityId", "taskOrder", "createdAt", "updatedAt", "createdBy", "updatedBy"]; }; declare const dashboardTemplateSchemaLiteral: { readonly title: "dashboard template schema"; readonly version: 0; readonly description: "Schema for dashboard templates"; readonly primaryKey: "id"; readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly isActive: { readonly type: "boolean"; readonly default: false; }; readonly templateName: { readonly type: "string"; }; readonly dashboardLink: { readonly type: "string"; }; readonly tags: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly mainLayouts: { readonly type: "object"; readonly properties: { readonly lg: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; readonly layouts: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; }; }; readonly compactType: { readonly type: readonly ["string", "null"]; readonly enum: readonly ["horizontal", "vertical", null]; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; readonly additionalProperties: true; }; }; readonly md: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; readonly layouts: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; }; }; readonly compactType: { readonly type: readonly ["string", "null"]; readonly enum: readonly ["horizontal", "vertical", null]; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; readonly additionalProperties: true; }; }; readonly sm: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; readonly layouts: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; }; }; readonly compactType: { readonly type: readonly ["string", "null"]; readonly enum: readonly ["horizontal", "vertical", null]; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; readonly additionalProperties: true; }; }; readonly xs: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; readonly layouts: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; }; }; readonly compactType: { readonly type: readonly ["string", "null"]; readonly enum: readonly ["horizontal", "vertical", null]; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; readonly additionalProperties: true; }; }; readonly xxs: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; readonly layouts: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly w: { readonly type: "number"; }; readonly h: { readonly type: "number"; }; readonly x: { readonly type: "number"; }; readonly y: { readonly type: "number"; }; readonly i: { readonly type: "string"; }; readonly componentName: { readonly type: "string"; }; readonly moved: { readonly type: "boolean"; readonly default: false; }; readonly static: { readonly type: "boolean"; readonly default: false; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; }; }; readonly compactType: { readonly type: readonly ["string", "null"]; readonly enum: readonly ["horizontal", "vertical", null]; }; }; readonly required: readonly ["w", "h", "x", "y", "i"]; readonly additionalProperties: true; }; }; }; readonly required: readonly ["lg", "md", "sm", "xs", "xxs"]; }; readonly createdAt: { readonly type: "number"; }; readonly updatedAt: { readonly type: "number"; }; }; readonly required: readonly ["id", "templateName", "dashboardLink", "tags", "mainLayouts"]; }; declare const dashboardSchemaLiteral: { readonly title: "dashboard schema"; readonly version: 0; readonly description: "Schema for dashboards"; readonly primaryKey: "id"; readonly type: "object"; readonly properties: { readonly id: { readonly type: "string"; readonly maxLength: 100; }; readonly dashboardId: { readonly type: "string"; readonly maxLength: 100; }; readonly dashboardName: { readonly type: "string"; }; readonly createdAt: { readonly type: "string"; }; readonly updatedAt: { readonly type: "string"; }; readonly createdBy: { readonly type: "string"; }; readonly updatedBy: { readonly type: "string"; }; }; readonly required: readonly ["dashboardId", "dashboardName"]; readonly additionalProperties: false; }; declare const projectSchemaLiteral: { readonly title: "projects schema"; readonly version: 0; readonly primaryKey: "id"; readonly type: "object"; readonly properties: { readonly id: { readonly maxLength: 10; readonly type: "string"; }; readonly name: { readonly type: "string"; }; readonly logo: { readonly type: "string"; }; readonly status: { readonly type: "string"; readonly enum: readonly ["all", "started", "on-hold", "completed"]; }; readonly description: { readonly type: "string"; }; readonly orgId: { readonly type: "string"; }; readonly company: { readonly type: "string"; }; readonly startDate: { readonly type: readonly ["integer", "null"]; }; readonly endDate: { readonly type: readonly ["integer", "null"]; }; readonly budget: { readonly type: "integer"; }; readonly createdAt: { readonly type: "number"; }; readonly updatedAt: { readonly type: "number"; }; readonly createdBy: { readonly type: "string"; }; readonly updatedBy: { readonly type: "string"; }; }; readonly required: readonly ["id", "name", "orgId", "company", "status", "description", "createdAt", "updatedAt", "createdBy", "updatedBy"]; }; declare const projectStatusSchema: z.ZodUnion, z.ZodLiteral<"started">, z.ZodLiteral<"on-hold">, z.ZodLiteral<"completed">]>; type LabelSchema = { id: string; projectId: string; type: "status" | "priority"; name: string; color: string; order: number; description?: string; createdAt: number; updatedAt: number; createdBy: { id: string; name: string; image?: string; }; updatedBy: { id: string; name: string; image?: string; }; }; type TaskDataSchema = { id: string; projectId: string; name: string; statusId: string; priorityId: string; parentTaskId?: string | null; isSubtask?: boolean; taskOrder: number; startDate?: number; endDate?: number; description?: string; acceptanceCriteria?: { id: string; text: string; checked: boolean; order: number; }[]; completed: boolean; refUrls: { id: string; url: string; title?: string; type: "figma" | "task" | "external"; taskId?: string; }[]; labelsTags: { value: string; label: string; color: string; }[]; attachments: { id: string; name: string; url: string; size: string; type?: string; }[]; assignedTo: { id: string; name: string; image?: string; }[]; /** * Computed/UI-only field derived from parentTaskId/isSubtask. * This field is not persisted with the main Task row. */ subTasks?: { id: string; name: string; completed: boolean; order: number; }[]; checklist?: { id: string; text: string; checked: boolean; order: number; }[]; createdAt: number; updatedAt: number; createdBy: { id: string; name: string; image?: string; }; updatedBy: { id: string; name: string; image?: string; }; }; type CreateTaskData = Pick & Partial>; type UpdateTaskData = Partial>; type CreateLabelData = Pick & Partial>; type UpdateLabelData = Partial>; type TaskLabel = TaskDataSchema["labelsTags"][0]; type TaskAttachment = TaskDataSchema["attachments"][0]; type TaskAssignee = TaskDataSchema["assignedTo"][0]; type TaskSubTask = NonNullable[0]; type TaskComment = { id: string; content: string; createdAt: number; createdBy: { id: string; name: string; image?: string; }; }; interface DefaultDataOptions { projectId?: string; labelsOnly?: boolean; forceLabelCreation?: boolean; } declare const baseFieldType: { TEXT: string; INTEGER: string; REAL: string; BLOB: string; }; declare const fieldType: { BOOLEAN: string; DATE: string; TIME: string; DATETIME: string; FUTUREDATE: string; FUTURETIME: string; FUTUREDATETIME: string; PASTDATE: string; PASTDATETIME: string; ADULTAGE: string; CHILDAGE: string; JSON: string; JSONB: string; UUID: string; ARRAY: string; ENUM: string; SERIAL: string; TEXT: string; INTEGER: string; REAL: string; BLOB: string; }; type FieldType = (typeof fieldType)[keyof typeof fieldType]; type FieldDef = { key: string; type: FieldType; unique?: boolean; notNull?: boolean; check?: string; }; type Index = { fields: string[]; unique: boolean; indexName: string; }; declare const requiredColumns: Record; declare const requiredColumnArray: FieldDef[]; type TableSchema = { name: string; lov?: boolean; large?: boolean; gridView?: boolean; formView?: boolean; readonly?: boolean; columns: FieldDef[]; indexes: Index[]; }; interface Project { id: string; name: string; startDate: Date; endDate: Date; progress: number; color: string; subProjects?: Project[]; } interface DataItem { name?: string; notes?: string; value?: string; } interface TreeDataItem { children?: TreeDataItem[]; data?: DataItem; expanded?: boolean; id: string; name: string; type: "folder" | "file"; } interface ProjectData { tasks: TaskDataSchema[]; labels: LabelSchema[]; isLoading: boolean; error: string | null; } interface UseProjectDataReturn extends ProjectData { createTask: (statusId: string, taskData: Partial) => Promise; updateTask: (taskId: string, updates: Partial) => Promise; deleteTask: (taskId: string) => Promise; moveTask: (taskId: string, targetStatusId: string, targetIndex?: number) => Promise; createLabel: (type: "status" | "priority", // Add new parameter name: string, color?: string, description?: string) => Promise; updateLabel: (labelId: string, // Change from statusId updates: { name?: string; color?: string; description?: string; }) => Promise; deleteLabel: (labelId: string) => Promise; reorderLabels: (labelIds: string[]) => Promise; refetch: () => void; clearError: () => void; } interface CurrentUser { id: string; name: string; image?: string; } interface KanbanColumn extends Omit { tasks: KanbanTask[]; completedTasksCount: number; totalTasksCount: number; progressPercentage: number; } interface KanbanTask extends Partial> { completed?: boolean; statusLabel?: string; statusColor?: string; priorityLabel?: string; priorityColor?: string; attachments?: { id: string; name: string; url: string; size: string; type?: string; }[]; attachment?: { name: string; url?: string; size: string; type?: string; }[]; labelsTags?: { value: string; label: string; color: string; }[]; assignedTo?: { id: string; name: string; avatar?: string; label?: string; color?: string; value?: string; checked?: boolean; }[]; subTasks?: { id?: string; name: string; completed: boolean; progress?: number; }[]; createdBy?: { id: string; name: string; image?: string; }; updatedBy?: { id: string; name: string; image?: string; }; } interface UseKanbanReturn { columns: KanbanColumn[]; isLoading: boolean; error: string | null; createTask: (statusId: string, // Change from columnId taskData: Partial) => Promise; updateTask: (taskId: string, updates: Partial) => Promise; deleteTask: (taskId: string) => Promise; moveTask: (taskId: string, targetStatusId: string, // Change from targetColumnId targetIndex?: number) => Promise; createStatusLabel: (name: string, color?: string, description?: string) => Promise; updateStatusLabel: (labelId: string, // Change from columnId updates: { name?: string; color?: string; description?: string; }) => Promise; deleteStatusLabel: (labelId: string) => Promise; reorderStatusLabels: (labelIds: string[]) => Promise; bulkUpdateTasks: (taskIds: string[], updates: Partial) => Promise; bulkMoveTasks: (taskIds: string[], targetStatusId: string) => Promise; bulkDeleteTasks: (taskIds: string[]) => Promise; refetch: () => void; clearError: () => void; projectStats: { totalTasks: number; completedTasks: number; totalStatusLabels: number; overdueTasks: number; urgentTasks: number; }; } interface TableTask extends KanbanTask { statusLabel?: string; statusColor?: string; assignedToNames?: string; totalSubTasks?: number; completedSubTasks?: number; isOverdue?: boolean; } interface UseTableViewReturn { tasks: TableTask[]; labels: LabelSchema[]; isLoading: boolean; error: string | null; createTask: (taskData: Partial) => Promise; updateTask: (taskId: string, updates: Partial) => Promise; deleteTask: (taskId: string) => Promise; moveTaskToStatus: (taskId: string, statusId: string) => Promise; createLabel: (type: "status" | "priority", // Add new parameter name: string, color?: string, description?: string) => Promise; updateLabel: (labelId: string, // Change from statusId updates: { name?: string; color?: string; description?: string; }) => Promise; deleteLabel: (labelId: string) => Promise; refetch: () => void; clearError: () => void; projectStats: { totalTasks: number; completedTasks: number; totalLabels: number; overdueTasks: number; urgentTasks: number; }; } declare const DEFAULT_LABELS: { name: string; color: string; type: string; order: number; description: string; }[]; type TaskStatusDocType = LabelSchema & { type: "status"; isDefault?: boolean; }; type HasSameKeysAs = U; export { type Assert, type CreateLabelData, type CreateTaskData, type CurrentUser, DEFAULT_LABELS, type DataItem, type DefaultDataOptions, type FieldDef, type FieldType, type HasSameKeysAs, type Index, type IsEqual, type KanbanColumn, type KanbanTask, type LabelSchema, type Project, type ProjectData, type ProjectStatus, type TableSchema, type TableTask, type TaskAssignee, type TaskAttachment, type TaskComment, type TaskDataSchema, type TaskLabel, type TaskStatusDocType, type TaskSubTask, type TimeType, type TreeDataItem, type UpdateLabelData, type UpdateTaskData, type UseKanbanReturn, type UseProjectDataReturn, type UseTableViewReturn, VALID_STATUSES, VALID_TIME_TYPES, baseFieldType, dashboardSchemaLiteral, dashboardTemplateSchemaLiteral, fieldType, labelSchemaLiteral, projectSchemaLiteral, projectStatusSchema, requiredColumnArray, requiredColumns, taskSchemaLiteral };