feat: add snjs package
This commit is contained in:
18
packages/snjs/lib/Services/Sync/Signals.ts
Normal file
18
packages/snjs/lib/Services/Sync/Signals.ts
Normal 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>
|
||||
Reference in New Issue
Block a user