@univerjs/protocol 0.1.47-alpha.0 → 0.1.48
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 +25 -25
- package/lib/types/index.d.ts +25 -23
- package/lib/types/ts/univer/changeset.d.ts +4 -0
- package/lib/types/ts/univer/constants/biz.d.ts +17 -0
- package/lib/types/ts/univer/constants/errors.d.ts +54 -0
- package/lib/types/ts/univer/initial_sheet.d.ts +2 -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 +4 -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/universer/v1/activity.d.ts +22 -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 +7 -2
- 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 +104 -1
- package/lib/types/ts/{v1 → universer/v1}/connector.d.ts +2 -2
- package/lib/types/ts/{v1 → universer/v1}/conversation.d.ts +160 -5
- package/lib/types/ts/{v1 → universer/v1}/email.d.ts +11 -1
- package/lib/types/ts/{v1 → universer/v1}/entitlement.d.ts +279 -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/universer/v1/frontend_logs.d.ts +36 -0
- package/lib/types/ts/{v1 → universer/v1}/go_config_center.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/history.d.ts +31 -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 +4 -1
- package/lib/types/ts/universer/v1/redemption_code.d.ts +32 -0
- package/lib/types/ts/universer/v1/referral.d.ts +55 -0
- package/lib/types/ts/universer/v1/scraper.d.ts +144 -0
- package/lib/types/ts/{v1 → universer/v1}/snapshot.d.ts +53 -13
- 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 +79 -1
- package/lib/types/ts/universer/v1/user_event.d.ts +23 -0
- package/lib/types/ts/{v1 → universer/v1}/user_settings.d.ts +1 -1
- package/lib/types/ts/{v1 → universer/v1}/usip.d.ts +7 -0
- package/lib/types/ts/{v1 → universer/v1}/workspace.d.ts +6 -5
- package/lib/umd/index.js +1 -1
- package/package.json +7 -13
- 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
|
@@ -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,
|
|
@@ -16,6 +16,18 @@ export declare enum EntitlementItemType {
|
|
|
16
16
|
BizDefined = 2,
|
|
17
17
|
UNRECOGNIZED = -1
|
|
18
18
|
}
|
|
19
|
+
export declare enum EntitlementType {
|
|
20
|
+
InvalidEntitlement = 0,
|
|
21
|
+
TimeEntitlement = 1,
|
|
22
|
+
QuotaEntitlement = 2,
|
|
23
|
+
MixEntitlement = 3,
|
|
24
|
+
UNRECOGNIZED = -1
|
|
25
|
+
}
|
|
26
|
+
export declare enum QuotaKey {
|
|
27
|
+
NoneQuotaKey = 0,
|
|
28
|
+
CreditGeneral = 1,
|
|
29
|
+
UNRECOGNIZED = -1
|
|
30
|
+
}
|
|
19
31
|
export declare enum EntitlementItemId {
|
|
20
32
|
WebTableExtractRate = 0,
|
|
21
33
|
ServerExtractHistory = 1,
|
|
@@ -25,14 +37,58 @@ export declare enum EntitlementItemId {
|
|
|
25
37
|
ProSearchRate = 5,
|
|
26
38
|
AvailableAImodels = 6,
|
|
27
39
|
RowsLimitedPerDrillDown = 7,
|
|
40
|
+
/** BiaoDaReportRate - for biaoda */
|
|
41
|
+
BiaoDaReportRate = 11,
|
|
42
|
+
/** BiaoDaChatReserveTime - 对话保存时间, type=BizDefined, value format: "30" means 30days, "-N" negative or 0 means infinity. */
|
|
43
|
+
BiaoDaChatReserveTime = 13,
|
|
44
|
+
/** BiaoDaAvailableModels - 可用模型, type=BizDefined, value format: "model-1,model-2", models seperate by ',' */
|
|
45
|
+
BiaoDaAvailableModels = 14,
|
|
46
|
+
/** BiaoDaMaxTextAnalyzeRows - 文本分析行数限制, type=BizDefined, value format: "10000" means max 10000 rows, "-N" negative or 0 means infinity. */
|
|
47
|
+
BiaoDaMaxTextAnalyzeRows = 15,
|
|
48
|
+
/** BiaoDaChartsWatermark - 下载图表水印, type=BizDefined, value format: "true" means should add watermark, "false" means no watermark. */
|
|
49
|
+
BiaoDaChartsWatermark = 16,
|
|
50
|
+
/** BiaoDaBasicModelChatRate - 基础模型对话分析频控 */
|
|
51
|
+
BiaoDaBasicModelChatRate = 17,
|
|
52
|
+
/** BiaoDaPremiumModelChatRate - 高级模型对话分析频控 */
|
|
53
|
+
BiaoDaPremiumModelChatRate = 18,
|
|
54
|
+
/** BiaoDaSubPageDrillDownRate - 子页面下钻频控 */
|
|
55
|
+
BiaoDaSubPageDrillDownRate = 19,
|
|
56
|
+
/** BiaoDaURLScrapeRate - URL采集频控 */
|
|
57
|
+
BiaoDaURLScrapeRate = 20,
|
|
58
|
+
/** BiaoDaMaxEnrichmentRows - 数据增强限制行数, type=BizDefined, value format: "10000" means max 10000 rows, "-N" negative or 0 means infinity. */
|
|
59
|
+
BiaoDaMaxEnrichmentRows = 26,
|
|
60
|
+
/** BiaoDaUnitDownload - unit下载,type=Ability */
|
|
61
|
+
BiaoDaUnitDownload = 31,
|
|
62
|
+
/** BiaoDaDashboardDownload - dashboard下载,type=Ability */
|
|
63
|
+
BiaoDaDashboardDownload = 32,
|
|
64
|
+
/** XlsxAIBasicPoints - xlsx.ai 基础积分 */
|
|
65
|
+
XlsxAIBasicPoints = 101,
|
|
66
|
+
UNRECOGNIZED = -1
|
|
67
|
+
}
|
|
68
|
+
export declare enum QuotaSource {
|
|
69
|
+
InvalidQuotaSource = 0,
|
|
70
|
+
AwardedQuota = 1,
|
|
71
|
+
RedeemedQuota = 2,
|
|
72
|
+
RegisterQuota = 3,
|
|
73
|
+
QuotaPackage = 4,
|
|
74
|
+
PlanedQuota = 5,
|
|
75
|
+
ReferralQuota = 6,
|
|
28
76
|
UNRECOGNIZED = -1
|
|
29
77
|
}
|
|
30
78
|
export declare enum ProductType {
|
|
31
|
-
|
|
32
|
-
OneTime = 0,
|
|
79
|
+
NonProduct = 0,
|
|
33
80
|
Recurring = 1,
|
|
34
81
|
/** Freebie - freebie product, like the anonymous users can enjoy pro search 5 times per 4 hours */
|
|
35
82
|
Freebie = 2,
|
|
83
|
+
OneTime = 3,
|
|
84
|
+
UNRECOGNIZED = -1
|
|
85
|
+
}
|
|
86
|
+
export declare enum ProductCategory {
|
|
87
|
+
InvalidProductCategory = 0,
|
|
88
|
+
/** PlanProduct - 订阅类 */
|
|
89
|
+
PlanProduct = 1,
|
|
90
|
+
/** QuotaPackageProduct - 加量包类 */
|
|
91
|
+
QuotaPackageProduct = 2,
|
|
36
92
|
UNRECOGNIZED = -1
|
|
37
93
|
}
|
|
38
94
|
export declare enum SessionType {
|
|
@@ -55,6 +111,16 @@ export declare enum SubscriptionStatus {
|
|
|
55
111
|
Cancelled = 4,
|
|
56
112
|
UNRECOGNIZED = -1
|
|
57
113
|
}
|
|
114
|
+
export declare enum IdentitySource {
|
|
115
|
+
InvalidIdentitySource = 0,
|
|
116
|
+
DefaultIdentity = 1,
|
|
117
|
+
AwardedIdentity = 2,
|
|
118
|
+
RedeemedIdentity = 3,
|
|
119
|
+
PlanedIdentity = 4,
|
|
120
|
+
RegisteredIdentity = 5,
|
|
121
|
+
ReferralIdentity = 6,
|
|
122
|
+
UNRECOGNIZED = -1
|
|
123
|
+
}
|
|
58
124
|
export declare enum UserInfoType {
|
|
59
125
|
Email = 0,
|
|
60
126
|
BillingAddress = 1,
|
|
@@ -66,6 +132,21 @@ export declare enum InvoiceStatus {
|
|
|
66
132
|
Void = 2,
|
|
67
133
|
UNRECOGNIZED = -1
|
|
68
134
|
}
|
|
135
|
+
export declare enum PaymentChannel {
|
|
136
|
+
NonPay = 0,
|
|
137
|
+
AliPay = 1,
|
|
138
|
+
WechatPay = 2,
|
|
139
|
+
Stripe = 3,
|
|
140
|
+
UNRECOGNIZED = -1
|
|
141
|
+
}
|
|
142
|
+
export declare enum OrderStatus {
|
|
143
|
+
Order_StatusNone = 0,
|
|
144
|
+
Order_PendingPay = 1,
|
|
145
|
+
Order_Cancelled = 2,
|
|
146
|
+
Order_Expired = 3,
|
|
147
|
+
Order_Completed = 4,
|
|
148
|
+
UNRECOGNIZED = -1
|
|
149
|
+
}
|
|
69
150
|
export interface RateLimiter {
|
|
70
151
|
/** negative value means infinity */
|
|
71
152
|
limitedCnt: number;
|
|
@@ -97,6 +178,8 @@ export interface Entitlement {
|
|
|
97
178
|
level: number;
|
|
98
179
|
name: string;
|
|
99
180
|
groups: EntitlementItemGroup[];
|
|
181
|
+
id: string;
|
|
182
|
+
type: EntitlementType;
|
|
100
183
|
}
|
|
101
184
|
export interface RateDetail {
|
|
102
185
|
/** eg. if interval=Week and interval_cnt=3, it's mean 3 weeks */
|
|
@@ -146,18 +229,64 @@ export interface TakeNItemRateByUserResponse {
|
|
|
146
229
|
lackCnt: number;
|
|
147
230
|
error: Error | undefined;
|
|
148
231
|
}
|
|
232
|
+
export interface DeductQuotaByUserRequest {
|
|
233
|
+
itemId: string;
|
|
234
|
+
/** deduct n, if available count less than n, deduct to 0. */
|
|
235
|
+
n: number;
|
|
236
|
+
}
|
|
237
|
+
export interface DeductQuotaByUserResponse {
|
|
238
|
+
error: Error | undefined;
|
|
239
|
+
}
|
|
240
|
+
export interface ReportQuotaUsageRequest {
|
|
241
|
+
/** string representation of enum QuotaKey */
|
|
242
|
+
quotaKey: string;
|
|
243
|
+
quotaUsed: number;
|
|
244
|
+
/** used to aggregate credits cost */
|
|
245
|
+
messageId?: string | undefined;
|
|
246
|
+
/** used to aggregate credits cost */
|
|
247
|
+
conversationId?: string | undefined;
|
|
248
|
+
}
|
|
249
|
+
export interface ReportQuotaUsageResponse {
|
|
250
|
+
error: Error | undefined;
|
|
251
|
+
}
|
|
252
|
+
export interface GetQuotaItemRequest {
|
|
253
|
+
quotaKey: string;
|
|
254
|
+
}
|
|
255
|
+
export interface GetQuotaItemResponse {
|
|
256
|
+
/** 只返回真实可用大于0的明细 */
|
|
257
|
+
item: QuotaItem | undefined;
|
|
258
|
+
error: Error | undefined;
|
|
259
|
+
}
|
|
260
|
+
export interface QuotaDetailRecord {
|
|
261
|
+
source: QuotaSource;
|
|
262
|
+
grantTime: string;
|
|
263
|
+
expireTime: string;
|
|
264
|
+
quotaTotal: number;
|
|
265
|
+
quotaLeft: number;
|
|
266
|
+
}
|
|
267
|
+
export interface QuotaItem {
|
|
268
|
+
quotaKey: string;
|
|
269
|
+
totalAvailable: number;
|
|
270
|
+
details: QuotaDetailRecord[];
|
|
271
|
+
}
|
|
272
|
+
export interface QuotaItemConf {
|
|
273
|
+
quotaKey: string;
|
|
274
|
+
quotaTotal: number;
|
|
275
|
+
}
|
|
149
276
|
export interface Product {
|
|
150
277
|
productId: string;
|
|
151
|
-
/** only Recurring now */
|
|
152
278
|
productType: ProductType;
|
|
153
279
|
entitlement: Entitlement | undefined;
|
|
154
280
|
name: string;
|
|
155
281
|
/** optional, recommendation text of the product */
|
|
156
282
|
recommendation: string;
|
|
157
283
|
tags: string[];
|
|
158
|
-
|
|
284
|
+
entitlementType: EntitlementType;
|
|
285
|
+
category: ProductCategory;
|
|
286
|
+
quotaConfs: {
|
|
287
|
+
[key: string]: QuotaItemConf;
|
|
288
|
+
};
|
|
159
289
|
interval: Interval;
|
|
160
|
-
/** optional, set if product_type is Recurring */
|
|
161
290
|
intervalCnt: number;
|
|
162
291
|
/** the origin price */
|
|
163
292
|
price: string;
|
|
@@ -167,11 +296,13 @@ export interface Product {
|
|
|
167
296
|
promotionPrice: string;
|
|
168
297
|
/** optional, how many interval the promotion last, set if there's any promotion and product_type is Recurring */
|
|
169
298
|
promotionIntervalCnt: number;
|
|
170
|
-
/** optional, eg. 20 means the saving percent is 20%, 0 or nil mean do not display percent */
|
|
171
|
-
maxSavingPercent: number;
|
|
172
299
|
/** optional, the product table name */
|
|
173
300
|
tabName: string;
|
|
174
301
|
}
|
|
302
|
+
export interface Product_QuotaConfsEntry {
|
|
303
|
+
key: string;
|
|
304
|
+
value: QuotaItemConf | undefined;
|
|
305
|
+
}
|
|
175
306
|
export interface PaymentSession {
|
|
176
307
|
sessionType: SessionType;
|
|
177
308
|
clientSecret: string;
|
|
@@ -189,6 +320,8 @@ export interface Subscription {
|
|
|
189
320
|
subscriptTime: number;
|
|
190
321
|
/** unix timestamp of UTC 0 */
|
|
191
322
|
nextChargeTime: number;
|
|
323
|
+
entitlementType: EntitlementType;
|
|
324
|
+
entitlementLevel: number;
|
|
192
325
|
/** is the subscription need payment */
|
|
193
326
|
paymentNeeded: boolean;
|
|
194
327
|
/** optional, set session data if payment_needed is true */
|
|
@@ -209,9 +342,16 @@ export interface PaymentMethod {
|
|
|
209
342
|
export interface Identity {
|
|
210
343
|
entitlementLevel: number;
|
|
211
344
|
entitlementName: string;
|
|
345
|
+
/** deprecated, this value has no significance. */
|
|
212
346
|
startTime: number;
|
|
213
|
-
/**
|
|
347
|
+
/** deprecated, due to potential overflow risks, use expireTimeSec instead. */
|
|
214
348
|
expireTime: number;
|
|
349
|
+
/** is the system's default identity? */
|
|
350
|
+
isDefault: boolean;
|
|
351
|
+
/** expire time in seconds, negative value means the identity will never expire */
|
|
352
|
+
expireTimeSec: string;
|
|
353
|
+
entitlementType: EntitlementType;
|
|
354
|
+
identitySource: IdentitySource;
|
|
215
355
|
}
|
|
216
356
|
export interface GetSubscriptionSummaryRequest {
|
|
217
357
|
}
|
|
@@ -221,8 +361,16 @@ export interface GetSubscriptionSummaryResponse {
|
|
|
221
361
|
currentSubscription: Subscription | undefined;
|
|
222
362
|
/** optional, may be set if currently has any subscription */
|
|
223
363
|
paymentMethod: PaymentMethod | undefined;
|
|
364
|
+
/** key for QuotaKey string, val for available now */
|
|
365
|
+
availableQuotas: {
|
|
366
|
+
[key: string]: number;
|
|
367
|
+
};
|
|
224
368
|
error: Error | undefined;
|
|
225
369
|
}
|
|
370
|
+
export interface GetSubscriptionSummaryResponse_AvailableQuotasEntry {
|
|
371
|
+
key: string;
|
|
372
|
+
value: number;
|
|
373
|
+
}
|
|
226
374
|
export interface Address {
|
|
227
375
|
City: string;
|
|
228
376
|
Country: string;
|
|
@@ -232,29 +380,47 @@ export interface Address {
|
|
|
232
380
|
State: string;
|
|
233
381
|
}
|
|
234
382
|
export interface ProductGroup {
|
|
235
|
-
|
|
383
|
+
interval: Interval;
|
|
384
|
+
intervalCnt: number;
|
|
385
|
+
/** optional, eg. 20 means the saving percent is 20%, 0 or nil mean do not display percent */
|
|
386
|
+
maxSavingPercent: number;
|
|
236
387
|
products: Product[];
|
|
237
388
|
}
|
|
238
389
|
export interface ListProductsRequest {
|
|
390
|
+
couponCode: string;
|
|
239
391
|
}
|
|
240
392
|
export interface ListProductsResponse {
|
|
393
|
+
/** only return the subscription products */
|
|
241
394
|
groups: ProductGroup[];
|
|
242
395
|
/** set if has subscription */
|
|
243
396
|
currentSubscription: Subscription | undefined;
|
|
397
|
+
identity: Identity | undefined;
|
|
398
|
+
/** deprecated */
|
|
244
399
|
missingUserInfoTypes: UserInfoType[];
|
|
400
|
+
/** only return the quota packages */
|
|
401
|
+
quotaPackages: Product[];
|
|
402
|
+
isQuotaPackageAvailableForUser: boolean;
|
|
245
403
|
error: Error | undefined;
|
|
246
404
|
}
|
|
247
405
|
export interface CreateSubscriptionRequest {
|
|
248
406
|
productId: string;
|
|
249
|
-
/** set if
|
|
407
|
+
/** set if previous CreateSubscriptionResponse returns error code ENTITLE_NEED_BILLING_ADDRESS */
|
|
250
408
|
billingAddress: Address | undefined;
|
|
251
|
-
/**
|
|
409
|
+
/** deprecated, ignore this field */
|
|
252
410
|
email: string;
|
|
253
411
|
/** set the return url after payment complete */
|
|
254
412
|
paymentReturnUrl: string;
|
|
413
|
+
couponCode: string;
|
|
255
414
|
}
|
|
256
415
|
export interface CreateSubscriptionResponse {
|
|
257
416
|
session: PaymentSession | undefined;
|
|
417
|
+
/** if error code is ENTITLE_NEED_BILLING_ADDRESS, collect user's billing address and try again */
|
|
418
|
+
error: Error | undefined;
|
|
419
|
+
}
|
|
420
|
+
export interface ChangeSubscriptionRequest {
|
|
421
|
+
toProductId: string;
|
|
422
|
+
}
|
|
423
|
+
export interface ChangeSubscriptionResponse {
|
|
258
424
|
error: Error | undefined;
|
|
259
425
|
}
|
|
260
426
|
export interface CancelSubscriptionRequest {
|
|
@@ -273,8 +439,10 @@ export interface Invoice {
|
|
|
273
439
|
/** format 12.45 */
|
|
274
440
|
payAmount: string;
|
|
275
441
|
currency: string;
|
|
442
|
+
userId: string;
|
|
276
443
|
productId: string;
|
|
277
444
|
productName: string;
|
|
445
|
+
subscriptionId: string;
|
|
278
446
|
description: string;
|
|
279
447
|
/** link of the receipt */
|
|
280
448
|
receiptUrl: string;
|
|
@@ -282,6 +450,8 @@ export interface Invoice {
|
|
|
282
450
|
invoicePdf: string;
|
|
283
451
|
/** invoice number */
|
|
284
452
|
invoiceNumber: string;
|
|
453
|
+
billingCycleNo: number;
|
|
454
|
+
couponCode: string;
|
|
285
455
|
}
|
|
286
456
|
export interface ListInvoicesRequest {
|
|
287
457
|
/** no of the first page is 1 */
|
|
@@ -300,19 +470,115 @@ export interface ListInvoicesResponse {
|
|
|
300
470
|
totalCnt: number;
|
|
301
471
|
error: Error | undefined;
|
|
302
472
|
}
|
|
473
|
+
export interface ListPaidInvoicesRequest {
|
|
474
|
+
batchId: string;
|
|
475
|
+
limit: number;
|
|
476
|
+
/** [begin, end) */
|
|
477
|
+
periodBegin: number;
|
|
478
|
+
periodEnd: number;
|
|
479
|
+
}
|
|
480
|
+
export interface ListPaidInvoicesResponse {
|
|
481
|
+
invoices: Invoice[];
|
|
482
|
+
hasMore: boolean;
|
|
483
|
+
nextBatchId: string;
|
|
484
|
+
error: Error | undefined;
|
|
485
|
+
}
|
|
303
486
|
export interface GetPaymentConfigRequest {
|
|
304
487
|
}
|
|
305
488
|
export interface GetPaymentConfigResponse {
|
|
306
|
-
|
|
489
|
+
channels: PaymentChannel[];
|
|
490
|
+
/** returned if has stripe channel */
|
|
491
|
+
stripePublicApiKey: string;
|
|
492
|
+
error: Error | undefined;
|
|
493
|
+
}
|
|
494
|
+
export interface PaymentRequest {
|
|
495
|
+
productId: string;
|
|
496
|
+
qty: number;
|
|
497
|
+
channel: PaymentChannel;
|
|
498
|
+
orderId: string;
|
|
499
|
+
/** for stripe channel only, optional, set if previous PaymentRequest returns error code ENTITLE_NEED_BILLING_ADDRESS */
|
|
500
|
+
billingAddress: Address | undefined;
|
|
501
|
+
/** for stripe channel only, required, redirect URL after pay success */
|
|
502
|
+
succUrl: string;
|
|
503
|
+
}
|
|
504
|
+
export interface PaymentResponse {
|
|
505
|
+
orderId: string;
|
|
506
|
+
/** for PaymentChannel AliPay and WechatPay */
|
|
507
|
+
payQRCode: string;
|
|
508
|
+
/** for PaymentChannel Stripe */
|
|
509
|
+
payLink: string;
|
|
510
|
+
channel: PaymentChannel;
|
|
511
|
+
error: Error | undefined;
|
|
512
|
+
}
|
|
513
|
+
export interface GetOrderStatusRequest {
|
|
514
|
+
orderId: string;
|
|
515
|
+
}
|
|
516
|
+
export interface GetOrderStatusResponse {
|
|
517
|
+
order: Order | undefined;
|
|
518
|
+
error: Error | undefined;
|
|
519
|
+
}
|
|
520
|
+
export interface Order {
|
|
521
|
+
id: string;
|
|
522
|
+
productId: string;
|
|
523
|
+
qty: number;
|
|
524
|
+
currency: string;
|
|
525
|
+
price: string;
|
|
526
|
+
amount: string;
|
|
527
|
+
status: OrderStatus;
|
|
528
|
+
expireTime: string;
|
|
529
|
+
}
|
|
530
|
+
export interface ListActiveEntitlementsRequest {
|
|
531
|
+
}
|
|
532
|
+
export interface ListActiveEntitlementsResponse {
|
|
533
|
+
entitlements: Entitlement[];
|
|
534
|
+
error: Error | undefined;
|
|
535
|
+
}
|
|
536
|
+
export interface GrantEntitlementRequest {
|
|
537
|
+
bizId: string;
|
|
538
|
+
bizGrantId: string;
|
|
539
|
+
toUserId: string;
|
|
540
|
+
/** if no fixed entitlement granted, set empty */
|
|
541
|
+
entitlementId: string;
|
|
542
|
+
interval: Interval;
|
|
543
|
+
intervalCnt: number;
|
|
544
|
+
/** if no quota granted, set empty */
|
|
545
|
+
quotaConfs: {
|
|
546
|
+
[key: string]: QuotaItemConf;
|
|
547
|
+
};
|
|
548
|
+
/** set if entitlementId setted */
|
|
549
|
+
identitySource: IdentitySource;
|
|
550
|
+
/** set if quotaConfs setted */
|
|
551
|
+
quotaSource: QuotaSource;
|
|
552
|
+
/** quotaInterval & quotaIntervalCnt specify the duration of granted quota */
|
|
553
|
+
quotaInterval: Interval;
|
|
554
|
+
/** quotaInterval & quotaIntervalCnt specify the duration of granted quota */
|
|
555
|
+
quotaIntervalCnt: number;
|
|
556
|
+
}
|
|
557
|
+
export interface GrantEntitlementRequest_QuotaConfsEntry {
|
|
558
|
+
key: string;
|
|
559
|
+
value: QuotaItemConf | undefined;
|
|
560
|
+
}
|
|
561
|
+
export interface GrantEntitlementResponse {
|
|
307
562
|
error: Error | undefined;
|
|
308
563
|
}
|
|
309
564
|
export interface EntitlementService {
|
|
310
565
|
MGetEntitlementItemsByUser(request: MGetEntitlementItemsByUserRequest, metadata?: Metadata): Observable<MGetEntitlementItemsByUserResponse>;
|
|
566
|
+
GetQuotaItem(request: GetQuotaItemRequest, metadata?: Metadata): Observable<GetQuotaItemResponse>;
|
|
567
|
+
ReportQuotaUsage(request: ReportQuotaUsageRequest, metadata?: Metadata): Observable<ReportQuotaUsageResponse>;
|
|
568
|
+
/** for back-end only, can deduct and add. */
|
|
311
569
|
TakeNItemRateByUser(request: TakeNItemRateByUserRequest, metadata?: Metadata): Observable<TakeNItemRateByUserResponse>;
|
|
570
|
+
/** for front-end only case, just deduct, can not return quota. */
|
|
571
|
+
DeductQuotaByUser(request: DeductQuotaByUserRequest, metadata?: Metadata): Observable<DeductQuotaByUserResponse>;
|
|
312
572
|
GetPaymentConfig(request: GetPaymentConfigRequest, metadata?: Metadata): Observable<GetPaymentConfigResponse>;
|
|
313
573
|
ListProducts(request: ListProductsRequest, metadata?: Metadata): Observable<ListProductsResponse>;
|
|
314
574
|
GetSubscriptionSummary(request: GetSubscriptionSummaryRequest, metadata?: Metadata): Observable<GetSubscriptionSummaryResponse>;
|
|
315
575
|
CreateSubscription(request: CreateSubscriptionRequest, metadata?: Metadata): Observable<CreateSubscriptionResponse>;
|
|
576
|
+
ChangeSubscription(request: ChangeSubscriptionRequest, metadata?: Metadata): Observable<ChangeSubscriptionResponse>;
|
|
316
577
|
CancelSubscription(request: CancelSubscriptionRequest, metadata?: Metadata): Observable<CancelSubscriptionResponse>;
|
|
317
578
|
ListInvoices(request: ListInvoicesRequest, metadata?: Metadata): Observable<ListInvoicesResponse>;
|
|
579
|
+
ListPaidInvoices(request: ListPaidInvoicesRequest, metadata?: Metadata): Observable<ListPaidInvoicesResponse>;
|
|
580
|
+
Pay(request: PaymentRequest, metadata?: Metadata): Observable<PaymentResponse>;
|
|
581
|
+
GetOrderStatus(request: GetOrderStatusRequest, metadata?: Metadata): Observable<GetOrderStatusResponse>;
|
|
582
|
+
ListActiveEntitlements(request: ListActiveEntitlementsRequest, metadata?: Metadata): Observable<ListActiveEntitlementsResponse>;
|
|
583
|
+
GrantEntitlement(request: GrantEntitlementRequest, metadata?: Metadata): Observable<GrantEntitlementResponse>;
|
|
318
584
|
}
|
|
@@ -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
|
+
}
|
|
@@ -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 FileSource {
|
|
6
6
|
Undefined = 0,
|
|
@@ -14,6 +14,8 @@ export declare enum FileSource {
|
|
|
14
14
|
UnitSnapshot = 4,
|
|
15
15
|
/** UserProfileImg - assign UserID */
|
|
16
16
|
UserProfileImg = 5,
|
|
17
|
+
/** ClipsheetFragments - assign UserID, fragmented file will be deleted after 30 days */
|
|
18
|
+
ClipsheetFragments = 6,
|
|
17
19
|
UNRECOGNIZED = -1
|
|
18
20
|
}
|
|
19
21
|
export declare enum DownloadUrlMode {
|
|
@@ -64,10 +66,23 @@ export interface PutTemplateResouceResponse {
|
|
|
64
66
|
error: Error | undefined;
|
|
65
67
|
signUrl: string;
|
|
66
68
|
}
|
|
69
|
+
export interface PutFileByIdRequest {
|
|
70
|
+
data?: Uint8Array | undefined;
|
|
71
|
+
meta?: PutFileByIdMeta | undefined;
|
|
72
|
+
}
|
|
73
|
+
export interface PutFileByIdMeta {
|
|
74
|
+
fileId: string;
|
|
75
|
+
fileSize: number;
|
|
76
|
+
}
|
|
77
|
+
export interface PutFileByIdResponse {
|
|
78
|
+
error: Error | undefined;
|
|
79
|
+
fileId: string;
|
|
80
|
+
}
|
|
67
81
|
export interface FileService {
|
|
68
82
|
SignUrl(request: SignUrlRequest, metadata?: Metadata): Observable<SignUrlResponse>;
|
|
69
83
|
Upload(request: Observable<FileUploadRequest>, metadata?: Metadata): Observable<UploadResponse>;
|
|
70
84
|
SetUniverGoJson(request: SetUniverGoJsonRequest, metadata?: Metadata): Observable<SetUniverGoJsonResponse>;
|
|
71
85
|
GetUniverGoJson(request: GetUniverGoJsonRequest, metadata?: Metadata): Observable<GetUniverGoJsonResponse>;
|
|
72
86
|
PutTemplateResouce(request: PutTemplateResouceRequest, metadata?: Metadata): Observable<PutTemplateResouceResponse>;
|
|
87
|
+
PutFileById(request: Observable<PutFileByIdRequest>, metadata?: Metadata): Observable<PutFileByIdResponse>;
|
|
73
88
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 WriteFrontendLogRequest {
|
|
6
|
+
userId?: string | undefined;
|
|
7
|
+
logLabel: string;
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export interface WriteFrontendLogResponse {
|
|
11
|
+
error: Error | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface ListFrontendLogsRequest {
|
|
14
|
+
logLabel?: string | undefined;
|
|
15
|
+
startTime: number;
|
|
16
|
+
endTime: number;
|
|
17
|
+
next: string;
|
|
18
|
+
pageSize: number;
|
|
19
|
+
ascending: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ListFrontendLogsResponse {
|
|
22
|
+
error: Error | undefined;
|
|
23
|
+
logs: ListFrontendLogsResponse_FrontendLog[];
|
|
24
|
+
hasMore: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ListFrontendLogsResponse_FrontendLog {
|
|
27
|
+
logId: string;
|
|
28
|
+
userId: string;
|
|
29
|
+
logLabel: string;
|
|
30
|
+
timestamp: number;
|
|
31
|
+
content: string;
|
|
32
|
+
}
|
|
33
|
+
export interface FrontendLogsService {
|
|
34
|
+
WriteLog(request: WriteFrontendLogRequest, metadata?: Metadata): Observable<WriteFrontendLogResponse>;
|
|
35
|
+
List(request: ListFrontendLogsRequest, metadata?: Metadata): Observable<ListFrontendLogsResponse>;
|
|
36
|
+
}
|
|
@@ -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 ConfigScopeType {
|
|
6
6
|
ConfigScopeType_None = 0,
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { Metadata } from '@grpc/grpc-js';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Error } from '
|
|
4
|
-
import { UniverType } from '
|
|
5
|
-
import { User } from '
|
|
3
|
+
import { Error } from '../../univer/constants/errors';
|
|
4
|
+
import { UniverType } from '../../univer/constants/univer';
|
|
5
|
+
import { User } from '../../univer/permission';
|
|
6
6
|
export declare const protobufPackage = "universer.v1";
|
|
7
|
+
export declare enum HistoryOrigin {
|
|
8
|
+
HISTORY_ORIGIN_UNSPECIFIED = 0,
|
|
9
|
+
HISTORY_ORIGIN_USER = 1,
|
|
10
|
+
HISTORY_ORIGIN_CHARACTER = 2,
|
|
11
|
+
UNRECOGNIZED = -1
|
|
12
|
+
}
|
|
7
13
|
export interface CreateHistoryRequest {
|
|
8
14
|
unitId: string;
|
|
9
15
|
subUnitId: string;
|
|
10
16
|
type: UniverType;
|
|
11
17
|
revision: number;
|
|
18
|
+
additionalFields?: string | undefined;
|
|
12
19
|
}
|
|
13
20
|
export interface CreateHistoryResponse {
|
|
14
21
|
error: Error | undefined;
|
|
@@ -21,11 +28,18 @@ export interface History {
|
|
|
21
28
|
recoverTime: string;
|
|
22
29
|
startRevision: number;
|
|
23
30
|
endRevision: number;
|
|
31
|
+
/** additionalFields is a reserved field for future use */
|
|
32
|
+
additionalFields?: string | undefined;
|
|
33
|
+
origin?: HistoryOrigin | undefined;
|
|
24
34
|
}
|
|
25
35
|
export interface HistoryListRequest {
|
|
26
36
|
length: number;
|
|
27
37
|
lastLabel: string;
|
|
28
38
|
unitId: string;
|
|
39
|
+
origin?: HistoryOrigin | undefined;
|
|
40
|
+
/** @deprecated */
|
|
41
|
+
userId?: string | undefined;
|
|
42
|
+
userIds: string[];
|
|
29
43
|
}
|
|
30
44
|
export interface HistoryEntities {
|
|
31
45
|
datas: {
|
|
@@ -50,7 +64,21 @@ export interface HistoryListResponse {
|
|
|
50
64
|
entities: HistoryEntities | undefined;
|
|
51
65
|
historyIds: string[];
|
|
52
66
|
}
|
|
67
|
+
export interface ListHistoryCreatorsRequest {
|
|
68
|
+
unitId: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ListHistoryCreatorsResponse {
|
|
71
|
+
error: Error | undefined;
|
|
72
|
+
creators: ListHistoryCreatorsResponse_Creator[];
|
|
73
|
+
}
|
|
74
|
+
export interface ListHistoryCreatorsResponse_Creator {
|
|
75
|
+
userId: string;
|
|
76
|
+
name: string;
|
|
77
|
+
avatar: string;
|
|
78
|
+
origins: HistoryOrigin[];
|
|
79
|
+
}
|
|
53
80
|
export interface HistoryService {
|
|
54
81
|
GetHistoryList(request: HistoryListRequest, metadata?: Metadata): Observable<HistoryListResponse>;
|
|
55
82
|
CreateHistory(request: CreateHistoryRequest, metadata?: Metadata): Observable<CreateHistoryResponse>;
|
|
83
|
+
ListHistoryCreators(request: ListHistoryCreatorsRequest, metadata?: Metadata): Observable<ListHistoryCreatorsResponse>;
|
|
56
84
|
}
|