@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
package/lib/index.js ADDED
@@ -0,0 +1,447 @@
1
+ //#region src/ts/univer/colla-msg.ts
2
+ let CommentSolvedStatus = /* @__PURE__ */ function(CommentSolvedStatus) {
3
+ CommentSolvedStatus[CommentSolvedStatus["OpenOrReOpen"] = 0] = "OpenOrReOpen";
4
+ CommentSolvedStatus[CommentSolvedStatus["Solved"] = 1] = "Solved";
5
+ CommentSolvedStatus[CommentSolvedStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
6
+ return CommentSolvedStatus;
7
+ }({});
8
+ let CommentUpdateEventType = /* @__PURE__ */ function(CommentUpdateEventType) {
9
+ CommentUpdateEventType[CommentUpdateEventType["Unknown"] = 0] = "Unknown";
10
+ CommentUpdateEventType[CommentUpdateEventType["Add"] = 1] = "Add";
11
+ CommentUpdateEventType[CommentUpdateEventType["Reply"] = 2] = "Reply";
12
+ CommentUpdateEventType[CommentUpdateEventType["Edit"] = 3] = "Edit";
13
+ CommentUpdateEventType[CommentUpdateEventType["Delete"] = 4] = "Delete";
14
+ CommentUpdateEventType[CommentUpdateEventType["Solve"] = 5] = "Solve";
15
+ CommentUpdateEventType[CommentUpdateEventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
16
+ return CommentUpdateEventType;
17
+ }({});
18
+
19
+ //#endregion
20
+ //#region src/ts/univer/constants/errors.ts
21
+ /**
22
+ * Copyright 2023-present DreamNum Co., Ltd.
23
+ *
24
+ * Licensed under the Apache License, Version 2.0 (the "License");
25
+ * you may not use this file except in compliance with the License.
26
+ * You may obtain a copy of the License at
27
+ *
28
+ * http://www.apache.org/licenses/LICENSE-2.0
29
+ *
30
+ * Unless required by applicable law or agreed to in writing, software
31
+ * distributed under the License is distributed on an "AS IS" BASIS,
32
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33
+ * See the License for the specific language governing permissions and
34
+ * limitations under the License.
35
+ */
36
+ let ErrorCode = /* @__PURE__ */ function(ErrorCode) {
37
+ /** UNDEFINED - general codes */
38
+ ErrorCode[ErrorCode["UNDEFINED"] = 0] = "UNDEFINED";
39
+ ErrorCode[ErrorCode["OK"] = 1] = "OK";
40
+ ErrorCode[ErrorCode["INTERNAL_ERROR"] = 2] = "INTERNAL_ERROR";
41
+ ErrorCode[ErrorCode["PERMISSION_DENIED"] = 3] = "PERMISSION_DENIED";
42
+ ErrorCode[ErrorCode["NOT_FOUND"] = 4] = "NOT_FOUND";
43
+ ErrorCode[ErrorCode["UNAUTHENTICATED"] = 5] = "UNAUTHENTICATED";
44
+ ErrorCode[ErrorCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
45
+ ErrorCode[ErrorCode["INVALID_ARGUMENT"] = 7] = "INVALID_ARGUMENT";
46
+ ErrorCode[ErrorCode["TOO_MANY_REQUESTS"] = 8] = "TOO_MANY_REQUESTS";
47
+ ErrorCode[ErrorCode["COMPLETION_FINISHED"] = 9] = "COMPLETION_FINISHED";
48
+ /** LOGIN_FAILED - login */
49
+ ErrorCode[ErrorCode["LOGIN_FAILED"] = 10] = "LOGIN_FAILED";
50
+ ErrorCode[ErrorCode["MOBILE_VERIFY_CODE_MISMATCH"] = 11] = "MOBILE_VERIFY_CODE_MISMATCH";
51
+ ErrorCode[ErrorCode["MOBILE_VERIFY_CODE_NOT_FOUND_OR_EXPIRED"] = 12] = "MOBILE_VERIFY_CODE_NOT_FOUND_OR_EXPIRED";
52
+ ErrorCode[ErrorCode["EMAIL_VERIFY_CODE_MISMATCH"] = 13] = "EMAIL_VERIFY_CODE_MISMATCH";
53
+ ErrorCode[ErrorCode["EMAIL_VERIFY_CODE_NOT_FOUND_OR_EXPIRED"] = 14] = "EMAIL_VERIFY_CODE_NOT_FOUND_OR_EXPIRED";
54
+ ErrorCode[ErrorCode["AUTHORIZE_CODE_ILLEGAL"] = 15] = "AUTHORIZE_CODE_ILLEGAL";
55
+ ErrorCode[ErrorCode["LOGIN_TOKEN_PROCESSING_FAILED"] = 16] = "LOGIN_TOKEN_PROCESSING_FAILED";
56
+ /** CURRENT_STATUS_CANNOT_OPERATE - biz cmn codes with 100 shift */
57
+ ErrorCode[ErrorCode["CURRENT_STATUS_CANNOT_OPERATE"] = 100] = "CURRENT_STATUS_CANNOT_OPERATE";
58
+ ErrorCode[ErrorCode["ERROR_AGAIN"] = 101] = "ERROR_AGAIN";
59
+ /** USER_NOT_FOUND - user codes with 200 shift */
60
+ ErrorCode[ErrorCode["USER_NOT_FOUND"] = 201] = "USER_NOT_FOUND";
61
+ ErrorCode[ErrorCode["USER_IS_ANONYMOUS"] = 202] = "USER_IS_ANONYMOUS";
62
+ /** CHANGESET_REVISION_CONFILICT - changeset codes with 5000 shift */
63
+ ErrorCode[ErrorCode["CHANGESET_REVISION_CONFILICT"] = 5001] = "CHANGESET_REVISION_CONFILICT";
64
+ /** SNAPSHOT_INVALID_SNAPSHOT - snapshotError codes with 6000 shift */
65
+ ErrorCode[ErrorCode["SNAPSHOT_INVALID_SNAPSHOT"] = 6001] = "SNAPSHOT_INVALID_SNAPSHOT";
66
+ ErrorCode[ErrorCode["SNAPSHOT_HAS_BEEN_REMOVED"] = 6002] = "SNAPSHOT_HAS_BEEN_REMOVED";
67
+ ErrorCode[ErrorCode["ENSURE_SNAPSHOT_EXECUTION"] = 6003] = "ENSURE_SNAPSHOT_EXECUTION";
68
+ /** APPLY_REJECT - apply service codes with 7000 shift */
69
+ ErrorCode[ErrorCode["APPLY_REJECT"] = 7001] = "APPLY_REJECT";
70
+ /** APPLY_NON_SEQUENTIAL_REVISION - apply service expects sequential revisions, otherwise return this code */
71
+ ErrorCode[ErrorCode["APPLY_NON_SEQUENTIAL_REVISION"] = 7002] = "APPLY_NON_SEQUENTIAL_REVISION";
72
+ /** APPLY_REVISION_CONFILICT - save changeset failed because of revision exists */
73
+ ErrorCode[ErrorCode["APPLY_REVISION_CONFILICT"] = 7003] = "APPLY_REVISION_CONFILICT";
74
+ /** APPLY_PERMISSION_DENIED - apply failed because of the user permission denied */
75
+ ErrorCode[ErrorCode["APPLY_PERMISSION_DENIED"] = 7004] = "APPLY_PERMISSION_DENIED";
76
+ /** APPLY_DUPLICATED - if the changeset has been applied before, return this code */
77
+ ErrorCode[ErrorCode["APPLY_DUPLICATED"] = 7005] = "APPLY_DUPLICATED";
78
+ /** CONNECTOR_DATA_TOO_LARGE - connector codes with 8000 shift */
79
+ ErrorCode[ErrorCode["CONNECTOR_DATA_TOO_LARGE"] = 8001] = "CONNECTOR_DATA_TOO_LARGE";
80
+ /** LICENSE_MAX_UNITS_EXCEEDED - license code with 9000 shift */
81
+ ErrorCode[ErrorCode["LICENSE_MAX_UNITS_EXCEEDED"] = 9001] = "LICENSE_MAX_UNITS_EXCEEDED";
82
+ ErrorCode[ErrorCode["LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED"] = 9002] = "LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED";
83
+ ErrorCode[ErrorCode["LICENSE_IMPORT_SIZE_EXCEEDED"] = 9003] = "LICENSE_IMPORT_SIZE_EXCEEDED";
84
+ ErrorCode[ErrorCode["LICENSE_EXPORT_SIZE_EXCEEDED"] = 9004] = "LICENSE_EXPORT_SIZE_EXCEEDED";
85
+ /** LICENSE_DISTRO_REJECTED - the feature not allowed for the distro */
86
+ ErrorCode[ErrorCode["LICENSE_DISTRO_REJECTED"] = 9005] = "LICENSE_DISTRO_REJECTED";
87
+ /** YUUMI_UNABLE_LOAD_URL - yuumi */
88
+ ErrorCode[ErrorCode["YUUMI_UNABLE_LOAD_URL"] = 10001] = "YUUMI_UNABLE_LOAD_URL";
89
+ ErrorCode[ErrorCode["YUUMI_URL_COL_OUT_OF_RANGE"] = 10002] = "YUUMI_URL_COL_OUT_OF_RANGE";
90
+ ErrorCode[ErrorCode["YUUMI_RATE_OVER_LIMIT"] = 10003] = "YUUMI_RATE_OVER_LIMIT";
91
+ ErrorCode[ErrorCode["YUUMI_SUBSCRIPTION_NOT_FOUND"] = 10004] = "YUUMI_SUBSCRIPTION_NOT_FOUND";
92
+ /** YUUMI_NO_CUBOID_FOR_QUESTION - yuumi AI */
93
+ ErrorCode[ErrorCode["YUUMI_NO_CUBOID_FOR_QUESTION"] = 10010] = "YUUMI_NO_CUBOID_FOR_QUESTION";
94
+ ErrorCode[ErrorCode["YUUMI_ASYNCIO_CANCELLED"] = 10011] = "YUUMI_ASYNCIO_CANCELLED";
95
+ ErrorCode[ErrorCode["YUUMI_TABLE_NOT_FOUND_IN_UNIT"] = 10012] = "YUUMI_TABLE_NOT_FOUND_IN_UNIT";
96
+ ErrorCode[ErrorCode["YUUMI_ALL_TABLES_IS_INVALID"] = 10013] = "YUUMI_ALL_TABLES_IS_INVALID";
97
+ ErrorCode[ErrorCode["YUUMI_PROMPT_MAX_TOKENS_EXCEEDED"] = 10014] = "YUUMI_PROMPT_MAX_TOKENS_EXCEEDED";
98
+ ErrorCode[ErrorCode["YUUMI_AI_RUN_FAILED"] = 10015] = "YUUMI_AI_RUN_FAILED";
99
+ ErrorCode[ErrorCode["YUUMI_CONNECTOR_URL_NOT_FOUND"] = 10016] = "YUUMI_CONNECTOR_URL_NOT_FOUND";
100
+ /** PY_RUNTIME_SCRIPT_ERROR - py-runtime */
101
+ ErrorCode[ErrorCode["PY_RUNTIME_SCRIPT_ERROR"] = 11001] = "PY_RUNTIME_SCRIPT_ERROR";
102
+ /** INVITE_CODE_HAS_BEEN_UES - invite-code */
103
+ ErrorCode[ErrorCode["INVITE_CODE_HAS_BEEN_UES"] = 12001] = "INVITE_CODE_HAS_BEEN_UES";
104
+ ErrorCode[ErrorCode["INVALID_INVITE_CODE"] = 12002] = "INVALID_INVITE_CODE";
105
+ ErrorCode[ErrorCode["INVITE_CODE_REQUIRED"] = 12003] = "INVITE_CODE_REQUIRED";
106
+ ErrorCode[ErrorCode["USER_NOT_INVITED_CODE"] = 12004] = "USER_NOT_INVITED_CODE";
107
+ ErrorCode[ErrorCode["INVITE_CODE_ALREADY_BOUND"] = 12005] = "INVITE_CODE_ALREADY_BOUND";
108
+ /** WECHAT_HAS_BEEN_BOUND - user profile */
109
+ ErrorCode[ErrorCode["WECHAT_HAS_BEEN_BOUND"] = 13001] = "WECHAT_HAS_BEEN_BOUND";
110
+ ErrorCode[ErrorCode["MOBILE_HAS_BEEN_BOUND"] = 13002] = "MOBILE_HAS_BEEN_BOUND";
111
+ ErrorCode[ErrorCode["EMAIL_HAS_BEEN_BOUND"] = 13003] = "EMAIL_HAS_BEEN_BOUND";
112
+ /** ENTITLE_CAN_NOT_BUY_LOWER_OTP - entitlement domain errors */
113
+ ErrorCode[ErrorCode["ENTITLE_CAN_NOT_BUY_LOWER_OTP"] = 14001] = "ENTITLE_CAN_NOT_BUY_LOWER_OTP";
114
+ /** ENTITLE_UPDOWN_GRADE_NOT_SUPPORT - subscription upgrade/downgrade is not supported */
115
+ ErrorCode[ErrorCode["ENTITLE_UPDOWN_GRADE_NOT_SUPPORT"] = 14002] = "ENTITLE_UPDOWN_GRADE_NOT_SUPPORT";
116
+ /** ENTITLE_DUP_SUBSCRIPTION - duplicate subscription */
117
+ ErrorCode[ErrorCode["ENTITLE_DUP_SUBSCRIPTION"] = 14003] = "ENTITLE_DUP_SUBSCRIPTION";
118
+ /** PAYMENT_CHANNEL_NOT_SUPPORT - payment channel is not supported */
119
+ ErrorCode[ErrorCode["PAYMENT_CHANNEL_NOT_SUPPORT"] = 14004] = "PAYMENT_CHANNEL_NOT_SUPPORT";
120
+ /** ENTITLE_INVALID_COUPON_CODE - invalid coupon code */
121
+ ErrorCode[ErrorCode["ENTITLE_INVALID_COUPON_CODE"] = 14005] = "ENTITLE_INVALID_COUPON_CODE";
122
+ /** ENTITLE_COUPON_EXPIRED - coupon expired */
123
+ ErrorCode[ErrorCode["ENTITLE_COUPON_EXPIRED"] = 14006] = "ENTITLE_COUPON_EXPIRED";
124
+ /** ENTITLE_COUPON_USED_UP - coupon used up */
125
+ ErrorCode[ErrorCode["ENTITLE_COUPON_USED_UP"] = 14007] = "ENTITLE_COUPON_USED_UP";
126
+ /** ENTITLE_USE_COUPON_NOT_1ST_TRADE - not the first purchase, cannot use coupon */
127
+ ErrorCode[ErrorCode["ENTITLE_USE_COUPON_NOT_1ST_TRADE"] = 14008] = "ENTITLE_USE_COUPON_NOT_1ST_TRADE";
128
+ /** ENTITLE_CHAT_LIMIT_EXCEED - chat rate limit exceeded */
129
+ ErrorCode[ErrorCode["ENTITLE_CHAT_LIMIT_EXCEED"] = 14101] = "ENTITLE_CHAT_LIMIT_EXCEED";
130
+ /** ENTITLE_REPORT_LIMIT_EXCEED - report rate limit exceeded */
131
+ ErrorCode[ErrorCode["ENTITLE_REPORT_LIMIT_EXCEED"] = 14102] = "ENTITLE_REPORT_LIMIT_EXCEED";
132
+ /** ENTITLE_INSUFFICIENT_QUOTA - insufficient quota */
133
+ ErrorCode[ErrorCode["ENTITLE_INSUFFICIENT_QUOTA"] = 14103] = "ENTITLE_INSUFFICIENT_QUOTA";
134
+ /** ENTITLE_NEED_BILLING_ADDRESS - billing address required */
135
+ ErrorCode[ErrorCode["ENTITLE_NEED_BILLING_ADDRESS"] = 14301] = "ENTITLE_NEED_BILLING_ADDRESS";
136
+ /** REDEMPTION_INVALID_CODE - redemption code domain errors */
137
+ ErrorCode[ErrorCode["REDEMPTION_INVALID_CODE"] = 15001] = "REDEMPTION_INVALID_CODE";
138
+ /** REDEMPTION_CODE_INACTIVE - code inactive */
139
+ ErrorCode[ErrorCode["REDEMPTION_CODE_INACTIVE"] = 15002] = "REDEMPTION_CODE_INACTIVE";
140
+ /** REDEMPTION_CODE_FULLY_REDEEMED - fully redeemed */
141
+ ErrorCode[ErrorCode["REDEMPTION_CODE_FULLY_REDEEMED"] = 15003] = "REDEMPTION_CODE_FULLY_REDEEMED";
142
+ /** REDEMPTION_CODE_NOT_STARTED - not started yet */
143
+ ErrorCode[ErrorCode["REDEMPTION_CODE_NOT_STARTED"] = 15004] = "REDEMPTION_CODE_NOT_STARTED";
144
+ /** REDEMPTION_USER_NOT_ELIGIBLE - user not eligible */
145
+ ErrorCode[ErrorCode["REDEMPTION_USER_NOT_ELIGIBLE"] = 15005] = "REDEMPTION_USER_NOT_ELIGIBLE";
146
+ /** REDEMPTION_USER_REDEEM_TIMES_EXCEED - user redemption limit exceeded */
147
+ ErrorCode[ErrorCode["REDEMPTION_USER_REDEEM_TIMES_EXCEED"] = 15006] = "REDEMPTION_USER_REDEEM_TIMES_EXCEED";
148
+ /** REDEMPTION_CODE_HAS_BEEN_CREATED - redemption code already exists */
149
+ ErrorCode[ErrorCode["REDEMPTION_CODE_HAS_BEEN_CREATED"] = 15007] = "REDEMPTION_CODE_HAS_BEEN_CREATED";
150
+ /** DATA_SOURCE_TOO_LARGE - data source errors */
151
+ ErrorCode[ErrorCode["DATA_SOURCE_TOO_LARGE"] = 16001] = "DATA_SOURCE_TOO_LARGE";
152
+ ErrorCode[ErrorCode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
153
+ return ErrorCode;
154
+ }({});
155
+
156
+ //#endregion
157
+ //#region src/ts/univer/constants/univer.ts
158
+ /**
159
+ * Copyright 2023-present DreamNum Co., Ltd.
160
+ *
161
+ * Licensed under the Apache License, Version 2.0 (the "License");
162
+ * you may not use this file except in compliance with the License.
163
+ * You may obtain a copy of the License at
164
+ *
165
+ * http://www.apache.org/licenses/LICENSE-2.0
166
+ *
167
+ * Unless required by applicable law or agreed to in writing, software
168
+ * distributed under the License is distributed on an "AS IS" BASIS,
169
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
170
+ * See the License for the specific language governing permissions and
171
+ * limitations under the License.
172
+ */
173
+ let UniverType = /* @__PURE__ */ function(UniverType) {
174
+ UniverType[UniverType["UNIVER_UNKNOWN"] = 0] = "UNIVER_UNKNOWN";
175
+ UniverType[UniverType["UNIVER_DOC"] = 1] = "UNIVER_DOC";
176
+ UniverType[UniverType["UNIVER_SHEET"] = 2] = "UNIVER_SHEET";
177
+ UniverType[UniverType["UNIVER_SLIDE"] = 3] = "UNIVER_SLIDE";
178
+ UniverType[UniverType["UNIVER_PROJECT"] = 4] = "UNIVER_PROJECT";
179
+ UniverType[UniverType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
180
+ return UniverType;
181
+ }({});
182
+
183
+ //#endregion
184
+ //#region src/ts/univer/initial-sheet.ts
185
+ /**
186
+ * Copyright 2023-present DreamNum Co., Ltd.
187
+ *
188
+ * Licensed under the Apache License, Version 2.0 (the "License");
189
+ * you may not use this file except in compliance with the License.
190
+ * You may obtain a copy of the License at
191
+ *
192
+ * http://www.apache.org/licenses/LICENSE-2.0
193
+ *
194
+ * Unless required by applicable law or agreed to in writing, software
195
+ * distributed under the License is distributed on an "AS IS" BASIS,
196
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
197
+ * See the License for the specific language governing permissions and
198
+ * limitations under the License.
199
+ */
200
+ let CellType = /* @__PURE__ */ function(CellType) {
201
+ CellType[CellType["UNDEFINED"] = 0] = "UNDEFINED";
202
+ CellType[CellType["TEXT"] = 1] = "TEXT";
203
+ CellType[CellType["URL"] = 2] = "URL";
204
+ CellType[CellType["IMAGE"] = 3] = "IMAGE";
205
+ CellType[CellType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
206
+ return CellType;
207
+ }({});
208
+
209
+ //#endregion
210
+ //#region src/ts/univer/permission.ts
211
+ /**
212
+ * Copyright 2023-present DreamNum Co., Ltd.
213
+ *
214
+ * Licensed under the Apache License, Version 2.0 (the "License");
215
+ * you may not use this file except in compliance with the License.
216
+ * You may obtain a copy of the License at
217
+ *
218
+ * http://www.apache.org/licenses/LICENSE-2.0
219
+ *
220
+ * Unless required by applicable law or agreed to in writing, software
221
+ * distributed under the License is distributed on an "AS IS" BASIS,
222
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
223
+ * See the License for the specific language governing permissions and
224
+ * limitations under the License.
225
+ */
226
+ let UnitAction = /* @__PURE__ */ function(UnitAction) {
227
+ UnitAction[UnitAction["View"] = 0] = "View";
228
+ UnitAction[UnitAction["Edit"] = 1] = "Edit";
229
+ UnitAction[UnitAction["ManageCollaborator"] = 2] = "ManageCollaborator";
230
+ UnitAction[UnitAction["Print"] = 3] = "Print";
231
+ /** Duplicate - create a copy */
232
+ UnitAction[UnitAction["Duplicate"] = 4] = "Duplicate";
233
+ UnitAction[UnitAction["Comment"] = 5] = "Comment";
234
+ UnitAction[UnitAction["Copy"] = 6] = "Copy";
235
+ UnitAction[UnitAction["Share"] = 7] = "Share";
236
+ UnitAction[UnitAction["Export"] = 8] = "Export";
237
+ /** @deprecated */
238
+ UnitAction[UnitAction["MoveWorksheet"] = 9] = "MoveWorksheet";
239
+ /** @deprecated */
240
+ UnitAction[UnitAction["DeleteWorksheet"] = 10] = "DeleteWorksheet";
241
+ /** @deprecated */
242
+ UnitAction[UnitAction["HideWorksheet"] = 11] = "HideWorksheet";
243
+ /** @deprecated */
244
+ UnitAction[UnitAction["RenameWorksheet"] = 12] = "RenameWorksheet";
245
+ /** @deprecated */
246
+ UnitAction[UnitAction["CreateWorksheet"] = 13] = "CreateWorksheet";
247
+ /** @deprecated */
248
+ UnitAction[UnitAction["SetWorksheetStyle"] = 14] = "SetWorksheetStyle";
249
+ /** @deprecated */
250
+ UnitAction[UnitAction["EditWorksheetCell"] = 15] = "EditWorksheetCell";
251
+ UnitAction[UnitAction["InsertHyperlink"] = 16] = "InsertHyperlink";
252
+ UnitAction[UnitAction["Sort"] = 17] = "Sort";
253
+ UnitAction[UnitAction["Filter"] = 18] = "Filter";
254
+ UnitAction[UnitAction["PivotTable"] = 19] = "PivotTable";
255
+ /** @deprecated */
256
+ UnitAction[UnitAction["FloatImg"] = 20] = "FloatImg";
257
+ /** @deprecated */
258
+ UnitAction[UnitAction["IHistory"] = 21] = "IHistory";
259
+ /**
260
+ * RwHgtClWdt - row height, column width
261
+ *
262
+ * @deprecated
263
+ */
264
+ UnitAction[UnitAction["RwHgtClWdt"] = 22] = "RwHgtClWdt";
265
+ /**
266
+ * ViemRwHgtClWdt - row height, column width in view mode
267
+ *
268
+ * @deprecated
269
+ */
270
+ UnitAction[UnitAction["ViemRwHgtClWdt"] = 23] = "ViemRwHgtClWdt";
271
+ /**
272
+ * ViewFilter - filter in view mode
273
+ *
274
+ * @deprecated
275
+ */
276
+ UnitAction[UnitAction["ViewFilter"] = 24] = "ViewFilter";
277
+ UnitAction[UnitAction["MoveSheet"] = 25] = "MoveSheet";
278
+ /** DeleteSheet - delete the sub sheet */
279
+ UnitAction[UnitAction["DeleteSheet"] = 26] = "DeleteSheet";
280
+ UnitAction[UnitAction["HideSheet"] = 27] = "HideSheet";
281
+ UnitAction[UnitAction["CopySheet"] = 28] = "CopySheet";
282
+ UnitAction[UnitAction["RenameSheet"] = 29] = "RenameSheet";
283
+ UnitAction[UnitAction["CreateSheet"] = 30] = "CreateSheet";
284
+ UnitAction[UnitAction["SelectProtectedCells"] = 31] = "SelectProtectedCells";
285
+ UnitAction[UnitAction["SelectUnProtectedCells"] = 32] = "SelectUnProtectedCells";
286
+ UnitAction[UnitAction["SetCellStyle"] = 33] = "SetCellStyle";
287
+ UnitAction[UnitAction["SetCellValue"] = 34] = "SetCellValue";
288
+ UnitAction[UnitAction["SetRowStyle"] = 35] = "SetRowStyle";
289
+ UnitAction[UnitAction["SetColumnStyle"] = 36] = "SetColumnStyle";
290
+ UnitAction[UnitAction["InsertRow"] = 37] = "InsertRow";
291
+ UnitAction[UnitAction["InsertColumn"] = 38] = "InsertColumn";
292
+ UnitAction[UnitAction["DeleteRow"] = 39] = "DeleteRow";
293
+ UnitAction[UnitAction["DeleteColumn"] = 40] = "DeleteColumn";
294
+ UnitAction[UnitAction["EditExtraObject"] = 41] = "EditExtraObject";
295
+ /** Delete - delete the unit file */
296
+ UnitAction[UnitAction["Delete"] = 42] = "Delete";
297
+ UnitAction[UnitAction["RecoverHistory"] = 43] = "RecoverHistory";
298
+ UnitAction[UnitAction["ViewHistory"] = 44] = "ViewHistory";
299
+ UnitAction[UnitAction["CreatePermissionObject"] = 45] = "CreatePermissionObject";
300
+ UnitAction[UnitAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
301
+ return UnitAction;
302
+ }({});
303
+ let UnitRole = /* @__PURE__ */ function(UnitRole) {
304
+ UnitRole[UnitRole["Reader"] = 0] = "Reader";
305
+ UnitRole[UnitRole["Editor"] = 1] = "Editor";
306
+ UnitRole[UnitRole["Owner"] = 2] = "Owner";
307
+ UnitRole[UnitRole["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
308
+ return UnitRole;
309
+ }({});
310
+ let UnitObject = /* @__PURE__ */ function(UnitObject) {
311
+ UnitObject[UnitObject["Unkonwn"] = 0] = "Unkonwn";
312
+ UnitObject[UnitObject["Workbook"] = 1] = "Workbook";
313
+ UnitObject[UnitObject["Worksheet"] = 2] = "Worksheet";
314
+ UnitObject[UnitObject["SelectRange"] = 3] = "SelectRange";
315
+ UnitObject[UnitObject["Document"] = 4] = "Document";
316
+ UnitObject[UnitObject["Slide"] = 5] = "Slide";
317
+ UnitObject[UnitObject["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
318
+ return UnitObject;
319
+ }({});
320
+ let ObjectScope = /* @__PURE__ */ function(ObjectScope) {
321
+ ObjectScope[ObjectScope["SomeCollaborator"] = 0] = "SomeCollaborator";
322
+ ObjectScope[ObjectScope["AllCollaborator"] = 1] = "AllCollaborator";
323
+ ObjectScope[ObjectScope["OneSelf"] = 2] = "OneSelf";
324
+ ObjectScope[ObjectScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
325
+ return ObjectScope;
326
+ }({});
327
+
328
+ //#endregion
329
+ //#region src/ts/univer/workbook.ts
330
+ let CellValueType = /* @__PURE__ */ function(CellValueType) {
331
+ CellValueType[CellValueType["UNKNOWN"] = 0] = "UNKNOWN";
332
+ CellValueType[CellValueType["STRING"] = 1] = "STRING";
333
+ CellValueType[CellValueType["NUMBER"] = 2] = "NUMBER";
334
+ CellValueType[CellValueType["BOOLEAN"] = 3] = "BOOLEAN";
335
+ CellValueType[CellValueType["FORCE_STRING"] = 4] = "FORCE_STRING";
336
+ CellValueType[CellValueType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
337
+ return CellValueType;
338
+ }({});
339
+
340
+ //#endregion
341
+ //#region src/ts/univercloud/stats/v1/stats.ts
342
+ /**
343
+ * Copyright 2023-present DreamNum Co., Ltd.
344
+ *
345
+ * Licensed under the Apache License, Version 2.0 (the "License");
346
+ * you may not use this file except in compliance with the License.
347
+ * You may obtain a copy of the License at
348
+ *
349
+ * http://www.apache.org/licenses/LICENSE-2.0
350
+ *
351
+ * Unless required by applicable law or agreed to in writing, software
352
+ * distributed under the License is distributed on an "AS IS" BASIS,
353
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
354
+ * See the License for the specific language governing permissions and
355
+ * limitations under the License.
356
+ */
357
+ let IRecordType = /* @__PURE__ */ function(IRecordType) {
358
+ /** Unknown - don't use */
359
+ IRecordType[IRecordType["Unknown"] = 0] = "Unknown";
360
+ IRecordType[IRecordType["Colla"] = 1] = "Colla";
361
+ IRecordType[IRecordType["Import"] = 2] = "Import";
362
+ IRecordType[IRecordType["Export"] = 3] = "Export";
363
+ IRecordType[IRecordType["ICreateUnit"] = 4] = "ICreateUnit";
364
+ IRecordType[IRecordType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
365
+ return IRecordType;
366
+ }({});
367
+
368
+ //#endregion
369
+ //#region src/ts/universer/v1/comb.ts
370
+ /** more details: https://c3fgartrp2.feishu.cn/docx/OS47dk8BCo1ZeKxXiNvcDLuZn2g#PymGdupuyoYfvTxv1EBciV7in9b */
371
+ let CombCmd = /* @__PURE__ */ function(CombCmd) {
372
+ /** UNKNOWN_CMD - unknown cmd */
373
+ CombCmd[CombCmd["UNKNOWN_CMD"] = 0] = "UNKNOWN_CMD";
374
+ /** HELLO - call hello to get comb info, this is essential after you connect to the server */
375
+ CombCmd[CombCmd["HELLO"] = 1] = "HELLO";
376
+ /** JOIN - call join to join couple of rooms */
377
+ CombCmd[CombCmd["JOIN"] = 2] = "JOIN";
378
+ /** LEAVE - call leave to leave a room */
379
+ CombCmd[CombCmd["LEAVE"] = 3] = "LEAVE";
380
+ /** INGEST - call ingest to broadcast a message to a room */
381
+ CombCmd[CombCmd["INGEST"] = 4] = "INGEST";
382
+ /** HEARTBEAT - call heartbeat to keep the connection alive */
383
+ CombCmd[CombCmd["HEARTBEAT"] = 5] = "HEARTBEAT";
384
+ /**
385
+ * RECV - RECV not a cmd actually, you never call a RECV cmd.
386
+ * when you receive a message from comb(may be created by another user), the cmd will be RECV
387
+ */
388
+ CombCmd[CombCmd["RECV"] = 6] = "RECV";
389
+ CombCmd[CombCmd["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
390
+ return CombCmd;
391
+ }({});
392
+ let CmdRspCode = /* @__PURE__ */ function(CmdRspCode) {
393
+ CmdRspCode[CmdRspCode["UNKNOWN_CODE"] = 0] = "UNKNOWN_CODE";
394
+ CmdRspCode[CmdRspCode["OK"] = 1] = "OK";
395
+ CmdRspCode[CmdRspCode["FAIL"] = 2] = "FAIL";
396
+ /**
397
+ * JOIN_ROOM_FULL - 1000~1999 room related
398
+ * max room member reached
399
+ */
400
+ CmdRspCode[CmdRspCode["JOIN_ROOM_FULL"] = 1001] = "JOIN_ROOM_FULL";
401
+ /** JOIN_ROOM_NOT_EXISTS - the specified room does not exists */
402
+ CmdRspCode[CmdRspCode["JOIN_ROOM_NOT_EXISTS"] = 1002] = "JOIN_ROOM_NOT_EXISTS";
403
+ /** JOIN_ROOM_PERMISSION_DENIED - has no permission to join the room */
404
+ CmdRspCode[CmdRspCode["JOIN_ROOM_PERMISSION_DENIED"] = 1003] = "JOIN_ROOM_PERMISSION_DENIED";
405
+ /** GLOBAL_ROOMS_CNT_EXCEEDS - global live collaboration rooms count exceeds */
406
+ CmdRspCode[CmdRspCode["GLOBAL_ROOMS_CNT_EXCEEDS"] = 1004] = "GLOBAL_ROOMS_CNT_EXCEEDS";
407
+ CmdRspCode[CmdRspCode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
408
+ return CmdRspCode;
409
+ }({});
410
+
411
+ //#endregion
412
+ //#region src/ts/universer/v1/file.ts
413
+ let FileSource = /* @__PURE__ */ function(FileSource) {
414
+ FileSource[FileSource["Undefined"] = 0] = "Undefined";
415
+ /** HttpImport - assign UserID */
416
+ FileSource[FileSource["HttpImport"] = 1] = "HttpImport";
417
+ /** HttpExport - assign UserID */
418
+ FileSource[FileSource["HttpExport"] = 2] = "HttpExport";
419
+ /** UnitEmbedded - assign UnitID */
420
+ FileSource[FileSource["UnitEmbedded"] = 3] = "UnitEmbedded";
421
+ /** UnitSnapshot - assign UnitID */
422
+ FileSource[FileSource["UnitSnapshot"] = 4] = "UnitSnapshot";
423
+ /** UserProfileImg - assign UserID */
424
+ FileSource[FileSource["UserProfileImg"] = 5] = "UserProfileImg";
425
+ /** ClipsheetFragments - assign UserID, fragmented file will be deleted after 30 days */
426
+ FileSource[FileSource["ClipsheetFragments"] = 6] = "ClipsheetFragments";
427
+ /** LLMInputData - assign UserID */
428
+ FileSource[FileSource["LLMInputData"] = 7] = "LLMInputData";
429
+ FileSource[FileSource["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
430
+ return FileSource;
431
+ }({});
432
+
433
+ //#endregion
434
+ //#region src/utils.ts
435
+ /**
436
+ * To examine if a response is an error.
437
+ *
438
+ * @param error error interface
439
+ * @returns if the response is an error
440
+ */
441
+ function isError(error) {
442
+ if (error && error.code && error.code !== ErrorCode.OK && error.code !== "OK") return true;
443
+ return false;
444
+ }
445
+
446
+ //#endregion
447
+ export { CellType, CellValueType, CmdRspCode, CombCmd, CommentSolvedStatus, CommentUpdateEventType, ErrorCode, FileSource, IRecordType, ObjectScope, UnitAction, UnitObject, UnitRole, UniverType, isError };
@@ -1,40 +1,43 @@
1
- export type { DeserializedSheetBlock as IDeserializedSheetBlock, GetDeserializedSheetBlockResponse as IGetDeserializedSheetBlockResponse } from './other/sheet_block';
2
- export type { Changeset as IChangeset, Command as ICommand, Mutation as IMutation } from './ts/univer/changeset';
3
- export { CommentUpdate_Status as CommentSolvedStatus, CommentUpdate_EventType as CommentUpdateEventType, type CollaMsg as ICollaMsg, type CollaMsgErrorEvent as ICollaMsgErrorEvent, type CollaMsgJoin as ICollaMsgJoin, type CollaMsgLeave as ICollaMsgLeave, type CommentUpdate as ICommentUpdate, type LiveShareNewHost as ILiveShareNewHost, type LiveShareOperation as ILiveShareOperation, type LiveShareOperation_Operation as ILiveShareOperation_Operation, type LiveShareOperation_OperationsEntry as ILiveShareOperation_OperationsEntry, type LiveShareRequestHost as ILiveShareRequestHost, type LiveShareTerminate as ILiveShareTerminate, type ShouldCloseConn as IShouldCloseConn, type UpdateCollaborator as IUpdateCollaborator, type UpdateCursor as IUpdateCursor, type UpdatePermissionObj as IUpdatePermissionObj, } from './ts/univer/colla_msg';
4
- export { ErrorCode, type Error as IError } from './ts/univer/constants/errors';
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
+ export type { IDeserializedSheetBlock, IGetDeserializedSheetBlockResponse, } from './other/sheet-block';
17
+ export type { IChangeset, ICommand, IMutation, } from './ts/univer/changeset';
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, } from './ts/univer/constants/errors';
5
20
  export { UniverType } from './ts/univer/constants/univer';
6
- export type { DocumentMeta as IDocumentMeta } from './ts/univer/doc';
7
- export { CellType, type InitialSheet as IInitialSheet, type Row as IRow, type RowCell as IRow_Cell, } from './ts/univer/initial_sheet';
8
- export type { UnitPermissionStrategy as IUnitPermissionStrategy, UnitRoleKV as IUnitRoleKV, } from './ts/univer/permission';
9
- export { ObjectScope, UnitAction, UnitObject, UnitRole, UnitShareScope, } from './ts/univer/permission';
10
- export type { Range as IRange } from './ts/univer/range';
11
- export type { Resource as IResource } from './ts/univer/resource';
12
- export type { Snapshot as ISnapshot, TableInfo as ITableInfo, } from './ts/univer/snapshot';
13
- 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';
14
- export type { Record as IRecord, Report as IReport, } from './ts/univercloud/stats/v1/stats';
15
- export { RecordType as IRecordType, } from './ts/univercloud/stats/v1/stats';
16
- export { type ApplyRequest as IApplyRequest, type ApplyResponse as IApplyResponse, type CreateUnitRequest as ICreateUnitRequest, type CreateUnitResponse as ICreateUnitResponse, type DirectWriteBody as IDirectWriteBody, type DirectWriteRequest as IDirectWriteRequest, type DirectWriteResponse as IDirectWriteResponse, type DisposeRequest as IDisposeRequest, type DisposeResponse as IDisposeResponse, type EnsureSnapshotRequest as IEnsureSnapshotRequest, type EnsureSnapshotResponse as IEnsureSnapshotResponse, type ForkUnitRequest as IForkUnitRequest, type ForkUnitResponse as IForkUnitResponse, type GetUnitRawContentRequest as IGetUnitRawContentRequest, type GetUnitRawContentResponse as IGetUnitRawContentResponse, type PreloadUnitRequest as IPreloadUnitRequest, type PreloadUnitResponse as IPreloadUnitResponse, type WorkbookCreateMeta as IWorkbookCreateMeta, } from './ts/univerpro/v1/apply';
17
- export { type HelperService as ICollaborationHelperService, type CreateLatestSnapshotInBackgroundRequest as ICreateLatestSnapshotInBackgroundRequest, type CreateLatestSnapshotInBackgroundResponse as ICreateLatestSnapshotInBackgroundResponse, } from './ts/univerpro/v1/helper';
18
- export type { CloseSessionRequest as ICloseSessionRequest, CloseSessionResponse as ICloseSessionResponse, ComputeRequest as IComputeRequest, ComputeResponse as IComputeResponse, CreateWorkbookRequest as ICreateWorkbookRequest, CreateWorkbookResponse as ICreateWorkbookResponse, Cuboid as ICuboid, CuboidData as ICuboidData, Dimension as IDimension, Field as IField, FilterNumber as IFilterNumber, FilterString as IFilterString, GetAggregationParamsRequest as IGetAggregationParamsRequest, GetAggregationParamsResponse as IGetAggregationParamsResponse, GetCuboidsByIdRequest as IGetCuboidsByIdRequest, GetCuboidsByIdResponse as IGetCuboidsByIdResponse, GetPreprocessRangesRequest as IGetPreprocessRangesRequest, GetPreprocessRangesResponse as IGetPreprocessRangesResponse, GetValuesRequest as IGetValuesRequest, GetValuesResponse as IGetValuesResponse, Measure as IMeasure, MergeRequest as IMergeRequest, MergeResponse as IMergeResponse, RunAggregationRequest as IRunAggregationRequest, SetBackgroundColorRequest as ISetBackgroundColorRequest, SetBackgroundColorResponse as ISetBackgroundColorResponse, SetBorderRequest as ISetBorderRequest, SetBorderResponse as ISetBorderResponse, SetValueRequest as ISetValueRequest, SetValueResponse as ISetValueResponse, SetValuesRequest as ISetValuesRequest, SetValuesResponse as ISetValuesResponse, SetWorkbookNameRequest as ISetWorkbookNameRequest, SetWorkbookNameResponse as ISetWorkbookNameResponse, SSCService as ISSCService, TableInfoList as ITableInfoList, View as IView, ViewDetail as IViewDetail, } from './ts/univerpro/v1/ssc';
19
- export { NumberFilterEnum } from './ts/univerpro/v1/ssc';
20
- export type { GetSSRRequest as IGetSSRRequest, GetSSRResponse as IGetSSRResponse, SSRService as ISSRService, } from './ts/univerpro/v1/ssr';
21
- export type { AccessKey as IAccessKey, AccessKeyService as IAccessKeyService, CreateAccessKeyRequest as ICreateAccessKeyRequest, CreateAccessKeyResponse as ICreateAccessKeyResponse, DeleteAccessKeyRequest as IDeleteAccessKeyRequest, DeleteAccessKeyResponse as IDeleteAccessKeyResponse, ListAccessKeysRequest as IListAccessKeysRequest, ListAccessKeysResponse as IListAccessKeysResponse, } from './ts/universer/v1/access_key';
22
- export type { CodeFragmentation as ICodeFragmentation, } from './ts/universer/v1/analyse_cmn';
23
- export { DataFragmentationType as DataFragmentationTypeEnum, } from './ts/universer/v1/analyse_cmn';
24
- export type { AnalyseTask, DeleteAnalyseTaskRequest, DeleteAnalyseTaskResponse, GetAnalyseTaskRequest, GetAnalyseTaskResponse, GetGoalRecommendationsRequest, GetGoalRecommendationsResponse, GetReportDataFragmentationRequest, GetReportDataFragmentationResponse, ReportDataFragmentation as IReportDataFragmentation, ListAnalyseTasksRequest, ListAnalyseTasksResponse, ListReportDataFragmentationsRequest, ListReportDataFragmentationsResponse, RenameAnalyseTaskRequest, RenameAnalyseTaskResponse, RerunAnalyseTaskRequest, RerunAnalyseTaskResponse, SubmitAnalyseTaskRequest, SubmitAnalyseTaskResponse, SummarizeSourceDataRequest, SummarizeSourceDataResponse, UpdateReportDataFragmentationRequest, UpdateReportDataFragmentationResponse, } from './ts/universer/v1/analyse_task';
25
- export { AnalyseTaskStatus, } from './ts/universer/v1/analyse_task';
26
- export type { ActionInfo as IActionInfo, AllowedRequest as IAllowedRequest, AllowedResponse as IAllowedResponse, AuthzService as IAuthzService, BatchAllowedResponse as IBatchAllowedResponse, Collaborator as ICollaborator, CreateCollaboratorRequest as ICreateCollaboratorRequest, CreateCollaboratorResponse as ICreateCollaboratorResponse, CreateRequest as ICreateRequest, CreateRequest_SelectRangeObject as ICreateRequest_SelectRangeObject, CreateRequest_WorksheetObject as ICreateRequest_WorksheetObject, CreateResponse as ICreateResponse, DeleteCollaboratorRequest as IDeleteCollaboratorRequest, DeleteCollaboratorResponse as IDeleteCollaboratorResponse, ListCollaboratorRequest as IListCollaboratorRequest, ListCollaboratorResponse as IListCollaboratorResponse, ListPermPointRequest as IListPermPointRequest, ListPermPointResponse as IListPermPointResponse, ListRolesRequest as IListRolesRequest, ListRolesResponse as IListRolesResponse, PermissionPoint as IPermissionPoint, PutCollaboratorsRequest as IPutCollaboratorsRequest, PutCollaboratorsResponse as IPutCollaboratorsResponse, UpdateCollaboratorRequest as IUpdateCollaboratorRequest, UpdateCollaboratorResponse as IUpdateCollaboratorResponse, UpdatePermPointRequest as IUpdatePermPointRequest, UpdatePermPointResponse as IUpdatePermPointResponse, } from './ts/universer/v1/authz';
27
- 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/universer/v1/comb';
28
- export type { AddCommentRequest, AddCommentResponse, DeleteCommentRequest, DeleteCommentResponse, EditCommentRequest, EditCommentResponse, ListCommentsRequest, ListCommentsResponse, Reply, ReplyCommentRequest, ReplyCommentResponse, SolvedCommentRequest, SolvedCommentResponse, Thread, } from './ts/universer/v1/comment';
29
- export type { GetConversationDataFragmentationRequest, GetConversationDataFragmentationResponse, Attachment as IAttachment, ChatContentSSEBlock as IChatContentSSEBlock, ChatFragmentationSSEBlock as IChatFragmentationSSEBlock, ChatSSEBlock as IChatSSEBlock, ContentBlock as IContentBlock, Conversation as IConversation, ConversationDataFragmentation as IConversationDataFragmentation, ConversationMessage as IConversationMessage, ListConversationMessagesRequest as IListConversationMessagesRequest, ListConversationMessagesResponse as IListConversationMessagesResponse, ListConversationsRequest as IListConversationsRequest, ListConversationsResponse as IListConversationsResponse, SubmitPromptRequest as ISubmitPromptRequest, ListConversationDataFragmentationsRequest, ListConversationDataFragmentationsResponse, UpdateConversationDataFragmentationRequest, UpdateConversationDataFragmentationResponse, GetConversationCsRequest as IGetConversationCsRequest, GetConversationCsResponse as IGetConversationCsResponse, } from './ts/universer/v1/conversation';
30
- export { AttachmentType as AttachmentTypeEnum, ChatSSEBlockType as ChatSSEBlockTypeEnum, ChatSSEStatus as ChatSSEStatusEnum, CompletionStatus as CompletionStatusEnum, ConversationRoleType as ConversationRoleTypeEnum, ContentBlockType as MessageContentBlockTypeEnum, ContentType as MessageContentTypeEnum, MessageReaction as MessageReactionEnum, } from './ts/universer/v1/conversation';
31
- export { ImportOutputType as ImportOutputTypeEnum, ImportScene as ImportSceneEnum, } from './ts/universer/v1/exchange';
32
- export { FileSource, type FileService as IFileService, type FileUploadRequest as IFileUploadRequest, type FileUploadMeta as IuploadFileRequestMeta, type UploadResponse as IUploadResponse, } from './ts/universer/v1/file';
33
- export type { CreateHistoryRequest as ICreateHistoryRequest, CreateHistoryResponse as ICreateHistoryResponse, History as IHistory, HistoryEntities as IHistoryEntities, HistoryListRequest as IHistoryListRequest, HistoryService as IHistoryService, GetHistoryCsRequest as IGetHistoryCsRequest, GetHistoryCsResponse as IGetHistoryCsResponse, } from './ts/universer/v1/history';
34
- export type { GetUserLicenseRequest as IGetUserLicenseRequest, GetUserLicenseResponse as IGetUserLicenseResponse, LicenseService as ILicenseService, } from './ts/universer/v1/license';
35
- export { type CopyFileMetaRequest as ICopyFileMetaRequest, type CopyFileMetaResponse as ICopyFileMetaResponse, type FetchMissingChangesetsRequest as IFetchMissingChangesetsRequest, type FetchMissingChangesetsResponse as IFetchMissingChangesetsResponse, type GetLatestCsReqIdBySidRequest as IGetLatestCsReqIdBySidRequest, type GetLatestCsReqIdBySidResponse as IGetLatestCsReqIdBySidResponse, 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 ReportUnitRoutingStatsRequest as IReportUnitRoutingStatsRequest, type ReportUnitRoutingStatsResponse as IReportUnitRoutingStatsResponse, 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, type UpdateUnitRequest as IUpdateUnitRequest, type UpdateUnitResponse as IUpdateUnitResponse, } from './ts/universer/v1/snapshot';
36
- export { type InstallPackagesRequest as IInstallPackagesRequest, type InstallPackagesResponse as IInstallPackagesResponse, type RunUniscriptRequest as IRunUniscriptRequest, type RunUniscriptResponse as IRunUniscriptResponse, type Uniscript as IUniscript, type UniscriptEnv as IUniscriptEnv, UniscriptEnv, } from './ts/universer/v1/uniscript';
37
- export type { GetSessionTicketRequest as IGetSessionTicketRequest, GetSessionTicketResponse as IGetSessionTicketResponse, GetUserRequest as IGetUserRequest, GetUserResponse as IGetUserResponse, ListUsersResponse as IListUsersResponse, User as IUser, UserService as IUserService, } from './ts/universer/v1/user';
38
- export { type BindingUnitRequest as IBindingUnitRequest, type DeleteUnitRequest as IDeleteUnitRequest, type DeleteUnitResponse as IDeleteUnitResponse, type RecentListRequest as IRecentListRequest, type RecentListResponse as IRecentListResponse, type RemoveNodeRequest as IRemoveNodeRequest, type RemoveNodeResponse as IRemoveNodeResponse, type RestoreNodeRequest as IRestoreNodeRequest, type RestoreNodeResponse as IRestoreNodeResponse, RootType as IRootType, type WorkspaceService as IWorkspaceService, } from './ts/universer/v1/workspace';
39
- export type { RangeCompletionRequest as IRangeCompletionRequest, RangeCompletionResponse as IRangeCompletionResponse, UrlContext as IUrlContext, UrlRowContext as IUrlRowContext, YuumiService as IYuumiService, } from './ts/yuumi/v1/yuumi';
21
+ export type { IDocumentMeta } from './ts/univer/doc';
22
+ export { CellType, type IInitialSheet, type IRow, type IRowCell, } from './ts/univer/initial-sheet';
23
+ export type { IUnitRoleKV, } from './ts/univer/permission';
24
+ export { ObjectScope, UnitAction, UnitObject, UnitRole, } from './ts/univer/permission';
25
+ export type { IRange } from './ts/univer/range';
26
+ export type { ISnapshot, ITableInfo, } from './ts/univer/snapshot';
27
+ export { CellValueType, type ICellData, type ISheetBlock, type ISheetBlockMeta, type IWorkbookMeta, type IWorksheetMeta, } from './ts/univer/workbook';
28
+ export type { IRecord, } from './ts/univercloud/stats/v1/stats';
29
+ export { IRecordType, } from './ts/univercloud/stats/v1/stats';
30
+ export { type IApplyRequest, type IApplyResponse, type ICreateUnitRequest, type ICreateUnitResponse, type IDirectWriteRequest, type IDirectWriteResponse, type IDisposeRequest, type IDisposeResponse, type IEnsureSnapshotRequest, type IEnsureSnapshotResponse, type IForkUnitRequest, type IForkUnitResponse, type IGetUnitRawContentRequest, type IGetUnitRawContentResponse, type IPreloadUnitRequest, type IPreloadUnitResponse, type IWorkbookCreateMeta, } from './ts/univerpro/v1/apply';
31
+ export { type ICollaborationHelperService, type ICreateLatestSnapshotInBackgroundRequest, type ICreateLatestSnapshotInBackgroundResponse, } from './ts/univerpro/v1/helper';
32
+ export type { IComputeRequest, IComputeResponse, IGetPreprocessRangesRequest, IGetPreprocessRangesResponse, IGetValuesRequest, IGetValuesResponse, ITableInfoList, } from './ts/univerpro/v1/ssc';
33
+ export type { IGetSSRRequest, IGetSSRResponse, } from './ts/univerpro/v1/ssr';
34
+ export type { IAccessKeyService, } from './ts/universer/v1/access-key';
35
+ export type { IActionInfo, IAllowedRequest, IAllowedResponse, IAuthzService, IBatchAllowedResponse, ICollaborator, ICreateCollaboratorRequest, ICreateRequest, ICreateRequestSelectRangeObject, ICreateResponse, IDeleteCollaboratorRequest, IDeleteCollaboratorResponse, IListCollaboratorRequest, IListCollaboratorResponse, IListPermPointRequest, IListPermPointResponse, IListRolesRequest, IListRolesResponse, IPermissionPoint, IPutCollaboratorsRequest, IPutCollaboratorsResponse, IUpdateCollaboratorRequest, IUpdateCollaboratorResponse, IUpdatePermPointRequest, } from './ts/universer/v1/authz';
36
+ export { CmdRspCode, CombCmd, type ICombJoinRequest, type ICombJoinResponse, type ICombLeaveRequest, type ICombService, type IMember, type INewChangesRequest, type INewChangesResponse, } from './ts/universer/v1/comb';
37
+ export type { IAddCommentRequest, IAddCommentResponse, IDeleteCommentRequest, IDeleteCommentResponse, IEditCommentRequest, IEditCommentResponse, IListCommentsRequest, IListCommentsResponse, IReply, IReplyCommentRequest, IReplyCommentResponse, ISolvedCommentRequest, ISolvedCommentResponse, IThread, } from './ts/universer/v1/comment';
38
+ export { FileSource, type IFileService, type IFileUploadRequest, } from './ts/universer/v1/file';
39
+ export type { ICreateHistoryRequest, ICreateHistoryResponse, IGetHistoryCsRequest, IGetHistoryCsResponse, IHistoryService, } from './ts/universer/v1/history';
40
+ 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';
40
43
  export { isError } from './utils';
@@ -0,0 +1,27 @@
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 { IError } from '../ts/univer/constants/errors';
17
+ export interface IGetDeserializedSheetBlockResponse {
18
+ error: IError | undefined;
19
+ block: IDeserializedSheetBlock | undefined;
20
+ }
21
+ export interface IDeserializedSheetBlock {
22
+ /** block id, generate by backend server */
23
+ id: string;
24
+ startRow: number;
25
+ endRow: number;
26
+ data: object;
27
+ }
@@ -1,27 +1,41 @@
1
- import { UniverType } from './constants/univer';
2
- export declare const protobufPackage = "univer";
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 { UniverType } from './constants/univer';
3
17
  /** It should be the same as `ICommandInfo` in the frontend. */
4
- export interface Mutation {
18
+ export interface IMutation {
5
19
  /** ID of the mutation */
6
20
  id: string;
7
21
  /** serialized params */
8
22
  data: string;
9
23
  }
10
24
  /** It should be the same as `ICommand` in the frontend. */
11
- export interface Command {
25
+ export interface ICommand {
12
26
  /** ID of the command */
13
27
  id: string;
14
28
  /** serizlized params */
15
29
  data: string;
16
30
  }
17
- export interface Changeset {
31
+ export interface IChangeset {
18
32
  /** unitID of the Univer document */
19
33
  unitID: string;
20
34
  type: UniverType;
21
35
  baseRev: number;
22
36
  revision: number;
23
37
  userID: string;
24
- mutations: Mutation[];
38
+ mutations: IMutation[];
25
39
  memberID: string;
26
40
  /** sid works with reqId, represent the id of a unit edit session */
27
41
  sid?: string | undefined;