/**
 * Zod validation schemas for SDK site configuration.
 *
 * These schemas are used to validate configuration fetched from
 * SDK sites before storing in the database.
 */
import { z } from 'zod';
import type { RiverbankSiteConfig, BlockFieldOptionsMap, BlockFieldExtensionsMap, BlockFieldExtension, SyncConfig } from './types';
import type { SdkCustomBlock } from './types';
export { contentConfigSchema } from './content-validation';
export type { ContentConfigInput, ContentConfigOutput } from './content-validation';
/**
 * Schema for SDK theme palette.
 * Maps token names to CSS color values.
 */
export declare const sdkThemePaletteSchema: z.ZodRecord<z.ZodString, z.ZodString>;
/**
 * Schema for SDK theme configuration.
 */
export declare const sdkThemeConfigSchema: z.ZodObject<{
    palette: z.ZodRecord<z.ZodString, z.ZodString>;
}, z.core.$strip>;
/**
 * Schema for SDK site URLs (previewUrl, liveUrl).
 * - Must be valid URL format
 * - Production URLs must use HTTPS (HTTP allowed for localhost/dev)
 * - Trailing slashes are stripped
 */
export declare const sdkSiteUrlSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
/**
 * Schema for section background color options.
 */
export declare const sectionBackgroundSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    token: z.ZodString;
}, z.core.$strip>;
/**
 * Schema for section spacing values.
 */
export declare const sectionSpacingSchema: z.ZodEnum<{
    default: "default";
    compact: "compact";
    spacious: "spacious";
}>;
/**
 * Schema for container max-width values.
 */
export declare const containerMaxWidthSchema: z.ZodEnum<{
    default: "default";
    full: "full";
    wide: "wide";
    narrow: "narrow";
}>;
/**
 * Schema for container alignment values.
 */
export declare const containerAlignmentSchema: z.ZodEnum<{
    center: "center";
    left: "left";
    right: "right";
}>;
/**
 * Schema for section options configuration.
 */
export declare const sectionOptionsSchema: z.ZodOptional<z.ZodObject<{
    backgroundColor: z.ZodOptional<z.ZodBoolean>;
    backgroundImage: z.ZodOptional<z.ZodBoolean>;
    backgroundGradient: z.ZodOptional<z.ZodBoolean>;
    spacing: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
        default: "default";
        compact: "compact";
        spacious: "spacious";
    }>>, z.ZodBoolean]>>;
    textColor: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>>;
/**
 * Schema for container options configuration.
 */
export declare const containerOptionsSchema: z.ZodOptional<z.ZodObject<{
    maxWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
        default: "default";
        full: "full";
        wide: "wide";
        narrow: "narrow";
    }>>, z.ZodBoolean]>>;
    alignment: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
        center: "center";
        left: "left";
        right: "right";
    }>>, z.ZodBoolean]>>;
}, z.core.$strip>>;
/**
 * Schema for site style configuration.
 */
export declare const siteStyleConfigSchema: z.ZodOptional<z.ZodObject<{
    sectionBackgrounds: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        token: z.ZodString;
    }, z.core.$strip>>>;
    sectionOptions: z.ZodOptional<z.ZodObject<{
        backgroundColor: z.ZodOptional<z.ZodBoolean>;
        backgroundImage: z.ZodOptional<z.ZodBoolean>;
        backgroundGradient: z.ZodOptional<z.ZodBoolean>;
        spacing: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
            default: "default";
            compact: "compact";
            spacious: "spacious";
        }>>, z.ZodBoolean]>>;
        textColor: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>>;
    containerOptions: z.ZodOptional<z.ZodObject<{
        maxWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
            default: "default";
            full: "full";
            wide: "wide";
            narrow: "narrow";
        }>>, z.ZodBoolean]>>;
        alignment: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
            center: "center";
            left: "left";
            right: "right";
        }>>, z.ZodBoolean]>>;
    }, z.core.$strip>>;
}, z.core.$strip>>;
/**
 * Whitelisted endpoints for SDK data loaders.
 *
 * These are the only CMS endpoints that can be called from config-based loaders.
 * This ensures SDK sites can only access safe, read-only public endpoints.
 *
 * Derived from SUPPORTED_LOADER_ENDPOINTS - the single source of truth.
 */
