import { IDocumentManager } from '@jupyterlab/docmanager'; import { ISettingRegistry } from '@jupyterlab/settingregistry'; import { TranslationBundle } from '@jupyterlab/translation'; import { Contents, IContentProvider, ServerConnection, User } from '@jupyterlab/services'; import { ISignal } from '@lumino/signaling'; import { IDocumentProvider, ISharedModelFactory } from '@jupyter/collaborative-drive'; import { IDocumentProviderFactory } from './tokens'; import { Awareness } from 'y-protocols/awareness'; export interface IForkProvider { connectToForkDoc: (forkRoomId: string, sessionId: string) => Promise; reconnect: () => Promise; contentType: string; format: string; save?: () => Promise; } declare namespace RtcContentProvider { interface IOptions { user: User.IManager; trans: TranslationBundle; globalAwareness: Awareness | null; serverSettings: ServerConnection.ISettings; documentManager?: IDocumentManager | null; currentDrive: Contents.IDrive; fileChanged?: ISignal; providerFactory: IDocumentProviderFactory; /** * @deprecated Pass `documentManager` instead. Used as a fallback when * `documentManager` is not provided. Will be removed in a future major * release. * @see {@link IOptions.documentManager} */ docmanagerSettings?: ISettingRegistry.ISettings | null; } } export declare class RtcContentProvider implements IContentProvider { constructor(options: RtcContentProvider.IOptions); /** * SharedModel factory for the content provider. */ readonly sharedModelFactory: ISharedModelFactory; get providers(): Map; /** * Get a file or directory. * * @param localPath: The path to the file. * * @param options: The options used to fetch the file. * * @returns A promise which resolves with the file content. */ get(localPath: string, options?: Contents.IFetchOptions): Promise; /** * Save a file. * * @param localPath - The desired file path. * * @param options - Optional overrides to the model. * * @returns A promise which resolves with the file content model when the * file is saved. */ save(localPath: string, options?: Partial & Contents.IContentProvisionOptions): Promise; /** * A signal emitted when a file operation takes place. */ get fileChanged(): ISignal; private _onCreate; private _user; private _currentDrive; private _trans; private _globalAwareness; private _providers; private _providerFileChanged; private _driveFileChanged?; private _serverSettings; private _documentManager; private _docmanagerSettings; private _providerFactory; } export {};