@univerjs/protocol 0.1.38-alpha.18 → 0.1.38-alpha.20
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/types/index.d.ts +1 -0
- package/lib/types/ts/v1/history.d.ts +57 -0
- package/package.json +2 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export { type InitialSheet as IInitialSheet, type Row as IRow, type RowCell as I
|
|
|
21
21
|
export type { UrlContext as IUrlContext, UrlRowContext as IUrlRowContext, RangeCompletionRequest as IRangeCompletionRequest, RangeCompletionResponse as IRangeCompletionResponse, YuumiService as IYuumiService, } from './ts/yuumi/v1/yuumi';
|
|
22
22
|
export type { SSRService as ISSRService, GetSSRRequest as IGetSSRRequest, GetSSRResponse as IGetSSRResponse, } from './ts/v1/ssr';
|
|
23
23
|
export type { AddCommentRequest, AddCommentResponse, DeleteCommentRequest, DeleteCommentResponse, ListCommentsRequest, ListCommentsResponse, Reply, ReplyCommentRequest, ReplyCommentResponse, Thread, EditCommentRequest, EditCommentResponse, SolvedCommentRequest, SolvedCommentResponse, } from './ts/v1/comment';
|
|
24
|
+
export type { CreateHistoryRequest as ICreateHistoryRequest, CreateHistoryResponse as ICreateHistoryResponse, History as IHistory, HistoryListRequest as IHistoryListRequest, HistoryEntities as IHistoryEntities, HistoryService as IHistoryService, } from './ts/v1/history';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Metadata } from '@grpc/grpc-js';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Error } from '../univer/constants/errors';
|
|
4
|
+
import { UniverType } from '../univer/constants/univer';
|
|
5
|
+
import { User } from '../univer/permission';
|
|
6
|
+
|
|
7
|
+
export declare const protobufPackage = "universer.v1";
|
|
8
|
+
export interface CreateHistoryRequest {
|
|
9
|
+
unitId: string;
|
|
10
|
+
subUnitId: string;
|
|
11
|
+
type: UniverType;
|
|
12
|
+
revision: number;
|
|
13
|
+
}
|
|
14
|
+
export interface CreateHistoryResponse {
|
|
15
|
+
error: Error | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface History {
|
|
18
|
+
userId: string;
|
|
19
|
+
unitId: string;
|
|
20
|
+
command: string[];
|
|
21
|
+
createTime: string;
|
|
22
|
+
recoverTime: string;
|
|
23
|
+
startRevision: number;
|
|
24
|
+
endRevision: number;
|
|
25
|
+
}
|
|
26
|
+
export interface HistoryListRequest {
|
|
27
|
+
length: number;
|
|
28
|
+
lastLabel: string;
|
|
29
|
+
unitId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface HistoryEntities {
|
|
32
|
+
datas: {
|
|
33
|
+
[key: string]: History;
|
|
34
|
+
};
|
|
35
|
+
users: {
|
|
36
|
+
[key: string]: User;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface HistoryEntities_DatasEntry {
|
|
40
|
+
key: string;
|
|
41
|
+
value: History | undefined;
|
|
42
|
+
}
|
|
43
|
+
export interface HistoryEntities_UsersEntry {
|
|
44
|
+
key: string;
|
|
45
|
+
value: User | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface HistoryListResponse {
|
|
48
|
+
error: Error | undefined;
|
|
49
|
+
hasMore: boolean;
|
|
50
|
+
lastLabel: string;
|
|
51
|
+
entities: HistoryEntities | undefined;
|
|
52
|
+
historyIds: string[];
|
|
53
|
+
}
|
|
54
|
+
export interface HistoryService {
|
|
55
|
+
GetHistoryList(request: HistoryListRequest, metadata?: Metadata): Observable<HistoryListResponse>;
|
|
56
|
+
CreateHistory(request: CreateHistoryRequest, metadata?: Metadata): Observable<CreateHistoryResponse>;
|
|
57
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/protocol",
|
|
3
|
-
"version": "0.1.38-alpha.
|
|
3
|
+
"version": "0.1.38-alpha.20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A protocol of Univer repos",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"rxjs": ">=7.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"typescript": "^5.5.3",
|
|
41
42
|
"vite": "^5.3.3",
|
|
42
43
|
"vite-plugin-dts": "^3.9.1"
|
|
43
44
|
},
|