export declare const sdkLoaderEndpointSchema: z.ZodEnum<{
    getPublicFormById: "getPublicFormById";
    getPublicBookingServices: "getPublicBookingServices";
    listPublicEvents: "listPublicEvents";
    listPublicPasses: "listPublicPasses";
    listPublicCourses: "listPublicCourses";
    listPublicTeamMembers: "listPublicTeamMembers";
    listPublicMemberships: "listPublicMemberships";
    listPublicProducts: "listPublicProducts";
    getPublishedEntryPreview: "getPublishedEntryPreview";
    listPublishedEntries: "listPublishedEntries";
    getPublicEventDetails: "getPublicEventDetails";
}>;
export declare const loaderParamBindingSchema: z.ZodObject<{
    $bind: z.ZodObject<{
        from: z.ZodString;
        fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
        transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strip>>>;
        pick: z.ZodDefault<z.ZodEnum<{
            value: "value";
            context: "context";
            collection: "collection";
        }>>;
        coerce: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
        }>>;
    }, z.core.$strip>;
}, z.core.$strip>;
/**
 * A loader param value can be static or a binding expression.
 */
export declare const loaderParamValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
    $bind: z.ZodObject<{
        from: z.ZodString;
        fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
        transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strip>>>;
        pick: z.ZodDefault<z.ZodEnum<{
            value: "value";
            context: "context";
            collection: "collection";
        }>>;
        coerce: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
        }>>;
    }, z.core.$strip>;
}, z.core.$strip>]>;
/**
 * A loader `when` value must be a boolean or a binding expression.
 * This keeps execution semantics explicit and avoids accidental truthy/falsy coercion.
 */
export declare const loaderWhenValueSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
    $bind: z.ZodObject<{
        from: z.ZodString;
        fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
        transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strip>>>;
        pick: z.ZodDefault<z.ZodEnum<{
            value: "value";
            context: "context";
            collection: "collection";
        }>>;
        coerce: z.ZodOptional<z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
        }>>;
    }, z.core.$strip>;
}, z.core.$strip>]>;
/**
 * Schema for config-based data loader.
 *
 * Config loaders execute server-side during loadPage() and are
 * restricted to whitelisted CMS endpoints.
 */
export declare const sdkConfigLoaderSchema: z.ZodObject<{
    endpoint: z.ZodEnum<{
        getPublicFormById: "getPublicFormById";
        getPublicBookingServices: "getPublicBookingServices";
        listPublicEvents: "listPublicEvents";
        listPublicPasses: "listPublicPasses";
        listPublicCourses: "listPublicCourses";
        listPublicTeamMembers: "listPublicTeamMembers";
        listPublicMemberships: "listPublicMemberships";
        listPublicProducts: "listPublicProducts";
        getPublishedEntryPreview: "getPublishedEntryPreview";
        listPublishedEntries: "listPublishedEntries";
        getPublicEventDetails: "getPublicEventDetails";
    }>;
    params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
        $bind: z.ZodObject<{
            from: z.ZodString;
            fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
            transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, z.core.$strip>>>;
            pick: z.ZodDefault<z.ZodEnum<{
                value: "value";
                context: "context";
                collection: "collection";
            }>>;
            coerce: z.ZodOptional<z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
            }>>;
        }, z.core.$strip>;
    }, z.core.$strip>]>>;
    mode: z.ZodDefault<z.ZodEnum<{
        server: "server";
        client: "client";
    }>>;
    when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
        $bind: z.ZodObject<{
            from: z.ZodString;
            fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
            transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, z.core.$strip>>>;
            pick: z.ZodDefault<z.ZodEnum<{
                value: "value";
                context: "context";
                collection: "collection";
            }>>;
            coerce: z.ZodOptional<z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
            }>>;
        }, z.core.$strip>;
    }, z.core.$strip>]>>;
}, z.core.$strip>;
/**
 * Schema for the dataLoaders field on custom blocks.
 * Validates the loader configuration and limits the number of loaders.
 */
