@univerjs-pro/collaboration 0.4.0-alpha.1 → 0.4.0-experimental.20241017-da434a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/types/models/changeset.d.ts +4 -0
- package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +2 -1
- package/lib/types/services/snapshot/__tests__/snapshot.service.spec.d.ts +2 -1
- package/lib/types/services/snapshot/snapshot.service.d.ts +2 -1
- package/lib/umd/index.js +1 -1
- package/package.json +27 -27
|
@@ -8,6 +8,10 @@ export interface IChangeset {
|
|
|
8
8
|
userID: string;
|
|
9
9
|
mutations: IMutationInfo[];
|
|
10
10
|
memberID: string;
|
|
11
|
+
/** sid works with reqId, represent the id of a unit edit session */
|
|
12
|
+
sid?: string;
|
|
13
|
+
/** reqId works with sid, should be monotonically increasing and begin with 1 in the same edit session */
|
|
14
|
+
reqId?: number;
|
|
11
15
|
}
|
|
12
16
|
export declare function parseProtocolChangeset(protocolChangeset: IProtocolChangeset): IChangeset;
|
|
13
17
|
export declare function parseProtocolCommand(protocolCommands: IProtocolCommand[]): ICommandInfo[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IWorkbookData } from '@univerjs/core';
|
|
2
|
-
import { ICopyFileMetaRequest, ICopyFileMetaResponse, IDeserializedSheetBlock, IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetDeserializedSheetBlockResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse, ISheetBlock, ISnapshot } from '@univerjs/protocol';
|
|
2
|
+
import { ICopyFileMetaRequest, ICopyFileMetaResponse, IDeserializedSheetBlock, IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetDeserializedSheetBlockResponse, IGetLatestCsReqIdBySidRequest, IGetLatestCsReqIdBySidResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse, ISheetBlock, ISnapshot } from '@univerjs/protocol';
|
|
3
3
|
import { ILogContext } from '../../../utils';
|
|
4
4
|
import { ISnapshotServerService } from '../snapshot.service';
|
|
5
5
|
export declare const testSnapshot: () => ISnapshot;
|
|
@@ -23,4 +23,5 @@ export declare class MockSnapshotServerService implements ISnapshotServerService
|
|
|
23
23
|
/** Save changeset to a database. */
|
|
24
24
|
saveChangeset(context: ILogContext, params: ISaveChangesetRequest): Promise<ISaveChangesetResponse>;
|
|
25
25
|
copyFileMeta(context: ILogContext, params: ICopyFileMetaRequest): Promise<ICopyFileMetaResponse>;
|
|
26
|
+
getLatestCsReqIdBySid(context: ILogContext, params: IGetLatestCsReqIdBySidRequest): Promise<IGetLatestCsReqIdBySidResponse>;
|
|
26
27
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRender, IRenderManagerService } from '@univerjs/engine-render';
|
|
2
|
-
import { ICopyFileMetaRequest, ICopyFileMetaResponse, IFetchMissingChangesetsResponse, IGetDeserializedSheetBlockResponse, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetResponse, ISaveSheetBlockResponse, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
2
|
+
import { ICopyFileMetaRequest, ICopyFileMetaResponse, IFetchMissingChangesetsResponse, IGetDeserializedSheetBlockResponse, IGetLatestCsReqIdBySidResponse, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetResponse, ISaveSheetBlockResponse, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
3
3
|
import { Nullable } from 'vitest';
|
|
4
4
|
import { ILogContext } from '../../../utils';
|
|
5
5
|
import { Injector } from '@univerjs/core';
|
|
@@ -19,4 +19,5 @@ export declare class MockSnapshotServerService implements ISnapshotServerService
|
|
|
19
19
|
saveSheetBlock(): Promise<ISaveSheetBlockResponse>;
|
|
20
20
|
saveChangeset(): Promise<ISaveChangesetResponse>;
|
|
21
21
|
copyFileMeta(context: ILogContext, params: ICopyFileMetaRequest): Promise<ICopyFileMetaResponse>;
|
|
22
|
+
getLatestCsReqIdBySid(): Promise<IGetLatestCsReqIdBySidResponse>;
|
|
22
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentDataModel, IDocumentData, IWorkbookData, Workbook, ICommandService, Injector, IResourceManagerService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { ICopyFileMetaRequest, ICopyFileMetaResponse, IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetDeserializedSheetBlockResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
2
|
+
import { ICopyFileMetaRequest, ICopyFileMetaResponse, IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetDeserializedSheetBlockResponse, IGetLatestCsReqIdBySidRequest, IGetLatestCsReqIdBySidResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetRequest, ISaveChangesetResponse, ISaveSheetBlockRequest, ISaveSheetBlockResponse, ISaveSnapshotRequest, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
3
3
|
import { ILogContext } from '../../utils';
|
|
4
4
|
import { CompressMutationService } from '../compress-mutation/compress-mutation-service';
|
|
5
5
|
import { RevisionService } from '../rev/rev.service';
|
|
@@ -25,6 +25,7 @@ export interface ISnapshotServerService {
|
|
|
25
25
|
/** Save changeset to a database. */
|
|
26
26
|
saveChangeset: (context: ILogContext, params: ISaveChangesetRequest) => Promise<ISaveChangesetResponse>;
|
|
27
27
|
copyFileMeta: (context: ILogContext, params: ICopyFileMetaRequest) => Promise<ICopyFileMetaResponse>;
|
|
28
|
+
getLatestCsReqIdBySid: (context: ILogContext, params: IGetLatestCsReqIdBySidRequest) => Promise<IGetLatestCsReqIdBySidResponse>;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* The service provides methods to load snapshots from the snapshot server.
|