@univerjs/protocol 0.1.16 → 0.1.17

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.
@@ -6,9 +6,8 @@ export type { DocumentMeta as IDocumentMeta } from './ts/univer/doc';
6
6
  export type { Resource as IResource } from './ts/univer/resource';
7
7
  export type { Snapshot as ISnapshot } from './ts/univer/snapshot';
8
8
  export { CellValueType, type CellData as ICellData, type CellValue as ICellValue, type RowData as IRowData, type RowData_ItemsEntry as IRowDataItemsEntry, type SheetBlock as ISheetBlock, type SheetBlockMeta as ISheetBlockMeta, type WorkbookMeta as IWorkbookMeta, type WorkbookMeta_BlockMetaEntry as IWorkbookMeta_BlockMetaEntry, type WorkbookMeta_SheetsEntry as IWorkbookMeta_SheetsEntry, type WorksheetMeta as IWorksheetMeta, } from './ts/univer/workbook';
9
- export { type ApplyRequest as IApplyRequest, type ApplyResponse as IApplyResponse, type CreateUnitRequest as ICreateUnitRequest, type CreateUnitResponse as ICreateUnitResponse, type DisposeRequest as IDisposeRequest, type DisposeResponse as IDisposeResponse, type WorkbookCreateMeta as IWorkbookCreateMeta, } from './ts/v1/apply';
9
+ export { type ApplyRequest as IApplyRequest, type ApplyResponse as IApplyResponse, type CreateUnitRequest as ICreateUnitRequest, type CreateUnitResponse as ICreateUnitResponse, type DisposeRequest as IDisposeRequest, type DisposeResponse as IDisposeResponse, type WorkbookCreateMeta as IWorkbookCreateMeta, type EnsureSnapshotRequest as IEnsureSnapshotRequest, type EnsureSnapshotResponse as IEnsureSnapshotResponse, } from './ts/v1/apply';
10
10
  export { CmdRspCode, CombCmd, type CombInfoResponse as ICombInfoResponse, type CombJoinInfo as ICombJoinInfo, type CombJoinRequest as ICombJoinRequest, type CombJoinResponse as ICombJoinResponse, type CombJoinResponse_RoomInfo as ICombJoinResponseRoomInfo, type CombJoinResponse_RoomInfosEntry as ICombJoinResponseRoomInfosEntry, type CombLeaveRequest as ICombLeaveRequest, type CombService as ICombService, type ConnectResponse as IConnectResponse, type Member as IMember, type NewChangesRequest as INewChangesRequest, type NewChangesResponse as INewChangesResponse, } from './ts/v1/comb';
11
11
  export { type FetchMissingChangesetsRequest as IFetchMissingChangesetsRequest, type FetchMissingChangesetsResponse as IFetchMissingChangesetsResponse, type GetResourcesRequest as IGetResourcesRequest, type GetResourcesResponse as IGetResourcesResponse, type GetSheetBlockRequest as IGetSheetBlockRequest, type GetSheetBlockResponse as IGetSheetBlockResponse, type GetSnapshotRequest as IGetSnapshotRequest, type GetSnapshotResponse as IGetSnapshotResponse, type GetUnitOnRevRequest as IGetUnitOnRevRequest, type GetUnitOnRevResponse as IGetUnitOnRevResponse, type SaveChangesetRequest as ISaveChangesetRequest, type SaveChangesetResponse as ISaveChangesetResponse, type SaveSheetBlockRequest as ISaveSheetBlockRequest, type SaveSheetBlockResponse as ISaveSheetBlockResponse, type SaveSnapshotRequest as ISaveSnapshotRequest, type SaveSnapshotResponse as ISaveSnapshotResponse, type SnapshotService as ISnapshotService, } from './ts/v1/snapshot';
12
- export { type TransformRequest as ITransformRequest, type TransformResponse as ITransformResponse, type TransformService as ITransformService, type EnsureSnapshotRequest as IEnsureSnapshotRequest, type EnsureSnapshotResponse as IEnsureSnapshotResponse, type GenerateSnapshotService as IGenerateSnapshotService, } from './ts/v1/transform';
13
12
  export { type CollaMsg as ICollaMsg, type CollaMsgJoin as ICollaMsgJoin, type CollaMsgLeave as ICollaMsgLeave, type UpdateCursor as IUpdateCursor, type LiveShareRequestHost as ILiveShareRequestHost, type LiveShareNewHost as ILiveShareNewHost, type LiveShareOperation as ILiveShareOperation, type LiveShareOperation_Operation as ILiveShareOperation_Operation, type LiveShareOperation_OperationsEntry as ILiveShareOperation_OperationsEntry, type LiveShareTerminate as ILiveShareTerminate, type CollaMsgErrorEvent as ICollaMsgErrorEvent, } from './ts/univer/colla_msg';
