import { z } from 'zod'; import type { ObjectStoreReader, ObjectStoreWriter } from './objectStore.ts'; export declare const PublishedProjectionGenerationSchema: "network.xyo.dapp.projection.published.generation" & { readonly __schema: true; }; export declare const PublishedProjectionHeadSchema: "network.xyo.dapp.projection.published.head" & { readonly __schema: true; }; export declare const PublishedProjectionHeadKey: "head.json"; export declare const PublishedProjectionScopeZod: z.ZodObject<{ dappId: z.ZodString; chainId: z.ZodString; projectionId: z.ZodString; projectionVersion: z.ZodString; }, z.core.$strict>; export type PublishedProjectionScope = z.infer; export declare const PublishedProjectionSourceZod: z.ZodObject<{ completedPosition: z.ZodOptional; cursor: z.ZodOptional; floor: z.ZodOptional; observedHead: z.ZodOptional; }, z.core.$strict>; export type PublishedProjectionSource = z.infer; export declare const PublishedProjectionObjectReferenceZod: z.ZodObject<{ contentHash: z.ZodString; contentType: z.ZodOptional; key: z.ZodString; logicalKey: z.ZodString; size: z.ZodNumber; storeId: z.ZodString; }, z.core.$strict>; export type PublishedProjectionObjectReference = z.infer; export declare const PublishedProjectionGenerationZod: z.ZodObject<{ generationId: z.ZodString; objects: z.ZodArray; key: z.ZodString; logicalKey: z.ZodString; size: z.ZodNumber; storeId: z.ZodString; }, z.core.$strict>>; source: z.ZodObject<{ completedPosition: z.ZodOptional; cursor: z.ZodOptional; floor: z.ZodOptional; observedHead: z.ZodOptional; }, z.core.$strict>; dappId: z.ZodString; chainId: z.ZodString; projectionId: z.ZodString; projectionVersion: z.ZodString; schema: z.ZodLiteral<"network.xyo.dapp.projection.published.generation" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strict>; export type PublishedProjectionGeneration = z.infer; export declare const PublishedProjectionHeadZod: z.ZodObject<{ generationId: z.ZodString; generationHash: z.ZodString; generationKey: z.ZodString; previousGenerationId: z.ZodOptional; revision: z.ZodNumber; dappId: z.ZodString; chainId: z.ZodString; projectionId: z.ZodString; projectionVersion: z.ZodString; schema: z.ZodLiteral<"network.xyo.dapp.projection.published.head" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strict>; export type PublishedProjectionHead = z.infer; export interface PublishedProjection { readonly generation: PublishedProjectionGeneration; readonly head: PublishedProjectionHead; readonly headEtag?: string; } export interface ProjectionPublicationObject { readonly body: string | Uint8Array; readonly cacheControl?: string; readonly contentType?: string; readonly key: string; readonly storeId: string; } export interface PublishProjectionGenerationOptions { readonly expected?: PublishedProjection; /** HTTP policy selected by the app; excluded from content identity. */ readonly generationCacheControl?: string; readonly generationId: string; readonly headCacheControl?: string; readonly headStoreId: string; readonly objects: readonly ProjectionPublicationObject[]; readonly scope: PublishedProjectionScope; readonly signal?: AbortSignal; readonly source?: PublishedProjectionSource; readonly stores: Readonly>; } export interface ProjectionPublicationConflict { readonly key?: string; readonly kind: 'aborted' | 'head-conflict' | 'immutable-collision'; readonly message: string; } export interface PublishProjectionGenerationFailure { readonly conflict: ProjectionPublicationConflict; readonly ok: false; } export interface PublishProjectionGenerationSuccess extends PublishedProjection { readonly ok: true; } export type PublishProjectionGenerationResult = PublishProjectionGenerationFailure | PublishProjectionGenerationSuccess; export interface ReadPublishedProjectionOptions { readonly expectedScope?: PublishedProjectionScope; readonly headStore: ObjectStoreReader; } export type PublishedProjectionObjectLoader = (storeId: string, key: string) => Promise; export interface LoadPublishedProjectionOptions { readonly expectedScope?: PublishedProjectionScope; readonly headStoreId: string; readonly load: PublishedProjectionObjectLoader; } export interface ResolvePublishedProjectionObjectOptions { readonly key: string; readonly projection: PublishedProjection; readonly storeId: string; readonly stores: Readonly>; } export interface LoadPublishedProjectionObjectOptions { readonly key: string; readonly load: PublishedProjectionObjectLoader; readonly projection: PublishedProjection; readonly storeId: string; } export interface ResolvedPublishedProjectionObject { readonly body: Uint8Array; readonly reference: PublishedProjectionObjectReference; } export declare function hashProjectionPublicationBytes(value: string | Uint8Array): string; export declare function decodeUtf8(value: Uint8Array): string; export declare function readPublishedProjection(options: ReadPublishedProjectionOptions): Promise; /** Reads a verified published projection through a caller-owned transport such as HTTP or a native bridge. */ export declare function loadPublishedProjection(options: LoadPublishedProjectionOptions): Promise; export declare function publishProjectionGeneration(options: PublishProjectionGenerationOptions): Promise; export declare function resolvePublishedProjectionObject(options: ResolvePublishedProjectionObjectOptions): Promise; /** Loads and verifies one logical projection object through a caller-owned transport. */ export declare function loadPublishedProjectionObject(options: LoadPublishedProjectionObjectOptions): Promise; //# sourceMappingURL=projectionPublication.d.ts.map