export declare const sdkDataLoadersSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
    endpoint: z.ZodEnum<{
        getPublicFormById: "getPublicFormById";
        getPublicBookingServices: "getPublicBookingServices";
        listPublicEvents: "listPublicEvents";
        listPublicPasses: "listPublicPasses";
        listPublicCourses: "listPublicCourses";
        listPublicTeamMembers: "listPublicTeamMembers";
        listPublicMemberships: "listPublicMemberships";
        listPublicProducts: "listPublicProducts";
        getPublishedEntryPreview: "getPublishedEntryPreview";
        listPublishedEntries: "listPublishedEntries";
        getPublicEventDetails: "getPublicEventDetails";
    }>;
    params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
        $bind: z.ZodObject<{
            from: z.ZodString;
            fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
            transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, z.core.$strip>>>;
            pick: z.ZodDefault<z.ZodEnum<{
                value: "value";
                context: "context";
                collection: "collection";
            }>>;
            coerce: z.ZodOptional<z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
            }>>;
        }, z.core.$strip>;
    }, z.core.$strip>]>>;
    mode: z.ZodDefault<z.ZodEnum<{
        server: "server";
        client: "client";
    }>>;
    when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
        $bind: z.ZodObject<{
            from: z.ZodString;
            fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
            transforms: z.ZodDefault<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, z.core.$strip>>>;
            pick: z.ZodDefault<z.ZodEnum<{
                value: "value";
                context: "context";
                collection: "collection";
            }>>;
            coerce: z.ZodOptional<z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
            }>>;
        }, z.core.$strip>;
    }, z.core.$strip>]>>;
}, z.core.$strip>>>;
/**
 * Schema for field select option.
 */
export declare const fieldSelectOptionSchema: z.ZodObject<{
    value: z.ZodString;
    label: z.ZodString;
}, z.core.$strip>;
/**
 * Schema for per-field configuration within a block.
 */
export declare const blockFieldConfigSchema: z.ZodObject<{
    options: z.ZodOptional<z.ZodArray<z.ZodObject<{
        value: z.ZodString;
        label: z.ZodString;
    }, z.core.$strip>>>;
}, z.core.$strip>;
/**
 * Schema for per-block field options.
 *
 * Block IDs must be either 'block.*' (system blocks) or 'custom.*' (custom blocks).
 * Field IDs can be any valid identifier string.
 */
export declare const blockFieldOptionsSchema: z.ZodType<BlockFieldOptionsMap>;
/**
 * Schema for block field extension configuration.
 *
 * Validates additional fields to be appended to a built-in block.
 * Includes refinement to ensure required fields have defaultValue.
 *
 * Note: Explicit type annotation required due to recursive fieldSchema complexity.
 */
export declare const blockFieldExtensionSchema: z.ZodType<BlockFieldExtension>;
/**
 * Schema for block field extensions map.
 *
 * Block IDs must be system blocks (e.g., 'block.body-text', 'block.hero').
 * Custom blocks ('custom.*') should define their fields directly, not via extensions.
 */
export declare const blockFieldExtensionsSchema: z.ZodType<BlockFieldExtensionsMap | undefined>;
/**
 * Validates that extended field IDs don't conflict with existing block fields.
 *
 * This validation should be called during config push to provide clear error messages.
 * Returns an array of conflict errors, or empty array if valid.
 *
 * @example
 * ```typescript
 * const conflicts = validateFieldIdConflicts(config.blockFieldExtensions);
 * if (conflicts.length > 0) {
 *   throw new Error(conflicts.map(c => c.message).join('\n'));
 * }
 * ```
 */
