import { NaturalStore } from '../base/NaturalStore'; import { ErrorCode } from '../utils/ErrorCode'; import { SubScribeRange } from './NaturalCloudSyncModule'; import { AggreResult } from './request/SyncResult'; import { TransactionData } from './request/TransactionRequest'; export interface SyncTaskHandler { onUpsert(storeName: string, data: any[]): Promise; onDelete(storeName: string, data: any[]): Promise; onQuery(storeName: string, tableName: string, query: string): Promise; onAggregateQuery(storeName: string, tableName: string, query: string): Promise; onTransaction(storeName: string, verifyObjects: any[], operations: TransactionData[]): Promise; onSubscribe(subscribeType: SubScribeRange, store?: NaturalStore, defaultSubscribeInfo?: [number, string, string]): Promise; onUnSubscribe(subscribeType: SubScribeRange, store?: NaturalStore, defaultSubscribeInfo?: [number, string, number, string]): Promise; subscribeForRekey(): Promise; unsubscribeForRekey(): Promise; }