@univerjs-procollaborationReadme

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


@univerjs-pro/collaboration

Enumerations

EnumerationDescription
CollaborationEventTypes of all possible collaboration events.

Classes

ClassDescription
CompressMutationServiceDuring transmission, compression is performed for a specific operation,referencing during transport. Before send -> compress -> transmission -> … -> node apply -> decompression -> apply. Before send -> compress -> transmission -> … -> node transform -> decompression -> apply. Before send -> compress -> transmission -> … -> take from server -> decompression -> apply. Before send -> compress -> save to local -> … -> take from local -> decompression -> apply.
DocTransformControllerThis controller register sheet transform algorithms to the transform service.
RevisionServiceThis service provide util functions to get revision number of a document or increment the revision number.
SheetTransformControllerThis controller register sheet transform algorithms to the transform service.
SnapshotServiceThe service provides methods to load snapshots from the snapshot server.
TransformServiceThis service’s responsibility is to transform mutations (changesets).
UniverCollaborationPluginPlug-in base class, all plug-ins must inherit from this base class. Provide basic methods.

Interfaces

InterfaceDescription
IAcknowledgedChangesetAwaiting mutations were acknowledged by the server.
IAcknowledgementEvent-
IChangeset-
ICollaborationUser-
ICreateUnitMutationParams-
IFailureTransformChangesetsResult-
IFailureTransformMutationResult-
IFailureTransformMutationsResult-
IFailureTransformMutationsWithChangesetResult-
IFetchingMissEventWhen the collaboration session is created, it should send a handshake event to the server.
IFetchOperationsEvent-
IHeartbeatRequestEvent-
IHeartbeatResponseEvent-
IHelloRequestEvent-
IHelloResponseEvent-
IHistoryIoService-
IIngestQuestEvent-
IJoinRequestEvent-
IJoinResponseEvent-
ILeaveRequestEvent-
ILogContext-
IMutationTransformAlgorithmA single transform algorithm. Algorithms are registered to the transform service in the form of {m1}-{m2}. When the transform service is transforming two mutations, it would find the algorithm by the form of {m1}-{m2}. m1 is the mutation on the left side, and m2 is the mutation on the right side.
INewChangesetsEventReceives a changeset from collaboration server.
INewHostEvent-
IOperationEvent-
IPermissionUpdateEvent-
IPseudoFetchMissingResultEvent-
IRecvResponseEvent-
IRejectedChangesetAwaiting mutations were rejected by the server.
IRejectionEvent-
IRequestHostEvent-
IRetryEvent-
IRevertRevisionMutationParams-
IShouldCloseConnEvent-
ISnapshotServerService-
ISubmitChangesetEventSend a changeset to the collaboration sever.
ISuccessTransformChangesetsResult-
ISuccessTransformMutationResult-
ISuccessTransformMutationsResult-
ISuccessTransformMutationsWithChangesetResult-
ITerminateEvent-
ITransformServiceThis service’s responsibility is to transform mutations (changesets).
IUpdateCursorEvent-
IUserJoinEvent-
IUserLeaveEvent-
IUserSelectionEvent-

Type Aliases

Type aliasDescription
ICollaborationEventA union type of all possible collaboration events.
ICombRequestEvent-
ICombResponseEvent-
ITransformChangesetsResult-
ITransformMutationResult-
ITransformMutationsResult-
ITransformMutationsWithChangesetResult-

Variables

VariableDescription
CreateUnitMutationThis mutation will not create a unit but only be a signal
RevertRevisionMutation-
SINGLE_HISTORY_MUTATIONS-
SINGLE_SNAPSHOT_MUTATIONSSome special mutations. It a changeset contains the following mutations it should create a snapshot immediately.
textDecoder-
textEncoder-

Functions

FunctionDescription
b64DecodeUnicode-
b64EncodeUnicode-
generateTempDocumentSnapshot-
generateTemporarySnap-
getSheetBlocksFromSnapshot-
IHistoryIoService-
ISnapshotServerServiceIt provides implementations for server side controllers to load or save or load snapshots. This service should be implemented by the host environment. And it shouldn’t contain any business logic.
isTransformChangesetsFailure-
isTransformChangesetsSuccess-
isTransformMutationFailure-
isTransformMutationsFailure-
isTransformMutationsSuccess-
isTransformMutationSuccess-
isTransformMutationsWithChangesetFailure-
isTransformMutationsWithChangesetSuccess-
ITransformService-
makeArray-
mapDocumentTypeToUniverType-
parseChangesetToProtocol-
parseMutationToProtocol-
parseProtocolChangeset-
parseProtocolCommand-
parseProtocolMutation-
transformDocumentDataToSnapshot-
transformSnapshotToDocumentData-
transformSnapshotToWorkbookDataAssemble a snapshot to a workbook.
transformWorkbookDataToSnapshot-