export declare function validateFieldIdConflicts(blockFieldExtensions?: BlockFieldExtensionsMap | null): {
    blockId: string;
    fieldId: string;
    message: string;
}[];
/**
 * Schema for sync configuration.
 *
 * Controls how CLI push operations handle content synchronization.
 * Status changes (draft/published) are synced based on local file status.
 */
export declare const syncConfigSchema: z.ZodType<SyncConfig>;
/**
 * Schema for deploy configuration.
 *
 * Configures the `riverbankcms deploy` command behavior.
 */
export declare const deployConfigSchema: z.ZodOptional<z.ZodObject<{
    verifyCommand: z.ZodOptional<z.ZodString>;
    prebuildOutput: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
/**
 * Schema for SDK custom block definitions.
 *
 * Validates custom blocks defined in riverbank.config.ts.
 * Reuses fieldSchema from @riverbankcms/blocks for field validation.
 *
 * Note: Explicit type annotation required due to recursive fieldSchema complexity.
 */
export declare const sdkCustomBlockSchema: z.ZodType<SdkCustomBlock>;
/**
 * Schema for the complete SDK site configuration.
 *
 * Use this schema to validate configuration fetched from SDK sites
 * before storing in the database.
 *
 * @example
 * ```typescript
 * import { riverbankSiteConfigSchema } from '@riverbankcms/sdk/config/validation';
 *
 * const rawConfig = await response.json();
 * const config = riverbankSiteConfigSchema.parse(rawConfig);
 * ```
 */
/**
 * Schema for theme source configuration.
 * Controls where the SDK site loads its theme from.
 */
export declare const themeSourceSchema: z.ZodOptional<z.ZodEnum<{
    local: "local";
    cms: "cms";
}>>;
/**
 * Schema for active theme name.
 * Validates theme name follows safe filename conventions.
 */
export declare const activeThemeSchema: z.ZodOptional<z.ZodString>;
export declare const layoutConfigSchema: z.ZodObject<{
    footerBlocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodOptional<z.ZodString>;
        kind: z.ZodString;
        content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strict>>>;
}, z.core.$strict>;
export declare const sdkWorkflowIdSchema: z.ZodString;
export declare const sdkWorkflowEndpointSchema: z.ZodString;
export declare const sdkWorkflowTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    type: z.ZodLiteral<"manual">;
}, z.core.$strict>], "type">;
export declare const sdkWorkflowConfirmationSchema: z.ZodObject<{
    title: z.ZodString;
    body: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
export declare const sdkWorkflowConfigSchema: z.ZodObject<{
    id: z.ZodString;
    title: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    contentType: z.ZodString;
    endpoint: z.ZodString;
    triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"manual">;
    }, z.core.$strict>], "type">>;
    confirmation: z.ZodOptional<z.ZodObject<{
        title: z.ZodString;
        body: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>;
export declare const sdkWorkflowsSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
    id: z.ZodString;
    title: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    contentType: z.ZodString;
    endpoint: z.ZodString;
    triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        type: z.ZodLiteral<"manual">;
    }, z.core.$strict>], "type">>;
    confirmation: z.ZodOptional<z.ZodObject<{
        title: z.ZodString;
        body: z.ZodOptional<z.ZodString>;
    }, z.core.$strict>>;
}, z.core.$strict>>>;
export declare const riverbankSiteConfigSchema: z.ZodType<RiverbankSiteConfig>;
/**
 * Type inferred from the validation schema.
 * This should match the RiverbankSiteConfig type from ./types.ts
 */
export type ValidatedRiverbankSiteConfig = z.infer<typeof riverbankSiteConfigSchema>;
/**
 * Type for a validated SDK custom block.
 */
export type ValidatedSdkCustomBlock = z.infer<typeof sdkCustomBlockSchema>;
