rxdb
Version:
A local-first realtime NoSQL Database for JavaScript applications - https://rxdb.info/
39 lines (38 loc) • 2.16 kB
TypeScript
import type { RxCollection, ReplicationPullOptions, ReplicationPushOptions } from '../../types/index.d.ts';
import { RxReplicationState } from '../replication/index.ts';
import type { OneDriveCheckpointType, OneDriveState, SyncOptionsOneDrive } from './microsoft-onedrive-types.ts';
import { DriveStructure } from './init.ts';
import { SignalingOptions, SignalingState } from './signaling.ts';
export * from './microsoft-onedrive-types.ts';
export * from './microsoft-onedrive-helper.ts';
export * from './transaction.ts';
export * from './init.ts';
export * from './document-handling.ts';
export * from './downstream.ts';
export * from './upstream.ts';
export * from './signaling.ts';
export declare const DEFAULT_TRANSACTION_TIMEOUT: number;
export declare class RxOneDriveReplicationState<RxDocType> extends RxReplicationState<RxDocType, OneDriveCheckpointType> {
readonly oneDrive: OneDriveState;
readonly driveStructure: DriveStructure;
readonly replicationIdentifierHash: string;
readonly collection: RxCollection<RxDocType, any>;
readonly pull?: ReplicationPullOptions<RxDocType, OneDriveCheckpointType> | undefined;
readonly push?: ReplicationPushOptions<RxDocType> | undefined;
readonly signalingOptions?: SignalingOptions | undefined;
readonly live: boolean;
retryTime: number;
autoStart: boolean;
/**
* Only exists on live replication
*/
signalingState?: SignalingState;
constructor(oneDrive: OneDriveState, driveStructure: DriveStructure, replicationIdentifierHash: string, collection: RxCollection<RxDocType, any>, pull?: ReplicationPullOptions<RxDocType, OneDriveCheckpointType> | undefined, push?: ReplicationPushOptions<RxDocType> | undefined, signalingOptions?: SignalingOptions | undefined, live?: boolean, retryTime?: number, autoStart?: boolean);
/**
* Notify other peers that something
* has or might have changed so that
* they can pull from their checkpoints.
*/
notifyPeers(): Promise<void>;
}
export declare function replicateMicrosoftOneDrive<RxDocType>(options: SyncOptionsOneDrive<RxDocType>): Promise<RxOneDriveReplicationState<RxDocType>>;