/**
 * doc-ref.ts — shared document-reference schemas (D0090).
 *
 * `GeneralizedDocRefSchema` and `SourceLocatorSchema` are the single Zod
 * definitions for a robust document reference and its optional embedded
 * cross-source / cross-project locator. They are composed by every wrapper
 * that accepts document references:
 *
 * - `PipelineRequestSchema`  (the universal wire contract — API body, CLI
 *   `--config` JSON, repository_dispatch payload)
 * - `EvalConfigSchema`       (the `--config` developer config wrapper, D0060)
 *
 * Both schemas `satisfies z.ZodType<…>` against the independently-authored
 * domain types in `@sanity/ailf-shared` / `../types/generalized-task.ts`, so
 * backend/wire drift is a build error (D0045) and there is exactly one union
 * — no per-wrapper duplication.
 *
 * This module lives in core because both wrappers live in core; the domain
 * types it asserts against live one layer down in shared.
 */
import { z } from "zod";
/**
 * Embedded retrieval contract for a `GeneralizedDocRef` (D0090 tier 2).
 *
 * `SourceLocator = SanityContentLakeLocator | GoogleDriveLocator |
 * SanityCanvasLocator`. Authored independently in `@sanity/ailf-shared`; this
 * schema asserts `satisfies z.ZodType<SourceLocator>` so backend/wire drift
 * is a build error (D0045). Kept permissive on the optional fields (no
 * `.url()` on the Content Lake `url`, since a locator may carry an internal
 * handle), but the required identity fields (`projectId` + `dataset` +
 * `documentId` for Content Lake; `fileId` for Drive; `environment` +
 * `organizationId` + `resourceId` + `documentId` for Canvas) are enforced.
 */
export declare const SourceLocatorSchema: z.ZodUnion<readonly [z.ZodObject<{
    kind: z.ZodLiteral<"sanity-content-lake">;
    projectId: z.ZodString;
    dataset: z.ZodString;
    organizationId: z.ZodOptional<z.ZodString>;
    url: z.ZodOptional<z.ZodString>;
    resource: z.ZodOptional<z.ZodLiteral<"document">>;
    documentId: z.ZodString;
    documentType: z.ZodOptional<z.ZodString>;
    revision: z.ZodOptional<z.ZodString>;
    perspective: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"google-drive">;
    fileId: z.ZodString;
    revision: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"sanity-canvas">;
    environment: z.ZodEnum<{
        production: "production";
        staging: "staging";
    }>;
    organizationId: z.ZodString;
    resourceId: z.ZodString;
    documentId: z.ZodString;
    revision: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>;
/**
 * `IdDocRef` is listed FIRST so an entry carrying both `id` and
 * `path`/`slug` matches it (preserving id/slug/path) instead of being
 * narrowed to `PathDocRef`/`SlugDocRef`. The `_id` is authoritative;
 * slug/path are informational only.
 *
 * Every arm carries an optional `locator` ({@link SourceLocatorSchema}) for
 * tier-2 cross-source / cross-project pinning (D0090). It stays optional so
 * every existing bare reference validates unchanged.
 */
export declare const GeneralizedDocRefSchema: z.ZodUnion<readonly [z.ZodObject<{
    id: z.ZodString;
    slug: z.ZodOptional<z.ZodString>;
    path: z.ZodOptional<z.ZodString>;
    reason: z.ZodOptional<z.ZodString>;
    locator: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
        kind: z.ZodLiteral<"sanity-content-lake">;
        projectId: z.ZodString;
        dataset: z.ZodString;
        organizationId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        resource: z.ZodOptional<z.ZodLiteral<"document">>;
        documentId: z.ZodString;
        documentType: z.ZodOptional<z.ZodString>;
        revision: z.ZodOptional<z.ZodString>;
        perspective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"google-drive">;
        fileId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"sanity-canvas">;
        environment: z.ZodEnum<{
            production: "production";
            staging: "staging";
        }>;
        organizationId: z.ZodString;
        resourceId: z.ZodString;
        documentId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>]>>;
}, z.core.$strip>, z.ZodObject<{
    path: z.ZodString;
    reason: z.ZodOptional<z.ZodString>;
    locator: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
        kind: z.ZodLiteral<"sanity-content-lake">;
        projectId: z.ZodString;
        dataset: z.ZodString;
        organizationId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        resource: z.ZodOptional<z.ZodLiteral<"document">>;
        documentId: z.ZodString;
        documentType: z.ZodOptional<z.ZodString>;
        revision: z.ZodOptional<z.ZodString>;
        perspective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"google-drive">;
        fileId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"sanity-canvas">;
        environment: z.ZodEnum<{
            production: "production";
            staging: "staging";
        }>;
        organizationId: z.ZodString;
        resourceId: z.ZodString;
        documentId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>]>>;
}, z.core.$strip>, z.ZodObject<{
    slug: z.ZodString;
    reason: z.ZodOptional<z.ZodString>;
    locator: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
        kind: z.ZodLiteral<"sanity-content-lake">;
        projectId: z.ZodString;
        dataset: z.ZodString;
        organizationId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        resource: z.ZodOptional<z.ZodLiteral<"document">>;
        documentId: z.ZodString;
        documentType: z.ZodOptional<z.ZodString>;
        revision: z.ZodOptional<z.ZodString>;
        perspective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"google-drive">;
        fileId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"sanity-canvas">;
        environment: z.ZodEnum<{
            production: "production";
            staging: "staging";
        }>;
        organizationId: z.ZodString;
        resourceId: z.ZodString;
        documentId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>]>>;
}, z.core.$strip>, z.ZodObject<{
    perspective: z.ZodString;
    reason: z.ZodOptional<z.ZodString>;
    locator: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
        kind: z.ZodLiteral<"sanity-content-lake">;
        projectId: z.ZodString;
        dataset: z.ZodString;
        organizationId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        resource: z.ZodOptional<z.ZodLiteral<"document">>;
        documentId: z.ZodString;
        documentType: z.ZodOptional<z.ZodString>;
        revision: z.ZodOptional<z.ZodString>;
        perspective: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"google-drive">;
        fileId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"sanity-canvas">;
        environment: z.ZodEnum<{
            production: "production";
            staging: "staging";
        }>;
        organizationId: z.ZodString;
        resourceId: z.ZodString;
        documentId: z.ZodString;
        revision: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>]>>;
}, z.core.$strip>]>;
