internal: incomplete vault systems behind feature flag (#2340)

This commit is contained in:
Mo
2023-06-30 09:01:56 -05:00
committed by GitHub
parent d16e401bb9
commit b032eb9c9b
638 changed files with 20321 additions and 4813 deletions

View File

@@ -19,4 +19,10 @@ export type SyncOptions = {
* and before the sync request is network dispatched
*/
onPresyncSave?: () => void
/** If supplied, the sync will be exclusive to items in these sharedVaults */
sharedVaultUuids?: string[]
/** If true and sharedVaultUuids is present, excludes sending global syncToken as part of request */
syncSharedVaultsFromScratch?: boolean
}

View File

@@ -2,8 +2,10 @@
import { FullyFormedPayloadInterface } from '@standardnotes/models'
import { SyncOptions } from './SyncOptions'
import { AbstractService } from '../Service/AbstractService'
import { SyncEvent } from '../Event/SyncEvent'
export interface SyncServiceInterface {
export interface SyncServiceInterface extends AbstractService<SyncEvent> {
sync(options?: Partial<SyncOptions>): Promise<unknown>
resetSyncState(): void
markAllItemsAsNeedingSyncAndPersist(): Promise<void>
@@ -11,4 +13,5 @@ export interface SyncServiceInterface {
persistPayloads(payloads: FullyFormedPayloadInterface[]): Promise<void>
lockSyncing(): void
unlockSyncing(): void
syncSharedVaultsFromScratch(sharedVaultUuids: string[]): Promise<void>
}