@coursebuilder/core
Version:
Core package for Course Builder
151 lines (148 loc) • 5.41 kB
TypeScript
import { z } from 'zod';
declare const ContentResourceResourceSchema: 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;
}>;
declare const ContentResourceSchema: z.ZodObject<{
id: z.ZodString;
type: z.ZodString;
createdById: z.ZodString;
currentVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
fields: z.ZodOptional<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>;
resources: 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.ZodNullable<z.ZodString>;
createdByOrganizationMembershipId: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: string;
id: string;
createdAt: Date | null;
organizationId: string | null;
updatedAt: Date | null;
deletedAt: Date | null;
createdById: string;
resources: {
createdAt: Date | null;
resourceId: string;
resourceOfId: string;
position: number;
metadata: Record<string, any> | null;
updatedAt: Date | null;
deletedAt: Date | null;
resource?: any;
}[] | null;
createdByOrganizationMembershipId: string | null;
fields?: Record<string, any> | null | undefined;
currentVersionId?: string | null | undefined;
}, {
type: string;
id: string;
createdAt: Date | null;
organizationId: string | null;
updatedAt: Date | null;
deletedAt: Date | null;
createdById: string;
createdByOrganizationMembershipId: string | null;
fields?: Record<string, any> | null | 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;
}>;
declare const ContentResourceProductSchema: z.ZodObject<{
resourceId: z.ZodString;
productId: 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;
product: z.ZodAny;
}, "strip", z.ZodTypeAny, {
createdAt: Date | null;
productId: string;
resourceId: string;
position: number;
metadata: Record<string, any> | null;
updatedAt: Date | null;
deletedAt: Date | null;
resource?: any;
product?: any;
}, {
createdAt: Date | null;
productId: string;
resourceId: string;
updatedAt: Date | null;
deletedAt: Date | null;
position?: number | undefined;
metadata?: Record<string, any> | null | undefined;
resource?: any;
product?: any;
}>;
type ContentResource = z.infer<typeof ContentResourceSchema>;
type ContentResourceResource = z.infer<typeof ContentResourceResourceSchema>;
type ContentResourceProduct = z.infer<typeof ContentResourceProductSchema>;
declare const ResourceStateSchema: z.ZodUnion<[z.ZodLiteral<"draft">, z.ZodLiteral<"published">, z.ZodLiteral<"archived">, z.ZodLiteral<"deleted">]>;
declare const ResourceVisibilitySchema: z.ZodUnion<[z.ZodLiteral<"public">, z.ZodLiteral<"private">, z.ZodLiteral<"unlisted">]>;
export { type ContentResource, type ContentResourceProduct, ContentResourceProductSchema, type ContentResourceResource, ContentResourceResourceSchema, ContentResourceSchema, ResourceStateSchema, ResourceVisibilitySchema };