14
13
  export { type FileService as IFileService, type FileUploadMeta as IuploadFileRequestMeta, type FileUploadRequest as IFileUploadRequest, type UploadResponse as IUploadResponse, } from './ts/v1/file';
@@ -3,6 +3,7 @@ import { Observable } from "rxjs";
3
3
  import type { Changeset } from "../univer/changeset";
4
4
  import type { Error } from "../univer/constants/errors";
5
5
  import type { UniverType } from "../univer/constants/univer";
6
+ import type { Snapshot } from "../univer/snapshot";
6
7
  import type { CustomCellTemplate } from "../univer/unit_template";
7
8
  export declare const protobufPackage = "univerpro.v1";
8
9
  /** The meta required to create a new unit. */
@@ -52,6 +53,15 @@ export interface DisposeRequest {
52
53
  export interface DisposeResponse {
53
54
  error: Error | undefined;
54
55
  }
56
+ export interface EnsureSnapshotRequest {
57
+ unitID: string;
58
+ type: UniverType;
59
+ revision: number;
60
+ }
61
+ export interface EnsureSnapshotResponse {
62
+ error: Error | undefined;
63
+ snapshot: Snapshot | undefined;
64
+ }
55
65
  /**
56
66
  * This service is used to apply changesets to a document.
57
67
  * It is implements in Node.js. See `univer-pro/apps/univer-collaboration-server`.
@@ -69,4 +79,10 @@ export interface ApplyService {
69
79
  * Should be called when the last collaboration member leaves the room.
70
80
  */
71
81
  Dispose(request: DisposeRequest, metadata?: Metadata): Observable<DisposeResponse>;
82
+ /**
83
+ * Ensure the snapshot at a given number would be saved to the snapshot service.
84
+ * Normally used for exporting because the server written in Go
85
+ * cannot apply changesets.
86
+ */
87
+ EnsureSnapshot(request: EnsureSnapshotRequest, metadata?: Metadata): Observable<EnsureSnapshotResponse>;
72
88
  }
@@ -67,9 +67,7 @@ export interface Data_Temporal {
67
67
  workerTaskQueue: string;
68
68
  }
69
69
  export interface Service {
70
- transform: Service_RpcService | undefined;
71
70
  apply: Service_RpcService | undefined;
72
- nodeSnapshot: Service_RpcService | undefined;
73
71
  }
74
72
  export interface Service_RpcService {
75
73
  addr: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/protocol",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "private": false,
5
5
  "description": "A protocol of Univer repos",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -1,38 +0,0 @@
1
- import { Metadata } from "@grpc/grpc-js";
2
- import { Observable } from "rxjs";
3
- import type { Changeset } from "../univer/changeset";
4
- import type { Error } from "../univer/constants/errors";
5
- import type { UniverType } from "../univer/constants/univer";
6
- import type { Snapshot } from "../univer/snapshot";
7
- export declare const protobufPackage = "univerpro.v1";
8
- export interface TransformRequest {
9
- /** the */
10
- unitID: string;
11
- type: UniverType;
12
- concurrent: Changeset[];
13
- changeset: Changeset | undefined;
14
- }
15
- export interface TransformResponse {
16
- error: Error | undefined;
17
- changeset: Changeset | undefined;
18
- }
19
- export interface EnsureSnapshotRequest {
20
- unitID: string;
21
- type: UniverType;
22
- revision: number;
23
- }
24
- export interface EnsureSnapshotResponse {
25
- error: Error | undefined;
26
- snapshot: Snapshot | undefined;
27
- }
28
- export interface TransformService {
29
- Transform(request: TransformRequest, metadata?: Metadata): Observable<TransformResponse>;
30
- }
31
- export interface GenerateSnapshotService {
32
- /**
33
- * Ensure the snapshot at a given number would be saved to the snapshot service.
34
- * Normally used for exporting because the server written in Go
35
- * cannot apply changesets.
36
- */
37
- EnsureSnapshot(request: EnsureSnapshotRequest, metadata?: Metadata): Observable<EnsureSnapshotResponse>;
38
- }