/** Durable per-spreadsheet authority records used to fence remote mutations. */ import type { SqlExecutor, SqlStorageAdapter } from "../../../contracts/storage/sql.js"; import { type FencingContext } from "@hikoutei/ikisaki"; export interface SpreadsheetAuthority { readonly spreadsheetId: string; readonly ownerId: string; readonly authorityEpoch: number; readonly authorityToken: string; readonly updatedAt: number; } export type EnsureSpreadsheetAuthorityResult = { readonly kind: "claimed"; readonly authority: SpreadsheetAuthority; } | { readonly kind: "fenced_out"; }; /** Ensures the current writer fence owns one registered spreadsheet authority. */ export declare function ensureSpreadsheetAuthorityWithSql(sql: SqlExecutor, options: FencingContext & { readonly physicalSheetId: string; readonly ownerId: string; }): Promise; /** Ensures a spreadsheet authority through an adapter-owned transaction. */ export declare function ensureSpreadsheetAuthorityWithAdapter(storage: SqlStorageAdapter, options: FencingContext & { readonly physicalSheetId: string; readonly ownerId: string; }): Promise; /** Reads the durable authority attached to one registered physical sheet. */ export declare function readSpreadsheetAuthorityWithSql(sql: SqlExecutor, physicalSheetId: string): Promise; /** Reads one durable spreadsheet authority through a fresh adapter context. */ export declare function readSpreadsheetAuthorityWithAdapter(storage: SqlStorageAdapter, physicalSheetId: string): Promise; //# sourceMappingURL=spreadsheetAuthority.d.ts.map