@univerjs-pro/collaboration v0.5.4
Class: SnapshotService
Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:78
The service provides methods to load snapshots from the snapshot server.
Constructors
new SnapshotService()
new SnapshotService(
_revisionService,
_univerInstanceService,
_snapshotServerService,
_commandService,
_injector,
_compressMutationService,
_resourceManagerService): SnapshotService
Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:79
Parameters
Parameter | Type |
---|---|
_revisionService | RevisionService |
_univerInstanceService | IUniverInstanceService |
_snapshotServerService | ISnapshotServerService |
_commandService | ICommandService |
_injector | Injector |
_compressMutationService | CompressMutationService |
_resourceManagerService | IResourceManagerService |
Returns
Methods
loadDoc()
loadDoc(
unitID,
rev,
context): Promise<DocumentDataModel>
Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:165
Parameters
Parameter | Type |
---|---|
unitID | string |
rev | number |
context | ILogContext |
Returns
Promise
<DocumentDataModel
>
loadSheet()
loadSheet(
unitId,
rev,
context): Promise<Workbook>
Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:89
Parameters
Parameter | Type |
---|---|
unitId | string |
rev | number |
context | ILogContext |
Returns
Promise
<Workbook
>
save()
save(_context, workbook): IWorkbookData
Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:214
Parameters
Parameter | Type |
---|---|
_context | ILogContext |
workbook | Workbook |
Returns
Deprecated
This should be moved to ResourceLoaderService.saveUnit
.
saveDoc()
saveDoc(_context, document): IDocumentData
Defined in: packages/collaboration/src/services/snapshot/snapshot.service.ts:228
Parameters
Parameter | Type |
---|---|
_context | ILogContext |
document | DocumentDataModel |
Returns
Deprecated
This should be moved to ResourceLoaderService.saveUnit
.