import { type LocalTranscriptEntry, type LocalTranscriptChange } from './local-transcript-state.js'; import { type LocalDirectoryPreferences } from './local-directory-preferences.js'; import { LocalMessageMarkStore } from './local-message-marks.js'; import { LocalSelfNoteQuotes } from './local-self-note-quotes.js'; import { LocalWorldReactions } from './local-world-reactions.js'; import { SelfRoleSyncStore } from './self-role-sync-store.js'; import { type ConversationViewportEntries } from './conversation-viewport-state.js'; import { type RecentEmojiStore } from './emoji-recent.js'; import { CommonGroupDatabase } from './common-group-database.js'; import type { ArkmeStateStore } from './state-store.js'; import type { ArkmeCachedSnapshot, ArkmeRecordingSpeakerCandidate, ArkmeSourceList, ArkmeImageBytes, ArkmeConversationMemberCache, ArkmeConversationMemberUpdate, ArkmeCachedQueryResult, ArkmeLongArticleDraft, ArkmePendingWrite, ArkmeRecordCursor, ArkmeRecordReeditDraft, ArkmeSelfRecordList, ArkmeSelfRole, ArkmeSelfRoleSnapshot, ArkmeSelfSummary, ArkmeUserProfile, ArkmeUserProfileSnapshot } from './types.js'; import type { ArkmeExtensionReviewOperation } from './extensions/types.js'; import type { RecordingImportJob } from './recording-import-contract.js'; /** Read-only migration input; historical snapshots remain available after a role is deleted. */ export interface ArkmeSelfRoleBinding { recordUid: string; snapshot: ArkmeSelfRoleSnapshot; boundAtMillis: number; } export interface ArkmeSelfRoleBindingPage { items: ArkmeSelfRoleBinding[]; nextCursor?: string; } export declare class ArkmeLocalDatabase implements RecentEmojiStore { private readonly operationalState; readonly selfNoteQuotes: LocalSelfNoteQuotes; readonly worldReactions: LocalWorldReactions; readonly messageMarks: LocalMessageMarkStore; readonly selfRoleSync: SelfRoleSyncStore; readonly commonGroups: CommonGroupDatabase; private readonly path; private readonly database; private readonly migrations; private readonly securedWindowsFiles; constructor(directory: string, operationalState: ArkmeStateStore); arrangementBoardCache(environment: string, userId: number, pages?: import('./arrangement-board-cache.js').ArkmeArrangementBoardCachePages): Promise>>; readCancellationCompletion(): Promise; writeCancellationCompletion(completion: import('./state-store.js').ArkmeCancellationCompletion | undefined): Promise; readOfflineContextJournal(scope: string): Promise>; putOfflineContextJournal(scope: string, id: string, entry: import('./offline-context-contract.js').OfflineContextJournalEntry): Promise; deleteOfflineContextJournal(scope: string, id: string, fingerprint: string): Promise; teamOutboundTarget(scope: string, requestUid: string): Promise; retainTeamOutboundTarget(scope: string, requestUid: string, value: import('./team-outbound-contract.js').TeamOutboundRecovery): Promise; uniqueCode(): Promise; readRecordingSpeakerCache(scope: string, userId: number): Promise; writeRecordingSpeakerCache(scope: string, userId: number, candidates: ArkmeRecordingSpeakerCandidate[]): Promise; clearRecordingSpeakerCache(scope: string, userId: number): Promise; listSelfRoles(userId: number): Promise; createSelfRole(userId: number, name: string, avatarRef?: string): Promise; updateSelfRole(userId: number, roleId: string, name: string | undefined, avatarRef?: string): Promise; deleteSelfRole(userId: number, roleId: string): Promise; bindSelfRole(userId: number, recordUid: string, roleId: string): Promise; unbindSelfRole(userId: number, recordUid: string, roleId: string): Promise; rebindSelfRole(userId: number, recordUid: string, newRecordUid: string): Promise; selfRoleSnapshots(userId: number, recordUids: readonly string[]): Promise>; /** Stable, account-scoped pages for a account-scoped snapshot inspection. No local row is marked synced or removed. */ selfRoleBindings(userId: number, afterRecordUid?: string, limit?: number): Promise; readDirectoryCache(userId: number): Promise; writeDirectoryCache(userId: number, page: ArkmeSourceList): Promise; selfRoleAvatarLocalRef(userId: number, fileAssetUid: string): Promise; readAvatarCache(userId: number, imageRef: string): Promise; writeAvatarCache(userId: number, imageRef: string, image: ArkmeImageBytes): Promise; cachedSnapshot(userId: number): Promise; queryCached(userId: number, options: { query?: string; limit: number; beforeMillis?: number; }): Promise; revision(userId: number): Promise; cachedProfile(userId: number): Promise; cachedConversationMembers(userId: number, group: string): Promise; private readConversationMembers; mergeConversationMembers(userId: number, group: string, update: ArkmeConversationMemberUpdate): Promise; forgetCachedMembers(userId: number, group: string, refs: readonly string[]): Promise; private writeConversationMembers; clearConversationMembers(userId: number, group: string): Promise; cacheProfile(userId: number, profile: ArkmeUserProfile): Promise; cacheSummary(userId: number, summary: ArkmeSelfSummary): Promise; cachePage(userId: number, page: ArkmeSelfRecordList, requestCursor?: ArkmeRecordCursor): Promise; listPending(userId: number): Promise; putPending(userId: number, pending: ArkmePendingWrite): Promise; listExtensionReviewOperations(userId: number): Promise; putExtensionReviewOperation(userId: number, operation: ArkmeExtensionReviewOperation): Promise; markExtensionReviewOperation(userId: number, clientMutationId: string, state: ArkmeExtensionReviewOperation['state'], error?: string): Promise; removeExtensionReviewOperation(userId: number, clientMutationId: string): Promise; getLongArticleDraft(userId: number, sourceRef: string, itemUid?: string): Promise; putLongArticleDraft(userId: number, draft: ArkmeLongArticleDraft): Promise; removeLongArticleDraft(userId: number, sourceRef: string, itemUid?: string): Promise; getRecordReeditDraft(userId: number, sourceIdentityKey: string, itemUid: string): Promise; putRecordReeditDraft(userId: number, draft: Omit, expectedRevision?: number): Promise; recordReeditFileRefs(userId: number): Promise; arkoPendingTurns(userId: number): Promise; arkoTurn(userId: number, uid: string): Promise; prepareArkoTurn(userId: number, turn: import('./arko-turn-contract.js').ArkmeArkoPendingTurn, request?: Record): Promise; acknowledgeArkoTurn(userId: number, uid: string): Promise; arkoFileRefs(userId: number): Promise; readDayReviewPending(scope: string, day: string): Promise; prepareDayReview(scope: string, day: string, request: Record): Promise; acknowledgeDayReview(scope: string, day: string, requestId: string): Promise; listRecordReeditSubmissions(userId: number): Promise; acknowledgeRecordReeditSubmission(userId: number, identity: string, submissionId: string, version: number): Promise; discardRecordReeditCandidate(userId: number, sourceIdentityKey: string, itemUid: string, expectedRevision: number): Promise; putRecordReeditSubmission(userId: number, job: import('./record-reedit-contract.js').ArkmeRecordReeditSubmission, expectedId?: string): Promise; removeRecordReeditDraft(userId: number, sourceIdentityKey: string, itemUid: string, expectedRevision: number, expectedCandidate?: ArkmeRecordReeditDraft): Promise; listRecordingImportJobs(userId: number): Promise; planRecordingToolBatch(...args: Parameters): Promise>; listAllRecordingImportJobs(): Promise; getRecordingImportJob(userId: number, jobId: string): Promise; putRecordingImportJob(userId: number, job: RecordingImportJob): Promise; admitRecordingImportJob(userId: number, job: RecordingImportJob, signal?: AbortSignal): ReturnType; replaceRecordingImportJob(userId: number, job: RecordingImportJob, expectedRevision: number, signal?: AbortSignal): Promise; removeRecordingImportJob(userId: number, jobId: string): Promise; markAttempt(userId: number, recordUid: string, error: string): Promise; markSynced(userId: number, recordUid: string, status: number): Promise; close(): void; private recordFromRow; private profileFromRow; private insertPending; private pendingCaptureContext; private upsertSyncedRecord; private ensureMigrated; private readRecentEmojiIds; recentEmojiIds(accountKey: string): Promise; localTranscriptEntries(account: string, scope: string, ids: string[], change?: LocalTranscriptChange): Promise>; localDirectoryPreferences(accountKey: string, entries?: LocalDirectoryPreferences, migrate?: boolean): Promise; readConversationViewports(accountKey: string, surface: string): Promise; writeConversationViewports(accountKey: string, surface: string, entries: ConversationViewportEntries): Promise; recordRecentEmoji(accountKey: string, emojiId: string): Promise; private transaction; private bumpRevision; private secureDatabaseFiles; } //# sourceMappingURL=local-database.d.ts.map