@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.
Files changed (84) hide show
  1. package/README.md +1 -3
  2. package/lib/cjs/index.js +463 -1
  3. package/lib/es/index.js +446 -36
  4. package/lib/index.js +447 -0
  5. package/lib/types/index.d.ts +41 -38
  6. package/lib/types/other/sheet-block.d.ts +27 -0
  7. package/lib/types/ts/univer/changeset.d.ts +20 -6
  8. package/lib/types/ts/univer/colla-msg.d.ts +176 -0
  9. package/lib/types/ts/univer/constants/errors.d.ts +33 -19
  10. package/lib/types/ts/univer/constants/univer.d.ts +15 -1
  11. package/lib/types/ts/univer/doc.d.ts +18 -4
  12. package/lib/types/ts/univer/drawing.d.ts +16 -2
  13. package/lib/types/ts/univer/initial-sheet.d.ts +46 -0
  14. package/lib/types/ts/univer/permission.d.ts +19 -5
  15. package/lib/types/ts/univer/range.d.ts +16 -2
  16. package/lib/types/ts/univer/resource.d.ts +16 -2
  17. package/lib/types/ts/univer/snapshot.d.ts +23 -9
  18. package/lib/types/ts/univer/unit-template.d.ts +23 -0
  19. package/lib/types/ts/univer/univer-file.d.ts +27 -0
  20. package/lib/types/ts/univer/workbook.d.ts +30 -53
  21. package/lib/types/ts/univercloud/stats/v1/stats.d.ts +34 -0
  22. package/lib/types/ts/univerpro/v1/apply.d.ts +129 -0
  23. package/lib/types/ts/univerpro/v1/helper.d.ts +36 -0
  24. package/lib/types/ts/univerpro/v1/ssc.d.ts +72 -0
  25. package/lib/types/ts/univerpro/v1/ssr.d.ts +28 -0
  26. package/lib/types/ts/universer/v1/access-key.d.ts +51 -0
  27. package/lib/types/ts/universer/v1/authz.d.ts +102 -87
  28. package/lib/types/ts/universer/v1/comb.d.ts +40 -61
  29. package/lib/types/ts/universer/v1/comment.d.ts +45 -49
  30. package/lib/types/ts/universer/v1/file.d.ts +57 -42
  31. package/lib/types/ts/universer/v1/history.d.ts +52 -49
  32. package/lib/types/ts/universer/v1/license.d.ts +54 -39
  33. package/lib/types/ts/universer/v1/snapshot.d.ts +146 -143
  34. package/lib/types/ts/universer/v1/user.d.ts +28 -275
  35. package/lib/types/utils.d.ts +17 -2
  36. package/lib/umd/index.js +1 -1
  37. package/package.json +33 -11
  38. package/lib/types/ts/univer/colla_msg.d.ts +0 -178
  39. package/lib/types/ts/univer/constants/biz.d.ts +0 -17
  40. package/lib/types/ts/univer/event_sync.d.ts +0 -10
  41. package/lib/types/ts/univer/initial_sheet.d.ts +0 -31
  42. package/lib/types/ts/univer/unit_template.d.ts +0 -9
  43. package/lib/types/ts/univer/univer_file.d.ts +0 -33
  44. package/lib/types/ts/universer/v1/access_key.d.ts +0 -36
  45. package/lib/types/ts/universer/v1/access_key_logs.d.ts +0 -43
  46. package/lib/types/ts/universer/v1/activity.d.ts +0 -22
  47. package/lib/types/ts/universer/v1/analyse_cmn.d.ts +0 -27
  48. package/lib/types/ts/universer/v1/analyse_data_source.d.ts +0 -86
  49. package/lib/types/ts/universer/v1/analyse_task.d.ts +0 -232
  50. package/lib/types/ts/universer/v1/clipsheet_task.d.ts +0 -72
  51. package/lib/types/ts/universer/v1/conf.d.ts +0 -570
  52. package/lib/types/ts/universer/v1/connector.d.ts +0 -74
  53. package/lib/types/ts/universer/v1/conversation.d.ts +0 -578
  54. package/lib/types/ts/universer/v1/email.d.ts +0 -28
  55. package/lib/types/ts/universer/v1/entitlement.d.ts +0 -663
  56. package/lib/types/ts/universer/v1/exchange.d.ts +0 -101
  57. package/lib/types/ts/universer/v1/feedback.d.ts +0 -71
  58. package/lib/types/ts/universer/v1/frontend_logs.d.ts +0 -36
  59. package/lib/types/ts/universer/v1/go_config_center.d.ts +0 -91
  60. package/lib/types/ts/universer/v1/inbox.d.ts +0 -59
  61. package/lib/types/ts/universer/v1/invite_code.d.ts +0 -47
  62. package/lib/types/ts/universer/v1/license_manage.d.ts +0 -157
  63. package/lib/types/ts/universer/v1/oauth2.d.ts +0 -24
  64. package/lib/types/ts/universer/v1/oidc.d.ts +0 -167
  65. package/lib/types/ts/universer/v1/redemption_code.d.ts +0 -32
  66. package/lib/types/ts/universer/v1/referral.d.ts +0 -55
  67. package/lib/types/ts/universer/v1/scraper.d.ts +0 -144
  68. package/lib/types/ts/universer/v1/source_connector/api.d.ts +0 -110
  69. package/lib/types/ts/universer/v1/source_connector/conf.d.ts +0 -29
  70. package/lib/types/ts/universer/v1/source_connector/displayer.d.ts +0 -16
  71. package/lib/types/ts/universer/v1/source_connector/source.d.ts +0 -46
  72. package/lib/types/ts/universer/v1/source_connector/stream_view.d.ts +0 -31
  73. package/lib/types/ts/universer/v1/survey.d.ts +0 -25
  74. package/lib/types/ts/universer/v1/template.d.ts +0 -48
  75. package/lib/types/ts/universer/v1/toolkit.d.ts +0 -23
  76. package/lib/types/ts/universer/v1/trigger.d.ts +0 -102
  77. package/lib/types/ts/universer/v1/uniscript.d.ts +0 -104
  78. package/lib/types/ts/universer/v1/uniscript_logs.d.ts +0 -157
  79. package/lib/types/ts/universer/v1/univer_go_template.d.ts +0 -65
  80. package/lib/types/ts/universer/v1/user_event.d.ts +0 -23
  81. package/lib/types/ts/universer/v1/user_settings.d.ts +0 -22
  82. package/lib/types/ts/universer/v1/usip.d.ts +0 -62
  83. package/lib/types/ts/universer/v1/video_task.d.ts +0 -196
  84. package/lib/types/ts/universer/v1/workspace.d.ts +0 -273
