Task
Task
Explanation of types:
question
: User should answer a Questionfeedback
: User should provide feedback for a Questionstats
: Used for adminscompareVersion
: Mostly for moderators. Which Question is better? The old or new one?fixQuestionTopic
: Used for migration. Is not used anymore.
type TaskType =
| 'question'
| 'feedback'
| 'stats'
| 'compareVersions'
| 'fixQuestionTopic'
| string
interface TaskReply {
questionAnswerId?: string
timeToSolve?: number
}
interface Task {
id: string
type: TaskType
sessionId: string
questionId?: string
position: number
waitAfterReply?: boolean
reply?: any | TaskReply
}
interface FeedbackDetailedCriterion<
T extends FeedbackDetails = FeedbackDetails
> {
criterion: FeedbackCriterion
details?: T
}
interface FeedbackTask extends Task {
feedbackCriteria: (FeedbackDetailedCriterion | any)[]
type: 'feedback'
reply?: {
feedbacks: {
criterion: FeedbackCriterion
details?: any
feedbackId: string
}[]
}
}