import type { Theme } from "@riverbankcms/blocks";
import { z } from "zod";
import type { AiGenerateSiteEntityType, AiGenerateSitePrimaryCta, AiGenerateSiteRequest } from "./siteGeneration";
import type { BookingVerticalConfig } from "./bookingConfig";
import type { AppointmentSetupTargetStep } from "./appointmentSetup";
/**
 * Site Onboarding Contracts
 *
 * These types cover AI-assisted site setup, launch readiness, and the
 * Macadamia public onboarding flow.
 *
 * Note: Do NOT use these API types as validation schemas. They document wire
 * contracts while the owning services validate and normalize inputs.
 */
export type SitePurpose = "GENERATE_LEADS" | "SHOWCASE_PORTFOLIO" | "SELL_PRODUCTS" | "SELL_TICKETS" | "EVENT_INFO" | "BLOGGING" | "COMMUNITY" | "OTHER";
export type AiBrandGuidelinesExample = {
    title: string;
    text: string;
};
export type SiteAiBrandGuidelinesPayload = {
    brandVoice: string | null;
    audience: string | null;
    writingGuidelines: string | null;
    dos: string | null;
    donts: string | null;
    examples: AiBrandGuidelinesExample[];
};
export type SiteAiBrandGuidelinesResponse = {
    settings: SiteAiBrandGuidelinesPayload | null;
};
export type SiteAiProfileEntityType = "INDIVIDUAL" | "BUSINESS" | "NON_PROFIT" | "EVENT" | "COMMUNITY" | "OTHER";
export type SiteAiProfileLocationMode = "PHYSICAL" | "REMOTE_ONLY" | "NOT_RELEVANT";
export type SiteAiProfilePayload = {
    entityType: SiteAiProfileEntityType;
    entityName: string;
    industry: string;
    summary: string | null;
    locationMode: SiteAiProfileLocationMode;
    locationText: string | null;
    goals: SitePurpose[];
    otherGoal: string | null;
};
export type SiteAiProfileResponse = {
    profile: SiteAiProfilePayload | null;
};
export type SiteContentSamplingStats = {
    candidateCount: number;
    eligibleCount: number;
    sampledCount: number;
    totalMeaningfulChars: number;
    totalChars: number;
    placeholderCandidateCount: number;
};
export type SiteContentSampledItem = {
    kind: "page" | "entry";
    title: string | null;
    path: string | null;
    identifier: string | null;
    meaningfulCharCount: number;
};
export type AiBrandGuidelinesGenerationContextResponse = {
    siteContent: {
        allowed: boolean;
        reason: string | null;
        stats: SiteContentSamplingStats;
        sampled: SiteContentSampledItem[];
    };
};
export type AiBrandGuidelinesGenerateRequest = {
    step: "field";
    field: "audience" | "brandVoice" | "writingGuidelines" | "dos" | "donts" | "examples";
    useSiteContent: boolean;
    lockedSettings: Partial<SiteAiBrandGuidelinesPayload>;
    currentSettings?: SiteAiBrandGuidelinesPayload;
    userMessage?: string;
};
export type AiBrandGuidelinesGenerateResponse = {
    kind: "field-proposal";
    field: "audience" | "brandVoice" | "writingGuidelines" | "dos" | "donts" | "examples";
    message: string;
    proposal: Partial<SiteAiBrandGuidelinesPayload>;
    siteContent: {
        allowed: boolean;
        enabled: boolean;
        reason: string | null;
        stats: SiteContentSamplingStats;
    };
};
export type MacadamiaOnboardingSiteMode = "single_page" | "fuller_starter";
export type MacadamiaOnboardingMappedPalette = {
    palette: Record<"primary" | "secondary" | "accent" | "background" | "surface" | "text", string>;
    mode: "light" | "dark";
};
export type MacadamiaOnboardingVisualIdentity = {
    logoPath: string | null;
    logoUrl: string | null;
    logoPalette: string[] | null;
    logoMappedPalette: MacadamiaOnboardingMappedPalette | null;
    primaryColor: string | null;
    secondaryColors: string[];
    selectedPaletteKey: string | null;
    inspirationUrls: string[];
};
export type LaunchRequirementId = "confirm_email" | "review_generated_site" | "configure_appointments" | "configure_events" | "configure_courses" | "connect_payments" | "connect_custom_domain";
export type LaunchRequirementPackId = "core" | "bookings_appointments" | "bookings_events" | "bookings_courses" | "payments" | "domain";
export type LaunchRequirementPriority = "required" | "recommended" | "optional";
export type LaunchRequirementState = "complete" | "pending";
export type LaunchRequirementOwner = "admin" | "editor" | "either";
export declare const LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS: {
    readonly configure_appointments: {
        readonly requirementId: "configure_appointments";
        readonly reason: "launch_anyway";
    };
};
export type LaunchRequirementOverrideDefinition = (typeof LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS)[keyof typeof LAUNCH_REQUIREMENT_OVERRIDE_DEFINITIONS];
export type LaunchOverridableRequirementId = LaunchRequirementOverrideDefinition["requirementId"];
export type LaunchRequirementOverrideReason = LaunchRequirementOverrideDefinition["reason"];
export type LaunchRequirementOverride = {
    requirementId: Extract<LaunchRequirementId, "configure_appointments">;
    reason: LaunchRequirementOverrideReason;
    acknowledgedAt: string | null;
    acknowledgedBy: string | null;
};
export type LaunchRequirementAction = {
    kind: "open_dashboard_path";
    label: string;
    path: string;
} | {
    kind: "acknowledge_requirement";
    label: string;
    requirementId: Extract<LaunchRequirementId, "review_generated_site">;
    acknowledgementKind: "review";
} | {
    kind: "acknowledge_requirement";
    label: string;
    requirementId: Extract<LaunchRequirementId, "configure_appointments">;
    acknowledgementKind: "override";
    overrideReason: LaunchRequirementOverrideReason;
} | {
    kind: "informational_only";
    label: string;
};
export type LaunchRequirementEvidence = {
    kind: "derived";
} | {
    kind: "acknowledged";
    acknowledgedAt: string | null;
    acknowledgedBy: string | null;
} | {
    kind: "overridden";
    reason: LaunchRequirementOverrideReason;
    acknowledgedAt: string | null;
    acknowledgedBy: string | null;
} | {
    kind: "deferred";
    reason: "pending_setup" | "pending_acknowledgement";
};
export type LaunchEmailPackState = {
    kind: "confirmed";
} | {
    kind: "pending_confirmation";
};
export type LaunchReviewPackState = {
    kind: "reviewed";
    reviewedAt: string | null;
    reviewedBy: string | null;
} | {
    kind: "pending_review";
};
export type LaunchAppointmentsPackState = {
    kind: "disabled";
} | {
    kind: "ready";
} | {
    kind: "pending_setup";
    targetStep: AppointmentSetupTargetStep;
};
export type LaunchEventsPackState = {
    kind: "disabled";
} | {
    kind: "ready";
} | {
    kind: "pending_setup";
};
export type LaunchPaymentsPackState = {
    kind: "not_applicable";
} | {
    kind: "ready";
} | {
    kind: "pending_setup";
};
export type LaunchCoursesPackState = {
    kind: "not_applicable";
} | {
    kind: "ready";
} | {
    kind: "pending_setup";
};
export type LaunchCustomDomainPackState = {
    kind: "connected";
} | {
    kind: "pending_setup";
};
export type LaunchRequirement = {
    id: LaunchRequirementId;
    packId: LaunchRequirementPackId;
    priority: LaunchRequirementPriority;
    state: LaunchRequirementState;
    owner: LaunchRequirementOwner;
    title: string;
    description: string;
    action: LaunchRequirementAction;
    secondaryAction?: LaunchRequirementAction | null;
    evidence: LaunchRequirementEvidence;
};
export type GoLiveDecision = {
    kind: "allowed";
    overriddenRequirementIds: LaunchRequirementId[];
} | {
    kind: "blocked";
    blockingRequirementIds: LaunchRequirementId[];
    overriddenRequirementIds: LaunchRequirementId[];
};
export type LaunchReadiness = {
    requirements: LaunchRequirement[];
    pendingRequiredCount: number;
    pendingRecommendedCount: number;
    pendingOptionalCount: number;
    goLiveDecision: GoLiveDecision;
};
export declare const acknowledgeLaunchRequirementRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    requirementId: z.ZodLiteral<"review_generated_site">;
}, z.core.$strip>, z.ZodObject<{
    requirementId: z.ZodLiteral<"configure_appointments">;
    overrideReason: z.ZodLiteral<"launch_anyway">;
}, z.core.$strip>], "requirementId">;
export type AcknowledgeLaunchRequirementRequest = z.infer<typeof acknowledgeLaunchRequirementRequestSchema>;
export declare function toAcknowledgeLaunchRequirementRequest(action: Extract<LaunchRequirementAction, {
    kind: "acknowledge_requirement";
}>): AcknowledgeLaunchRequirementRequest;
export type AcknowledgeLaunchRequirementResponse = {
    acknowledged: true;
    requirementId: Extract<LaunchRequirementId, "review_generated_site" | "configure_appointments">;
};
export type GoLiveSiteResponse = {
    redirectPath: string;
};
export type OnboardingPreviewStatusResponse = {
    dashboardUnlocked: boolean;
    requiresEmailConfirmation: boolean;
    launchReadiness: LaunchReadiness;
};
export type OnboardingPreviewThemeOption = {
    id: string;
    themeIndex: number;
    name: string;
    description: string;
    rationale: string;
    isCurrent: boolean;
    theme: Theme;
};
export type OnboardingPreviewThemesResponse = {
    currentThemeId: string | null;
    themes: OnboardingPreviewThemeOption[];
};
export type ResendOnboardingPreviewConfirmationResponse = {
    result: "resent" | "already_confirmed";
    dashboardUnlocked: boolean;
    requiresEmailConfirmation: boolean;
    launchReadiness: LaunchReadiness;
};
export type PublicOnboardingSurfaceId = "macadamia";
export type MacadamiaOnboardingTeamMode = "solo" | "team";
export type MacadamiaOnboardingOfferingKind = "classes" | "courses" | "workshops" | "retreats" | "performances" | "private_sessions";
export type MacadamiaOnboardingStyleMood = "calm_grounding" | "warm_welcoming" | "modern_polished" | "natural_earthy" | "bright_uplifting" | "luxury_retreat";
export type MacadamiaOnboardingFirstOfferingKind = "class" | "course" | "workshop" | "retreat" | "performance" | "private_session";
export type MacadamiaOnboardingFirstOfferingDeliveryMode = "in_person" | "online" | "both";
export type MacadamiaOnboardingFirstOfferingScheduleMode = "weekly" | "one_off";
export type MacadamiaOnboardingWeekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
export type MacadamiaOnboardingCourseSession = {
    clientId: string;
    startDate: string;
    startTime: string;
    endDate: string;
    endTime: string;
    isMultiDay: boolean;
};
export type MacadamiaOnboardingFirstOffering = {
    kind: "class";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode;
    location: string | null;
    startDate: string;
    recurrenceRule: string;
    startTime: string;
    durationMinutes: number;
    priceType: "free" | "paid";
    priceAmount: number | null;
    capacity: number | null;
} | {
    kind: "course";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode;
    location: string | null;
    priceType: "free" | "paid";
    priceAmount: number | null;
    capacity: number | null;
    sessions: MacadamiaOnboardingCourseSession[];
} | {
    kind: "workshop" | "retreat" | "performance";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode;
    location: string | null;
    scheduleMode: MacadamiaOnboardingFirstOfferingScheduleMode;
    startDate: string;
    startTime: string;
    durationMinutes: number;
    priceType: "free" | "paid";
    priceAmount: number | null;
    capacity: number | null;
} | {
    kind: "private_session";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode;
    location: string | null;
    durationMinutes: number;
    priceType: "free" | "paid";
    priceAmount: number | null;
};
export type MacadamiaOnboardingDraftFirstOffering = {
    kind: "class";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode | null;
    location: string | null;
    startDate: string | null;
    recurrenceRule: string | null;
    startTime: string | null;
    durationMinutes: number | null;
    priceType: "free" | "paid" | null;
    priceAmount: number | null;
    capacity: number | null;
} | {
    kind: "course";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode | null;
    location: string | null;
    priceType: "free" | "paid" | null;
    priceAmount: number | null;
    capacity: number | null;
    sessions: MacadamiaOnboardingCourseSession[];
} | {
    kind: "workshop" | "retreat" | "performance";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode | null;
    location: string | null;
    scheduleMode: MacadamiaOnboardingFirstOfferingScheduleMode;
    startDate: string | null;
    startTime: string | null;
    durationMinutes: number | null;
    priceType: "free" | "paid" | null;
    priceAmount: number | null;
    capacity: number | null;
} | {
    kind: "private_session";
    title: string;
    description: string | null;
    deliveryMode: MacadamiaOnboardingFirstOfferingDeliveryMode | null;
    location: string | null;
    durationMinutes: number | null;
    priceType: "free" | "paid" | null;
    priceAmount: number | null;
};
export type MacadamiaOnboardingSurfaceData = {
    teamMode: MacadamiaOnboardingTeamMode;
    ownerName: string | null;
    offeringKinds: MacadamiaOnboardingOfferingKind[];
    bookingVerticalConfig?: BookingVerticalConfig | null;
    siteMode: MacadamiaOnboardingSiteMode;
    styleMoods: MacadamiaOnboardingStyleMood[];
    countryCode: string | null;
    locationText: string | null;
    timezone: string;
    currency: string;
    visualIdentity: MacadamiaOnboardingVisualIdentity;
    firstOffering: MacadamiaOnboardingDraftFirstOffering | null;
};
export type PublicOnboardingLogoUploadUrlRequest = {
    filename: string;
    bytes: number;
    mimeType?: string | null;
};
export type PublicOnboardingLogoUploadUrlResponse = {
    signedUrl: string;
    storagePath: string;
};
export type PublicOnboardingLogoUploadRequest = {
    storagePath: string;
    palette?: string[] | null;
};
export type PublicOnboardingLogoUploadResponse = {
    path: string;
    publicUrl: string | null;
    palette: string[];
};
export type PublicOnboardingAttemptStatus = "draft" | "claimed" | "provisioning" | "provisioned" | "completed" | "cancelled";
export type PublicOnboardingProvisioningStage = "starting" | "site_setup" | "copy_generation" | "media_generation" | "page_creation" | "surface_setup" | "theme_setup" | "preview_ready";
export type SiteGenerationScope = "simple" | "comprehensive";
export type SiteGenerationFeatureKey = "home" | "about" | "contact" | "appointments" | "events" | "testimonials" | "faq" | "newsletter_signup" | "blog" | "portfolio" | "gallery" | "map_directions";
export type SiteGenerationBookingOfferingKind = "classes" | "courses" | "workshops" | "retreats" | "performances" | "private_sessions";
export type AiSiteWizardSuggestGoalsRequest = {
    entityType: AiGenerateSiteEntityType;
    entityName: string;
    industry: string;
    summary?: string;
};
export type AiSiteWizardSuggestGoalsResponse = {
    recommendedPrimaryPurpose: SitePurpose;
    primaryOptions: Array<{
        purpose: SitePurpose;
        label: string;
        hint: string;
        confidence: number;
    }>;
};
export type AiSiteWizardIntakeTriageRequest = {
    entityType: AiGenerateSiteEntityType;
    entityName: string;
    industry: string;
    summary?: string;
};
export type AiSiteWizardIntakeTriageResponse = {
    suggestAskAppointments: boolean;
    suggestAskEvents: boolean;
    suggestAskNewsletter: boolean;
    suggestAskShop: boolean;
    confidence: {
        appointments: number;
        events: number;
        newsletter: number;
        shop: number;
    };
    reasons: {
        appointments: string | null;
        events: string | null;
        newsletter: string | null;
        shop: string | null;
    };
};
export type AiSiteWizardTelemetryEvent = "wizard_resumed" | "goal_suggestions_loaded" | "goal_suggestions_failed" | "goal_suggestions_stale" | "wizard_draft_saved" | "wizard_draft_save_failed";
export type AiSiteWizardTelemetryRequest = {
    event: AiSiteWizardTelemetryEvent;
    metadata?: Record<string, unknown>;
};
export type AiSiteWizardTelemetryResponse = {
    ok: true;
};
export type SiteWizardResumeSnapshot = {
    step?: 1 | 2 | 3;
    goals?: SitePurpose[];
    goalsTouched?: boolean;
    selectedGoals?: Array<{
        key: SitePurpose;
        label: string;
        description: string;
    }> | null;
    primaryCta?: AiGenerateSitePrimaryCta | null;
    logoPath?: string | null;
    logoUrl?: string | null;
    logoPalette?: string[] | null;
    logoMappedPalette?: {
        palette: Record<"primary" | "secondary" | "accent" | "background" | "surface" | "text", string>;
        mode: "light" | "dark";
    } | null;
    goalSuggestions?: AiSiteWizardSuggestGoalsResponse | null;
    goalSuggestionsInputKey?: string | null;
};
export type SiteGenerationIntakePayload = {
    version: 1;
    scope: SiteGenerationScope;
    selectedFeatures: SiteGenerationFeatureKey[];
    appointmentsEnabled: boolean;
    eventsEnabled: boolean;
    bookingOfferingKinds?: SiteGenerationBookingOfferingKind[] | null;
    bookingVerticalConfig?: BookingVerticalConfig | null;
    triage?: AiSiteWizardIntakeTriageResponse | null;
    wizardState?: SiteWizardResumeSnapshot | null;
};
export type SiteGenerationIntakeResponse = {
    intake: SiteGenerationIntakePayload | null;
};
export type PublicOnboardingAttemptPayload = {
    version: 1;
    surfaceId: PublicOnboardingSurfaceId;
    siteTitle: string;
    siteProfile: SiteAiProfilePayload;
    generationIntake: SiteGenerationIntakePayload;
    brandGuidelines?: SiteAiBrandGuidelinesPayload | null;
    generateRequest: AiGenerateSiteRequest;
    surfaceData: MacadamiaOnboardingSurfaceData;
};
export type PublicOnboardingAttempt = {
    status: PublicOnboardingAttemptStatus;
    surfaceId: PublicOnboardingSurfaceId;
    siteTitle: string;
    siteProfile: SiteAiProfilePayload;
    generationIntake: SiteGenerationIntakePayload;
    brandGuidelines: SiteAiBrandGuidelinesPayload | null;
    generateRequest: AiGenerateSiteRequest;
    surfaceData: MacadamiaOnboardingSurfaceData;
    siteId: string | null;
    siteSlug: string | null;
    lastError: string | null;
    createdAt: string;
    updatedAt: string;
};
export type PublicOnboardingAttemptResponse = {
    attempt: PublicOnboardingAttempt;
    attemptToken: string;
};
export type PublicOnboardingAttemptProgress = {
    kind: "awaiting_auth";
} | {
    kind: "idle";
} | {
    kind: "running";
    stage: PublicOnboardingProvisioningStage;
    message: string;
    startedAt: string | null;
    lastUpdatedAt: string | null;
} | {
    kind: "taking_longer";
    stage: PublicOnboardingProvisioningStage;
    message: string;
    startedAt: string | null;
    lastUpdatedAt: string | null;
} | {
    kind: "ready";
    siteId: string;
    siteSlug: string;
    continuePath: string;
} | {
    kind: "failed";
    errorMessage: string;
} | {
    kind: "unavailable";
    reason: "completed" | "cancelled" | "invalid_site";
    message: string;
};
export type PublicOnboardingAttemptProgressResponse = {
    progress: PublicOnboardingAttemptProgress;
};
export type PublicOnboardingAttemptRunKickoff = {
    kind: "started";
    runId: string;
} | {
    kind: "restarted_stale";
    runId: string;
} | {
    kind: "already_running";
} | {
    kind: "not_needed";
} | {
    kind: "blocked";
};
export type PublicOnboardingAttemptRunResponse = {
    kickoff: PublicOnboardingAttemptRunKickoff;
    progress: PublicOnboardingAttemptProgress;
};
