/**
 * Prisma `Json` column. Schemaless by definition — values are validated and
 * narrowed at the call site (see `asRecord()` in api/route-helpers). Typed as
 * `any` to mirror Prisma's own loose Json ergonomics; do NOT widen other
 * fields to this alias.
 */
export type JsonValue = any;
export type DocumentStatus = 'DRAFT' | 'PUBLISHED' | 'ARCHIVED' | 'SCHEDULED' | 'SCHEDULED_UNPUBLISH';
export type UserRole = 'ADMIN' | 'EDITOR' | 'AUTHOR' | 'CLIENT' | 'OWNER' | 'VIEWER';
export type InviteStatus = 'PENDING' | 'ACCEPTED' | 'EXPIRED' | 'CANCELLED';
export type ChangeType = 'CREATE' | 'UPDATE' | 'PUBLISH' | 'RESTORE' | 'DELETE';
export type AuditEvent = 'login_success' | 'login_failed' | 'logout' | 'password_change' | 'password_reset_request' | 'password_reset_complete' | 'totp_enabled' | 'totp_disabled' | 'api_key_created' | 'api_key_revoked' | 'document_created' | 'document_updated' | 'document_published' | 'document_deleted' | 'media_uploaded' | 'media_deleted' | 'user_created' | 'user_updated' | 'user_deactivated' | 'settings_changed' | 'version_restored' | 'export_requested' | 'import_completed';
export type ContentIssueType = 'MISSING_META_DESCRIPTION' | 'MISSING_ALT_TEXT' | 'BROKEN_INTERNAL_LINK' | 'OUTDATED_CONTENT';
export type NotificationType = 'DOCUMENT_PUBLISHED' | 'DOCUMENT_ASSIGNED' | 'REVIEW_REQUESTED' | 'REVIEW_APPROVED' | 'COMMENT_ADDED' | 'SYSTEM_ALERT' | 'WORKFLOW_STEP';
export type OrderStatus = 'PENDING' | 'CONFIRMED' | 'PROCESSING' | 'SHIPPED' | 'DELIVERED' | 'CANCELLED' | 'REFUNDED';
export type PaymentStatus = 'PENDING' | 'AUTHORIZED' | 'CAPTURED' | 'FAILED' | 'REFUNDED' | 'PARTIALLY_REFUNDED';
export type WorkflowStage = 'DRAFT' | 'IN_REVIEW' | 'APPROVED' | 'PUBLISHED' | 'ARCHIVED';
export type DiscountType = 'PERCENTAGE' | 'FIXED_AMOUNT' | 'FREE_SHIPPING';
export type ProductType = 'PHYSICAL' | 'DIGITAL' | 'SUBSCRIPTION' | 'BUNDLE';
export type MediaStatus = 'PROCESSING' | 'READY' | 'FAILED';
export type SeoAuditStatus = 'RUNNING' | 'COMPLETED' | 'FAILED';
export type SeoIssueSeverity = 'critical' | 'warning' | 'info';
export type SeoIssueStatus = 'open' | 'ignored' | 'resolved' | 'recurring';
export type SeoIssueCategory = 'content' | 'technical' | 'redirects' | 'media' | 'performance' | 'schema' | 'social' | 'indexing';
export interface User {
    id: string;
    email: string;
    name: string;
    avatarUrl: string | null;
    role: UserRole;
    passwordHash: string | null;
    totpSecret: string | null;
    totpEnabled: boolean;
    backupCodes: JsonValue | null;
    authProvider: string | null;
    isActive: boolean;
    isApproved: boolean;
    emailVerified: boolean;
    lastLoginAt: Date | null;
    createdAt: Date;
    updatedAt: Date;
    suspendedAt: Date | null;
    lockedAt: Date | null;
    forcePasswordReset: boolean;
    mfaRequired: boolean;
    failedLoginCount: number;
    lastActiveAt: Date | null;
    invitedById: string | null;
    acceptedInviteAt: Date | null;
    sessions?: Session[];
    oauthAccounts?: OAuthAccount[];
    apiKeys?: ApiKey[];
    documents?: Document[];
    updatedDocuments?: Document[];
    versions?: Version[];
    media?: Media[];
    contentLocks?: ContentLock[];
    notifications?: InAppNotification[];
    contentTemplates?: ContentTemplate[];
    workflowAssigned?: WorkflowState[];
    passwordResetTokens?: PasswordResetToken[];
}
export interface OAuthAccount {
    id: string;
    userId: string;
    provider: string;
    providerAccountId: string;
    accessToken: string | null;
    refreshToken: string | null;
    expiresAt: Date | null;
    createdAt: Date;
    user?: User;
}
export interface Session {
    id: string;
    userId: string;
    token: string;
    expiresAt: Date;
    revokedAt: Date | null;
    ipAddress: string | null;
    userAgent: string | null;
    fingerprintHash: string | null;
    createdAt: Date;
    user?: User;
}
export interface ApiKey {
    id: string;
    name: string;
    keyHash: string;
    keyPrefix: string;
    userId: string;
    scopes: JsonValue;
    ipRestrictions: JsonValue | null;
    expiresAt: Date | null;
    lastUsedAt: Date | null;
    revokedAt: Date | null;
    createdAt: Date;
    user?: User;
}
export interface AuditLog {
    id: string;
    event: string;
    userId: string | null;
    ipAddress: string | null;
    userAgent: string | null;
    details: JsonValue | null;
    timestamp: Date;
}
export interface Folder {
    id: string;
    name: string;
    scope: string;
    parentId: string | null;
    position: number;
    createdAt: Date;
    updatedAt: Date;
    parent?: Folder | null;
    children?: Folder[];
    documents?: Document[];
    media?: Media[];
}
export interface Document {
    id: string;
    collection: string;
    title: string | null;
    slug: string | null;
    data: JsonValue;
    status: DocumentStatus;
    locale: string | null;
    localeGroupId: string | null;
    createdById: string;
    updatedById: string;
    publishedAt: Date | null;
    scheduledAt: Date | null;
    scheduledUnpublishAt: Date | null;
    deletedAt: Date | null;
    searchVector: string | null;
    plainText: string | null;
    contentHash: string | null;
    structuredData: JsonValue | null;
    contentGraph: JsonValue | null;
    siteId: string | null;
    templateId: string | null;
    workflowStage: WorkflowStage;
    reviewerId: string | null;
    reviewNote: string | null;
    folderId: string | null;
    createdAt: Date;
    updatedAt: Date;
    createdBy?: User;
    updatedBy?: User;
    folder?: Folder | null;
    versions?: Version[];
    mediaUsages?: MediaUsage[];
    contentLocks?: ContentLock[];
    contentIssues?: ContentIssue[];
}
export interface Version {
    id: string;
    documentId: string;
    data: JsonValue;
    changedById: string;
    changeType: ChangeType;
    createdAt: Date;
    document?: Document;
    changedBy?: User;
}
export interface Media {
    id: string;
    filename: string;
    storageKey: string;
    mimeType: string;
    fileSize: number;
    width: number | null;
    height: number | null;
    altText: string | null;
    title: string | null;
    uploadedById: string;
    focalPointX: number | null;
    focalPointY: number | null;
    blurHash: string | null;
    aiAltText: string | null;
    aiTags: JsonValue | null;
    aiDescription: string | null;
    folderId: string | null;
    createdAt: Date;
    updatedAt: Date;
    originalFileName: string | null;
    caption: string | null;
    description: string | null;
    focusKeyword: string | null;
    tags: JsonValue | null;
    publicUrl: string | null;
    storageProvider: string | null;
    durationSeconds: number | null;
    thumbnailUrl: string | null;
    responsiveVariants: JsonValue | null;
    status: MediaStatus;
    deletedAt: Date | null;
    uploadedBy?: User;
    folder?: Folder | null;
    mediaUsages?: MediaUsage[];
}
export interface MediaUsage {
    id: string;
    mediaId: string;
    documentId: string;
    fieldPath: string;
    createdAt: Date;
    media?: Media;
    document?: Document;
}
export interface ContentLock {
    id: string;
    documentId: string;
    userId: string;
    lockedAt: Date;
    expiresAt: Date;
    document?: Document;
    user?: User;
}
export interface InAppNotification {
    id: string;
    userId: string;
    type: string;
    title: string;
    message: string | null;
    link: string | null;
    read: boolean;
    createdAt: Date;
    user?: User;
}
export interface ContentTemplate {
    id: string;
    name: string;
    collection: string;
    templateData: JsonValue;
    createdById: string;
    createdAt: Date;
    updatedAt: Date;
    createdBy?: User;
}
export interface Site {
    id: string;
    domain: string;
    name: string;
    configOverrides: JsonValue | null;
    isDefault: boolean;
    createdAt: Date;
    updatedAt: Date;
}
export interface WorkflowState {
    id: string;
    documentId: string;
    currentStep: number;
    assignedToId: string | null;
    status: string;
    definition: JsonValue;
    createdAt: Date;
    updatedAt: Date;
    assignedTo?: User | null;
}
export interface Redirect {
    id: string;
    source: string;
    destination: string;
    statusCode: number;
    isRegex: boolean;
    notes: string | null;
    enabled: boolean;
    priority: number;
    preserveQuery: boolean;
    source_kind: string;
    hits: number;
    lastHitAt: Date | null;
    createdById: string | null;
    createdAt: Date;
    updatedAt: Date;
}
export interface SeoAuditRun {
    id: string;
    status: SeoAuditStatus;
    scope: string;
    startedById: string | null;
    startedAt: Date;
    finishedAt: Date | null;
    siteScoreBefore: number | null;
    siteScoreAfter: number | null;
    pagesScanned: number;
    issuesFound: number;
    criticalCount: number;
    warningCount: number;
    infoCount: number;
    errorMessage: string | null;
    metadata: JsonValue | null;
    issues?: SeoIssue[];
}
export interface SeoIssue {
    id: string;
    auditRunId: string | null;
    issueKey: string;
    entityType: string | null;
    entityId: string | null;
    entityTitle: string | null;
    url: string | null;
    severity: SeoIssueSeverity;
    category: SeoIssueCategory;
    type: string;
    title: string;
    description: string | null;
    impact: string | null;
    recommendation: string | null;
    status: SeoIssueStatus;
    fixable: boolean;
    fixActionType: string | null;
    relatedEntityIds: JsonValue | null;
    source: string;
    firstDetectedAt: Date;
    lastDetectedAt: Date;
    resolvedAt: Date | null;
    resolvedById: string | null;
    metadata: JsonValue | null;
    auditRun?: SeoAuditRun | null;
}
export interface Redirect404Hit {
    id: string;
    path: string;
    hits: number;
    referrer: string | null;
    resolvedAt: Date | null;
    firstSeenAt: Date;
    lastSeenAt: Date;
}
export interface AiCrawlerHit {
    id: string;
    bot: string;
    surface: string;
    category: string;
    hits: number;
    firstSeenAt: Date;
    lastSeenAt: Date;
}
export interface RedirectSuggestion {
    id: string;
    fromPath: string;
    toPath: string;
    confidence: number;
    reason: string | null;
    status: string;
    source: string;
    metadata: JsonValue | null;
    createdAt: Date;
    updatedAt: Date;
}
export interface FormSchemaVersion {
    id: string;
    formId: string;
    version: number;
    fields: JsonValue;
    notes: string | null;
    createdById: string | null;
    createdAt: Date;
}
export interface FormSubmission {
    id: string;
    entryNumber: number | null;
    formId: string;
    schemaVersionId: string | null;
    data: JsonValue;
    normalizedData: JsonValue | null;
    attribution: JsonValue | null;
    senderName: string | null;
    senderEmail: string | null;
    senderPhone: string | null;
    preview: string | null;
    status: string;
    unread: boolean;
    starred: boolean;
    archived: boolean;
    spamStatus: string;
    ipAddressHash: string | null;
    userAgent: string | null;
    referrer: string | null;
    pageUrl: string | null;
    utmSource: string | null;
    utmMedium: string | null;
    utmCampaign: string | null;
    submittedAt: Date;
    readAt: Date | null;
    archivedAt: Date | null;
    createdAt: Date;
    updatedAt: Date;
    files?: FormSubmissionFile[];
}
export interface FormSubmissionFile {
    id: string;
    submissionId: string;
    fieldKey: string;
    mediaAssetId: string | null;
    fileName: string;
    mimeType: string;
    sizeBytes: number;
    storageKey: string;
    publicUrl: string | null;
    secureDownloadUrl: string | null;
    createdAt: Date;
    submission?: FormSubmission;
}
export interface FormWebhook {
    id: string;
    formId: string;
    url: string;
    secret: string;
    enabled: boolean;
    events: JsonValue;
    retryCount: number;
    lastDeliveryAt: Date | null;
    lastDeliveryStatus: string | null;
    createdAt: Date;
    updatedAt: Date;
}
export interface BackupRecord {
    id: string;
    filename: string;
    storageKey: string;
    sizeBytes: number;
    type: string;
    metadata: JsonValue | null;
    createdAt: Date;
}
export interface WebhookEndpoint {
    id: string;
    url: string;
    events: JsonValue;
    secret: string;
    active: boolean;
    name: string | null;
    createdAt: Date;
    updatedAt: Date;
    deliveries?: WebhookDeliveryLog[];
}
export interface WebhookDeliveryLog {
    id: string;
    endpointId: string;
    event: string;
    payload: JsonValue;
    status: string;
    attempts: number;
    maxAttempts: number;
    lastAttemptAt: Date | null;
    nextRetryAt: Date | null;
    responseStatus: number | null;
    responseBody: string | null;
    createdAt: Date;
    endpoint?: WebhookEndpoint;
}
export interface PasswordResetToken {
    id: string;
    userId: string;
    tokenHash: string;
    expiresAt: Date;
    usedAt: Date | null;
    createdAt: Date;
    user?: User;
}
export interface Invite {
    id: string;
    email: string;
    role: UserRole;
    status: InviteStatus;
    tokenHash: string;
    message: string | null;
    invitedByUserId: string | null;
    acceptedUserId: string | null;
    expiresAt: Date;
    acceptedAt: Date | null;
    cancelledAt: Date | null;
    createdAt: Date;
    updatedAt: Date;
}
export interface ScriptTag {
    id: string;
    name: string;
    code: string;
    placement: string;
    scope: string;
    targetPaths: string[];
    priority: number;
    enabled: boolean;
    createdAt: Date;
    updatedAt: Date;
}
export interface PageTemplate {
    id: string;
    name: string;
    description: string | null;
    category: string;
    tree: JsonValue;
    thumbnail: string | null;
    builtIn: boolean;
    createdAt: Date;
    updatedAt: Date;
}
export interface SavedSection {
    id: string;
    name: string;
    description: string | null;
    category: string;
    tree: JsonValue;
    thumbnail: string | null;
    usageCount: number;
    createdAt: Date;
    updatedAt: Date;
}
export interface ApiRequestMetric {
    id: string;
    bucketStart: Date;
    route: string;
    statusBucket: string;
    count: number;
    sumLatencyMs: number;
    maxLatencyMs: number;
    latencyHistogram: JsonValue;
    updatedAt: Date;
}
export interface ContentIssue {
    id: string;
    documentId: string;
    type: ContentIssueType;
    count: number;
    details: JsonValue | null;
    firstSeenAt: Date;
    lastSeenAt: Date;
    document?: Document;
}
/** Maps Prisma delegate property names (camelCase) to their row types. */
export interface ActuateModelMap {
    user: User;
    oAuthAccount: OAuthAccount;
    session: Session;
    apiKey: ApiKey;
    auditLog: AuditLog;
    folder: Folder;
    document: Document;
    version: Version;
    media: Media;
    mediaUsage: MediaUsage;
    contentLock: ContentLock;
    inAppNotification: InAppNotification;
    contentTemplate: ContentTemplate;
    site: Site;
    workflowState: WorkflowState;
    redirect: Redirect;
    seoAuditRun: SeoAuditRun;
    seoIssue: SeoIssue;
    redirect404Hit: Redirect404Hit;
    aiCrawlerHit: AiCrawlerHit;
    redirectSuggestion: RedirectSuggestion;
    formSchemaVersion: FormSchemaVersion;
    formSubmission: FormSubmission;
    formSubmissionFile: FormSubmissionFile;
    formWebhook: FormWebhook;
    backupRecord: BackupRecord;
    webhookEndpoint: WebhookEndpoint;
    webhookDeliveryLog: WebhookDeliveryLog;
    passwordResetToken: PasswordResetToken;
    invite: Invite;
    scriptTag: ScriptTag;
    pageTemplate: PageTemplate;
    savedSection: SavedSection;
    apiRequestMetric: ApiRequestMetric;
    contentIssue: ContentIssue;
}
//# sourceMappingURL=model-types.d.ts.map