import { CustomFieldValue, ExecutorOrCreator, DeprecatedReminder, VisibleOption, OrganizationId, TaskDivisionType, ApprovalSchema, UrgeSchema } from 'teambition-types'; import { ProjectId, ScenarioFieldConfigId, SprintId, StageId, SubtaskId, TagId, TaskId, TasklistId, TaskPriority, TaskflowStatusId, UserId } from 'teambition-types'; import { ProjectSchema } from './Project'; import { SprintSchema } from './Sprint'; import { StageSchema } from './Stage'; import { TagSchema } from './Tag'; import { TasklistSchema } from './Tasklist'; import { TaskflowStatusSnippet } from './TaskflowStatus'; import { TaskScenarioFieldConfigSchema } from './ScenarioFieldConfig'; import { TraceSchema } from './Trace'; import { Omit } from '../utils'; export interface TaskRelation { _projectId: ProjectId; _stageId: StageId; _tasklistId: TasklistId; project: Pick; stage: Pick; tasklist: Pick; } declare type Parent = Pick; export interface TaskSchema { _id: TaskId; content: string; note: string; accomplished: string; ancestorIds: TaskId[]; ancestors?: Pick[]; startDate: string | null; divisions?: TaskDivisionType[]; dueDate: string | null; priority: TaskPriority; hasReminder: boolean; isDone: boolean; isArchived: boolean; isDeleted: boolean; isTopInProject: boolean; created: string; creator?: ExecutorOrCreator; updated: string; visible: VisibleOption; _organizationId: OrganizationId | null; _sprintId?: SprintId; _stageId: StageId; _creatorId: UserId; _tasklistId: TasklistId; _projectId: ProjectId | null; _executorId: UserId | null; _scenariofieldconfigId?: ScenarioFieldConfigId; _taskflowstatusId?: TaskflowStatusId; involveMembers: UserId[]; tagIds: TagId[]; tags?: Array>; recurrence: string[] | null; pos: number; _sourceId: string; sourceDate: string | null; subtaskIds: SubtaskId[]; source: string; customfields: CustomFieldValue[]; involvers: ExecutorOrCreator[]; commentsCount: number; attachmentsCount: number; likesCount: number; objectlinksCount: number; openId?: string; shareStatus: number; /** * @deprecated 兼容字段 */ reminder: DeprecatedReminder; subtaskCount: { total: number; done: number; }; executor: ExecutorOrCreator | null; _taskId: TaskId; parent: Parent & Partial>; progress: number; rating: 0 | 1 | 2 | 3 | 4 | 5; relations?: TaskRelation[]; relationsString?: string; scenariofieldconfig?: Pick | null; stage: Pick; storyPoint: string; sprint?: SprintSchema; taskflowstatus?: TaskflowStatusSnippet | null; tasklist?: { _id: TasklistId; title: string; }; trace?: TraceSchema; objectType: 'task'; type: 'task'; isFavorite: boolean; project?: Pick; uniqueId: number; url: string; workTime: { totalTime: number; usedTime: number; unit: string; }; approve?: Pick | ApprovalSchema; effort: number | null; urge?: UrgeSchema; customPos?: Record; } export {};