@univerjs-pro/collaboration v0.5.0-beta.1 • Docs
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
Parameter | Type |
---|---|
_revisionService | RevisionService |
_univerInstanceService | IUniverInstanceService |
_snapshotServerService | ISnapshotServerService |
_commandService | ICommandService |
_injector | Injector |
_compressMutationService | CompressMutationService |
_resourceManagerService | IResourceManagerService |
Returns
Defined in
packages/collaboration/src/services/snapshot/snapshot.service.ts:79
Methods
loadDoc()
loadDoc(
unitID,
rev,
context?): Promise<DocumentDataModel>
Parameters
Parameter | Type |
---|---|
unitID | string |
rev | number |
context ? | ILogContext |
Returns
Promise
<DocumentDataModel
>
Defined in
packages/collaboration/src/services/snapshot/snapshot.service.ts:163
loadSheet()
loadSheet(
unitID,
rev,
context?): Promise<Workbook>
Parameters
Parameter | Type |
---|---|
unitID | string |
rev | number |
context ? | ILogContext |
Returns
Promise
<Workbook
>
Defined in
packages/collaboration/src/services/snapshot/snapshot.service.ts:89
save()
save(_context, workbook): IWorkbookData
Parameters
Parameter | Type |
---|---|
_context | ILogContext |
workbook | Workbook |
Returns
Defined in
packages/collaboration/src/services/snapshot/snapshot.service.ts:211
saveDoc()
saveDoc(_context, document): IDocumentData
Parameters
Parameter | Type |
---|---|
_context | ILogContext |
document | DocumentDataModel |
Returns
Defined in
packages/collaboration/src/services/snapshot/snapshot.service.ts:222