@univerjs/protocol 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +22 -22
- package/lib/types/index.d.ts +2 -2
- package/lib/types/ts/univer/changeset.d.ts +1 -0
- package/lib/types/ts/univer/event_sync.d.ts +2 -5
- package/lib/types/ts/universer/v1/analyse_data_source.d.ts +6 -0
- package/lib/types/ts/universer/v1/authz.d.ts +1 -0
- package/lib/types/ts/universer/v1/comment.d.ts +1 -1
- package/lib/types/ts/universer/v1/conf.d.ts +29 -0
- package/lib/types/ts/universer/v1/conversation.d.ts +122 -15
- package/lib/types/ts/universer/v1/entitlement.d.ts +79 -0
- package/lib/types/ts/universer/v1/exchange.d.ts +4 -0
- package/lib/types/ts/universer/v1/file.d.ts +20 -0
- package/lib/types/ts/universer/v1/history.d.ts +22 -0
- package/lib/types/ts/universer/v1/oidc.d.ts +52 -0
- package/lib/types/ts/universer/v1/snapshot.d.ts +4 -0
- package/lib/types/ts/universer/v1/toolkit.d.ts +8 -0
- package/lib/types/ts/universer/v1/user.d.ts +74 -0
- package/lib/types/ts/universer/v1/video_task.d.ts +196 -0
- package/lib/types/ts/universer/v1/workspace.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { SystemHint } from '../../ai_common/common';
|
|
3
|
+
import { OpenAIMessage, SystemHint } from '../../ai_common/common';
|
|
4
|
+
import { Changeset } from '../../univer/changeset';
|
|
4
5
|
import { Error } from '../../univer/constants/errors';
|
|
5
6
|
import { DataFragmentationType } from './analyse_cmn';
|
|
6
7
|
import { RateDetail } from './entitlement';
|
|
@@ -10,6 +11,8 @@ export declare enum CompletionStatus {
|
|
|
10
11
|
Completion_Completed = 1,
|
|
11
12
|
Completion_UserCancelled = 2,
|
|
12
13
|
Completion_SystemErr = 3,
|
|
14
|
+
/** Completion_Interrupted - like hunman in the loop, and etc... */
|
|
15
|
+
Completion_Interrupted = 4,
|
|
13
16
|
UNRECOGNIZED = -1
|
|
14
17
|
}
|
|
15
18
|
export declare enum ConversationRoleType {
|
|
@@ -23,6 +26,22 @@ export declare enum ContentBlockType {
|
|
|
23
26
|
ContentBlockType_Prompt = 1,
|
|
24
27
|
ContentBlockType_Thinking = 2,
|
|
25
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,
|
|
26
45
|
UNRECOGNIZED = -1
|
|
27
46
|
}
|
|
28
47
|
export declare enum ContentType {
|
|
@@ -36,6 +55,7 @@ export declare enum AttachmentType {
|
|
|
36
55
|
AttachmentType_Unit = 1,
|
|
37
56
|
AttachmentType_Recommendation = 3,
|
|
38
57
|
AttachmentType_DataSource = 4,
|
|
58
|
+
AttachmentType_HitlAnswer = 5,
|
|
39
59
|
UNRECOGNIZED = -1
|
|
40
60
|
}
|
|
41
61
|
export declare enum MessageReaction {
|
|
@@ -66,6 +86,32 @@ export declare enum ChatSSEBlockType {
|
|
|
66
86
|
ChatSSEBlockType_ChatThinking = 9,
|
|
67
87
|
/** ChatSSEBlockType_Fragmentation - content data fragmentation */
|
|
68
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,
|
|
69
115
|
UNRECOGNIZED = -1
|
|
70
116
|
}
|
|
71
117
|
export declare enum ChatSSEStatus {
|
|
@@ -128,8 +174,28 @@ export interface Conversation {
|
|
|
128
174
|
title: string;
|
|
129
175
|
creatorUid: string;
|
|
130
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;
|
|
131
187
|
shared: boolean;
|
|
132
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
|
+
}
|
|
133
199
|
export interface GetConversationRequest {
|
|
134
200
|
conversationId: string;
|
|
135
201
|
}
|
|
@@ -154,6 +220,24 @@ export interface ListConversationsResponse {
|
|
|
154
220
|
nextBatchId: string;
|
|
155
221
|
error: Error | undefined;
|
|
156
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
|
+
}
|
|
157
241
|
export interface RenameConversationRequest {
|
|
158
242
|
conversationId: string;
|
|
159
243
|
newTitle: string;
|
|
@@ -190,6 +274,7 @@ export interface ConversationMessage {
|
|
|
190
274
|
completionStatus: CompletionStatus;
|
|
191
275
|
contents: ContentBlock[];
|
|
192
276
|
attachments: Attachment[];
|
|
277
|
+
respMeta: ChatRespMeta | undefined;
|
|
193
278
|
}
|
|
194
279
|
export interface ContentBlock {
|
|
195
280
|
blockType: ContentBlockType;
|
|
@@ -204,8 +289,9 @@ export interface Attachment {
|
|
|
204
289
|
* id of the Attachment,
|
|
205
290
|
* vary with the AttachmentType,
|
|
206
291
|
* AttachmentType_Unit -> unitId;
|
|
207
|
-
* AttachmentType_Recommendation -> no ID;
|
|
292
|
+
* AttachmentType_Recommendation -> no ID needed;
|
|
208
293
|
* AttachmentType_DataSource -> dataSourceId;
|
|
294
|
+
* AttachmentType_HitlAnswer -> no ID needed;
|
|
209
295
|
*/
|
|
210
296
|
id: string;
|
|
211
297
|
/**
|
|
@@ -213,7 +299,8 @@ export interface Attachment {
|
|
|
213
299
|
* vary with the AttachmentType,
|
|
214
300
|
* AttachmentType_Unit -> empty;
|
|
215
301
|
* AttachmentType_Recommendation -> json string of recommendations(json string array);
|
|
216
|
-
* AttachmentType_DataSource -> json string of v1.DataSource
|
|
302
|
+
* AttachmentType_DataSource -> json string of v1.DataSource;
|
|
303
|
+
* AttachmentType_HitlAnswer -> orig string of the hitl answer;
|
|
217
304
|
*/
|
|
218
305
|
content: string;
|
|
219
306
|
}
|
|
@@ -257,6 +344,12 @@ export interface SubmitPromptRequest {
|
|
|
257
344
|
systemHints: SystemHint[];
|
|
258
345
|
/** Locale Code */
|
|
259
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;
|
|
260
353
|
}
|
|
261
354
|
/** SSE api: /universer-api/conversation/resume */
|
|
262
355
|
export interface ResumeConversationRequest {
|
|
@@ -268,6 +361,8 @@ export interface ResumeConversationRequest {
|
|
|
268
361
|
/** Locale Code */
|
|
269
362
|
locale?: string | undefined;
|
|
270
363
|
model?: string | undefined;
|
|
364
|
+
/** the question's owner message id which is answer to. */
|
|
365
|
+
answerToMessageId: string;
|
|
271
366
|
}
|
|
272
367
|
/** SSE api: /universer-api/conversation/reconnect */
|
|
273
368
|
export interface ReconnectConversationRequest {
|
|
@@ -277,18 +372,13 @@ export interface ReconnectConversationRequest {
|
|
|
277
372
|
export interface ChatSSEBlock {
|
|
278
373
|
blockType: ChatSSEBlockType;
|
|
279
374
|
/**
|
|
280
|
-
*
|
|
281
|
-
* json string
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
* ChatSSEBlockType_ChatContent -> json string of ChatContentSSEBlock;
|
|
288
|
-
* ChatSSEBlockType_Attachment -> json string of Attachment;
|
|
289
|
-
* ChatSSEBlockType_RespMeta -> json string of ChatRespMeta;
|
|
290
|
-
* ChatSSEBlockType_ChatThinking -> json string of ChatThinkingSSEBlock;
|
|
291
|
-
* ChatSSEBlockType_Fragmentation -> json string of ChatFragmentationSSEBlock;
|
|
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;
|
|
292
382
|
*/
|
|
293
383
|
body: string;
|
|
294
384
|
status: ChatSSEStatus;
|
|
@@ -314,6 +404,11 @@ export interface PromptAck {
|
|
|
314
404
|
}
|
|
315
405
|
export interface ChatRespMeta {
|
|
316
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;
|
|
317
412
|
}
|
|
318
413
|
export interface ConversationDataFragmentation {
|
|
319
414
|
conversationId: string;
|
|
@@ -440,10 +535,21 @@ export interface SaveDashboardRequest {
|
|
|
440
535
|
export interface SaveDashboardResponse {
|
|
441
536
|
error: Error | undefined;
|
|
442
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
|
+
}
|
|
443
548
|
export interface ConversationService {
|
|
444
549
|
GetConversation(request: GetConversationRequest, metadata?: Metadata): Observable<GetConversationResponse>;
|
|
445
550
|
/** the conversation list is order by lastUpdate desc default. */
|
|
446
551
|
ListConversations(request: ListConversationsRequest, metadata?: Metadata): Observable<ListConversationsResponse>;
|
|
552
|
+
ListConversationsByUnit(request: ListConversationsByUnitRequest, metadata?: Metadata): Observable<ListConversationsByUnitResponse>;
|
|
447
553
|
RenameConversation(request: RenameConversationRequest, metadata?: Metadata): Observable<RenameConversationResponse>;
|
|
448
554
|
ShareConversation(request: ShareConversationRequest, metadata?: Metadata): Observable<ShareConversationResponse>;
|
|
449
555
|
UnshareConversation(request: UnshareConversationRequest, metadata?: Metadata): Observable<UnshareConversationResponse>;
|
|
@@ -468,4 +574,5 @@ export interface ConversationService {
|
|
|
468
574
|
FinishReport(request: FinishReportRequest, metadata?: Metadata): Observable<FinishReportResponse>;
|
|
469
575
|
GetDashboard(request: GetDashboardRequest, metadata?: Metadata): Observable<GetDashboardResponse>;
|
|
470
576
|
SaveDashboard(request: SaveDashboardRequest, metadata?: Metadata): Observable<SaveDashboardResponse>;
|
|
577
|
+
GetConversationCs(request: GetConversationCsRequest, metadata?: Metadata): Observable<GetConversationCsResponse>;
|
|
471
578
|
}
|
|
@@ -61,6 +61,12 @@ export declare enum EntitlementItemId {
|
|
|
61
61
|
BiaoDaUnitDownload = 31,
|
|
62
62
|
/** BiaoDaDashboardDownload - dashboard下载,type=Ability */
|
|
63
63
|
BiaoDaDashboardDownload = 32,
|
|
64
|
+
/** BiaoDaSuperScrapeRowsRate - 超级模板允许采集行数频控,type=Rate */
|
|
65
|
+
BiaoDaSuperScrapeRowsRate = 33,
|
|
66
|
+
/** BiaoDaSuperScrapeFreeTimesRate - 超级模板不限采集行数设置次数频控,type=Rate */
|
|
67
|
+
BiaoDaSuperScrapeFreeTimesRate = 34,
|
|
68
|
+
/** BiaoDaVideoScriptExtractTimesRate - 视频脚本提取处理次数频控,type=Rate */
|
|
69
|
+
BiaoDaVideoScriptExtractTimesRate = 35,
|
|
64
70
|
/** XlsxAIBasicPoints - xlsx.ai 基础积分 */
|
|
65
71
|
XlsxAIBasicPoints = 101,
|
|
66
72
|
UNRECOGNIZED = -1
|
|
@@ -75,6 +81,24 @@ export declare enum QuotaSource {
|
|
|
75
81
|
ReferralQuota = 6,
|
|
76
82
|
UNRECOGNIZED = -1
|
|
77
83
|
}
|
|
84
|
+
export declare enum QuotaUsageReason {
|
|
85
|
+
NonSpeciedUsage = 0,
|
|
86
|
+
ScrapeUsage = 1,
|
|
87
|
+
ChatUsage = 2,
|
|
88
|
+
ReportUsage = 3,
|
|
89
|
+
UnitEditUsage = 4,
|
|
90
|
+
/** TitleUsage - more later */
|
|
91
|
+
TitleUsage = 5,
|
|
92
|
+
RecommendationUsage = 6,
|
|
93
|
+
PromptOptimizationUsage = 7,
|
|
94
|
+
/** VideoTaskScriptUsage - video task step usages */
|
|
95
|
+
VideoTaskScriptUsage = 8,
|
|
96
|
+
VideoTaskScriptAnalysisUsage = 9,
|
|
97
|
+
VideoTaskStoryboardUsage = 10,
|
|
98
|
+
VideoTaskReuseUsage = 11,
|
|
99
|
+
VideoTaskRecreatePromptUsage = 12,
|
|
100
|
+
UNRECOGNIZED = -1
|
|
101
|
+
}
|
|
78
102
|
export declare enum ProductType {
|
|
79
103
|
NonProduct = 0,
|
|
80
104
|
Recurring = 1,
|
|
@@ -245,10 +269,55 @@ export interface ReportQuotaUsageRequest {
|
|
|
245
269
|
messageId?: string | undefined;
|
|
246
270
|
/** used to aggregate credits cost */
|
|
247
271
|
conversationId?: string | undefined;
|
|
272
|
+
reason: QuotaUsageReason;
|
|
248
273
|
}
|
|
249
274
|
export interface ReportQuotaUsageResponse {
|
|
250
275
|
error: Error | undefined;
|
|
251
276
|
}
|
|
277
|
+
export interface ListQuotaDetailsRequest {
|
|
278
|
+
/**
|
|
279
|
+
* batchId,
|
|
280
|
+
* set to empty in the 1st scroller request,
|
|
281
|
+
* then set to nextBatchId(which was returned by the previous request) in the following scroller request.
|
|
282
|
+
*/
|
|
283
|
+
batchId: string;
|
|
284
|
+
/** limit, specify how many records needed. */
|
|
285
|
+
limit: number;
|
|
286
|
+
quotaKey: string;
|
|
287
|
+
/** 是否只返回有可用quota的记录? */
|
|
288
|
+
availableOnly: boolean;
|
|
289
|
+
}
|
|
290
|
+
export interface ListQuotaDetailsResponse {
|
|
291
|
+
details: QuotaDetailRecord[];
|
|
292
|
+
hasMore: boolean;
|
|
293
|
+
nextBatchId: string;
|
|
294
|
+
error: Error | undefined;
|
|
295
|
+
}
|
|
296
|
+
export interface ListQuotaUsageRecordsRequest {
|
|
297
|
+
/**
|
|
298
|
+
* batchId,
|
|
299
|
+
* set to empty in the 1st scroller request,
|
|
300
|
+
* then set to nextBatchId(which was returned by the previous request) in the following scroller request.
|
|
301
|
+
*/
|
|
302
|
+
batchId: string;
|
|
303
|
+
/** limit, specify how many records needed. */
|
|
304
|
+
limit: number;
|
|
305
|
+
quotaKey: string;
|
|
306
|
+
}
|
|
307
|
+
export interface ListQuotaUsageRecordsResponse {
|
|
308
|
+
records: QuotaUsageRecord[];
|
|
309
|
+
hasMore: boolean;
|
|
310
|
+
nextBatchId: string;
|
|
311
|
+
error: Error | undefined;
|
|
312
|
+
}
|
|
313
|
+
export interface QuotaUsageRecord {
|
|
314
|
+
/** precision: seconds */
|
|
315
|
+
usageTime: string;
|
|
316
|
+
usageTotal: number;
|
|
317
|
+
reason: QuotaUsageReason;
|
|
318
|
+
conversationId?: string | undefined;
|
|
319
|
+
messageId?: string | undefined;
|
|
320
|
+
}
|
|
252
321
|
export interface GetQuotaItemRequest {
|
|
253
322
|
quotaKey: string;
|
|
254
323
|
}
|
|
@@ -259,7 +328,9 @@ export interface GetQuotaItemResponse {
|
|
|
259
328
|
}
|
|
260
329
|
export interface QuotaDetailRecord {
|
|
261
330
|
source: QuotaSource;
|
|
331
|
+
/** precision: seconds */
|
|
262
332
|
grantTime: string;
|
|
333
|
+
/** precision: seconds */
|
|
263
334
|
expireTime: string;
|
|
264
335
|
quotaTotal: number;
|
|
265
336
|
quotaLeft: number;
|
|
@@ -286,7 +357,9 @@ export interface Product {
|
|
|
286
357
|
quotaConfs: {
|
|
287
358
|
[key: string]: QuotaItemConf;
|
|
288
359
|
};
|
|
360
|
+
/** subscription interval if product_type is Recurring */
|
|
289
361
|
interval: Interval;
|
|
362
|
+
/** subscription interval count if product_type is Recurring */
|
|
290
363
|
intervalCnt: number;
|
|
291
364
|
/** the origin price */
|
|
292
365
|
price: string;
|
|
@@ -296,6 +369,10 @@ export interface Product {
|
|
|
296
369
|
promotionPrice: string;
|
|
297
370
|
/** optional, how many interval the promotion last, set if there's any promotion and product_type is Recurring */
|
|
298
371
|
promotionIntervalCnt: number;
|
|
372
|
+
/** work with quotaGrantIntervalCnt. subscription may be yearly, but quota is grant monthly. */
|
|
373
|
+
quotaGrantInterval: Interval;
|
|
374
|
+
/** work with quotaGrantInterval */
|
|
375
|
+
quotaGrantIntervalCnt: number;
|
|
299
376
|
/** optional, the product table name */
|
|
300
377
|
tabName: string;
|
|
301
378
|
}
|
|
@@ -565,6 +642,8 @@ export interface EntitlementService {
|
|
|
565
642
|
MGetEntitlementItemsByUser(request: MGetEntitlementItemsByUserRequest, metadata?: Metadata): Observable<MGetEntitlementItemsByUserResponse>;
|
|
566
643
|
GetQuotaItem(request: GetQuotaItemRequest, metadata?: Metadata): Observable<GetQuotaItemResponse>;
|
|
567
644
|
ReportQuotaUsage(request: ReportQuotaUsageRequest, metadata?: Metadata): Observable<ReportQuotaUsageResponse>;
|
|
645
|
+
ListQuotaDetails(request: ListQuotaDetailsRequest, metadata?: Metadata): Observable<ListQuotaDetailsResponse>;
|
|
646
|
+
ListQuotaUsageRecords(request: ListQuotaUsageRecordsRequest, metadata?: Metadata): Observable<ListQuotaUsageRecordsResponse>;
|
|
568
647
|
/** for back-end only, can deduct and add. */
|
|
569
648
|
TakeNItemRateByUser(request: TakeNItemRateByUserRequest, metadata?: Metadata): Observable<TakeNItemRateByUserResponse>;
|
|
570
649
|
/** for front-end only case, just deduct, can not return quota. */
|
|
@@ -28,6 +28,10 @@ export interface ImportRequest {
|
|
|
28
28
|
scene: ImportScene;
|
|
29
29
|
minSheetColumnCount: number;
|
|
30
30
|
minSheetRowCount: number;
|
|
31
|
+
/** used for integration with customer system */
|
|
32
|
+
idempotencyKey?: string | undefined;
|
|
33
|
+
/** used for integration with customer system, just store and pass through. This metadata will store with the imported unit. */
|
|
34
|
+
metaData?: string | undefined;
|
|
31
35
|
}
|
|
32
36
|
export interface ImportResponse {
|
|
33
37
|
error: Error | undefined;
|
|
@@ -16,6 +16,8 @@ export declare enum FileSource {
|
|
|
16
16
|
UserProfileImg = 5,
|
|
17
17
|
/** ClipsheetFragments - assign UserID, fragmented file will be deleted after 30 days */
|
|
18
18
|
ClipsheetFragments = 6,
|
|
19
|
+
/** LLMInputData - assign UserID */
|
|
20
|
+
LLMInputData = 7,
|
|
19
21
|
UNRECOGNIZED = -1
|
|
20
22
|
}
|
|
21
23
|
export declare enum DownloadUrlMode {
|
|
@@ -78,11 +80,29 @@ export interface PutFileByIdResponse {
|
|
|
78
80
|
error: Error | undefined;
|
|
79
81
|
fileId: string;
|
|
80
82
|
}
|
|
83
|
+
export interface SignPutUrlRequest {
|
|
84
|
+
fileSize: number;
|
|
85
|
+
name?: string | undefined;
|
|
86
|
+
source: FileSource;
|
|
87
|
+
}
|
|
88
|
+
export interface SignPutUrlResponse {
|
|
89
|
+
error: Error | undefined;
|
|
90
|
+
fileId: string;
|
|
91
|
+
putUrl: string;
|
|
92
|
+
}
|
|
93
|
+
export interface DeleteFileByIdRequest {
|
|
94
|
+
fileId: string;
|
|
95
|
+
}
|
|
96
|
+
export interface DeleteFileByIdResponse {
|
|
97
|
+
error: Error | undefined;
|
|
98
|
+
}
|
|
81
99
|
export interface FileService {
|
|
82
100
|
SignUrl(request: SignUrlRequest, metadata?: Metadata): Observable<SignUrlResponse>;
|
|
101
|
+
SignPutUrl(request: SignPutUrlRequest, metadata?: Metadata): Observable<SignPutUrlResponse>;
|
|
83
102
|
Upload(request: Observable<FileUploadRequest>, metadata?: Metadata): Observable<UploadResponse>;
|
|
84
103
|
SetUniverGoJson(request: SetUniverGoJsonRequest, metadata?: Metadata): Observable<SetUniverGoJsonResponse>;
|
|
85
104
|
GetUniverGoJson(request: GetUniverGoJsonRequest, metadata?: Metadata): Observable<GetUniverGoJsonResponse>;
|
|
86
105
|
PutTemplateResouce(request: PutTemplateResouceRequest, metadata?: Metadata): Observable<PutTemplateResouceResponse>;
|
|
87
106
|
PutFileById(request: Observable<PutFileByIdRequest>, metadata?: Metadata): Observable<PutFileByIdResponse>;
|
|
107
|
+
DeleteFileById(request: DeleteFileByIdRequest, metadata?: Metadata): Observable<DeleteFileByIdResponse>;
|
|
88
108
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { Changeset } from '../../univer/changeset';
|
|
3
4
|
import { Error } from '../../univer/constants/errors';
|
|
4
5
|
import { UniverType } from '../../univer/constants/univer';
|
|
5
6
|
import { User } from '../../univer/permission';
|
|
@@ -21,6 +22,7 @@ export interface CreateHistoryResponse {
|
|
|
21
22
|
error: Error | undefined;
|
|
22
23
|
}
|
|
23
24
|
export interface History {
|
|
25
|
+
/** @deprecated */
|
|
24
26
|
userId: string;
|
|
25
27
|
unitId: string;
|
|
26
28
|
command: string[];
|
|
@@ -31,6 +33,9 @@ export interface History {
|
|
|
31
33
|
/** additionalFields is a reserved field for future use */
|
|
32
34
|
additionalFields?: string | undefined;
|
|
33
35
|
origin?: HistoryOrigin | undefined;
|
|
36
|
+
startRevCreateTime: number;
|
|
37
|
+
endRevCreateTime: number;
|
|
38
|
+
userIds: string[];
|
|
34
39
|
}
|
|
35
40
|
export interface HistoryListRequest {
|
|
36
41
|
length: number;
|
|
@@ -77,8 +82,25 @@ export interface ListHistoryCreatorsResponse_Creator {
|
|
|
77
82
|
avatar: string;
|
|
78
83
|
origins: HistoryOrigin[];
|
|
79
84
|
}
|
|
85
|
+
export interface GetHistoryCsRequest {
|
|
86
|
+
unitId: string;
|
|
87
|
+
startRevision: number;
|
|
88
|
+
endRevision: number;
|
|
89
|
+
}
|
|
90
|
+
export interface GetHistoryCsResponse {
|
|
91
|
+
error: Error | undefined;
|
|
92
|
+
changesets: Changeset[];
|
|
93
|
+
users: {
|
|
94
|
+
[key: string]: User;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface GetHistoryCsResponse_UsersEntry {
|
|
98
|
+
key: string;
|
|
99
|
+
value: User | undefined;
|
|
100
|
+
}
|
|
80
101
|
export interface HistoryService {
|
|
81
102
|
GetHistoryList(request: HistoryListRequest, metadata?: Metadata): Observable<HistoryListResponse>;
|
|
82
103
|
CreateHistory(request: CreateHistoryRequest, metadata?: Metadata): Observable<CreateHistoryResponse>;
|
|
83
104
|
ListHistoryCreators(request: ListHistoryCreatorsRequest, metadata?: Metadata): Observable<ListHistoryCreatorsResponse>;
|
|
105
|
+
GetHistoryCs(request: GetHistoryCsRequest, metadata?: Metadata): Observable<GetHistoryCsResponse>;
|
|
84
106
|
}
|
|
@@ -101,6 +101,54 @@ export interface OIDCLoginStatus {
|
|
|
101
101
|
origin: string;
|
|
102
102
|
referralCode: string;
|
|
103
103
|
}
|
|
104
|
+
/** 小程序登录请求 */
|
|
105
|
+
export interface MiniProgramLoginRequest {
|
|
106
|
+
/** 小程序 wx.login() 获取的 code */
|
|
107
|
+
code: string;
|
|
108
|
+
/** 登录状态信息(JSON格式的 OIDCLoginStatus) */
|
|
109
|
+
state: string;
|
|
110
|
+
}
|
|
111
|
+
/** 小程序登录响应 */
|
|
112
|
+
export interface MiniProgramLoginResponse {
|
|
113
|
+
/** 临时 token,用于后续设置 cookie */
|
|
114
|
+
cookieToken: string;
|
|
115
|
+
/** 是否为新注册用户 */
|
|
116
|
+
isRegister: boolean;
|
|
117
|
+
needBindPhone: boolean;
|
|
118
|
+
error: Error | undefined;
|
|
119
|
+
}
|
|
120
|
+
/** 小程序绑定手机号请求 */
|
|
121
|
+
export interface MiniProgramBindPhoneRequest {
|
|
122
|
+
cookieToken: string;
|
|
123
|
+
phoneCode: string;
|
|
124
|
+
}
|
|
125
|
+
/** 小程序绑定手机号响应 */
|
|
126
|
+
export interface MiniProgramBindPhoneResponse {
|
|
127
|
+
success: boolean;
|
|
128
|
+
error: Error | undefined;
|
|
129
|
+
}
|
|
130
|
+
/** 小程序回调请求(WebView 中调用) */
|
|
131
|
+
export interface MiniProgramCallbackRequest {
|
|
132
|
+
/** 从 MiniProgramLoginResponse 获取的 token */
|
|
133
|
+
cookieToken: string;
|
|
134
|
+
/** 登录成功后跳转的 URL */
|
|
135
|
+
redirectUri: string;
|
|
136
|
+
}
|
|
137
|
+
/** 小程序回调响应 */
|
|
138
|
+
export interface MiniProgramCallbackResponse {
|
|
139
|
+
/** 是否成功设置 cookie */
|
|
140
|
+
success: boolean;
|
|
141
|
+
error: Error | undefined;
|
|
142
|
+
}
|
|
143
|
+
export interface WechatJSSDKSignatureRequest {
|
|
144
|
+
url: string;
|
|
145
|
+
}
|
|
146
|
+
export interface WechatJSSDKSignatureResponse {
|
|
147
|
+
error: Error | undefined;
|
|
148
|
+
timestamp: number;
|
|
149
|
+
nonceStr: string;
|
|
150
|
+
signature: string;
|
|
151
|
+
}
|
|
104
152
|
export interface OIDCService {
|
|
105
153
|
AuthRedirect(request: AuthRedirectRequest, metadata?: Metadata): Observable<AuthRedirectResponse>;
|
|
106
154
|
AuthCallback(request: AuthCallbackRequest, metadata?: Metadata): Observable<AuthCallbackResponse>;
|
|
@@ -112,4 +160,8 @@ export interface OIDCService {
|
|
|
112
160
|
WechatCallback(request: WechatCallbackRequest, metadata?: Metadata): Observable<WechatCallbackResponse>;
|
|
113
161
|
Authorize(request: AuthorizeRequest, metadata?: Metadata): Observable<AuthorizeResponse>;
|
|
114
162
|
ExchangeToken(request: ExchangeTokenRequest, metadata?: Metadata): Observable<ExchangeTokenResponse>;
|
|
163
|
+
MiniProgramLogin(request: MiniProgramLoginRequest, metadata?: Metadata): Observable<MiniProgramLoginResponse>;
|
|
164
|
+
MiniProgramBindPhone(request: MiniProgramBindPhoneRequest, metadata?: Metadata): Observable<MiniProgramBindPhoneResponse>;
|
|
165
|
+
MiniProgramCallback(request: MiniProgramCallbackRequest, metadata?: Metadata): Observable<MiniProgramCallbackResponse>;
|
|
166
|
+
WechatJSSDKSignature(request: WechatJSSDKSignatureRequest, metadata?: Metadata): Observable<WechatJSSDKSignatureResponse>;
|
|
115
167
|
}
|
|
@@ -118,6 +118,10 @@ export interface CreateUnitRequest {
|
|
|
118
118
|
workbookDataJson: string;
|
|
119
119
|
/** univer ai for exchange */
|
|
120
120
|
table?: SheetTable | undefined;
|
|
121
|
+
/** used for integration with customer system */
|
|
122
|
+
idempotencyKey?: string | undefined;
|
|
123
|
+
/** used for integration with customer system, just store and pass through */
|
|
124
|
+
metaData?: string | undefined;
|
|
121
125
|
}
|
|
122
126
|
export interface CreateUnitResponse {
|
|
123
127
|
error: Error | undefined;
|
|
@@ -10,6 +10,14 @@ export interface PreviewLinkResponse {
|
|
|
10
10
|
title: string;
|
|
11
11
|
error: Error | undefined;
|
|
12
12
|
}
|
|
13
|
+
export interface GetXfyunUrlRequest {
|
|
14
|
+
}
|
|
15
|
+
export interface GetXfyunUrlResponse {
|
|
16
|
+
error: Error | undefined;
|
|
17
|
+
/** 讯飞语音听写 WebSocket 鉴权 URL */
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
13
20
|
export interface ToolkitService {
|
|
14
21
|
PreviewLink(request: PreviewLinkRequest, metadata?: Metadata): Observable<PreviewLinkResponse>;
|
|
22
|
+
GetXfyunUrl(request: GetXfyunUrlRequest, metadata?: Metadata): Observable<GetXfyunUrlResponse>;
|
|
15
23
|
}
|
|
@@ -192,12 +192,86 @@ export interface GetGoogleAccessTokenResponse {
|
|
|
192
192
|
authUrl: string;
|
|
193
193
|
appId: string;
|
|
194
194
|
}
|
|
195
|
+
export interface AgentClientInfo {
|
|
196
|
+
name: string;
|
|
197
|
+
version: string;
|
|
198
|
+
runtime: string;
|
|
199
|
+
platform: string;
|
|
200
|
+
arch: string;
|
|
201
|
+
hostname: string;
|
|
202
|
+
}
|
|
203
|
+
export interface AgentPublicKey {
|
|
204
|
+
alg: string;
|
|
205
|
+
format: string;
|
|
206
|
+
value: string;
|
|
207
|
+
}
|
|
208
|
+
export interface AgentSignature {
|
|
209
|
+
alg: string;
|
|
210
|
+
format: string;
|
|
211
|
+
value: string;
|
|
212
|
+
}
|
|
213
|
+
export interface AgentFingerprint {
|
|
214
|
+
fingerprintId: string;
|
|
215
|
+
quality: string;
|
|
216
|
+
runtimeClass: string;
|
|
217
|
+
}
|
|
218
|
+
export interface AgentChallenge {
|
|
219
|
+
challengeId: string;
|
|
220
|
+
signingInput: string;
|
|
221
|
+
expiresAt: string;
|
|
222
|
+
}
|
|
223
|
+
export interface AgentCredential {
|
|
224
|
+
accessToken: string;
|
|
225
|
+
tokenType: string;
|
|
226
|
+
expiresAt: string;
|
|
227
|
+
}
|
|
228
|
+
export interface AgentRegisterStartRequest {
|
|
229
|
+
client: AgentClientInfo | undefined;
|
|
230
|
+
publicKey: AgentPublicKey | undefined;
|
|
231
|
+
fingerprint: AgentFingerprint | undefined;
|
|
232
|
+
}
|
|
233
|
+
export interface AgentRegisterStartResponse {
|
|
234
|
+
error: Error | undefined;
|
|
235
|
+
registrationId: string;
|
|
236
|
+
challenge: AgentChallenge | undefined;
|
|
237
|
+
}
|
|
238
|
+
export interface AgentRegisterFinishRequest {
|
|
239
|
+
registrationId: string;
|
|
240
|
+
challengeId: string;
|
|
241
|
+
signature: AgentSignature | undefined;
|
|
242
|
+
}
|
|
243
|
+
export interface AgentRegisterFinishResponse {
|
|
244
|
+
error: Error | undefined;
|
|
245
|
+
agentId: string;
|
|
246
|
+
}
|
|
247
|
+
export interface AgentSigninStartRequest {
|
|
248
|
+
agentId: string;
|
|
249
|
+
client: AgentClientInfo | undefined;
|
|
250
|
+
}
|
|
251
|
+
export interface AgentSigninStartResponse {
|
|
252
|
+
error: Error | undefined;
|
|
253
|
+
challenge: AgentChallenge | undefined;
|
|
254
|
+
}
|
|
255
|
+
export interface AgentSigninFinishRequest {
|
|
256
|
+
agentId: string;
|
|
257
|
+
challengeId: string;
|
|
258
|
+
signature: AgentSignature | undefined;
|
|
259
|
+
}
|
|
260
|
+
export interface AgentSigninFinishResponse {
|
|
261
|
+
error: Error | undefined;
|
|
262
|
+
agentId: string;
|
|
263
|
+
credential: AgentCredential | undefined;
|
|
264
|
+
}
|
|
195
265
|
export interface UserService {
|
|
196
266
|
GetUser(request: GetUserRequest, metadata?: Metadata): Observable<GetUserResponse>;
|
|
197
267
|
GetRawFullUserProfile(request: GetRawFullUserProfileRequest, metadata?: Metadata): Observable<GetRawFullUserProfileResponse>;
|
|
198
268
|
SetUsersTestTag(request: SetUsersTestTagRequest, metadata?: Metadata): Observable<SetUsersTestTagResponse>;
|
|
199
269
|
ListRawFullUserProfile(request: ListRawFullUserProfileRequest, metadata?: Metadata): Observable<ListRawFullUserProfileResponse>;
|
|
200
270
|
AnonymousSignIn(request: AnonymousSignInRequest, metadata?: Metadata): Observable<AnonymousSignInResponse>;
|
|
271
|
+
AgentRegisterStart(request: AgentRegisterStartRequest, metadata?: Metadata): Observable<AgentRegisterStartResponse>;
|
|
272
|
+
AgentRegisterFinish(request: AgentRegisterFinishRequest, metadata?: Metadata): Observable<AgentRegisterFinishResponse>;
|
|
273
|
+
AgentSigninStart(request: AgentSigninStartRequest, metadata?: Metadata): Observable<AgentSigninStartResponse>;
|
|
274
|
+
AgentSigninFinish(request: AgentSigninFinishRequest, metadata?: Metadata): Observable<AgentSigninFinishResponse>;
|
|
201
275
|
ListUsers(request: ListUsersRequest, metadata?: Metadata): Observable<ListUsersResponse>;
|
|
202
276
|
Logout(request: LogoutRequest, metadata?: Metadata): Observable<LogoutResponse>;
|
|
203
277
|
TransformUser(request: TransformUserRequest, metadata?: Metadata): Observable<TransformUserResponse>;
|