@univerjs/protocol 0.1.49 → 0.21.0-insiders.20260422-d7fcb4d
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/README.md +1 -3
- package/lib/cjs/index.js +463 -1
- package/lib/es/index.js +446 -36
- package/lib/index.js +447 -0
- package/lib/types/index.d.ts +41 -38
- package/lib/types/other/sheet-block.d.ts +27 -0
- package/lib/types/ts/univer/changeset.d.ts +20 -6
- package/lib/types/ts/univer/colla-msg.d.ts +176 -0
- package/lib/types/ts/univer/constants/errors.d.ts +33 -19
- package/lib/types/ts/univer/constants/univer.d.ts +15 -1
- package/lib/types/ts/univer/doc.d.ts +18 -4
- package/lib/types/ts/univer/drawing.d.ts +16 -2
- package/lib/types/ts/univer/initial-sheet.d.ts +46 -0
- package/lib/types/ts/univer/permission.d.ts +19 -5
- package/lib/types/ts/univer/range.d.ts +16 -2
- package/lib/types/ts/univer/resource.d.ts +16 -2
- package/lib/types/ts/univer/snapshot.d.ts +23 -9
- package/lib/types/ts/univer/unit-template.d.ts +23 -0
- package/lib/types/ts/univer/univer-file.d.ts +27 -0
- package/lib/types/ts/univer/workbook.d.ts +30 -53
- package/lib/types/ts/univercloud/stats/v1/stats.d.ts +34 -0
- package/lib/types/ts/univerpro/v1/apply.d.ts +129 -0
- package/lib/types/ts/univerpro/v1/helper.d.ts +36 -0
- package/lib/types/ts/univerpro/v1/ssc.d.ts +72 -0
- package/lib/types/ts/univerpro/v1/ssr.d.ts +28 -0
- package/lib/types/ts/universer/v1/access-key.d.ts +51 -0
- package/lib/types/ts/universer/v1/authz.d.ts +102 -87
- package/lib/types/ts/universer/v1/comb.d.ts +40 -61
- package/lib/types/ts/universer/v1/comment.d.ts +45 -49
- package/lib/types/ts/universer/v1/file.d.ts +57 -42
- package/lib/types/ts/universer/v1/history.d.ts +52 -49
- package/lib/types/ts/universer/v1/license.d.ts +54 -39
- package/lib/types/ts/universer/v1/snapshot.d.ts +146 -143
- package/lib/types/ts/universer/v1/user.d.ts +28 -275
- package/lib/types/utils.d.ts +17 -2
- package/lib/umd/index.js +1 -1
- package/package.json +33 -11
- package/lib/types/ts/univer/colla_msg.d.ts +0 -178
- package/lib/types/ts/univer/constants/biz.d.ts +0 -17
- package/lib/types/ts/univer/event_sync.d.ts +0 -10
- package/lib/types/ts/univer/initial_sheet.d.ts +0 -31
- package/lib/types/ts/univer/unit_template.d.ts +0 -9
- package/lib/types/ts/univer/univer_file.d.ts +0 -33
- package/lib/types/ts/universer/v1/access_key.d.ts +0 -36
- package/lib/types/ts/universer/v1/access_key_logs.d.ts +0 -43
- package/lib/types/ts/universer/v1/activity.d.ts +0 -22
- package/lib/types/ts/universer/v1/analyse_cmn.d.ts +0 -27
- package/lib/types/ts/universer/v1/analyse_data_source.d.ts +0 -86
- package/lib/types/ts/universer/v1/analyse_task.d.ts +0 -232
- package/lib/types/ts/universer/v1/clipsheet_task.d.ts +0 -72
- package/lib/types/ts/universer/v1/conf.d.ts +0 -570
- package/lib/types/ts/universer/v1/connector.d.ts +0 -74
- package/lib/types/ts/universer/v1/conversation.d.ts +0 -578
- package/lib/types/ts/universer/v1/email.d.ts +0 -28
- package/lib/types/ts/universer/v1/entitlement.d.ts +0 -663
- package/lib/types/ts/universer/v1/exchange.d.ts +0 -101
- package/lib/types/ts/universer/v1/feedback.d.ts +0 -71
- package/lib/types/ts/universer/v1/frontend_logs.d.ts +0 -36
- package/lib/types/ts/universer/v1/go_config_center.d.ts +0 -91
- package/lib/types/ts/universer/v1/inbox.d.ts +0 -59
- package/lib/types/ts/universer/v1/invite_code.d.ts +0 -47
- package/lib/types/ts/universer/v1/license_manage.d.ts +0 -157
- package/lib/types/ts/universer/v1/oauth2.d.ts +0 -24
- package/lib/types/ts/universer/v1/oidc.d.ts +0 -167
- package/lib/types/ts/universer/v1/redemption_code.d.ts +0 -32
- package/lib/types/ts/universer/v1/referral.d.ts +0 -55
- package/lib/types/ts/universer/v1/scraper.d.ts +0 -144
- package/lib/types/ts/universer/v1/source_connector/api.d.ts +0 -110
- package/lib/types/ts/universer/v1/source_connector/conf.d.ts +0 -29
- package/lib/types/ts/universer/v1/source_connector/displayer.d.ts +0 -16
- package/lib/types/ts/universer/v1/source_connector/source.d.ts +0 -46
- package/lib/types/ts/universer/v1/source_connector/stream_view.d.ts +0 -31
- package/lib/types/ts/universer/v1/survey.d.ts +0 -25
- package/lib/types/ts/universer/v1/template.d.ts +0 -48
- package/lib/types/ts/universer/v1/toolkit.d.ts +0 -23
- package/lib/types/ts/universer/v1/trigger.d.ts +0 -102
- package/lib/types/ts/universer/v1/uniscript.d.ts +0 -104
- package/lib/types/ts/universer/v1/uniscript_logs.d.ts +0 -157
- package/lib/types/ts/universer/v1/univer_go_template.d.ts +0 -65
- package/lib/types/ts/universer/v1/user_event.d.ts +0 -23
- package/lib/types/ts/universer/v1/user_settings.d.ts +0 -22
- package/lib/types/ts/universer/v1/usip.d.ts +0 -62
- package/lib/types/ts/universer/v1/video_task.d.ts +0 -196
- package/lib/types/ts/universer/v1/workspace.d.ts +0 -273
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 { Metadata } from '@grpc/grpc-js';
|
|
17
|
+
import type { Observable } from 'rxjs';
|
|
18
|
+
import type { IError } from '../../univer/constants/errors';
|
|
19
|
+
import type { IUnitPermissionStrategy, IUnitRoleKV, IUser, ObjectScope, UnitAction, UnitObject, UnitRole, UnitShareScope } from '../../univer/permission';
|
|
20
|
+
export interface ICollaborator {
|
|
7
21
|
id: string;
|
|
8
22
|
role: UnitRole;
|
|
9
|
-
subject:
|
|
23
|
+
subject: IUser | undefined;
|
|
10
24
|
}
|
|
11
|
-
|
|
25
|
+
interface IObjScope {
|
|
12
26
|
edit: ObjectScope;
|
|
13
27
|
read: ObjectScope;
|
|
14
28
|
}
|
|
15
|
-
export interface
|
|
29
|
+
export interface IPermissionPoint {
|
|
16
30
|
objectID: string;
|
|
17
31
|
unitID: string;
|
|
18
32
|
objectType: UnitObject;
|
|
@@ -20,169 +34,170 @@ export interface PermissionPoint {
|
|
|
20
34
|
/** @deprecated */
|
|
21
35
|
shareOn: boolean;
|
|
22
36
|
shareRole: UnitRole;
|
|
23
|
-
creator:
|
|
24
|
-
strategies:
|
|
25
|
-
actions:
|
|
37
|
+
creator: IUser | undefined;
|
|
38
|
+
strategies: IUnitPermissionStrategy[];
|
|
39
|
+
actions: IActionInfo[];
|
|
26
40
|
shareScope: UnitShareScope;
|
|
27
|
-
scope:
|
|
41
|
+
scope: IObjScope | undefined;
|
|
28
42
|
}
|
|
29
|
-
export interface
|
|
43
|
+
export interface ICreateRequest {
|
|
30
44
|
objectType: UnitObject;
|
|
31
|
-
selectRangeObject?:
|
|
32
|
-
worksheetObject?:
|
|
45
|
+
selectRangeObject?: ICreateRequestSelectRangeObject | undefined;
|
|
46
|
+
worksheetObject?: ICreateRequestWorksheetObject | undefined;
|
|
33
47
|
}
|
|
34
|
-
export interface
|
|
35
|
-
collaborators:
|
|
48
|
+
export interface ICreateRequestSelectRangeObject {
|
|
49
|
+
collaborators: ICollaborator[];
|
|
36
50
|
unitID: string;
|
|
37
51
|
name: string;
|
|
38
|
-
scope:
|
|
52
|
+
scope: IObjScope | undefined;
|
|
39
53
|
}
|
|
40
|
-
|
|
41
|
-
collaborators:
|
|
54
|
+
interface ICreateRequestWorksheetObject {
|
|
55
|
+
collaborators: ICollaborator[];
|
|
42
56
|
unitID: string;
|
|
43
57
|
name: string;
|
|
44
|
-
strategies:
|
|
45
|
-
scope:
|
|
58
|
+
strategies: IUnitPermissionStrategy[];
|
|
59
|
+
scope: IObjScope | undefined;
|
|
46
60
|
}
|
|
47
|
-
export interface
|
|
48
|
-
error:
|
|
61
|
+
export interface ICreateResponse {
|
|
62
|
+
error: IError | undefined;
|
|
49
63
|
objectID: string;
|
|
50
64
|
}
|
|
51
|
-
export interface
|
|
65
|
+
export interface IUpdatePermPointRequest {
|
|
52
66
|
objectType: UnitObject;
|
|
53
67
|
objectID: string;
|
|
54
68
|
unitID: string;
|
|
55
|
-
share:
|
|
69
|
+
share: IUpdatePermPointRequestShare | undefined;
|
|
56
70
|
name: string;
|
|
57
|
-
strategies:
|
|
58
|
-
scope:
|
|
59
|
-
collaborators:
|
|
71
|
+
strategies: IUnitPermissionStrategy[];
|
|
72
|
+
scope: IObjScope | undefined;
|
|
73
|
+
collaborators: IUpdatePermPointRequestCollaborators | undefined;
|
|
60
74
|
}
|
|
61
|
-
|
|
75
|
+
interface IUpdatePermPointRequestShare {
|
|
62
76
|
/** @deprecated */
|
|
63
77
|
on: boolean;
|
|
64
78
|
role: UnitRole;
|
|
65
79
|
scope: UnitShareScope;
|
|
66
80
|
}
|
|
67
|
-
|
|
68
|
-
collaborators:
|
|
81
|
+
interface IUpdatePermPointRequestCollaborators {
|
|
82
|
+
collaborators: ICollaborator[];
|
|
69
83
|
}
|
|
70
|
-
|
|
71
|
-
error:
|
|
84
|
+
interface IUpdatePermPointResponse {
|
|
85
|
+
error: IError | undefined;
|
|
72
86
|
}
|
|
73
|
-
export interface
|
|
87
|
+
export interface IListPermPointRequest {
|
|
74
88
|
unitID: string;
|
|
75
89
|
objectIDs: string[];
|
|
76
90
|
actions: UnitAction[];
|
|
77
91
|
}
|
|
78
|
-
export interface
|
|
79
|
-
error:
|
|
80
|
-
objects:
|
|
92
|
+
export interface IListPermPointResponse {
|
|
93
|
+
error: IError | undefined;
|
|
94
|
+
objects: IPermissionPoint[];
|
|
81
95
|
}
|
|
82
|
-
export interface
|
|
96
|
+
export interface ICreateCollaboratorRequest {
|
|
83
97
|
objectID: string;
|
|
84
98
|
unitID: string;
|
|
85
|
-
collaborators:
|
|
99
|
+
collaborators: ICollaborator[];
|
|
86
100
|
}
|
|
87
|
-
|
|
88
|
-
error:
|
|
101
|
+
interface ICreateCollaboratorResponse {
|
|
102
|
+
error: IError | undefined;
|
|
89
103
|
}
|
|
90
|
-
export interface
|
|
104
|
+
export interface IUpdateCollaboratorRequest {
|
|
91
105
|
objectID: string;
|
|
92
106
|
unitID: string;
|
|
93
|
-
collaborator:
|
|
107
|
+
collaborator: ICollaborator | undefined;
|
|
94
108
|
}
|
|
95
|
-
export interface
|
|
96
|
-
error:
|
|
109
|
+
export interface IUpdateCollaboratorResponse {
|
|
110
|
+
error: IError | undefined;
|
|
97
111
|
}
|
|
98
|
-
export interface
|
|
112
|
+
export interface IDeleteCollaboratorRequest {
|
|
99
113
|
objectID: string;
|
|
100
114
|
unitID: string;
|
|
101
115
|
collaboratorID: string;
|
|
102
116
|
}
|
|
103
|
-
export interface
|
|
104
|
-
error:
|
|
117
|
+
export interface IDeleteCollaboratorResponse {
|
|
118
|
+
error: IError | undefined;
|
|
105
119
|
}
|
|
106
|
-
export interface
|
|
120
|
+
export interface IListCollaboratorRequest {
|
|
107
121
|
objectID: string;
|
|
108
122
|
unitID: string;
|
|
109
123
|
}
|
|
110
|
-
export interface
|
|
111
|
-
error:
|
|
112
|
-
collaborators:
|
|
124
|
+
export interface IListCollaboratorResponse {
|
|
125
|
+
error: IError | undefined;
|
|
126
|
+
collaborators: ICollaborator[];
|
|
113
127
|
cfgEnableObjInherit: boolean;
|
|
114
128
|
}
|
|
115
|
-
export interface
|
|
129
|
+
export interface IPutCollaboratorsRequest {
|
|
116
130
|
objectID: string;
|
|
117
131
|
unitID: string;
|
|
118
|
-
collaborators:
|
|
132
|
+
collaborators: ICollaborator[];
|
|
119
133
|
}
|
|
120
|
-
export interface
|
|
121
|
-
error:
|
|
134
|
+
export interface IPutCollaboratorsResponse {
|
|
135
|
+
error: IError | undefined;
|
|
122
136
|
}
|
|
123
|
-
export interface
|
|
137
|
+
export interface IAllowedRequest {
|
|
124
138
|
objectID: string;
|
|
125
139
|
objectType: UnitObject;
|
|
126
140
|
unitID: string;
|
|
127
141
|
actions: UnitAction[];
|
|
128
142
|
}
|
|
129
|
-
export interface
|
|
143
|
+
export interface IActionInfo {
|
|
130
144
|
action?: UnitAction | undefined;
|
|
131
145
|
allowed?: boolean | undefined;
|
|
132
146
|
}
|
|
133
|
-
export interface
|
|
134
|
-
error:
|
|
135
|
-
actions:
|
|
147
|
+
export interface IAllowedResponse {
|
|
148
|
+
error: IError | undefined;
|
|
149
|
+
actions: IActionInfo[];
|
|
136
150
|
}
|
|
137
|
-
|
|
138
|
-
requests:
|
|
151
|
+
interface IBatchAllowedRequest {
|
|
152
|
+
requests: IAllowedRequest[];
|
|
139
153
|
}
|
|
140
|
-
|
|
154
|
+
interface IObjectActionInfo {
|
|
141
155
|
unitID: string;
|
|
142
156
|
objectID: string;
|
|
143
|
-
actions:
|
|
157
|
+
actions: IActionInfo[];
|
|
144
158
|
}
|
|
145
|
-
export interface
|
|
146
|
-
error:
|
|
147
|
-
objectActions:
|
|
159
|
+
export interface IBatchAllowedResponse {
|
|
160
|
+
error: IError | undefined;
|
|
161
|
+
objectActions: IObjectActionInfo[];
|
|
148
162
|
}
|
|
149
|
-
export interface
|
|
163
|
+
export interface IListRolesRequest {
|
|
150
164
|
objectType: UnitObject;
|
|
151
165
|
}
|
|
152
|
-
export interface
|
|
153
|
-
error:
|
|
154
|
-
roles:
|
|
166
|
+
export interface IListRolesResponse {
|
|
167
|
+
error: IError | undefined;
|
|
168
|
+
roles: IUnitRoleKV[];
|
|
155
169
|
actions: UnitAction[];
|
|
156
|
-
defaultStrategies:
|
|
170
|
+
defaultStrategies: IUnitPermissionStrategy[];
|
|
157
171
|
}
|
|
158
|
-
export interface
|
|
172
|
+
export interface IAuthzService {
|
|
159
173
|
/** create a permission mount point for specified type of object */
|
|
160
|
-
Create(request:
|
|
174
|
+
Create(request: ICreateRequest, metadata?: Metadata): Observable<ICreateResponse>;
|
|
161
175
|
/**
|
|
162
176
|
* update a permission mount point
|
|
163
177
|
* selectrange and worksheet may not used if unit record the permission point in mutation by itself.
|
|
164
178
|
* workbook and document use it to set share mode.
|
|
165
179
|
*/
|
|
166
|
-
Update(request:
|
|
180
|
+
Update(request: IUpdatePermPointRequest, metadata?: Metadata): Observable<IUpdatePermPointResponse>;
|
|
167
181
|
/**
|
|
168
182
|
* list all permission mount points for unit
|
|
169
183
|
* it may not used if unit record the permission point in mutation by itself
|
|
170
184
|
*/
|
|
171
|
-
List(request:
|
|
185
|
+
List(request: IListPermPointRequest, metadata?: Metadata): Observable<IListPermPointResponse>;
|
|
172
186
|
/** request a couple of actions, return the allowed actions */
|
|
173
|
-
Allowed(request:
|
|
187
|
+
Allowed(request: IAllowedRequest, metadata?: Metadata): Observable<IAllowedResponse>;
|
|
174
188
|
/** barch check if the actions are allowed */
|
|
175
|
-
BatchAllowed(request:
|
|
189
|
+
BatchAllowed(request: IBatchAllowedRequest, metadata?: Metadata): Observable<IBatchAllowedResponse>;
|
|
176
190
|
/** list object roles for specified object */
|
|
177
|
-
ListRoles(request:
|
|
191
|
+
ListRoles(request: IListRolesRequest, metadata?: Metadata): Observable<IListRolesResponse>;
|
|
178
192
|
/** new collaborator for specified object */
|
|
179
|
-
CreateCollaborator(request:
|
|
193
|
+
CreateCollaborator(request: ICreateCollaboratorRequest, metadata?: Metadata): Observable<ICreateCollaboratorResponse>;
|
|
180
194
|
/** list all collaborators for specified object */
|
|
181
|
-
ListCollaborators(request:
|
|
195
|
+
ListCollaborators(request: IListCollaboratorRequest, metadata?: Metadata): Observable<IListCollaboratorResponse>;
|
|
182
196
|
/** update collaborator for specified object */
|
|
183
|
-
UpdateCollaborator(request:
|
|
197
|
+
UpdateCollaborator(request: IUpdateCollaboratorRequest, metadata?: Metadata): Observable<IUpdateCollaboratorResponse>;
|
|
184
198
|
/** delete collaborator for specified object */
|
|
185
|
-
DeleteCollaborator(request:
|
|
199
|
+
DeleteCollaborator(request: IDeleteCollaboratorRequest, metadata?: Metadata): Observable<IDeleteCollaboratorResponse>;
|
|
186
200
|
/** put collaborators for specified object */
|
|
187
|
-
PutCollaborators(request:
|
|
201
|
+
PutCollaborators(request: IPutCollaboratorsRequest, metadata?: Metadata): Observable<IPutCollaboratorsResponse>;
|
|
188
202
|
}
|
|
203
|
+
export {};
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 { Metadata } from '@grpc/grpc-js';
|
|
17
|
+
import type { Observable } from 'rxjs';
|
|
18
|
+
import type { IChangeset } from '../../univer/changeset';
|
|
19
|
+
import type { IError } from '../../univer/constants/errors';
|
|
20
|
+
import type { UniverType } from '../../univer/constants/univer';
|
|
21
|
+
interface IEmpty {
|
|
22
|
+
}
|
|
9
23
|
/** more details: https://c3fgartrp2.feishu.cn/docx/OS47dk8BCo1ZeKxXiNvcDLuZn2g#PymGdupuyoYfvTxv1EBciV7in9b */
|
|
10
24
|
export declare enum CombCmd {
|
|
11
25
|
/** UNKNOWN_CMD - unknown cmd */
|
|
@@ -44,83 +58,48 @@ export declare enum CmdRspCode {
|
|
|
44
58
|
GLOBAL_ROOMS_CNT_EXCEEDS = 1004,
|
|
45
59
|
UNRECOGNIZED = -1
|
|
46
60
|
}
|
|
47
|
-
|
|
48
|
-
error: Error | undefined;
|
|
49
|
-
memberID: string;
|
|
50
|
-
}
|
|
51
|
-
export interface BroadcastRequest {
|
|
61
|
+
interface IBroadcastRequest {
|
|
52
62
|
roomID: string;
|
|
53
63
|
message: string;
|
|
54
64
|
}
|
|
55
|
-
export interface
|
|
65
|
+
export interface INewChangesRequest {
|
|
56
66
|
unitID: string;
|
|
57
67
|
memberID: string;
|
|
58
68
|
type: UniverType;
|
|
59
|
-
changeset:
|
|
69
|
+
changeset: IChangeset | undefined;
|
|
60
70
|
}
|
|
61
|
-
export interface
|
|
62
|
-
error:
|
|
71
|
+
export interface INewChangesResponse {
|
|
72
|
+
error: IError | undefined;
|
|
63
73
|
}
|
|
64
|
-
|
|
65
|
-
cmd: CombCmd;
|
|
66
|
-
/** route key is used to route the message to the right room */
|
|
67
|
-
routeKey: string;
|
|
68
|
-
code: CmdRspCode;
|
|
69
|
-
reason: string;
|
|
70
|
-
traceID: string;
|
|
71
|
-
rule: Rule | undefined;
|
|
72
|
-
collaMsg?: CollaMsg | undefined;
|
|
73
|
-
infoRsp?: CombInfoResponse | undefined;
|
|
74
|
-
joinRsp?: CombJoinResponse | undefined;
|
|
75
|
-
joinReq?: CombJoinRequest | undefined;
|
|
76
|
-
leaveReq?: CombLeaveRequest | undefined;
|
|
77
|
-
}
|
|
78
|
-
export interface CombJoinInfo {
|
|
74
|
+
interface ICombJoinInfo {
|
|
79
75
|
roomID: string;
|
|
80
76
|
/** extra args for joining the room */
|
|
81
77
|
args: string;
|
|
82
78
|
}
|
|
83
|
-
export interface
|
|
84
|
-
rooms:
|
|
79
|
+
export interface ICombJoinRequest {
|
|
80
|
+
rooms: ICombJoinInfo[];
|
|
85
81
|
}
|
|
86
|
-
export interface
|
|
82
|
+
export interface ICombJoinResponse {
|
|
87
83
|
roomInfos: {
|
|
88
|
-
[key: string]:
|
|
84
|
+
[key: string]: ICombJoinResponseRoomInfo;
|
|
89
85
|
};
|
|
90
86
|
}
|
|
91
|
-
|
|
87
|
+
interface ICombJoinResponseRoomInfo {
|
|
92
88
|
roomID: string;
|
|
93
|
-
members:
|
|
94
|
-
}
|
|
95
|
-
export interface CombJoinResponse_RoomInfosEntry {
|
|
96
|
-
key: string;
|
|
97
|
-
value: CombJoinResponse_RoomInfo | undefined;
|
|
89
|
+
members: IMember[];
|
|
98
90
|
}
|
|
99
|
-
export interface
|
|
100
|
-
memberID: string;
|
|
101
|
-
}
|
|
102
|
-
export interface CombLeaveRequest {
|
|
91
|
+
export interface ICombLeaveRequest {
|
|
103
92
|
roomID: string;
|
|
104
93
|
/** extra args for leaving the room */
|
|
105
94
|
args: string;
|
|
106
95
|
}
|
|
107
|
-
export interface
|
|
96
|
+
export interface IMember {
|
|
108
97
|
memberID: string;
|
|
109
98
|
name: string;
|
|
110
99
|
avatar?: string | undefined;
|
|
111
100
|
}
|
|
112
|
-
export interface
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
/** only member */
|
|
116
|
-
onlyMember: string[];
|
|
117
|
-
tunnel: Rule_Tunnel | undefined;
|
|
118
|
-
}
|
|
119
|
-
export interface Rule_Tunnel {
|
|
120
|
-
name: string;
|
|
121
|
-
value: string;
|
|
122
|
-
}
|
|
123
|
-
export interface CombService {
|
|
124
|
-
NewChanges(request: NewChangesRequest, metadata?: Metadata): Observable<NewChangesResponse>;
|
|
125
|
-
Broadcast(request: BroadcastRequest, metadata?: Metadata): Observable<Empty>;
|
|
101
|
+
export interface ICombService {
|
|
102
|
+
NewChanges(request: INewChangesRequest, metadata?: Metadata): Observable<INewChangesResponse>;
|
|
103
|
+
Broadcast(request: IBroadcastRequest, metadata?: Metadata): Observable<IEmpty>;
|
|
126
104
|
}
|
|
105
|
+
export {};
|
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 { CommentSolvedStatus } from '../../univer/colla-msg';
|
|
17
|
+
import type { IError } from '../../univer/constants/errors';
|
|
18
|
+
import type { IUser } from '../../univer/permission';
|
|
19
|
+
export interface IReply {
|
|
8
20
|
threadId: string;
|
|
9
21
|
replyId: string;
|
|
10
22
|
content: string;
|
|
11
23
|
userId: string;
|
|
12
24
|
createTimestamp: number;
|
|
13
25
|
}
|
|
14
|
-
export interface
|
|
26
|
+
export interface IThread {
|
|
15
27
|
threadId: string;
|
|
16
|
-
solved:
|
|
17
|
-
replies:
|
|
28
|
+
solved: CommentSolvedStatus;
|
|
29
|
+
replies: IReply[];
|
|
18
30
|
}
|
|
19
|
-
export interface
|
|
31
|
+
export interface IAddCommentRequest {
|
|
20
32
|
memberId: string;
|
|
21
33
|
unitId: string;
|
|
22
34
|
content: string;
|
|
23
35
|
mention: string[];
|
|
24
36
|
}
|
|
25
|
-
export interface
|
|
26
|
-
error:
|
|
27
|
-
comment:
|
|
37
|
+
export interface IAddCommentResponse {
|
|
38
|
+
error: IError | undefined;
|
|
39
|
+
comment: IThread | undefined;
|
|
28
40
|
}
|
|
29
|
-
export interface
|
|
41
|
+
export interface IListCommentsRequest {
|
|
30
42
|
unitId: string;
|
|
31
43
|
threadId: string[];
|
|
32
44
|
}
|
|
33
|
-
export interface
|
|
34
|
-
error:
|
|
45
|
+
export interface IListCommentsResponse {
|
|
46
|
+
error: IError | undefined;
|
|
35
47
|
comments: {
|
|
36
|
-
[key: string]:
|
|
48
|
+
[key: string]: IThread;
|
|
37
49
|
};
|
|
38
50
|
users: {
|
|
39
|
-
[key: string]:
|
|
51
|
+
[key: string]: IUser;
|
|
40
52
|
};
|
|
41
53
|
}
|
|
42
|
-
export interface
|
|
43
|
-
key: string;
|
|
44
|
-
value: Thread | undefined;
|
|
45
|
-
}
|
|
46
|
-
export interface ListCommentsResponse_UsersEntry {
|
|
47
|
-
key: string;
|
|
48
|
-
value: User | undefined;
|
|
49
|
-
}
|
|
50
|
-
export interface ReplyCommentRequest {
|
|
54
|
+
export interface IReplyCommentRequest {
|
|
51
55
|
memberId: string;
|
|
52
56
|
unitId: string;
|
|
53
57
|
threadId: string;
|
|
54
58
|
content: string;
|
|
55
59
|
mention: string[];
|
|
56
60
|
}
|
|
57
|
-
export interface
|
|
58
|
-
error:
|
|
59
|
-
reply:
|
|
61
|
+
export interface IReplyCommentResponse {
|
|
62
|
+
error: IError | undefined;
|
|
63
|
+
reply: IReply | undefined;
|
|
60
64
|
}
|
|
61
|
-
export interface
|
|
65
|
+
export interface ISolvedCommentRequest {
|
|
62
66
|
memberId: string;
|
|
63
67
|
unitId: string;
|
|
64
68
|
threadId: string;
|
|
65
|
-
solved:
|
|
69
|
+
solved: CommentSolvedStatus;
|
|
66
70
|
}
|
|
67
|
-
export interface
|
|
68
|
-
error:
|
|
71
|
+
export interface ISolvedCommentResponse {
|
|
72
|
+
error: IError | undefined;
|
|
69
73
|
}
|
|
70
|
-
export interface
|
|
74
|
+
export interface IEditCommentRequest {
|
|
71
75
|
memberId: string;
|
|
72
76
|
unitId: string;
|
|
73
77
|
threadId: string;
|
|
@@ -75,23 +79,15 @@ export interface EditCommentRequest {
|
|
|
75
79
|
content: string;
|
|
76
80
|
mention: string[];
|
|
77
81
|
}
|
|
78
|
-
export interface
|
|
79
|
-
error:
|
|
82
|
+
export interface IEditCommentResponse {
|
|
83
|
+
error: IError | undefined;
|
|
80
84
|
}
|
|
81
|
-
export interface
|
|
85
|
+
export interface IDeleteCommentRequest {
|
|
82
86
|
memberId: string;
|
|
83
87
|
unitId: string;
|
|
84
88
|
threadId: string;
|
|
85
89
|
replyId?: string | undefined;
|
|
86
90
|
}
|
|
87
|
-
export interface
|
|
88
|
-
error:
|
|
89
|
-
}
|
|
90
|
-
export interface CommentService {
|
|
91
|
-
AddComment(request: AddCommentRequest, metadata?: Metadata): Observable<AddCommentResponse>;
|
|
92
|
-
ListComments(request: ListCommentsRequest, metadata?: Metadata): Observable<ListCommentsResponse>;
|
|
93
|
-
ReplyComment(request: ReplyCommentRequest, metadata?: Metadata): Observable<ReplyCommentResponse>;
|
|
94
|
-
SolvedComment(request: SolvedCommentRequest, metadata?: Metadata): Observable<SolvedCommentResponse>;
|
|
95
|
-
EditComment(request: EditCommentRequest, metadata?: Metadata): Observable<EditCommentResponse>;
|
|
96
|
-
DeleteComment(request: DeleteCommentRequest, metadata?: Metadata): Observable<DeleteCommentResponse>;
|
|
91
|
+
export interface IDeleteCommentResponse {
|
|
92
|
+
error: IError | undefined;
|
|
97
93
|
}
|