UNPKG

@coursebuilder/core

Version:

Core package for Course Builder

182 lines (179 loc) 7.13 kB
import { z } from 'zod'; declare const resourceProgressSchema: z.ZodObject<{ userId: z.ZodString; resourceId: z.ZodNullable<z.ZodOptional<z.ZodString>>; completedAt: z.ZodNullable<z.ZodDate>; }, "strip", z.ZodTypeAny, { userId: string; completedAt: Date | null; resourceId?: string | null | undefined; }, { userId: string; completedAt: Date | null; resourceId?: string | null | undefined; }>; type ResourceProgress = z.infer<typeof resourceProgressSchema>; declare const moduleProgressSchema: z.ZodObject<{ completedLessons: z.ZodArray<z.ZodObject<{ userId: z.ZodString; resourceId: z.ZodNullable<z.ZodOptional<z.ZodString>>; completedAt: z.ZodNullable<z.ZodDate>; }, "strip", z.ZodTypeAny, { userId: string; completedAt: Date | null; resourceId?: string | null | undefined; }, { userId: string; completedAt: Date | null; resourceId?: string | null | undefined; }>, "many">; nextResource: z.ZodNullable<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; createdById: z.ZodOptional<z.ZodString>; currentVersionId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>; fields: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>>>; createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>; updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>; deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>; resources: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodArray<z.ZodObject<{ resourceId: z.ZodString; resourceOfId: z.ZodString; position: z.ZodDefault<z.ZodNumber>; metadata: z.ZodNullable<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>; createdAt: z.ZodNullable<z.ZodDate>; updatedAt: z.ZodNullable<z.ZodDate>; deletedAt: z.ZodNullable<z.ZodDate>; resource: z.ZodAny; }, "strip", z.ZodTypeAny, { createdAt: Date | null; resourceId: string; resourceOfId: string; position: number; metadata: Record<string, any> | null; updatedAt: Date | null; deletedAt: Date | null; resource?: any; }, { createdAt: Date | null; resourceId: string; resourceOfId: string; updatedAt: Date | null; deletedAt: Date | null; position?: number | undefined; metadata?: Record<string, any> | null | undefined; resource?: any; }>, "many">>>>; organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>; createdByOrganizationMembershipId: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { type?: string | undefined; id?: string | undefined; createdAt?: Date | null | undefined; fields?: Record<string, any> | null | undefined; organizationId?: string | null | undefined; updatedAt?: Date | null | undefined; deletedAt?: Date | null | undefined; createdById?: string | undefined; currentVersionId?: string | null | undefined; resources?: { createdAt: Date | null; resourceId: string; resourceOfId: string; position: number; metadata: Record<string, any> | null; updatedAt: Date | null; deletedAt: Date | null; resource?: any; }[] | null | undefined; createdByOrganizationMembershipId?: string | null | undefined; }, { type?: string | undefined; id?: string | undefined; createdAt?: Date | null | undefined; fields?: Record<string, any> | null | undefined; organizationId?: string | null | undefined; updatedAt?: Date | null | undefined; deletedAt?: Date | null | undefined; createdById?: string | undefined; currentVersionId?: string | null | undefined; resources?: { createdAt: Date | null; resourceId: string; resourceOfId: string; updatedAt: Date | null; deletedAt: Date | null; position?: number | undefined; metadata?: Record<string, any> | null | undefined; resource?: any; }[] | null | undefined; createdByOrganizationMembershipId?: string | null | undefined; }>>; percentCompleted: z.ZodDefault<z.ZodNumber>; completedLessonsCount: z.ZodDefault<z.ZodNumber>; totalLessonsCount: z.ZodDefault<z.ZodNumber>; }, "strip", z.ZodTypeAny, { completedLessons: { userId: string; completedAt: Date | null; resourceId?: string | null | undefined; }[]; nextResource: { type?: string | undefined; id?: string | undefined; createdAt?: Date | null | undefined; fields?: Record<string, any> | null | undefined; organizationId?: string | null | undefined; updatedAt?: Date | null | undefined; deletedAt?: Date | null | undefined; createdById?: string | undefined; currentVersionId?: string | null | undefined; resources?: { createdAt: Date | null; resourceId: string; resourceOfId: string; position: number; metadata: Record<string, any> | null; updatedAt: Date | null; deletedAt: Date | null; resource?: any; }[] | null | undefined; createdByOrganizationMembershipId?: string | null | undefined; } | null; percentCompleted: number; completedLessonsCount: number; totalLessonsCount: number; }, { completedLessons: { userId: string; completedAt: Date | null; resourceId?: string | null | undefined; }[]; nextResource: { type?: string | undefined; id?: string | undefined; createdAt?: Date | null | undefined; fields?: Record<string, any> | null | undefined; organizationId?: string | null | undefined; updatedAt?: Date | null | undefined; deletedAt?: Date | null | undefined; createdById?: string | undefined; currentVersionId?: string | null | undefined; resources?: { createdAt: Date | null; resourceId: string; resourceOfId: string; updatedAt: Date | null; deletedAt: Date | null; position?: number | undefined; metadata?: Record<string, any> | null | undefined; resource?: any; }[] | null | undefined; createdByOrganizationMembershipId?: string | null | undefined; } | null; percentCompleted?: number | undefined; completedLessonsCount?: number | undefined; totalLessonsCount?: number | undefined; }>; type ModuleProgress = z.infer<typeof moduleProgressSchema>; export { type ModuleProgress, type ResourceProgress, moduleProgressSchema, resourceProgressSchema };