feat: add snjs package

This commit is contained in:
Karol Sójko
2022-07-06 14:04:18 +02:00
parent 321a055bae
commit 0e40469e2f
296 changed files with 46109 additions and 187 deletions

View File

@@ -0,0 +1,18 @@
import { ServerSyncResponse } from '@Lib/Services/Sync/Account/Response'
import { OfflineSyncResponse } from './Offline/Response'
export enum SyncSignal {
Response = 1,
StatusChanged = 2,
}
export type SyncStats = {
completedUploadCount: number
totalUploadCount: number
}
export type ResponseSignalReceiver<T extends ServerSyncResponse | OfflineSyncResponse> = (
signal: SyncSignal,
response?: T,
stats?: SyncStats,
) => Promise<void>