import { type BrowserIdentity as BrowserIdentityValue, type BrowserIdentityListResponse as BrowserIdentityListResponseValue, type BrowserIdentityMutationResponse as BrowserIdentityMutationResponseValue, type BrowserRevision as BrowserRevisionValue, type BrowserRevisionListResponse as BrowserRevisionListResponseValue, type BrowserRevisionMaterialization as BrowserRevisionMaterializationValue, type InteractionError as InteractionErrorValue, type PublishBrowserRevisionResponse as PublishBrowserRevisionResponseValue, type UpdateBrowserIdentityRequest as UpdateBrowserIdentityRequestValue } from "@opengeni/contracts"; import { type Database } from "./database.js"; import { type BrowserStateArtifactCommitInput } from "./browser-state-artifacts.js"; export declare class BrowserIdentityNotFoundError extends Error { readonly name = "BrowserIdentityNotFoundError"; } export declare class BrowserIdentityConflictError extends Error { readonly name = "BrowserIdentityConflictError"; } export declare class BrowserIdentityStateError extends Error { readonly name = "BrowserIdentityStateError"; } export type BrowserRevisionPublicationPreparation = { kind: "completed"; response: PublishBrowserRevisionResponseValue; } | { kind: "pending"; operationState: "prepared" | "dispatched"; browserSessionId: string; controllerGeneration: string; identity: BrowserIdentityValue; parentRevisionId: string | null; }; export type BrowserRevisionPublicationDispatch = { kind: "completed"; response: PublishBrowserRevisionResponseValue; } | { kind: "dispatched"; browserSessionId: string; controllerGeneration: string; replayed: boolean; }; export type BrowserRevisionArtifactAuthority = { revision: BrowserRevisionValue; artifacts: Array<{ componentId: string; artifactId: string; objectKey: string; encryptedDataKey: string; contentDigest: string; manifestDigest: string; artifactDigest: string; sizeBytes: number; format: string; materialization: BrowserRevisionMaterializationValue; }>; }; export declare function listBrowserIdentities(db: Database, input: { accountId: string; workspaceId: string; includeArchived?: boolean; }): Promise; export declare function getBrowserIdentity(db: Database, input: { accountId: string; workspaceId: string; identityId: string; }): Promise; export declare function listBrowserRevisions(db: Database, input: { accountId: string; workspaceId: string; identityId: string; }): Promise; export declare function createBrowserIdentity(db: Database, input: { accountId: string; workspaceId: string; operationId: string; name: string; actorSubjectId: string; }): Promise; export declare function updateBrowserIdentity(db: Database, input: { accountId: string; workspaceId: string; identityId: string; actorSubjectId: string; } & UpdateBrowserIdentityRequestValue): Promise; export declare function browserRevisionPublicationRequestDigest(input: { browserSessionId: string; identityId: string; expectedHeadGeneration: number; advanceDefault: boolean; actorSubjectId: string; }): string; export declare function prepareBrowserRevisionPublication(db: Database, input: { accountId: string; workspaceId: string; operationId: string; browserSessionId: string; identityId: string; expectedHeadGeneration: number; advanceDefault: boolean; actorSubjectId: string; }): Promise; export declare function dispatchBrowserRevisionPublication(db: Database, input: { accountId: string; workspaceId: string; operationId: string; browserSessionId: string; controllerGeneration: string; identityId: string; expectedHeadGeneration: number; advanceDefault: boolean; actorSubjectId: string; stateUpload?: { objectKey: string; cleanupAfter: Date; }; }): Promise; export declare function commitBrowserRevisionPublication(db: Database, input: { accountId: string; workspaceId: string; operationId: string; browserSessionId: string; controllerGeneration: string; identityId: string; expectedHeadGeneration: number; advanceDefault: boolean; actorSubjectId: string; manifestDigest: string; artifacts: readonly BrowserStateArtifactCommitInput[]; }): Promise; export declare function failBrowserRevisionPublication(db: Database, input: { accountId: string; workspaceId: string; operationId: string; browserSessionId: string; controllerGeneration: string; state?: "failed" | "outcome_unknown"; error: InteractionErrorValue; }): Promise; /** Server-only storage authority used to restore a revision. Never project this * result through HTTP, MCP, Codemode output, or the public SDK. */ export declare function getBrowserRevisionArtifactAuthority(db: Database, input: { accountId: string; workspaceId: string; identityId: string; revisionId: string; }): Promise;