UNPKG

@coursebuilder/core

Version:

Core package for Course Builder

381 lines (378 loc) 14.7 kB
import { z } from 'zod'; declare const SubscriptionSchema: z.ZodObject<{ id: z.ZodString; organizationId: z.ZodOptional<z.ZodString>; productId: z.ZodString; createdAt: z.ZodDate; merchantSubscriptionId: z.ZodString; status: z.ZodDefault<z.ZodEnum<["incomplete", "incomplete_expired", "trialing", "active", "past_due", "canceled", "unpaid", "paused"]>>; fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>; product: z.ZodObject<{ id: z.ZodString; organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>; name: z.ZodString; key: z.ZodNullable<z.ZodOptional<z.ZodString>>; type: z.ZodDefault<z.ZodEnum<["live", "self-paced", "membership", "cohort"]>>; fields: z.ZodObject<{ body: z.ZodOptional<z.ZodNullable<z.ZodString>>; description: z.ZodOptional<z.ZodNullable<z.ZodString>>; slug: z.ZodString; image: z.ZodNullable<z.ZodOptional<z.ZodObject<{ url: z.ZodString; alt: z.ZodNullable<z.ZodOptional<z.ZodString>>; width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>; height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>; }, "strip", z.ZodTypeAny, { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; }, { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; }>>>; action: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodString>>>; state: z.ZodDefault<z.ZodEnum<["draft", "published", "archived", "deleted"]>>; visibility: z.ZodDefault<z.ZodEnum<["public", "private", "unlisted"]>>; }, "strip", z.ZodTypeAny, { slug: string; action: string | null; state: "draft" | "published" | "archived" | "deleted"; visibility: "public" | "private" | "unlisted"; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; }, { slug: string; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; action?: string | null | undefined; state?: "draft" | "published" | "archived" | "deleted" | undefined; visibility?: "public" | "private" | "unlisted" | undefined; }>; createdAt: z.ZodNullable<z.ZodDate>; status: z.ZodDefault<z.ZodNumber>; quantityAvailable: z.ZodDefault<z.ZodNumber>; price: z.ZodOptional<z.ZodNullable<z.ZodObject<{ id: z.ZodString; productId: z.ZodNullable<z.ZodOptional<z.ZodString>>; organizationId: z.ZodNullable<z.ZodOptional<z.ZodString>>; nickname: z.ZodNullable<z.ZodOptional<z.ZodString>>; status: z.ZodDefault<z.ZodNumber>; unitAmount: z.ZodEffects<z.ZodNumber, number, number>; createdAt: z.ZodNullable<z.ZodDate>; fields: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>; }, "strip", z.ZodTypeAny, { id: string; createdAt: Date | null; fields: Record<string, any>; status: number; unitAmount: number; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; }, { id: string; createdAt: Date | null; unitAmount: number; fields?: Record<string, any> | undefined; status?: number | undefined; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; }>>>; resources: z.ZodNullable<z.ZodDefault<z.ZodArray<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; }>, "many">>>; }, "strip", z.ZodTypeAny, { type: "live" | "self-paced" | "membership" | "cohort"; name: string; id: string; createdAt: Date | null; fields: { slug: string; action: string | null; state: "draft" | "published" | "archived" | "deleted"; visibility: "public" | "private" | "unlisted"; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; }; status: number; resources: { createdAt: Date | null; productId: string; resourceId: string; position: number; metadata: Record<string, any> | null; updatedAt: Date | null; deletedAt: Date | null; resource?: any; product?: any; }[] | null; quantityAvailable: number; organizationId?: string | null | undefined; key?: string | null | undefined; price?: { id: string; createdAt: Date | null; fields: Record<string, any>; status: number; unitAmount: number; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; } | null | undefined; }, { name: string; id: string; createdAt: Date | null; fields: { slug: string; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; action?: string | null | undefined; state?: "draft" | "published" | "archived" | "deleted" | undefined; visibility?: "public" | "private" | "unlisted" | undefined; }; type?: "live" | "self-paced" | "membership" | "cohort" | undefined; status?: number | undefined; organizationId?: string | null | undefined; resources?: { 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; }[] | null | undefined; key?: string | null | undefined; quantityAvailable?: number | undefined; price?: { id: string; createdAt: Date | null; unitAmount: number; fields?: Record<string, any> | undefined; status?: number | undefined; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; } | null | undefined; }>; merchantSubscription: z.ZodOptional<z.ZodObject<{ id: z.ZodString; organizationId: z.ZodNullable<z.ZodString>; merchantAccountId: z.ZodString; status: z.ZodDefault<z.ZodNumber>; createdAt: z.ZodDefault<z.ZodDate>; label: z.ZodNullable<z.ZodString>; identifier: z.ZodNullable<z.ZodString>; merchantCustomerId: z.ZodString; merchantProductId: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; createdAt: Date; status: number; organizationId: string | null; identifier: string | null; merchantAccountId: string; merchantProductId: string; merchantCustomerId: string; label: string | null; }, { id: string; organizationId: string | null; identifier: string | null; merchantAccountId: string; merchantProductId: string; merchantCustomerId: string; label: string | null; createdAt?: Date | undefined; status?: number | undefined; }>>; }, "strip", z.ZodTypeAny, { id: string; createdAt: Date; fields: Record<string, any>; status: "active" | "incomplete" | "incomplete_expired" | "trialing" | "past_due" | "canceled" | "unpaid" | "paused"; productId: string; product: { type: "live" | "self-paced" | "membership" | "cohort"; name: string; id: string; createdAt: Date | null; fields: { slug: string; action: string | null; state: "draft" | "published" | "archived" | "deleted"; visibility: "public" | "private" | "unlisted"; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; }; status: number; resources: { createdAt: Date | null; productId: string; resourceId: string; position: number; metadata: Record<string, any> | null; updatedAt: Date | null; deletedAt: Date | null; resource?: any; product?: any; }[] | null; quantityAvailable: number; organizationId?: string | null | undefined; key?: string | null | undefined; price?: { id: string; createdAt: Date | null; fields: Record<string, any>; status: number; unitAmount: number; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; } | null | undefined; }; merchantSubscriptionId: string; organizationId?: string | undefined; merchantSubscription?: { id: string; createdAt: Date; status: number; organizationId: string | null; identifier: string | null; merchantAccountId: string; merchantProductId: string; merchantCustomerId: string; label: string | null; } | undefined; }, { id: string; createdAt: Date; productId: string; product: { name: string; id: string; createdAt: Date | null; fields: { slug: string; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; action?: string | null | undefined; state?: "draft" | "published" | "archived" | "deleted" | undefined; visibility?: "public" | "private" | "unlisted" | undefined; }; type?: "live" | "self-paced" | "membership" | "cohort" | undefined; status?: number | undefined; organizationId?: string | null | undefined; resources?: { 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; }[] | null | undefined; key?: string | null | undefined; quantityAvailable?: number | undefined; price?: { id: string; createdAt: Date | null; unitAmount: number; fields?: Record<string, any> | undefined; status?: number | undefined; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; } | null | undefined; }; merchantSubscriptionId: string; fields?: Record<string, any> | undefined; status?: "active" | "incomplete" | "incomplete_expired" | "trialing" | "past_due" | "canceled" | "unpaid" | "paused" | undefined; organizationId?: string | undefined; merchantSubscription?: { id: string; organizationId: string | null; identifier: string | null; merchantAccountId: string; merchantProductId: string; merchantCustomerId: string; label: string | null; createdAt?: Date | undefined; status?: number | undefined; } | undefined; }>; type Subscription = z.infer<typeof SubscriptionSchema>; export { type Subscription, SubscriptionSchema };