@@ -1,18 +1,32 @@
1
- import { Metadata } from '@grpc/grpc-js';
2
- import { Observable } from 'rxjs';
3
- import { Error } from '../../univer/constants/errors';
4
- import { ObjectScope, UnitAction, UnitObject, UnitPermissionStrategy, UnitRole, UnitRoleKV, UnitShareScope, User } from '../../univer/permission';
5
- export declare const protobufPackage = "universer.v1";
6
- export interface Collaborator {
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: User | undefined;
23
+ subject: IUser | undefined;
10
24
  }
11
- export interface ObjScope {
25
+ interface IObjScope {
12
26
  edit: ObjectScope;
13
27
  read: ObjectScope;
14
28
  }
15
- export interface PermissionPoint {
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: User | undefined;
24
- strategies: UnitPermissionStrategy[];
25
- actions: ActionInfo[];
37
+ creator: IUser | undefined;
38
+ strategies: IUnitPermissionStrategy[];
39
+ actions: IActionInfo[];
26
40
  shareScope: UnitShareScope;
27
- scope: ObjScope | undefined;
41
+ scope: IObjScope | undefined;
28
42
  }
29
- export interface CreateRequest {
43
+ export interface ICreateRequest {
30
44
  objectType: UnitObject;
31
- selectRangeObject?: CreateRequest_SelectRangeObject | undefined;
32
- worksheetObject?: CreateRequest_WorksheetObject | undefined;
45
+ selectRangeObject?: ICreateRequestSelectRangeObject | undefined;
46
+ worksheetObject?: ICreateRequestWorksheetObject | undefined;
33
47
  }
34
- export interface CreateRequest_SelectRangeObject {
35
- collaborators: Collaborator[];
48
+ export interface ICreateRequestSelectRangeObject {
49
+ collaborators: ICollaborator[];
36
50
  unitID: string;
37
51
  name: string;
38
- scope: ObjScope | undefined;
52
+ scope: IObjScope | undefined;
39
53
  }
40
- export interface CreateRequest_WorksheetObject {
41
- collaborators: Collaborator[];
54
+ interface ICreateRequestWorksheetObject {
55
+ collaborators: ICollaborator[];
42
56
  unitID: string;
43
57
  name: string;
44
- strategies: UnitPermissionStrategy[];
45
- scope: ObjScope | undefined;
58
+ strategies: IUnitPermissionStrategy[];
59
+ scope: IObjScope | undefined;
46
60
  }
47
- export interface CreateResponse {
48
- error: Error | undefined;
61
+ export interface ICreateResponse {
62
+ error: IError | undefined;
49
63
  objectID: string;
50
64
  }
51
- export interface UpdatePermPointRequest {
65
+ export interface IUpdatePermPointRequest {
52
66
  objectType: UnitObject;
53
67
  objectID: string;
54
68
  unitID: string;
55
- share: UpdatePermPointRequest_Share | undefined;
69
+ share: IUpdatePermPointRequestShare | undefined;
56
70
  name: string;
57
- strategies: UnitPermissionStrategy[];
58
- scope: ObjScope | undefined;
59
- collaborators: UpdatePermPointRequest_Collaborators | undefined;
71
+ strategies: IUnitPermissionStrategy[];
72
+ scope: IObjScope | undefined;
73
+ collaborators: IUpdatePermPointRequestCollaborators | undefined;
60
74
  }
61
- export interface UpdatePermPointRequest_Share {
75
+ interface IUpdatePermPointRequestShare {
62
76
  /** @deprecated */
63
77
  on: boolean;
64
78
  role: UnitRole;
65
79
  scope: UnitShareScope;
66
80
  }
67
- export interface UpdatePermPointRequest_Collaborators {
68
- collaborators: Collaborator[];
81
+ interface IUpdatePermPointRequestCollaborators {
82
+ collaborators: ICollaborator[];
69
83
  }
70
- export interface UpdatePermPointResponse {
71
- error: Error | undefined;
84
+ interface IUpdatePermPointResponse {
85
+ error: IError | undefined;
72
86
  }
73
- export interface ListPermPointRequest {
87
+ export interface IListPermPointRequest {
74
88
  unitID: string;
75
89
  objectIDs: string[];
76
90
  actions: UnitAction[];
77
91
  }
78
- export interface ListPermPointResponse {
79
- error: Error | undefined;
80
- objects: PermissionPoint[];
92
+ export interface IListPermPointResponse {
93
+ error: IError | undefined;
94
+ objects: IPermissionPoint[];
81
95
  }
82
- export interface CreateCollaboratorRequest {
96
+ export interface ICreateCollaboratorRequest {
83
97
  objectID: string;
84
98
  unitID: string;
85
- collaborators: Collaborator[];
99
+ collaborators: ICollaborator[];
86
100
  }
87
- export interface CreateCollaboratorResponse {
88
- error: Error | undefined;
101
+ interface ICreateCollaboratorResponse {
102
+ error: IError | undefined;
89
103
  }
90
- export interface UpdateCollaboratorRequest {
104
+ export interface IUpdateCollaboratorRequest {
91
105
  objectID: string;
92
106
  unitID: string;
93
- collaborator: Collaborator | undefined;
107
+ collaborator: ICollaborator | undefined;
94
108
  }
95
- export interface UpdateCollaboratorResponse {
96
- error: Error | undefined;
109
+ export interface IUpdateCollaboratorResponse {
110
+ error: IError | undefined;
97
111
  }
98
- export interface DeleteCollaboratorRequest {
112
+ export interface IDeleteCollaboratorRequest {
99
113
  objectID: string;
100
114
  unitID: string;
101
115
  collaboratorID: string;
102
116
  }
103
- export interface DeleteCollaboratorResponse {
104
- error: Error | undefined;
117
+ export interface IDeleteCollaboratorResponse {
118
+ error: IError | undefined;
105
119
  }
106
- export interface ListCollaboratorRequest {
120
+ export interface IListCollaboratorRequest {
107
121
  objectID: string;
108
122
  unitID: string;
109
123
  }
110
- export interface ListCollaboratorResponse {
111
- error: Error | undefined;
112
- collaborators: Collaborator[];
124
+ export interface IListCollaboratorResponse {
125
+ error: IError | undefined;
126
+ collaborators: ICollaborator[];
113
127
  cfgEnableObjInherit: boolean;
114
128
  }
115
- export interface PutCollaboratorsRequest {
129
+ export interface IPutCollaboratorsRequest {
116
130
  objectID: string;
117
131
  unitID: string;
118
- collaborators: Collaborator[];
132
+ collaborators: ICollaborator[];
119
133
  }
120
- export interface PutCollaboratorsResponse {
121
- error: Error | undefined;
134
+ export interface IPutCollaboratorsResponse {
135
+ error: IError | undefined;
122
136
  }
123
- export interface AllowedRequest {
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 ActionInfo {
143
+ export interface IActionInfo {
130
144
  action?: UnitAction | undefined;
131
145
  allowed?: boolean | undefined;
132
146
  }
133
- export interface AllowedResponse {
134
- error: Error | undefined;
135
- actions: ActionInfo[];
147
+ export interface IAllowedResponse {
148
+ error: IError | undefined;
149
+ actions: IActionInfo[];
136
150
  }
137
- export interface BatchAllowedRequest {
138
- requests: AllowedRequest[];
151
+ interface IBatchAllowedRequest {
152
+ requests: IAllowedRequest[];
139
153
  }
140
- export interface ObjectActionInfo {
154
+ interface IObjectActionInfo {
141
155
  unitID: string;
142
156
  objectID: string;
143
- actions: ActionInfo[];
157
+ actions: IActionInfo[];
144
158
  }
145
- export interface BatchAllowedResponse {
146
- error: Error | undefined;
147
- objectActions: ObjectActionInfo[];
159
+ export interface IBatchAllowedResponse {
160
+ error: IError | undefined;
161
+ objectActions: IObjectActionInfo[];
148
162
  }
149
- export interface ListRolesRequest {
163
+ export interface IListRolesRequest {
150
164
  objectType: UnitObject;
151
165
  }
152
- export interface ListRolesResponse {
153
- error: Error | undefined;
154
- roles: UnitRoleKV[];
166
+ export interface IListRolesResponse {
167
+ error: IError | undefined;
168
+ roles: IUnitRoleKV[];
155
169
  actions: UnitAction[];
156
- defaultStrategies: UnitPermissionStrategy[];
170
+ defaultStrategies: IUnitPermissionStrategy[];
157
171
  }
158
- export interface AuthzService {
172
+ export interface IAuthzService {
159
173
  /** create a permission mount point for specified type of object */
160
- Create(request: CreateRequest, metadata?: Metadata): Observable<CreateResponse>;
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: UpdatePermPointRequest, metadata?: Metadata): Observable<UpdatePermPointResponse>;
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: ListPermPointRequest, metadata?: Metadata): Observable<ListPermPointResponse>;
185
+ List(request: IListPermPointRequest, metadata?: Metadata): Observable<IListPermPointResponse>;
172
186
  /** request a couple of actions, return the allowed actions */
173
- Allowed(request: AllowedRequest, metadata?: Metadata): Observable<AllowedResponse>;
187
+ Allowed(request: IAllowedRequest, metadata?: Metadata): Observable<IAllowedResponse>;
174
188
  /** barch check if the actions are allowed */
175
- BatchAllowed(request: BatchAllowedRequest, metadata?: Metadata): Observable<BatchAllowedResponse>;
189
+ BatchAllowed(request: IBatchAllowedRequest, metadata?: Metadata): Observable<IBatchAllowedResponse>;
176
190
  /** list object roles for specified object */
177
- ListRoles(request: ListRolesRequest, metadata?: Metadata): Observable<ListRolesResponse>;
191
+ ListRoles(request: IListRolesRequest, metadata?: Metadata): Observable<IListRolesResponse>;
178
192
  /** new collaborator for specified object */
179
- CreateCollaborator(request: CreateCollaboratorRequest, metadata?: Metadata): Observable<CreateCollaboratorResponse>;
193
+ CreateCollaborator(request: ICreateCollaboratorRequest, metadata?: Metadata): Observable<ICreateCollaboratorResponse>;
180
194
  /** list all collaborators for specified object */
181
- ListCollaborators(request: ListCollaboratorRequest, metadata?: Metadata): Observable<ListCollaboratorResponse>;
195
+ ListCollaborators(request: IListCollaboratorRequest, metadata?: Metadata): Observable<IListCollaboratorResponse>;
182
196
  /** update collaborator for specified object */
183
- UpdateCollaborator(request: UpdateCollaboratorRequest, metadata?: Metadata): Observable<UpdateCollaboratorResponse>;
197
+ UpdateCollaborator(request: IUpdateCollaboratorRequest, metadata?: Metadata): Observable<IUpdateCollaboratorResponse>;
184
198
  /** delete collaborator for specified object */
185
- DeleteCollaborator(request: DeleteCollaboratorRequest, metadata?: Metadata): Observable<DeleteCollaboratorResponse>;
199
+ DeleteCollaborator(request: IDeleteCollaboratorRequest, metadata?: Metadata): Observable<IDeleteCollaboratorResponse>;
186
200
  /** put collaborators for specified object */
187
- PutCollaborators(request: PutCollaboratorsRequest, metadata?: Metadata): Observable<PutCollaboratorsResponse>;
201
+ PutCollaborators(request: IPutCollaboratorsRequest, metadata?: Metadata): Observable<IPutCollaboratorsResponse>;
188
202
  }
203
+ export {};
@@ -1,11 +1,25 @@
1
- import { Metadata } from '@grpc/grpc-js';
2
- import { Observable } from 'rxjs';
3
- import { Empty } from '../../google/protobuf/empty';
4
- import { Changeset } from '../../univer/changeset';
5
- import { CollaMsg } from '../../univer/colla_msg';
6
- import { Error } from '../../univer/constants/errors';
7
- import { UniverType } from '../../univer/constants/univer';
8
- export declare const protobufPackage = "universer.v1";
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
- export interface ConnectResponse {
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 NewChangesRequest {
65
+ export interface INewChangesRequest {
56
66
  unitID: string;
57
67
  memberID: string;
58
68
  type: UniverType;
59
- changeset: Changeset | undefined;
69
+ changeset: IChangeset | undefined;
60
70
  }
61
- export interface NewChangesResponse {
62
- error: Error | undefined;
71
+ export interface INewChangesResponse {
72
+ error: IError | undefined;
63
73
  }
64
- export interface CombMsg {
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 CombJoinRequest {
84
- rooms: CombJoinInfo[];
79
+ export interface ICombJoinRequest {
80
+ rooms: ICombJoinInfo[];
85
81
  }
86
- export interface CombJoinResponse {
82
+ export interface ICombJoinResponse {
87
83
  roomInfos: {
88
- [key: string]: CombJoinResponse_RoomInfo;
84
+ [key: string]: ICombJoinResponseRoomInfo;
89
85
  };
90
86
  }
91
- export interface CombJoinResponse_RoomInfo {
87
+ interface ICombJoinResponseRoomInfo {
92
88
  roomID: string;
93
- members: Member[];
94
- }
95
- export interface CombJoinResponse_RoomInfosEntry {
96
- key: string;
97
- value: CombJoinResponse_RoomInfo | undefined;
89
+ members: IMember[];
98
90
  }
99
- export interface CombInfoResponse {
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 Member {
96
+ export interface IMember {
108
97
  memberID: string;
109
98
  name: string;
110
99
  avatar?: string | undefined;
111
100
  }
112
- export interface Rule {
113
- /** exclude member */
114
- excludeMember: string[];
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
- import { Metadata } from '@grpc/grpc-js';
2
- import { Observable } from 'rxjs';
3
- import { CommentUpdate_Status } from '../../univer/colla_msg';
4
- import { Error } from '../../univer/constants/errors';
5
- import { User } from '../../univer/permission';
6
- export declare const protobufPackage = "universer.v1";
7
- export interface Reply {
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 Thread {
26
+ export interface IThread {
15
27
  threadId: string;
16
- solved: CommentUpdate_Status;
17
- replies: Reply[];
28
+ solved: CommentSolvedStatus;
29
+ replies: IReply[];
18
30
  }
19
- export interface AddCommentRequest {
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 AddCommentResponse {
26
- error: Error | undefined;
27
- comment: Thread | undefined;
37
+ export interface IAddCommentResponse {
38
+ error: IError | undefined;
39
+ comment: IThread | undefined;
28
40
  }
29
- export interface ListCommentsRequest {
41
+ export interface IListCommentsRequest {
30
42
  unitId: string;
31
43
  threadId: string[];
32
44
  }
33
- export interface ListCommentsResponse {
34
- error: Error | undefined;
45
+ export interface IListCommentsResponse {
46
+ error: IError | undefined;
35
47
  comments: {
36
- [key: string]: Thread;
48
+ [key: string]: IThread;
37
49
  };
38
50
  users: {
39
- [key: string]: User;
51
+ [key: string]: IUser;
40
52
  };
41
53
  }
42
- export interface ListCommentsResponse_CommentsEntry {
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 ReplyCommentResponse {
58
- error: Error | undefined;
59
- reply: Reply | undefined;
61
+ export interface IReplyCommentResponse {
62
+ error: IError | undefined;
63
+ reply: IReply | undefined;
60
64
  }
61
- export interface SolvedCommentRequest {
65
+ export interface ISolvedCommentRequest {
62
66
  memberId: string;
63
67
  unitId: string;
64
68
  threadId: string;
65
- solved: CommentUpdate_Status;
69
+ solved: CommentSolvedStatus;
66
70
  }
67
- export interface SolvedCommentResponse {
68
- error: Error | undefined;
71
+ export interface ISolvedCommentResponse {
72
+ error: IError | undefined;
69
73
  }
70
- export interface EditCommentRequest {
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 EditCommentResponse {
79
- error: Error | undefined;
82
+ export interface IEditCommentResponse {
83
+ error: IError | undefined;
80
84
  }
81
- export interface DeleteCommentRequest {
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 DeleteCommentResponse {
88
- error: Error | undefined;
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
  }