AeThex-OS/packages/aethex-core/lib/DataSync.d.ts

45 lines
No EOL
1.2 KiB
TypeScript

/**
* AeThex DataSync - Cross-Platform State Synchronization
* Sync data across multiple metaverse platforms
*/
export interface SyncOptions {
platforms: string[];
realtime?: boolean;
conflictResolution?: 'latest' | 'merge' | 'manual';
}
export declare class DataSync {
private static syncedData;
private static listeners;
/**
* Sync data across platforms
*/
static sync(data: Record<string, any>, platforms: string[]): Promise<void>;
/**
* Pull data from specific platform
*/
static pull(userId: string, platform: string): Promise<any | null>;
/**
* Push data to specific platform
*/
static push(userId: string, platform: string, data: Record<string, any>): Promise<void>;
/**
* Listen for updates
*/
static onUpdate(userId: string, callback: (data: any) => void): void;
/**
* Notify listeners of data changes
*/
private static notifyListeners;
/**
* Get sync status
*/
static getSyncStatus(userId: string): Record<string, {
synced: boolean;
lastSync?: Date;
}>;
/**
* Clear synced data (for testing)
*/
static clear(): void;
}
//# sourceMappingURL=DataSync.d.ts.map