import type { SyncServerConfig } from './context.js'; /** One app-shaped seed mutation — the same vocabulary as client mutations. */ export type SeedMutation = { readonly table: string; readonly op: 'upsert'; /** * Full-row values keyed by column name (§6.1). Keys are accepted in * the SQL-truth snake_case or the generated row types' camelCase; * missing nullable columns become NULL. */ readonly values: Readonly>; } | { readonly table: string; readonly op: 'delete'; readonly rowId: string; }; export interface SeedTarget { readonly partition: string; readonly actorId: string; /** * The synthetic client identity of the seed (default `'seed'`). Together * with `commitId` it forms the §2.3 idempotency key — keep both stable * for a re-runnable seed, vary `commitId` to seed additional batches. */ readonly clientId?: string; /** The client commit id (default `'seed-commit-1'`). */ readonly commitId?: string; } export interface SeedMutationErrorOptions { readonly clientId: string; readonly clientCommitId: string; readonly opIndex: number; readonly code: string; readonly replayed: boolean; readonly retryable: boolean; readonly message: string; readonly recordedAtMs?: number; readonly cacheIdentity?: string; } /** Structured terminal failure from the real push path used by a seed. */ export declare class SeedMutationError extends Error { readonly name = "SeedMutationError"; readonly clientId: string; readonly clientCommitId: string; readonly opIndex: number; /** Exact protocol or host-validator rejection code. */ readonly code: string; readonly replayed: boolean; readonly retryable: boolean; readonly recordedAtMs?: number; readonly cacheIdentity?: string; constructor(options: SeedMutationErrorOptions); } /** * Seed `mutations` into a partition through the real push path. Throws a * `SeedMutationError` when the push is rejected and `SyncError` for malformed * helper input, so a broken seed fails loud instead of serving an empty store. */ export declare function seedMutations(config: SyncServerConfig, target: SeedTarget, mutations: readonly SeedMutation[]): Promise;