@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,578 +0,0 @@
1
- import { Metadata } from '@grpc/grpc-js';
2
- import { Observable } from 'rxjs';
3
- import { OpenAIMessage, SystemHint } from '../../ai_common/common';
4
- import { Changeset } from '../../univer/changeset';
5
- import { Error } from '../../univer/constants/errors';
6
- import { DataFragmentationType } from './analyse_cmn';
7
- import { RateDetail } from './entitlement';
8
- export declare const protobufPackage = "universer.v1";
9
- export declare enum CompletionStatus {
10
- Completion_None = 0,
11
- Completion_Completed = 1,
12
- Completion_UserCancelled = 2,
13
- Completion_SystemErr = 3,
14
- /** Completion_Interrupted - like hunman in the loop, and etc... */
15
- Completion_Interrupted = 4,
16
- UNRECOGNIZED = -1
17
- }
18
- export declare enum ConversationRoleType {
19
- RoleType_None = 0,
20
- RoleType_User = 1,
21
- RoleType_Agent = 2,
22
- UNRECOGNIZED = -1
23
- }
24
- export declare enum ContentBlockType {
25
- ContentBlockType_None = 0,
26
- ContentBlockType_Prompt = 1,
27
- ContentBlockType_Thinking = 2,
28
- ContentBlockType_Report = 3,
29
- /** ContentBlockType_PromptV2 - map to json string of the orig SubmitPromptRequest */
30
- ContentBlockType_PromptV2 = 4,
31
- /** ContentBlockType_HITL - HITL event */
32
- ContentBlockType_HITL = 103,
33
- /** ContentBlockType_ToolCallStart - tool call start */
34
- ContentBlockType_ToolCallStart = 105,
35
- /** ContentBlockType_ToolCallResult - tool call end */
36
- ContentBlockType_ToolCallResult = 106,
37
- /** ContentBlockType_SubAgentsCallStart - sub-agents calls start */
38
- ContentBlockType_SubAgentsCallStart = 107,
39
- /** ContentBlockType_SubAgentsCallResult - sub-agents calls end */
40
- ContentBlockType_SubAgentsCallResult = 108,
41
- /** ContentBlockType_SubAgentRunStarted - sub-agent started event */
42
- ContentBlockType_SubAgentRunStarted = 109,
43
- /** ContentBlockType_SubAgentRunFinished - sub-agent finished event */
44
- ContentBlockType_SubAgentRunFinished = 110,
45
- UNRECOGNIZED = -1
46
- }
47
- export declare enum ContentType {
48
- ContentType_None = 0,
49
- ContentType_PlainText = 1,
50
- ContentType_Markdown = 2,
51
- UNRECOGNIZED = -1
52
- }
53
- export declare enum AttachmentType {
54
- AttachmentType_None = 0,
55
- AttachmentType_Unit = 1,
56
- AttachmentType_Recommendation = 3,
57
- AttachmentType_DataSource = 4,
58
- AttachmentType_HitlAnswer = 5,
59
- UNRECOGNIZED = -1
60
- }
61
- export declare enum MessageReaction {
62
- Reaction_NoReact = 0,
63
- Reaction_ThumbsUp = 1,
64
- Reaction_ThumbsDown = 2,
65
- UNRECOGNIZED = -1
66
- }
67
- export declare enum ChatSSEBlockType {
68
- ChatSSEBlockType_None = 0,
69
- /** ChatSSEBlockType_EndOfStream - indicates that SSE stream ended */
70
- ChatSSEBlockType_EndOfStream = 1,
71
- /** ChatSSEBlockType_Reject - prompt rejected univer.constants.Error */
72
- ChatSSEBlockType_Reject = 2,
73
- /** ChatSSEBlockType_ModConversation - conversation modified */
74
- ChatSSEBlockType_ModConversation = 3,
75
- /** ChatSSEBlockType_PromptAck - prompt message ACK */
76
- ChatSSEBlockType_PromptAck = 4,
77
- /** ChatSSEBlockType_ChatContent - chat answer stream content */
78
- ChatSSEBlockType_ChatContent = 5,
79
- /** ChatSSEBlockType_Attachment - attachment of chat answer */
80
- ChatSSEBlockType_Attachment = 6,
81
- /** ChatSSEBlockType_RespMeta - meta data of the response message */
82
- ChatSSEBlockType_RespMeta = 7,
83
- /** ChatSSEBlockType_StreamErr - stream error */
84
- ChatSSEBlockType_StreamErr = 8,
85
- /** ChatSSEBlockType_ChatThinking - chat thinking stream content */
86
- ChatSSEBlockType_ChatThinking = 9,
87
- /** ChatSSEBlockType_Fragmentation - content data fragmentation */
88
- ChatSSEBlockType_Fragmentation = 10,
89
- /**
90
- * ChatSSEBlockType_RawMessage - deprecated, raw message from model, just use tool message body, use ChatSSEBlockType_ToolCall instead
91
- *
92
- * @deprecated
93
- */
94
- ChatSSEBlockType_RawMessage = 101,
95
- /**
96
- * ChatSSEBlockType_EditThinking - deprecated, use ChatSSEBlockType_ChatThinking instead
97
- *
98
- * @deprecated
99
- */
100
- ChatSSEBlockType_EditThinking = 102,
101
- /** ChatSSEBlockType_HITL - HITL event */
102
- ChatSSEBlockType_HITL = 103,
103
- /** ChatSSEBlockType_ToolCallStart - tool call start */
104
- ChatSSEBlockType_ToolCallStart = 105,
105
- /** ChatSSEBlockType_ToolCallResult - tool call end */
106
- ChatSSEBlockType_ToolCallResult = 106,
107
- /** ChatSSEBlockType_SubAgentsCallStart - sub-agents calls start */
108
- ChatSSEBlockType_SubAgentsCallStart = 107,
109
- /** ChatSSEBlockType_SubAgentsCallResult - sub-agents calls end */
110
- ChatSSEBlockType_SubAgentsCallResult = 108,
111
- /** ChatSSEBlockType_SubAgentRunStarted - sub-agent started event */
112
- ChatSSEBlockType_SubAgentRunStarted = 109,
113
- /** ChatSSEBlockType_SubAgentRunFinished - sub-agent finished event */
114
- ChatSSEBlockType_SubAgentRunFinished = 110,
115
- UNRECOGNIZED = -1
116
- }
117
- export declare enum ChatSSEStatus {
118
- ChatSSEStatus_None = 0,
119
- /** ChatSSEStatus_Appending - streaming still ongoing */
120
- ChatSSEStatus_Appending = 1,
121
- /** ChatSSEStatus_Success - streaming completed successfully */
122
- ChatSSEStatus_Success = 2,
123
- UNRECOGNIZED = -1
124
- }
125
- export interface ModelDetail {
126
- /** use string representation of enum ai_common.UniverAIModel */
127
- modelId: string;
128
- rateDetails: RateDetail[];
129
- }
130
- export interface ListAvailableModelsRequest {
131
- }
132
- export interface ListAvailableModelsResponse {
133
- models: ModelDetail[];
134
- error: Error | undefined;
135
- }
136
- export interface GetConversationModelsRequest {
137
- }
138
- export interface GetConversationModel {
139
- /** model id */
140
- id: string;
141
- /** show name */
142
- name: string;
143
- }
144
- export interface GetConversationModelsResponse {
145
- models: GetConversationModel[];
146
- error: Error | undefined;
147
- }
148
- export interface GetPromptRecommendationsRequest {
149
- /** must specify the unitIds */
150
- unitIds: string[];
151
- /**
152
- * if not in an existing conversation,
153
- * leave conversationId empty.
154
- */
155
- conversationId: string;
156
- /** Locale Code */
157
- locale: string;
158
- modelId: string;
159
- /** how many recommendations needed, default is 3 */
160
- count: number;
161
- /** use unit or data source. */
162
- dataSourceId: string;
163
- }
164
- export interface GetPromptRecommendationsResponse {
165
- recommendations: string[];
166
- error: Error | undefined;
167
- }
168
- export interface Conversation {
169
- conversationId: string;
170
- /** unix timestamp milli seconds */
171
- createTime: string;
172
- /** unix timestamp milli seconds */
173
- lastUpdate: string;
174
- title: string;
175
- creatorUid: string;
176
- expireTime: string;
177
- /**
178
- * version history:
179
- * 2512--不支持unit编辑类会话
180
- * 2601--统一分析和编辑会话
181
- */
182
- agentVersion: number;
183
- /** this field is nil for old version conversations */
184
- limits: ConversationLimits | undefined;
185
- /** this field is nil for old version conversations */
186
- settings: ConversationSettings | undefined;
187
- shared: boolean;
188
- }
189
- export interface ConversationLimits {
190
- /** cumulative tokens used in this conversation */
191
- cumulativeTokens: number;
192
- /** max allowed tokens in this conversation */
193
- maxAllowedTokens: number;
194
- }
195
- export interface ConversationSettings {
196
- /** add here if more settings needed in the future. */
197
- model: string;
198
- }
199
- export interface GetConversationRequest {
200
- conversationId: string;
201
- }
202
- export interface GetConversationResponse {
203
- conversation: Conversation | undefined;
204
- error: Error | undefined;
205
- }
206
- export interface ListConversationsRequest {
207
- /**
208
- * batchId,
209
- * set to empty in the 1st scroller request,
210
- * then set to nextBatchId(which was returned by the previous request) in the following scroller request.
211
- */
212
- batchId: string;
213
- /** limit, specify how many records needed. */
214
- limit: number;
215
- }
216
- export interface ListConversationsResponse {
217
- /** conversations, order by lastUpdate desc default. */
218
- conversations: Conversation[];
219
- hasMore: boolean;
220
- nextBatchId: string;
221
- error: Error | undefined;
222
- }
223
- export interface ListConversationsByUnitRequest {
224
- /**
225
- * batchId,
226
- * set to empty in the 1st scroller request,
227
- * then set to nextBatchId(which was returned by the previous request) in the following scroller request.
228
- */
229
- batchId: string;
230
- /** limit, specify how many records needed. */
231
- limit: number;
232
- /** required */
233
- unitId: string;
234
- }
235
- export interface ListConversationsByUnitResponse {
236
- conversations: Conversation[];
237
- hasMore: boolean;
238
- nextBatchId: string;
239
- error: Error | undefined;
240
- }
241
- export interface RenameConversationRequest {
242
- conversationId: string;
243
- newTitle: string;
244
- }
245
- export interface RenameConversationResponse {
246
- error: Error | undefined;
247
- }
248
- export interface ShareConversationRequest {
249
- conversationId: string;
250
- }
251
- export interface ShareConversationResponse {
252
- error: Error | undefined;
253
- }
254
- export interface UnshareConversationRequest {
255
- conversationId: string;
256
- }
257
- export interface UnshareConversationResponse {
258
- error: Error | undefined;
259
- }
260
- export interface DeleteConversationRequest {
261
- conversationId: string;
262
- }
263
- export interface DeleteConversationResponse {
264
- error: Error | undefined;
265
- }
266
- export interface ConversationMessage {
267
- messageId: string;
268
- roleType: ConversationRoleType;
269
- /** unix timestamp milli seconds */
270
- createTime: string;
271
- /** reaction of the owner */
272
- reaction: MessageReaction;
273
- /** completionStatus, set if message is answer */
274
- completionStatus: CompletionStatus;
275
- contents: ContentBlock[];
276
- attachments: Attachment[];
277
- respMeta: ChatRespMeta | undefined;
278
- }
279
- export interface ContentBlock {
280
- blockType: ContentBlockType;
281
- contentType: ContentType;
282
- body: string;
283
- /** for multi-channel response, default is empty */
284
- channelId?: string | undefined;
285
- }
286
- export interface Attachment {
287
- type: AttachmentType;
288
- /**
289
- * id of the Attachment,
290
- * vary with the AttachmentType,
291
- * AttachmentType_Unit -> unitId;
292
- * AttachmentType_Recommendation -> no ID needed;
293
- * AttachmentType_DataSource -> dataSourceId;
294
- * AttachmentType_HitlAnswer -> no ID needed;
295
- */
296
- id: string;
297
- /**
298
- * content of the Attachment,
299
- * vary with the AttachmentType,
300
- * AttachmentType_Unit -> empty;
301
- * AttachmentType_Recommendation -> json string of recommendations(json string array);
302
- * AttachmentType_DataSource -> json string of v1.DataSource;
303
- * AttachmentType_HitlAnswer -> orig string of the hitl answer;
304
- */
305
- content: string;
306
- }
307
- export interface ListConversationMessagesRequest {
308
- conversationId: string;
309
- /**
310
- * batchId,
311
- * set to empty in the 1st scroller request,
312
- * then set to nextBatchId(which was returned by the previous request) in the following scroller request.
313
- */
314
- batchId: string;
315
- /** limit, specify how many records needed. */
316
- limit: number;
317
- }
318
- export interface ListConversationMessagesResponse {
319
- /** messages, order by createTime desc default. */
320
- messages: ConversationMessage[];
321
- nextBatchId: string;
322
- hasMore: boolean;
323
- error: Error | undefined;
324
- }
325
- export interface ReactMessageRequest {
326
- /** conversationId, required */
327
- conversationId: string;
328
- /** messageId, required */
329
- messageId: string;
330
- reaction: MessageReaction;
331
- }
332
- export interface ReactMessageResponse {
333
- error: Error | undefined;
334
- }
335
- /** SSE api: /universer-api/conversation/prompt */
336
- export interface SubmitPromptRequest {
337
- /** set to empty when begin a new conversation */
338
- conversationId: string;
339
- promptText: string;
340
- attachedUnitIds: string[];
341
- model: string;
342
- /** use unit or data source */
343
- dataSourceId: string;
344
- systemHints: SystemHint[];
345
- /** Locale Code */
346
- locale?: string | undefined;
347
- /** optional, if provided, promptText will be ignored */
348
- messages: OpenAIMessage[];
349
- /** optional, json string array of SelectedRange, only used when messages is provided */
350
- selectedRanges: string[];
351
- /** optional, eg. "plan", "ask", "agent", "brainstorm" */
352
- mode?: string | undefined;
353
- }
354
- /** SSE api: /universer-api/conversation/resume */
355
- export interface ResumeConversationRequest {
356
- conversationId: string;
357
- /** see HITLType, use string, see ai_common/common.proto, eg. hitl_select_table */
358
- type: string;
359
- /** json string, see ai_common/common.proto */
360
- resumeData: string;
361
- /** Locale Code */
362
- locale?: string | undefined;
363
- model?: string | undefined;
364
- /** the question's owner message id which is answer to. */
365
- answerToMessageId: string;
366
- }
367
- /** SSE api: /universer-api/conversation/reconnect */
368
- export interface ReconnectConversationRequest {
369
- conversationId: string;
370
- }
371
- /** chat streaming response SSE block */
372
- export interface ChatSSEBlock {
373
- blockType: ChatSSEBlockType;
374
- /**
375
- * see ai_common/common.proto
376
- * ChatSSEBlockType_ToolCallStart -> json string of ChatToolCallStartSSEBlock;
377
- * ChatSSEBlockType_ToolCallResult -> json string of ChatToolCallResultSSEBlock;
378
- * ChatSSEBlockType_SubAgentsCallStart -> json string of ChatSubAgentsCallStartSSEBlock;
379
- * ChatSSEBlockType_SubAgentsCallResult -> json string of ChatSubAgentsCallResultSSEBlock;
380
- * ChatSSEBlockType_SubAgentRunStarted -> json string of ChatSubAgentRunStartedSSEBlock;
381
- * ChatSSEBlockType_SubAgentRunFinished -> json string of ChatSubAgentRunFinishedSSEBlock;
382
- */
383
- body: string;
384
- status: ChatSSEStatus;
385
- /** for multi-channel response, default is empty */
386
- channelId?: string | undefined;
387
- }
388
- export interface ChatContentSSEBlock {
389
- contentType: ContentType;
390
- body: string;
391
- }
392
- export interface ChatThinkingSSEBlock {
393
- contentType: ContentType;
394
- body: string;
395
- }
396
- export interface ChatFragmentationSSEBlock {
397
- fragmentationId: string;
398
- /** json string of CodeFragmentation */
399
- content: string;
400
- }
401
- export interface PromptAck {
402
- /** id of the user prompt message. */
403
- messageId: string;
404
- }
405
- export interface ChatRespMeta {
406
- messageId: string;
407
- /** cumulative tokens used in this conversation */
408
- cumulativeTokens: number;
409
- /** max allowed tokens in this conversation */
410
- maxAllowedTokens: number;
411
- reportable: boolean;
412
- }
413
- export interface ConversationDataFragmentation {
414
- conversationId: string;
415
- messageId: string;
416
- fragmentationId: string;
417
- type: DataFragmentationType;
418
- title: string;
419
- unitId: string;
420
- subUnitId: string;
421
- }
422
- export interface GetConversationDataFragmentationRequest {
423
- conversationId: string;
424
- fragmentationId: string;
425
- }
426
- export interface GetConversationDataFragmentationResponse {
427
- content: string;
428
- error: Error | undefined;
429
- }
430
- export interface ListConversationDataFragmentationsRequest {
431
- conversationId: string;
432
- }
433
- export interface ListConversationDataFragmentationsResponse {
434
- fragmentations: ConversationDataFragmentation[];
435
- error: Error | undefined;
436
- }
437
- export interface UpdateConversationDataFragmentationRequest {
438
- conversationId: string;
439
- fragmentationId: string;
440
- newContent: string;
441
- }
442
- export interface UpdateConversationDataFragmentationResponse {
443
- error: Error | undefined;
444
- }
445
- export interface BindUnitWithConversationRequest {
446
- unitId: string;
447
- conversationId: string;
448
- messageId: string;
449
- }
450
- export interface BindUnitWithConversationResponse {
451
- error: Error | undefined;
452
- }
453
- export interface CancelConversationRequest {
454
- conversationId: string;
455
- }
456
- export interface CancelConversationResponse {
457
- error: Error | undefined;
458
- }
459
- export interface NeedReconnectConversationRequest {
460
- conversationId: string;
461
- }
462
- export interface NeedReconnectConversationResponse {
463
- needReconnect: boolean;
464
- error: Error | undefined;
465
- }
466
- export interface CreateReportRequest {
467
- conversationId: string;
468
- messageId: string;
469
- }
470
- export interface CreateReportResponse {
471
- report: Report | undefined;
472
- error: Error | undefined;
473
- }
474
- export interface RedoReportRequest {
475
- reportId: string;
476
- conversationId: string;
477
- }
478
- export interface PollingReportRequest {
479
- reportId: string;
480
- conversationId: string;
481
- }
482
- export interface Report {
483
- reportId: string;
484
- conversationId: string;
485
- messageId: string;
486
- /** unix timestamp milli seconds */
487
- createTime: number;
488
- updateTime: number;
489
- status: string;
490
- fragmentationId: string;
491
- title: string;
492
- summary: string;
493
- }
494
- export interface ReportList {
495
- reports: Report[];
496
- }
497
- export interface ListReportsRequest {
498
- conversationId: string;
499
- }
500
- export interface ListReportsResponse {
501
- /** @deprecated */
502
- reports: Report[];
503
- /** messageId -> ReportList */
504
- reportsMap: {
505
- [key: string]: ReportList;
506
- };
507
- error: Error | undefined;
508
- }
509
- export interface ListReportsResponse_ReportsMapEntry {
510
- key: string;
511
- value: ReportList | undefined;
512
- }
513
- export interface FinishReportRequest {
514
- reportId: string;
515
- status: string;
516
- title: string;
517
- summary: string;
518
- content: string;
519
- }
520
- export interface FinishReportResponse {
521
- error: Error | undefined;
522
- }
523
- export interface GetDashboardRequest {
524
- conversationId: string;
525
- }
526
- export interface GetDashboardResponse {
527
- conversationId: string;
528
- dashboardJson: string;
529
- error: Error | undefined;
530
- }
531
- export interface SaveDashboardRequest {
532
- conversationId: string;
533
- dashboardJson: string;
534
- }
535
- export interface SaveDashboardResponse {
536
- error: Error | undefined;
537
- }
538
- export interface GetConversationCsRequest {
539
- conversationId: string;
540
- messageIds: string[];
541
- }
542
- export interface GetConversationCsResponse {
543
- changesets: Changeset[];
544
- startRevision: number;
545
- endRevision: number;
546
- error: Error | undefined;
547
- }
548
- export interface ConversationService {
549
- GetConversation(request: GetConversationRequest, metadata?: Metadata): Observable<GetConversationResponse>;
550
- /** the conversation list is order by lastUpdate desc default. */
551
- ListConversations(request: ListConversationsRequest, metadata?: Metadata): Observable<ListConversationsResponse>;
552
- ListConversationsByUnit(request: ListConversationsByUnitRequest, metadata?: Metadata): Observable<ListConversationsByUnitResponse>;
553
- RenameConversation(request: RenameConversationRequest, metadata?: Metadata): Observable<RenameConversationResponse>;
554
- ShareConversation(request: ShareConversationRequest, metadata?: Metadata): Observable<ShareConversationResponse>;
555
- UnshareConversation(request: UnshareConversationRequest, metadata?: Metadata): Observable<UnshareConversationResponse>;
556
- DeleteConversation(request: DeleteConversationRequest, metadata?: Metadata): Observable<DeleteConversationResponse>;
557
- /** the message list is order by createTime desc default. */
558
- ListConversationMessages(request: ListConversationMessagesRequest, metadata?: Metadata): Observable<ListConversationMessagesResponse>;
559
- ReactMessage(request: ReactMessageRequest, metadata?: Metadata): Observable<ReactMessageResponse>;
560
- GetPromptRecommendations(request: GetPromptRecommendationsRequest, metadata?: Metadata): Observable<GetPromptRecommendationsResponse>;
561
- /** deprecated, use ListAvailableModels instead */
562
- GetConversationModels(request: GetConversationModelsRequest, metadata?: Metadata): Observable<GetConversationModelsResponse>;
563
- ListAvailableModels(request: ListAvailableModelsRequest, metadata?: Metadata): Observable<ListAvailableModelsResponse>;
564
- GetConversationDataFragmentation(request: GetConversationDataFragmentationRequest, metadata?: Metadata): Observable<GetConversationDataFragmentationResponse>;
565
- ListConversationDataFragmentations(request: ListConversationDataFragmentationsRequest, metadata?: Metadata): Observable<ListConversationDataFragmentationsResponse>;
566
- UpdateConversationDataFragmentation(request: UpdateConversationDataFragmentationRequest, metadata?: Metadata): Observable<UpdateConversationDataFragmentationResponse>;
567
- BindUnitWithConversation(request: BindUnitWithConversationRequest, metadata?: Metadata): Observable<BindUnitWithConversationResponse>;
568
- CancelConversation(request: CancelConversationRequest, metadata?: Metadata): Observable<CancelConversationResponse>;
569
- NeedReconnectConversation(request: NeedReconnectConversationRequest, metadata?: Metadata): Observable<NeedReconnectConversationResponse>;
570
- CreateReport(request: CreateReportRequest, metadata?: Metadata): Observable<CreateReportResponse>;
571
- RedoReport(request: RedoReportRequest, metadata?: Metadata): Observable<CreateReportResponse>;
572
- PollingReport(request: PollingReportRequest, metadata?: Metadata): Observable<CreateReportResponse>;
573
- ListReports(request: ListReportsRequest, metadata?: Metadata): Observable<ListReportsResponse>;
574
- FinishReport(request: FinishReportRequest, metadata?: Metadata): Observable<FinishReportResponse>;
575
- GetDashboard(request: GetDashboardRequest, metadata?: Metadata): Observable<GetDashboardResponse>;
576
- SaveDashboard(request: SaveDashboardRequest, metadata?: Metadata): Observable<SaveDashboardResponse>;
577
- GetConversationCs(request: GetConversationCsRequest, metadata?: Metadata): Observable<GetConversationCsResponse>;
578
- }
@@ -1,28 +0,0 @@
1
- import { Metadata } from '@grpc/grpc-js';
2
- import { Observable } from 'rxjs';
3
- import { Error } from '../../univer/constants/errors';
4
- export declare const protobufPackage = "universer.v1";
5
- export interface SendRawEmailRequest {
6
- recipientEmail: string;
7
- data: string;
8
- title: string;
9
- template: string;
10
- }
11
- export interface SendRawEmailResponse {
12
- error: Error | undefined;
13
- }
14
- export interface SendClipsheetWorkflowEmailRequest {
15
- userId: string;
16
- recipientEmail: string;
17
- unitUrl: string;
18
- succeededAt: Date | undefined;
19
- userDisplayName: string;
20
- workflowName: string;
21
- }
22
- export interface SendClipsheetWorkflowEmailResponse {
23
- error: Error | undefined;
24
- }
25
- export interface EmailService {
26
- SendClipsheetWorkflowEmail(request: SendClipsheetWorkflowEmailRequest, metadata?: Metadata): Observable<SendClipsheetWorkflowEmailResponse>;
27
- SendRawEmail(request: SendRawEmailRequest, metadata?: Metadata): Observable<SendRawEmailResponse>;
28
- }