mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-18 22:37:21 +00:00
45 lines
No EOL
1.2 KiB
TypeScript
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
|