Merge branch 'main' into ts-analytics

This commit is contained in:
Christopher Liu authored and GitHub committed 2024-03-05 02:32:48 -05:00
commit 3dee3d0373
23 files changed
+504 -180

No files matched your search

+9 -1
View File
@@ -1,5 +1,7 @@
import { model, Schema, Types } from 'mongoose'
import { IResponse, responseSchema } from './response.js'
export interface INode {
path: string
type: string
@@ -46,13 +48,14 @@ export interface ISession {
user: Types.ObjectId
quest: string
containerId: string | null
status: string
status: 'active' | 'finished' | 'inactive'
createdAt: Date
updatedAt: Date
finishedAt?: Date
lastActivityAt: Date
tasks: ITask[]
hints: string[][]
responses: IResponse[][]
graph: INode
}
@@ -85,6 +88,11 @@ export const Session = model<ISession>(
},
tasks: [taskSchema],
hints: [[String]],
responses: {
type: [[responseSchema]],
required: true,
default: [],
},
graph: {
type: nodeSchema,
default: {