import { MigrationClient } from '../../migration-client'; import { ExtensionClient } from '../../extension-client'; import { Logger } from '../../logger'; export interface IdMap { id: number; table: string; sync_id: string; local_id: string; created_at: Date; } export declare abstract class IdMapperClient extends ExtensionClient { protected readonly logger: Logger; protected readonly table: string; /** * Cache for id maps */ protected cache: { bySyncId: Map; byLocalId: Map; }; constructor(migrationClient: MigrationClient, logger: Logger, table: string); getBySyncId(syncId: string): Promise; getByLocalId(localId: string): Promise; getAll(): Promise; create(localId: string | number, syncId?: string): Promise; removeBySyncId(syncId: string): Promise; removeByLocalId(localId: string): Promise; clearCache(): void; protected addToCache(idMap: IdMap): void; protected removeFromCache(idMap: IdMap): void; protected removeCacheByLocalId(localId: string): void; protected removeCacheBySyncId(syncId: string): void; }