@univerjs/protocol 0.1.47-alpha.0 → 0.1.47
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 +26 -26
- package/lib/types/index.d.ts +24 -23
- package/lib/types/ts/univer/constants/biz.d.ts +16 -0
- package/lib/types/ts/univer/constants/errors.d.ts +42 -0
- package/lib/types/ts/univer/range.d.ts +9 -0
- package/lib/types/ts/univer/snapshot.d.ts +7 -0
- package/lib/types/ts/univer/workbook.d.ts +2 -0
- package/lib/types/ts/{v1 → universer/v1}/access_key.d.ts +5 -1
- package/lib/types/ts/universer/v1/access_key_logs.d.ts +43 -0
- package/lib/types/ts/{v1 → universer/v1}/analyse_cmn.d.ts +9 -0
- package/lib/types/ts/{v1 → universer/v1}/analyse_data_source.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/analyse_task.d.ts +7 -4
- package/lib/types/ts/{v1 → universer/v1}/authz.d.ts +2 -2
- package/lib/types/ts/{v1 → universer/v1}/clipsheet_task.d.ts +32 -4
- package/lib/types/ts/{v1 → universer/v1}/comb.d.ts +5 -5
- package/lib/types/ts/{v1 → universer/v1}/comment.d.ts +2 -2
- package/lib/types/ts/{v1 → universer/v1}/conf.d.ts +55 -1
- package/lib/types/ts/{v1 → universer/v1}/connector.d.ts +2 -2
- package/lib/types/ts/{v1 → universer/v1}/conversation.d.ts +121 -5
- package/lib/types/ts/{v1 → universer/v1}/email.d.ts +11 -1
- package/lib/types/ts/{v1 → universer/v1}/entitlement.d.ts +120 -13
- package/lib/types/ts/{v1 → universer/v1}/exchange.d.ts +9 -4
- package/lib/types/ts/universer/v1/feedback.d.ts +71 -0
- package/lib/types/ts/{v1 → universer/v1}/file.d.ts +16 -1
- package/lib/types/ts/{v1 → universer/v1}/go_config_center.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/history.d.ts +3 -3
- package/lib/types/ts/universer/v1/inbox.d.ts +59 -0
- package/lib/types/ts/{v1 → universer/v1}/invite_code.d.ts +1 -1
- package/lib/types/ts/universer/v1/license.d.ts +75 -0
- package/lib/types/ts/{v1 → universer/v1}/license_manage.d.ts +55 -1
- package/lib/types/ts/{v1 → universer/v1}/oauth2.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/oidc.d.ts +3 -1
- package/lib/types/ts/universer/v1/redemption_code.d.ts +32 -0
- package/lib/types/ts/{v1 → universer/v1}/snapshot.d.ts +33 -14
- package/lib/types/ts/{v1 → universer/v1}/survey.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/template.d.ts +2 -2
- package/lib/types/ts/universer/v1/toolkit.d.ts +15 -0
- package/lib/types/ts/{v1 → universer/v1}/trigger.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/uniscript.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/uniscript_logs.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/univer_go_template.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/user.d.ts +56 -1
- package/lib/types/ts/{v1 → universer/v1}/user_settings.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/workspace.d.ts +6 -5
- package/lib/umd/index.js +1 -1
- package/package.json +6 -12
- package/lib/types/ts/v1/apply.d.ts +0 -138
- package/lib/types/ts/v1/feedback.d.ts +0 -26
- package/lib/types/ts/v1/license.d.ts +0 -35
- package/lib/types/ts/v1/ssc.d.ts +0 -259
- package/lib/types/ts/v1/ssr.d.ts +0 -25
- /package/lib/types/ts/{v1 → universer/v1}/source_connector/api.d.ts +0 -0
- /package/lib/types/ts/{v1 → universer/v1}/source_connector/conf.d.ts +0 -0
- /package/lib/types/ts/{v1 → universer/v1}/source_connector/displayer.d.ts +0 -0
- /package/lib/types/ts/{v1 → universer/v1}/source_connector/source.d.ts +0 -0
- /package/lib/types/ts/{v1 → universer/v1}/source_connector/stream_view.d.ts +0 -0
- /package/lib/types/ts/{v1 → universer/v1}/usip.d.ts +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Empty } from '
|
|
4
|
-
import { Changeset } from '
|
|
5
|
-
import { CollaMsg } from '
|
|
6
|
-
import { Error } from '
|
|
7
|
-
import { UniverType } from '
|
|
3
|
+
import { Empty } from '../../google/protobuf/empty';
|
|
4
|
+
import { Changeset } from '../../univer/changeset';
|
|
5
|
+
import { CollaMsg } from '../../univer/colla_msg';
|
|
6
|
+
import { Error } from '../../univer/constants/errors';
|
|
7
|
+
import { UniverType } from '../../univer/constants/univer';
|
|
8
8
|
export declare const protobufPackage = "universer.v1";
|
|
9
9
|
/** more details: https://c3fgartrp2.feishu.cn/docx/OS47dk8BCo1ZeKxXiNvcDLuZn2g#PymGdupuyoYfvTxv1EBciV7in9b */
|
|
10
10
|
export declare enum CombCmd {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { CommentUpdate_Status } from '
|
|
4
|
-
import { Error } from '
|
|
3
|
+
import { CommentUpdate_Status } from '../../univer/colla_msg';
|
|
4
|
+
import { Error } from '../../univer/constants/errors';
|
|
5
5
|
import { User } from './user';
|
|
6
6
|
export declare const protobufPackage = "universer.v1";
|
|
7
7
|
export interface Reply {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Duration } from '
|
|
1
|
+
import { Duration } from '../../google/protobuf/duration';
|
|
2
|
+
import { MessageChannel } from '../../univer/constants/biz';
|
|
2
3
|
export declare const protobufPackage = "universer.v1";
|
|
3
4
|
export declare enum ReleaseType {
|
|
4
5
|
UNKNOWN_TYPE = 0,
|
|
@@ -40,6 +41,9 @@ export interface Bootstrap {
|
|
|
40
41
|
models: ModelConf[];
|
|
41
42
|
wechat: Wechat | undefined;
|
|
42
43
|
aiAnalyseSampleConf: AIAnalyseSampleConf | undefined;
|
|
44
|
+
permissionBasedExport: PermissionBasedExport | undefined;
|
|
45
|
+
notifyConf: NotifyConf | undefined;
|
|
46
|
+
ip2AddrCliConf: IP2AddrCliConf | undefined;
|
|
43
47
|
}
|
|
44
48
|
export interface Server {
|
|
45
49
|
http: Server_HTTP | undefined;
|
|
@@ -133,6 +137,9 @@ export interface Service {
|
|
|
133
137
|
fileExchange: Service_RpcService | undefined;
|
|
134
138
|
nodeRuntime: Service_RpcService | undefined;
|
|
135
139
|
pythonRuntime: Service_RpcService | undefined;
|
|
140
|
+
ssc: Service_RpcService | undefined;
|
|
141
|
+
univerOps: Service_RpcService | undefined;
|
|
142
|
+
redemptionCode: Service_RpcService | undefined;
|
|
136
143
|
yuumi: Service_HttpService | undefined;
|
|
137
144
|
}
|
|
138
145
|
export interface Service_RpcService {
|
|
@@ -377,6 +384,13 @@ export interface EntitlementConf {
|
|
|
377
384
|
defaultEntiConf: EntitlementConf_DefaultEntiConf | undefined;
|
|
378
385
|
cronConf: EntitlementConf_CronConf | undefined;
|
|
379
386
|
stripeConf: EntitlementConf_StripeConf | undefined;
|
|
387
|
+
wechatPayConf: EntitlementConf_WechatPayConf | undefined;
|
|
388
|
+
aliPayConf: EntitlementConf_AliPayConf | undefined;
|
|
389
|
+
/** minutes eg. 1440 */
|
|
390
|
+
orderExpireInterval: number;
|
|
391
|
+
/** minutes eg. 15 */
|
|
392
|
+
intentExpireInterval: number;
|
|
393
|
+
identityExpireNtfConf: EntitlementConf_IdentityExpireNtfConf | undefined;
|
|
380
394
|
}
|
|
381
395
|
export interface EntitlementConf_DefaultEntiConf {
|
|
382
396
|
anonymousDefaultEntiId: number;
|
|
@@ -396,6 +410,30 @@ export interface EntitlementConf_StripeConf {
|
|
|
396
410
|
whSK: string;
|
|
397
411
|
timeout: number;
|
|
398
412
|
}
|
|
413
|
+
export interface EntitlementConf_WechatPayConf {
|
|
414
|
+
/** WeChat application ID */
|
|
415
|
+
appID: string;
|
|
416
|
+
/** Merchant certificate serial number */
|
|
417
|
+
mchCertificateSerialNumber: string;
|
|
418
|
+
/** Merchant ID */
|
|
419
|
+
mchID: string;
|
|
420
|
+
/** Merchant APIv3 key */
|
|
421
|
+
apiKey: string;
|
|
422
|
+
/** WeChat payment notification URL */
|
|
423
|
+
notifyUrl: string;
|
|
424
|
+
}
|
|
425
|
+
export interface EntitlementConf_AliPayConf {
|
|
426
|
+
appID: string;
|
|
427
|
+
privateKey: string;
|
|
428
|
+
apiKey: string;
|
|
429
|
+
/** alipay notification URL */
|
|
430
|
+
notifyUrl: string;
|
|
431
|
+
isProd: boolean;
|
|
432
|
+
}
|
|
433
|
+
export interface EntitlementConf_IdentityExpireNtfConf {
|
|
434
|
+
toNtfLeftDays: number[];
|
|
435
|
+
ntfRate: number;
|
|
436
|
+
}
|
|
399
437
|
export interface StatsConf {
|
|
400
438
|
/** seconds */
|
|
401
439
|
timeInterval: number;
|
|
@@ -436,3 +474,19 @@ export interface AIAnalyseSampleUnit {
|
|
|
436
474
|
unitId: string;
|
|
437
475
|
dataSummary: string;
|
|
438
476
|
}
|
|
477
|
+
export interface PermissionBasedExport {
|
|
478
|
+
enabled: boolean;
|
|
479
|
+
}
|
|
480
|
+
export interface NotifyConf {
|
|
481
|
+
/** 购买成功配置 */
|
|
482
|
+
purchase: NotifyConf_SceneConf[];
|
|
483
|
+
identityExpiring: NotifyConf_SceneConf[];
|
|
484
|
+
}
|
|
485
|
+
export interface NotifyConf_SceneConf {
|
|
486
|
+
channel: MessageChannel;
|
|
487
|
+
templateId: string;
|
|
488
|
+
}
|
|
489
|
+
export interface IP2AddrCliConf {
|
|
490
|
+
pathFmt: string;
|
|
491
|
+
token: string;
|
|
492
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Error } from '
|
|
4
|
-
import { RowData } from '
|
|
3
|
+
import { Error } from '../../univer/constants/errors';
|
|
4
|
+
import { RowData } from '../../univer/workbook';
|
|
5
5
|
import { DisplayerConfig } from './source_connector/displayer';
|
|
6
6
|
import { SelectColumn, WhereGroup as WhereGroup1 } from './source_connector/stream_view';
|
|
7
7
|
export declare const protobufPackage = "universer.v1";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { SystemHint } from '
|
|
4
|
-
import { Error } from '
|
|
3
|
+
import { SystemHint } from '../../ai_common/common';
|
|
4
|
+
import { Error } from '../../univer/constants/errors';
|
|
5
5
|
import { DataFragmentationType } from './analyse_cmn';
|
|
6
|
+
import { RateDetail } from './entitlement';
|
|
6
7
|
export declare const protobufPackage = "universer.v1";
|
|
7
8
|
export declare enum CompletionStatus {
|
|
8
9
|
Completion_None = 0,
|
|
@@ -75,6 +76,17 @@ export declare enum ChatSSEStatus {
|
|
|
75
76
|
ChatSSEStatus_Success = 2,
|
|
76
77
|
UNRECOGNIZED = -1
|
|
77
78
|
}
|
|
79
|
+
export interface ModelDetail {
|
|
80
|
+
/** use string representation of enum ai_common.UniverAIModel */
|
|
81
|
+
modelId: string;
|
|
82
|
+
rateDetails: RateDetail[];
|
|
83
|
+
}
|
|
84
|
+
export interface ListAvailableModelsRequest {
|
|
85
|
+
}
|
|
86
|
+
export interface ListAvailableModelsResponse {
|
|
87
|
+
models: ModelDetail[];
|
|
88
|
+
error: Error | undefined;
|
|
89
|
+
}
|
|
78
90
|
export interface GetConversationModelsRequest {
|
|
79
91
|
}
|
|
80
92
|
export interface GetConversationModel {
|
|
@@ -114,6 +126,16 @@ export interface Conversation {
|
|
|
114
126
|
/** unix timestamp milli seconds */
|
|
115
127
|
lastUpdate: string;
|
|
116
128
|
title: string;
|
|
129
|
+
creatorUid: string;
|
|
130
|
+
expireTime: string;
|
|
131
|
+
shared: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface GetConversationRequest {
|
|
134
|
+
conversationId: string;
|
|
135
|
+
}
|
|
136
|
+
export interface GetConversationResponse {
|
|
137
|
+
conversation: Conversation | undefined;
|
|
138
|
+
error: Error | undefined;
|
|
117
139
|
}
|
|
118
140
|
export interface ListConversationsRequest {
|
|
119
141
|
/**
|
|
@@ -139,6 +161,18 @@ export interface RenameConversationRequest {
|
|
|
139
161
|
export interface RenameConversationResponse {
|
|
140
162
|
error: Error | undefined;
|
|
141
163
|
}
|
|
164
|
+
export interface ShareConversationRequest {
|
|
165
|
+
conversationId: string;
|
|
166
|
+
}
|
|
167
|
+
export interface ShareConversationResponse {
|
|
168
|
+
error: Error | undefined;
|
|
169
|
+
}
|
|
170
|
+
export interface UnshareConversationRequest {
|
|
171
|
+
conversationId: string;
|
|
172
|
+
}
|
|
173
|
+
export interface UnshareConversationResponse {
|
|
174
|
+
error: Error | undefined;
|
|
175
|
+
}
|
|
142
176
|
export interface DeleteConversationRequest {
|
|
143
177
|
conversationId: string;
|
|
144
178
|
}
|
|
@@ -161,6 +195,8 @@ export interface ContentBlock {
|
|
|
161
195
|
blockType: ContentBlockType;
|
|
162
196
|
contentType: ContentType;
|
|
163
197
|
body: string;
|
|
198
|
+
/** for multi-channel response, default is empty */
|
|
199
|
+
channelId?: string | undefined;
|
|
164
200
|
}
|
|
165
201
|
export interface Attachment {
|
|
166
202
|
type: AttachmentType;
|
|
@@ -219,14 +255,23 @@ export interface SubmitPromptRequest {
|
|
|
219
255
|
/** use unit or data source */
|
|
220
256
|
dataSourceId: string;
|
|
221
257
|
systemHints: SystemHint[];
|
|
258
|
+
/** Locale Code */
|
|
259
|
+
locale?: string | undefined;
|
|
222
260
|
}
|
|
223
261
|
/** SSE api: /universer-api/conversation/resume */
|
|
224
262
|
export interface ResumeConversationRequest {
|
|
225
263
|
conversationId: string;
|
|
226
|
-
|
|
264
|
+
/** see HITLType, use string, see ai_common/common.proto, eg. hitl_select_table */
|
|
265
|
+
type: string;
|
|
266
|
+
/** json string, see ai_common/common.proto */
|
|
267
|
+
resumeData: string;
|
|
268
|
+
/** Locale Code */
|
|
269
|
+
locale?: string | undefined;
|
|
270
|
+
model?: string | undefined;
|
|
227
271
|
}
|
|
228
|
-
|
|
229
|
-
|
|
272
|
+
/** SSE api: /universer-api/conversation/reconnect */
|
|
273
|
+
export interface ReconnectConversationRequest {
|
|
274
|
+
conversationId: string;
|
|
230
275
|
}
|
|
231
276
|
/** chat streaming response SSE block */
|
|
232
277
|
export interface ChatSSEBlock {
|
|
@@ -247,6 +292,8 @@ export interface ChatSSEBlock {
|
|
|
247
292
|
*/
|
|
248
293
|
body: string;
|
|
249
294
|
status: ChatSSEStatus;
|
|
295
|
+
/** for multi-channel response, default is empty */
|
|
296
|
+
channelId?: string | undefined;
|
|
250
297
|
}
|
|
251
298
|
export interface ChatContentSSEBlock {
|
|
252
299
|
contentType: ContentType;
|
|
@@ -300,17 +347,86 @@ export interface UpdateConversationDataFragmentationRequest {
|
|
|
300
347
|
export interface UpdateConversationDataFragmentationResponse {
|
|
301
348
|
error: Error | undefined;
|
|
302
349
|
}
|
|
350
|
+
export interface BindUnitWithConversationRequest {
|
|
351
|
+
unitId: string;
|
|
352
|
+
conversationId: string;
|
|
353
|
+
messageId: string;
|
|
354
|
+
}
|
|
355
|
+
export interface BindUnitWithConversationResponse {
|
|
356
|
+
error: Error | undefined;
|
|
357
|
+
}
|
|
358
|
+
export interface CancelConversationRequest {
|
|
359
|
+
conversationId: string;
|
|
360
|
+
}
|
|
361
|
+
export interface CancelConversationResponse {
|
|
362
|
+
error: Error | undefined;
|
|
363
|
+
}
|
|
364
|
+
export interface NeedReconnectConversationRequest {
|
|
365
|
+
conversationId: string;
|
|
366
|
+
}
|
|
367
|
+
export interface NeedReconnectConversationResponse {
|
|
368
|
+
needReconnect: boolean;
|
|
369
|
+
error: Error | undefined;
|
|
370
|
+
}
|
|
371
|
+
export interface CreateReportRequest {
|
|
372
|
+
conversationId: string;
|
|
373
|
+
messageId: string;
|
|
374
|
+
}
|
|
375
|
+
export interface CreateReportResponse {
|
|
376
|
+
report: Report | undefined;
|
|
377
|
+
error: Error | undefined;
|
|
378
|
+
}
|
|
379
|
+
export interface Report {
|
|
380
|
+
reportId: string;
|
|
381
|
+
conversationId: string;
|
|
382
|
+
messageId: string;
|
|
383
|
+
/** unix timestamp milli seconds */
|
|
384
|
+
createTime: number;
|
|
385
|
+
updateTime: number;
|
|
386
|
+
status: string;
|
|
387
|
+
fragmentationId: string;
|
|
388
|
+
title: string;
|
|
389
|
+
summary: string;
|
|
390
|
+
}
|
|
391
|
+
export interface ListReportsRequest {
|
|
392
|
+
conversationId: string;
|
|
393
|
+
}
|
|
394
|
+
export interface ListReportsResponse {
|
|
395
|
+
reports: Report[];
|
|
396
|
+
error: Error | undefined;
|
|
397
|
+
}
|
|
398
|
+
export interface FinishReportRequest {
|
|
399
|
+
reportId: string;
|
|
400
|
+
status: string;
|
|
401
|
+
title: string;
|
|
402
|
+
summary: string;
|
|
403
|
+
content: string;
|
|
404
|
+
}
|
|
405
|
+
export interface FinishReportResponse {
|
|
406
|
+
error: Error | undefined;
|
|
407
|
+
}
|
|
303
408
|
export interface ConversationService {
|
|
409
|
+
GetConversation(request: GetConversationRequest, metadata?: Metadata): Observable<GetConversationResponse>;
|
|
304
410
|
/** the conversation list is order by lastUpdate desc default. */
|
|
305
411
|
ListConversations(request: ListConversationsRequest, metadata?: Metadata): Observable<ListConversationsResponse>;
|
|
306
412
|
RenameConversation(request: RenameConversationRequest, metadata?: Metadata): Observable<RenameConversationResponse>;
|
|
413
|
+
ShareConversation(request: ShareConversationRequest, metadata?: Metadata): Observable<ShareConversationResponse>;
|
|
414
|
+
UnshareConversation(request: UnshareConversationRequest, metadata?: Metadata): Observable<UnshareConversationResponse>;
|
|
307
415
|
DeleteConversation(request: DeleteConversationRequest, metadata?: Metadata): Observable<DeleteConversationResponse>;
|
|
308
416
|
/** the message list is order by createTime desc default. */
|
|
309
417
|
ListConversationMessages(request: ListConversationMessagesRequest, metadata?: Metadata): Observable<ListConversationMessagesResponse>;
|
|
310
418
|
ReactMessage(request: ReactMessageRequest, metadata?: Metadata): Observable<ReactMessageResponse>;
|
|
311
419
|
GetPromptRecommendations(request: GetPromptRecommendationsRequest, metadata?: Metadata): Observable<GetPromptRecommendationsResponse>;
|
|
420
|
+
/** deprecated, use ListAvailableModels instead */
|
|
312
421
|
GetConversationModels(request: GetConversationModelsRequest, metadata?: Metadata): Observable<GetConversationModelsResponse>;
|
|
422
|
+
ListAvailableModels(request: ListAvailableModelsRequest, metadata?: Metadata): Observable<ListAvailableModelsResponse>;
|
|
313
423
|
GetConversationDataFragmentation(request: GetConversationDataFragmentationRequest, metadata?: Metadata): Observable<GetConversationDataFragmentationResponse>;
|
|
314
424
|
ListConversationDataFragmentations(request: ListConversationDataFragmentationsRequest, metadata?: Metadata): Observable<ListConversationDataFragmentationsResponse>;
|
|
315
425
|
UpdateConversationDataFragmentation(request: UpdateConversationDataFragmentationRequest, metadata?: Metadata): Observable<UpdateConversationDataFragmentationResponse>;
|
|
426
|
+
BindUnitWithConversation(request: BindUnitWithConversationRequest, metadata?: Metadata): Observable<BindUnitWithConversationResponse>;
|
|
427
|
+
CancelConversation(request: CancelConversationRequest, metadata?: Metadata): Observable<CancelConversationResponse>;
|
|
428
|
+
NeedReconnectConversation(request: NeedReconnectConversationRequest, metadata?: Metadata): Observable<NeedReconnectConversationResponse>;
|
|
429
|
+
CreateReport(request: CreateReportRequest, metadata?: Metadata): Observable<CreateReportResponse>;
|
|
430
|
+
ListReports(request: ListReportsRequest, metadata?: Metadata): Observable<ListReportsResponse>;
|
|
431
|
+
FinishReport(request: FinishReportRequest, metadata?: Metadata): Observable<FinishReportResponse>;
|
|
316
432
|
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Error } from '
|
|
3
|
+
import { Error } from '../../univer/constants/errors';
|
|
4
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
|
+
}
|
|
5
14
|
export interface SendClipsheetWorkflowEmailRequest {
|
|
6
15
|
userId: string;
|
|
7
16
|
recipientEmail: string;
|
|
@@ -15,4 +24,5 @@ export interface SendClipsheetWorkflowEmailResponse {
|
|
|
15
24
|
}
|
|
16
25
|
export interface EmailService {
|
|
17
26
|
SendClipsheetWorkflowEmail(request: SendClipsheetWorkflowEmailRequest, metadata?: Metadata): Observable<SendClipsheetWorkflowEmailResponse>;
|
|
27
|
+
SendRawEmail(request: SendRawEmailRequest, metadata?: Metadata): Observable<SendRawEmailResponse>;
|
|
18
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Error } from '
|
|
3
|
+
import { Error } from '../../univer/constants/errors';
|
|
4
4
|
export declare const protobufPackage = "universer.v1";
|
|
5
5
|
export declare enum Interval {
|
|
6
6
|
Hour = 0,
|
|
@@ -25,14 +25,38 @@ export declare enum EntitlementItemId {
|
|
|
25
25
|
ProSearchRate = 5,
|
|
26
26
|
AvailableAImodels = 6,
|
|
27
27
|
RowsLimitedPerDrillDown = 7,
|
|
28
|
+
/** BiaoDaReportRate - for biaoda */
|
|
29
|
+
BiaoDaReportRate = 11,
|
|
30
|
+
/** BiaoDaChatReserveTime - 对话保存时间, type=BizDefined, value format: "30" means 30days, "-N" negative or 0 means infinity. */
|
|
31
|
+
BiaoDaChatReserveTime = 13,
|
|
32
|
+
/** BiaoDaAvailableModels - 可用模型, type=BizDefined, value format: "model-1,model-2", models seperate by ',' */
|
|
33
|
+
BiaoDaAvailableModels = 14,
|
|
34
|
+
/** BiaoDaMaxTextAnalyzeRows - 文本分析行数限制, type=BizDefined, value format: "10000" means max 10000 rows, "-N" negative or 0 means infinity. */
|
|
35
|
+
BiaoDaMaxTextAnalyzeRows = 15,
|
|
36
|
+
/** BiaoDaChartsWatermark - 下载图表水印, type=BizDefined, value format: "true" means should add watermark, "false" means no watermark. */
|
|
37
|
+
BiaoDaChartsWatermark = 16,
|
|
38
|
+
/** BiaoDaBasicModelChatRate - 基础模型对话分析频控 */
|
|
39
|
+
BiaoDaBasicModelChatRate = 17,
|
|
40
|
+
/** BiaoDaPremiumModelChatRate - 高级模型对话分析频控 */
|
|
41
|
+
BiaoDaPremiumModelChatRate = 18,
|
|
42
|
+
/** BiaoDaSubPageDrillDownRate - 子页面下钻频控 */
|
|
43
|
+
BiaoDaSubPageDrillDownRate = 19,
|
|
44
|
+
/** BiaoDaURLScrapeRate - URL采集频控 */
|
|
45
|
+
BiaoDaURLScrapeRate = 20,
|
|
46
|
+
/** BiaoDaMaxEnrichmentRows - 数据增强限制行数, type=BizDefined, value format: "10000" means max 10000 rows, "-N" negative or 0 means infinity. */
|
|
47
|
+
BiaoDaMaxEnrichmentRows = 26,
|
|
48
|
+
/** BiaoDaUnitDownload - unit下载,type=Ability */
|
|
49
|
+
BiaoDaUnitDownload = 31,
|
|
50
|
+
/** XlsxAIBasicPoints - xlsx.ai 基础积分 */
|
|
51
|
+
XlsxAIBasicPoints = 101,
|
|
28
52
|
UNRECOGNIZED = -1
|
|
29
53
|
}
|
|
30
54
|
export declare enum ProductType {
|
|
31
|
-
|
|
32
|
-
OneTime = 0,
|
|
55
|
+
NonProduct = 0,
|
|
33
56
|
Recurring = 1,
|
|
34
57
|
/** Freebie - freebie product, like the anonymous users can enjoy pro search 5 times per 4 hours */
|
|
35
58
|
Freebie = 2,
|
|
59
|
+
OneTime = 3,
|
|
36
60
|
UNRECOGNIZED = -1
|
|
37
61
|
}
|
|
38
62
|
export declare enum SessionType {
|
|
@@ -66,6 +90,21 @@ export declare enum InvoiceStatus {
|
|
|
66
90
|
Void = 2,
|
|
67
91
|
UNRECOGNIZED = -1
|
|
68
92
|
}
|
|
93
|
+
export declare enum PaymentChannel {
|
|
94
|
+
NonPay = 0,
|
|
95
|
+
AliPay = 1,
|
|
96
|
+
WechatPay = 2,
|
|
97
|
+
Stripe = 3,
|
|
98
|
+
UNRECOGNIZED = -1
|
|
99
|
+
}
|
|
100
|
+
export declare enum OrderStatus {
|
|
101
|
+
Order_StatusNone = 0,
|
|
102
|
+
Order_PendingPay = 1,
|
|
103
|
+
Order_Cancelled = 2,
|
|
104
|
+
Order_Expired = 3,
|
|
105
|
+
Order_Completed = 4,
|
|
106
|
+
UNRECOGNIZED = -1
|
|
107
|
+
}
|
|
69
108
|
export interface RateLimiter {
|
|
70
109
|
/** negative value means infinity */
|
|
71
110
|
limitedCnt: number;
|
|
@@ -97,6 +136,7 @@ export interface Entitlement {
|
|
|
97
136
|
level: number;
|
|
98
137
|
name: string;
|
|
99
138
|
groups: EntitlementItemGroup[];
|
|
139
|
+
id: string;
|
|
100
140
|
}
|
|
101
141
|
export interface RateDetail {
|
|
102
142
|
/** eg. if interval=Week and interval_cnt=3, it's mean 3 weeks */
|
|
@@ -146,18 +186,23 @@ export interface TakeNItemRateByUserResponse {
|
|
|
146
186
|
lackCnt: number;
|
|
147
187
|
error: Error | undefined;
|
|
148
188
|
}
|
|
189
|
+
export interface DeductQuotaByUserRequest {
|
|
190
|
+
itemId: string;
|
|
191
|
+
/** deduct n, if available count less than n, deduct to 0. */
|
|
192
|
+
n: number;
|
|
193
|
+
}
|
|
194
|
+
export interface DeductQuotaByUserResponse {
|
|
195
|
+
error: Error | undefined;
|
|
196
|
+
}
|
|
149
197
|
export interface Product {
|
|
150
198
|
productId: string;
|
|
151
|
-
/** only Recurring now */
|
|
152
199
|
productType: ProductType;
|
|
153
200
|
entitlement: Entitlement | undefined;
|
|
154
201
|
name: string;
|
|
155
202
|
/** optional, recommendation text of the product */
|
|
156
203
|
recommendation: string;
|
|
157
204
|
tags: string[];
|
|
158
|
-
/** optional, set if product_type is Recurring */
|
|
159
205
|
interval: Interval;
|
|
160
|
-
/** optional, set if product_type is Recurring */
|
|
161
206
|
intervalCnt: number;
|
|
162
207
|
/** the origin price */
|
|
163
208
|
price: string;
|
|
@@ -167,8 +212,6 @@ export interface Product {
|
|
|
167
212
|
promotionPrice: string;
|
|
168
213
|
/** optional, how many interval the promotion last, set if there's any promotion and product_type is Recurring */
|
|
169
214
|
promotionIntervalCnt: number;
|
|
170
|
-
/** optional, eg. 20 means the saving percent is 20%, 0 or nil mean do not display percent */
|
|
171
|
-
maxSavingPercent: number;
|
|
172
215
|
/** optional, the product table name */
|
|
173
216
|
tabName: string;
|
|
174
217
|
}
|
|
@@ -209,9 +252,14 @@ export interface PaymentMethod {
|
|
|
209
252
|
export interface Identity {
|
|
210
253
|
entitlementLevel: number;
|
|
211
254
|
entitlementName: string;
|
|
255
|
+
/** deprecated, this value has no significance. */
|
|
212
256
|
startTime: number;
|
|
213
|
-
/**
|
|
257
|
+
/** deprecated, due to potential overflow risks, use expireTimeSec instead. */
|
|
214
258
|
expireTime: number;
|
|
259
|
+
/** is the system's default identity? */
|
|
260
|
+
isDefault: boolean;
|
|
261
|
+
/** expire time in seconds, negative value means the identity will never expire */
|
|
262
|
+
expireTimeSec: string;
|
|
215
263
|
}
|
|
216
264
|
export interface GetSubscriptionSummaryRequest {
|
|
217
265
|
}
|
|
@@ -232,7 +280,10 @@ export interface Address {
|
|
|
232
280
|
State: string;
|
|
233
281
|
}
|
|
234
282
|
export interface ProductGroup {
|
|
235
|
-
|
|
283
|
+
interval: Interval;
|
|
284
|
+
intervalCnt: number;
|
|
285
|
+
/** optional, eg. 20 means the saving percent is 20%, 0 or nil mean do not display percent */
|
|
286
|
+
maxSavingPercent: number;
|
|
236
287
|
products: Product[];
|
|
237
288
|
}
|
|
238
289
|
export interface ListProductsRequest {
|
|
@@ -241,20 +292,22 @@ export interface ListProductsResponse {
|
|
|
241
292
|
groups: ProductGroup[];
|
|
242
293
|
/** set if has subscription */
|
|
243
294
|
currentSubscription: Subscription | undefined;
|
|
295
|
+
identity: Identity | undefined;
|
|
244
296
|
missingUserInfoTypes: UserInfoType[];
|
|
245
297
|
error: Error | undefined;
|
|
246
298
|
}
|
|
247
299
|
export interface CreateSubscriptionRequest {
|
|
248
300
|
productId: string;
|
|
249
|
-
/** set if
|
|
301
|
+
/** set if previous CreateSubscriptionResponse returns error code ENTITLE_NEED_BILLING_ADDRESS */
|
|
250
302
|
billingAddress: Address | undefined;
|
|
251
|
-
/**
|
|
303
|
+
/** deprecated, ignore this field */
|
|
252
304
|
email: string;
|
|
253
305
|
/** set the return url after payment complete */
|
|
254
306
|
paymentReturnUrl: string;
|
|
255
307
|
}
|
|
256
308
|
export interface CreateSubscriptionResponse {
|
|
257
309
|
session: PaymentSession | undefined;
|
|
310
|
+
/** if error code is ENTITLE_NEED_BILLING_ADDRESS, collect user's billing address and try again */
|
|
258
311
|
error: Error | undefined;
|
|
259
312
|
}
|
|
260
313
|
export interface CancelSubscriptionRequest {
|
|
@@ -303,16 +356,70 @@ export interface ListInvoicesResponse {
|
|
|
303
356
|
export interface GetPaymentConfigRequest {
|
|
304
357
|
}
|
|
305
358
|
export interface GetPaymentConfigResponse {
|
|
306
|
-
|
|
359
|
+
channels: PaymentChannel[];
|
|
360
|
+
/** returned if has stripe channel */
|
|
361
|
+
stripePublicApiKey: string;
|
|
362
|
+
error: Error | undefined;
|
|
363
|
+
}
|
|
364
|
+
export interface PaymentRequest {
|
|
365
|
+
productId: string;
|
|
366
|
+
qty: number;
|
|
367
|
+
channel: PaymentChannel;
|
|
368
|
+
orderId: string;
|
|
369
|
+
}
|
|
370
|
+
export interface PaymentResponse {
|
|
371
|
+
orderId: string;
|
|
372
|
+
payQRCode: string;
|
|
373
|
+
error: Error | undefined;
|
|
374
|
+
}
|
|
375
|
+
export interface GetOrderStatusRequest {
|
|
376
|
+
orderId: string;
|
|
377
|
+
}
|
|
378
|
+
export interface GetOrderStatusResponse {
|
|
379
|
+
order: Order | undefined;
|
|
380
|
+
error: Error | undefined;
|
|
381
|
+
}
|
|
382
|
+
export interface Order {
|
|
383
|
+
id: string;
|
|
384
|
+
productId: string;
|
|
385
|
+
qty: number;
|
|
386
|
+
currency: string;
|
|
387
|
+
price: string;
|
|
388
|
+
amount: string;
|
|
389
|
+
status: OrderStatus;
|
|
390
|
+
expireTime: string;
|
|
391
|
+
}
|
|
392
|
+
export interface ListActiveEntitlementsRequest {
|
|
393
|
+
}
|
|
394
|
+
export interface ListActiveEntitlementsResponse {
|
|
395
|
+
entitlements: Entitlement[];
|
|
396
|
+
error: Error | undefined;
|
|
397
|
+
}
|
|
398
|
+
export interface GrantEntitlementRequest {
|
|
399
|
+
bizId: string;
|
|
400
|
+
bizGrantId: string;
|
|
401
|
+
toUserId: string;
|
|
402
|
+
entitlementId: string;
|
|
403
|
+
interval: Interval;
|
|
404
|
+
intervalCnt: number;
|
|
405
|
+
}
|
|
406
|
+
export interface GrantEntitlementResponse {
|
|
307
407
|
error: Error | undefined;
|
|
308
408
|
}
|
|
309
409
|
export interface EntitlementService {
|
|
310
410
|
MGetEntitlementItemsByUser(request: MGetEntitlementItemsByUserRequest, metadata?: Metadata): Observable<MGetEntitlementItemsByUserResponse>;
|
|
411
|
+
/** for back-end only, can deduct and add. */
|
|
311
412
|
TakeNItemRateByUser(request: TakeNItemRateByUserRequest, metadata?: Metadata): Observable<TakeNItemRateByUserResponse>;
|
|
413
|
+
/** for front-end only case, just deduct, can not return quota. */
|
|
414
|
+
DeductQuotaByUser(request: DeductQuotaByUserRequest, metadata?: Metadata): Observable<DeductQuotaByUserResponse>;
|
|
312
415
|
GetPaymentConfig(request: GetPaymentConfigRequest, metadata?: Metadata): Observable<GetPaymentConfigResponse>;
|
|
313
416
|
ListProducts(request: ListProductsRequest, metadata?: Metadata): Observable<ListProductsResponse>;
|
|
314
417
|
GetSubscriptionSummary(request: GetSubscriptionSummaryRequest, metadata?: Metadata): Observable<GetSubscriptionSummaryResponse>;
|
|
315
418
|
CreateSubscription(request: CreateSubscriptionRequest, metadata?: Metadata): Observable<CreateSubscriptionResponse>;
|
|
316
419
|
CancelSubscription(request: CancelSubscriptionRequest, metadata?: Metadata): Observable<CancelSubscriptionResponse>;
|
|
317
420
|
ListInvoices(request: ListInvoicesRequest, metadata?: Metadata): Observable<ListInvoicesResponse>;
|
|
421
|
+
Pay(request: PaymentRequest, metadata?: Metadata): Observable<PaymentResponse>;
|
|
422
|
+
GetOrderStatus(request: GetOrderStatusRequest, metadata?: Metadata): Observable<GetOrderStatusResponse>;
|
|
423
|
+
ListActiveEntitlements(request: ListActiveEntitlementsRequest, metadata?: Metadata): Observable<ListActiveEntitlementsResponse>;
|
|
424
|
+
GrantEntitlement(request: GrantEntitlementRequest, metadata?: Metadata): Observable<GrantEntitlementResponse>;
|
|
318
425
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Error } from '
|
|
4
|
-
import { UniverType } from '
|
|
5
|
-
import { Snapshot } from '
|
|
6
|
-
import { SheetBlock } from '
|
|
3
|
+
import { Error } from '../../univer/constants/errors';
|
|
4
|
+
import { UniverType } from '../../univer/constants/univer';
|
|
5
|
+
import { Snapshot } from '../../univer/snapshot';
|
|
6
|
+
import { SheetBlock } from '../../univer/workbook';
|
|
7
7
|
export declare const protobufPackage = "universer.v1";
|
|
8
8
|
export declare enum ImportOutputType {
|
|
9
9
|
UNDEFINED = 0,
|
|
@@ -39,6 +39,11 @@ export interface ExportRequest {
|
|
|
39
39
|
/** if jsonID is specified, the input is the json file which represents a univer unit */
|
|
40
40
|
jsonID: string;
|
|
41
41
|
type: UniverType;
|
|
42
|
+
/** whether to use the SSC switch, default is false not use ssc */
|
|
43
|
+
sscSwitch: boolean;
|
|
44
|
+
/** whether to use the image url in the exported file */
|
|
45
|
+
useImageUrl: boolean;
|
|
46
|
+
ignoreTableExport: boolean;
|
|
42
47
|
}
|
|
43
48
|
export interface ExportResponse {
|
|
44
49
|
error: Error | undefined;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 declare enum FeedbackType {
|
|
6
|
+
FeedbackType_None = 0,
|
|
7
|
+
FeedbackType_Others = 1,
|
|
8
|
+
FeedbackType_Feature = 2,
|
|
9
|
+
FeedbackType_Bug = 3,
|
|
10
|
+
FeedbackType_AIImprovement = 4,
|
|
11
|
+
UNRECOGNIZED = -1
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* <SelectItem value="1">Non-commercial Pricing - Sheet Advanced Version</SelectItem>
|
|
15
|
+
* <SelectItem value="2">Non-commercial Pricing - Sheet Collaboration Version</SelectItem>
|
|
16
|
+
* <SelectItem value="3">Commercial / SaaS Pricing - Sheet Advanced Version</SelectItem>
|
|
17
|
+
* <SelectItem value="4">Commercial / SaaS Pricing - Sheet Collaboration Version</SelectItem>
|
|
18
|
+
*/
|
|
19
|
+
export declare enum InterestType {
|
|
20
|
+
InterestType_None = 0,
|
|
21
|
+
InterestType_Non_Commercial_Sheet_Advanced = 1,
|
|
22
|
+
InterestType_Non_Commercial_Sheet_Collaboration = 2,
|
|
23
|
+
InterestType_Commercial_Sheet_Advanced = 3,
|
|
24
|
+
InterestType_Commercial_Sheet_Collaboration = 4,
|
|
25
|
+
UNRECOGNIZED = -1
|
|
26
|
+
}
|
|
27
|
+
export declare enum ChannelType {
|
|
28
|
+
/** ChannelType_None - 未知 */
|
|
29
|
+
ChannelType_None = 0,
|
|
30
|
+
/** ChannelType_GitHub - GitHub */
|
|
31
|
+
ChannelType_GitHub = 1,
|
|
32
|
+
/** ChannelType_Google - Google */
|
|
33
|
+
ChannelType_Google = 2,
|
|
34
|
+
/** ChannelType_OnlineAdvertising - 在线广告 */
|
|
35
|
+
ChannelType_OnlineAdvertising = 3,
|
|
36
|
+
/** ChannelType_SocialMedia - 社交媒体平台(如 Facebook, Twitter 等) */
|
|
37
|
+
ChannelType_SocialMedia = 4,
|
|
38
|
+
/** ChannelType_FriendRecommendation - 朋友推荐 */
|
|
39
|
+
ChannelType_FriendRecommendation = 5,
|
|
40
|
+
/** ChannelType_Other - 其他 */
|
|
41
|
+
ChannelType_Other = 6,
|
|
42
|
+
UNRECOGNIZED = -1
|
|
43
|
+
}
|
|
44
|
+
export interface SubmitFeedbackRequest {
|
|
45
|
+
contactName: string;
|
|
46
|
+
contactEmail: string;
|
|
47
|
+
type: FeedbackType;
|
|
48
|
+
subject: string;
|
|
49
|
+
content: string;
|
|
50
|
+
}
|
|
51
|
+
export interface SubmitFeedbackResponse {
|
|
52
|
+
feedbackId: string;
|
|
53
|
+
error: Error | undefined;
|
|
54
|
+
}
|
|
55
|
+
export interface ContactRequest {
|
|
56
|
+
contactName: string;
|
|
57
|
+
contactCompany: string;
|
|
58
|
+
contactEmail: string;
|
|
59
|
+
type: InterestType;
|
|
60
|
+
message: string;
|
|
61
|
+
channel: ChannelType;
|
|
62
|
+
/** 如果选择“其他”,填写具体内容 */
|
|
63
|
+
otherChannel: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ContactResponse {
|
|
66
|
+
error: Error | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface FeedbackService {
|
|
69
|
+
SubmitFeedback(request: SubmitFeedbackRequest, metadata?: Metadata): Observable<SubmitFeedbackResponse>;
|
|
70
|
+
Contact(request: ContactRequest, metadata?: Metadata): Observable<ContactResponse>;
|
|
71
|
+
}
|