@univerjs-procollaborationclassesSnapshotservice

@univerjs-pro/collaboration v0.5.0-beta.1Docs


Class: SnapshotService

The service provides methods to load snapshots from the snapshot server.

Constructors

new SnapshotService()

new SnapshotService(
   _revisionService, 
   _univerInstanceService, 
   _snapshotServerService, 
   _commandService, 
   _injector, 
   _compressMutationService, 
   _resourceManagerService): SnapshotService

Parameters

ParameterType
_revisionServiceRevisionService
_univerInstanceServiceIUniverInstanceService
_snapshotServerServiceISnapshotServerService
_commandServiceICommandService
_injectorInjector
_compressMutationServiceCompressMutationService
_resourceManagerServiceIResourceManagerService

Returns

SnapshotService

Defined in

packages/collaboration/src/services/snapshot/snapshot.service.ts:79

Methods

loadDoc()

loadDoc(
   unitID, 
   rev, 
context?): Promise<DocumentDataModel>

Parameters

ParameterType
unitIDstring
revnumber
context?ILogContext

Returns

Promise<DocumentDataModel>

Defined in

packages/collaboration/src/services/snapshot/snapshot.service.ts:163


loadSheet()

loadSheet(
   unitID, 
   rev, 
context?): Promise<Workbook>

Parameters

ParameterType
unitIDstring
revnumber
context?ILogContext

Returns

Promise<Workbook>

Defined in

packages/collaboration/src/services/snapshot/snapshot.service.ts:89


save()

save(_context, workbook): IWorkbookData

Parameters

ParameterType
_contextILogContext
workbookWorkbook

Returns

IWorkbookData

Defined in

packages/collaboration/src/services/snapshot/snapshot.service.ts:211


saveDoc()

saveDoc(_context, document): IDocumentData

Parameters

ParameterType
_contextILogContext
documentDocumentDataModel

Returns

IDocumentData

Defined in

packages/collaboration/src/services/snapshot/snapshot.service.ts:222