@univerjs/protocol 0.24.0 → 0.25.0-insiders.20260604-29ebbff
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 +5 -4
- package/lib/types/ts/univer/colla-msg.d.ts +1 -0
- package/lib/types/ts/univer/slide.d.ts +25 -0
- package/lib/types/ts/univer/snapshot.d.ts +2 -0
- package/lib/types/ts/universer/v1/comb.d.ts +1 -0
- package/lib/types/ts/universer/v1/snapshot.d.ts +27 -0
- package/lib/types/ts/universer/v1/user.d.ts +7 -0
- package/package.json +3 -3
package/lib/types/index.d.ts
CHANGED
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
export type { IDeserializedSheetBlock, IGetDeserializedSheetBlockResponse, } from './other/sheet-block';
|
|
17
17
|
export type { IChangeset, ICommand, IMutation, } from './ts/univer/changeset';
|
|
18
18
|
export { CommentSolvedStatus, CommentUpdateEventType, type ICollaMsg, type ICollaMsgErrorEvent, type ICollaMsgJoin, type ICollaMsgLeave, type ICommentUpdate, type ILiveShareNewHost, type ILiveShareOperation, type ILiveShareOperationOperation, type ILiveShareRequestHost, type ILiveShareTerminate, type IShouldCloseConn, type IUniscriptRun, type IUpdateCursor, type IUpdatePermissionObj, } from './ts/univer/colla-msg';
|
|
19
|
-
export { ErrorCode, type IError
|
|
19
|
+
export { ErrorCode, type IError } from './ts/univer/constants/errors';
|
|
20
20
|
export { UniverType } from './ts/univer/constants/univer';
|
|
21
21
|
export type { IDocumentMeta } from './ts/univer/doc';
|
|
22
22
|
export { CellType, type IInitialSheet, type IRow, type IRowCell, } from './ts/univer/initial-sheet';
|
|
23
|
-
export type { IUnitRoleKV
|
|
23
|
+
export type { IUnitRoleKV } from './ts/univer/permission';
|
|
24
24
|
export { ObjectScope, UnitAction, UnitObject, UnitRole, } from './ts/univer/permission';
|
|
25
25
|
export type { IRange } from './ts/univer/range';
|
|
26
|
+
export type { ISlideMeta } from './ts/univer/slide';
|
|
26
27
|
export type { ISnapshot, ITableInfo, } from './ts/univer/snapshot';
|
|
27
28
|
export { CellValueType, type ICellData, type ISheetBlock, type ISheetBlockMeta, type IWorkbookMeta, type IWorksheetMeta, } from './ts/univer/workbook';
|
|
28
29
|
export type { IRecord, } from './ts/univercloud/stats/v1/stats';
|
|
@@ -38,6 +39,6 @@ export type { IAddCommentRequest, IAddCommentResponse, IDeleteCommentRequest, ID
|
|
|
38
39
|
export { FileSource, type IFileService, type IFileUploadRequest, } from './ts/universer/v1/file';
|
|
39
40
|
export type { ICreateHistoryRequest, ICreateHistoryResponse, IGetHistoryCsRequest, IGetHistoryCsResponse, IHistoryService, } from './ts/universer/v1/history';
|
|
40
41
|
export type { IGetUserLicenseResponse, ILicenseService, } from './ts/universer/v1/license';
|
|
41
|
-
export { type ICopyFileMetaRequest, type ICopyFileMetaResponse, type IFetchMissingChangesetsRequest, type IFetchMissingChangesetsResponse, type IGetLatestCsReqIdBySidRequest, type IGetLatestCsReqIdBySidResponse, type IGetResourcesRequest, type IGetResourcesResponse, type IGetSheetBlockRequest, type IGetSheetBlockResponse, type IGetUnitOnRevRequest, type IGetUnitOnRevResponse, type IReportUnitRoutingStatsRequest, type IReportUnitRoutingStatsResponse, type ISaveChangesetRequest, type ISaveChangesetResponse, type ISaveSheetBlockRequest, type ISaveSheetBlockResponse, type ISaveSnapshotRequest, type ISaveSnapshotResponse, type ISnapshotService, } from './ts/universer/v1/snapshot';
|
|
42
|
-
export type { IGetSessionTicketResponse, IGetUserResponse, IListUsersResponse, IUser, } from './ts/universer/v1/user';
|
|
42
|
+
export { type ICopyFileMetaRequest, type ICopyFileMetaResponse, type IFetchMissingChangesetsRequest, type IFetchMissingChangesetsResponse, type IGetLatestCsReqIdBySidRequest, type IGetLatestCsReqIdBySidResponse, type IGetResourcesRequest, type IGetResourcesResponse, type IGetSheetBlockRequest, type IGetSheetBlockResponse, type IGetUnitOnRevRequest, type IGetUnitOnRevResponse, type IMGetChangesetsByRevisionRequest, type IMGetChangesetsByRevisionResponse, type IMGetUnitMetaRequest, type IMGetUnitMetaResponse, type IReportUnitRoutingStatsRequest, type IReportUnitRoutingStatsResponse, type ISaveChangesetRequest, type ISaveChangesetResponse, type ISaveSheetBlockRequest, type ISaveSheetBlockResponse, type ISaveSnapshotRequest, type ISaveSnapshotResponse, type ISnapshotService, type IUnitMeta, } from './ts/universer/v1/snapshot';
|
|
43
|
+
export type { IGetSessionTicketResponse, IGetUserResponse, IListUsersResponse, IMigrateRequest, IMigrateResponse, IUser, } from './ts/universer/v1/user';
|
|
43
44
|
export { isError } from './utils';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IResource } from './resource';
|
|
17
|
+
export interface ISlideMeta {
|
|
18
|
+
unitID: string;
|
|
19
|
+
rev: number;
|
|
20
|
+
creator: string;
|
|
21
|
+
name: string;
|
|
22
|
+
resources: IResource[];
|
|
23
|
+
/** The original meta data in JSON format. */
|
|
24
|
+
originalMeta: Uint8Array;
|
|
25
|
+
}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { UniverType } from './constants/univer';
|
|
17
17
|
import type { IDocumentMeta } from './doc';
|
|
18
|
+
import type { ISlideMeta } from './slide';
|
|
18
19
|
import type { IWorkbookMeta } from './workbook';
|
|
19
20
|
export interface ISnapshot {
|
|
20
21
|
/** unitID of the Univer document */
|
|
@@ -23,6 +24,7 @@ export interface ISnapshot {
|
|
|
23
24
|
rev: number;
|
|
24
25
|
workbook: IWorkbookMeta | undefined;
|
|
25
26
|
doc: IDocumentMeta | undefined;
|
|
27
|
+
slide: ISlideMeta | undefined;
|
|
26
28
|
}
|
|
27
29
|
export interface ITableInfo {
|
|
28
30
|
/** json:ITableInfo */
|
|
@@ -53,6 +53,23 @@ interface IGetUnitMetaResponse {
|
|
|
53
53
|
createTime: string;
|
|
54
54
|
updateTime: string;
|
|
55
55
|
}
|
|
56
|
+
export interface IMGetUnitMetaRequest {
|
|
57
|
+
unitIds: string[];
|
|
58
|
+
}
|
|
59
|
+
export interface IMGetUnitMetaResponse {
|
|
60
|
+
error: IError | undefined;
|
|
61
|
+
metas: {
|
|
62
|
+
[key: string]: IUnitMeta;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface IUnitMeta {
|
|
66
|
+
unitId: string;
|
|
67
|
+
name: string;
|
|
68
|
+
creator: string;
|
|
69
|
+
type: UniverType;
|
|
70
|
+
createTime: string;
|
|
71
|
+
updateTime: string;
|
|
72
|
+
}
|
|
56
73
|
interface IGetSheetTableInfoRequest {
|
|
57
74
|
unitID: string;
|
|
58
75
|
type: UniverType;
|
|
@@ -172,6 +189,14 @@ export interface IFetchMissingChangesetsResponse {
|
|
|
172
189
|
changesets: IChangeset[];
|
|
173
190
|
latestRevision?: number | undefined;
|
|
174
191
|
}
|
|
192
|
+
export interface IMGetChangesetsByRevisionRequest {
|
|
193
|
+
unitId: string;
|
|
194
|
+
revisions: number[];
|
|
195
|
+
}
|
|
196
|
+
export interface IMGetChangesetsByRevisionResponse {
|
|
197
|
+
error: IError | undefined;
|
|
198
|
+
changesets: IChangeset[];
|
|
199
|
+
}
|
|
175
200
|
export interface ISaveSnapshotRequest {
|
|
176
201
|
unitID: string;
|
|
177
202
|
type: UniverType;
|
|
@@ -309,5 +334,7 @@ export interface ISnapshotService {
|
|
|
309
334
|
/** Get formula calculation results */
|
|
310
335
|
GetSnapshotMetaWithPreCalculated(request: IGetSnapshotMetaWithPreCalculatedRequest, metadata?: Metadata): Observable<IGetSnapshotMetaWithPreCalculatedResponse>;
|
|
311
336
|
ReportUnitRoutingStats(request: IReportUnitRoutingStatsRequest, metadata?: Metadata): Observable<IReportUnitRoutingStatsResponse>;
|
|
337
|
+
MGetChangesetsByRevision(request: IMGetChangesetsByRevisionRequest, metadata?: Metadata): Observable<IMGetChangesetsByRevisionResponse>;
|
|
338
|
+
MGetUnitMeta(request: IMGetUnitMetaRequest, metadata?: Metadata): Observable<IMGetUnitMetaResponse>;
|
|
312
339
|
}
|
|
313
340
|
export {};
|
|
@@ -42,4 +42,11 @@ export interface IGetSessionTicketResponse {
|
|
|
42
42
|
error: IError | undefined;
|
|
43
43
|
ticket: string;
|
|
44
44
|
}
|
|
45
|
+
export interface IMigrateRequest {
|
|
46
|
+
fromUserId: string;
|
|
47
|
+
toUserId: string;
|
|
48
|
+
}
|
|
49
|
+
export interface IMigrateResponse {
|
|
50
|
+
error: IError | undefined;
|
|
51
|
+
}
|
|
45
52
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/protocol",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0-insiders.20260604-29ebbff",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared protocol types, generated service interfaces, and data contracts for Univer.",
|
|
6
6
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"rxjs": "^7.8.2",
|
|
56
56
|
"typescript": "^6.0.3",
|
|
57
|
-
"vitest": "^4.1.
|
|
58
|
-
"@univerjs-infra/shared": "0.
|
|
57
|
+
"vitest": "^4.1.7",
|
|
58
|
+
"@univerjs-infra/shared": "0.25.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"test": "vitest run",
|