@univerjs/protocol 0.1.46-alpha.0 → 0.1.46-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +23 -21
  3. package/lib/types/index.d.ts +3 -1
  4. package/lib/types/ts/univer/initial_sheet.d.ts +8 -0
  5. package/lib/types/ts/v1/access_key.d.ts +32 -0
  6. package/lib/types/ts/v1/analyse_task.d.ts +173 -0
  7. package/lib/types/ts/v1/comment.d.ts +97 -0
  8. package/lib/types/ts/v1/conf.d.ts +424 -0
  9. package/lib/types/ts/v1/connector.d.ts +74 -0
  10. package/lib/types/ts/v1/conversation.d.ts +279 -0
  11. package/lib/types/ts/v1/email.d.ts +18 -0
  12. package/lib/types/ts/v1/entitlement.d.ts +318 -0
  13. package/lib/types/ts/v1/exchange.d.ts +90 -0
  14. package/lib/types/ts/v1/feedback.d.ts +26 -0
  15. package/lib/types/ts/v1/go_config_center.d.ts +91 -0
  16. package/lib/types/ts/v1/invite_code.d.ts +47 -0
  17. package/lib/types/ts/v1/license.d.ts +35 -0
  18. package/lib/types/ts/v1/license_manage.d.ts +103 -0
  19. package/lib/types/ts/v1/oauth2.d.ts +24 -0
  20. package/lib/types/ts/v1/oidc.d.ts +80 -0
  21. package/lib/types/ts/v1/source_connector/api.d.ts +110 -0
  22. package/lib/types/ts/v1/source_connector/conf.d.ts +29 -0
  23. package/lib/types/ts/v1/source_connector/displayer.d.ts +16 -0
  24. package/lib/types/ts/v1/source_connector/source.d.ts +46 -0
  25. package/lib/types/ts/v1/source_connector/stream_view.d.ts +31 -0
  26. package/lib/types/ts/v1/ssc.d.ts +238 -0
  27. package/lib/types/ts/v1/ssr.d.ts +25 -0
  28. package/lib/types/ts/v1/survey.d.ts +25 -0
  29. package/lib/types/ts/v1/template.d.ts +48 -0
  30. package/lib/types/ts/v1/trigger.d.ts +102 -0
  31. package/lib/types/ts/v1/uniscript.d.ts +104 -0
  32. package/lib/types/ts/v1/uniscript_logs.d.ts +157 -0
  33. package/lib/types/ts/v1/univer_go_template.d.ts +65 -0
  34. package/lib/types/ts/v1/user_settings.d.ts +22 -0
  35. package/lib/types/ts/v1/usip.d.ts +55 -0
  36. package/lib/types/ts/v1/workspace.d.ts +272 -0
  37. package/lib/umd/index.js +1 -1
  38. package/package.json +1 -1
@@ -0,0 +1,424 @@
1
+ import { Duration } from '../google/protobuf/duration';
2
+ export declare const protobufPackage = "universer.v1";
3
+ export declare enum ReleaseType {
4
+ UNKNOWN_TYPE = 0,
5
+ DEV = 1,
6
+ NON_COMMERCIAL = 2,
7
+ COMMERCIAL = 3,
8
+ UniverGO = 4,
9
+ UNRECOGNIZED = -1
10
+ }
11
+ export declare enum FeatureType {
12
+ UNKNOWN_FEATURE = 0,
13
+ UNIT_FEATURE = 1,
14
+ SHEET_FEATURE = 2,
15
+ DOC_FEATURE = 3,
16
+ SLIDE_FEATURE = 4,
17
+ WORKSPACE_FEATURE = 5,
18
+ UNRECOGNIZED = -1
19
+ }
20
+ export interface Bootstrap {
21
+ server: Server | undefined;
22
+ data: Data | undefined;
23
+ service: Service | undefined;
24
+ admin: Admin[];
25
+ extra: ExtraConf | undefined;
26
+ auth: Auth | undefined;
27
+ apiLimit: ApiLimit | undefined;
28
+ sentryConfig: SentryConfig | undefined;
29
+ usip: USIP | undefined;
30
+ dataProtectionConf: DataProtectionConf | undefined;
31
+ sesConfig: SESConf | undefined;
32
+ workspace: WorkspaceConf | undefined;
33
+ postHogConf: PostHogConf | undefined;
34
+ entitlementConf: EntitlementConf | undefined;
35
+ statsConf: StatsConf | undefined;
36
+ jaegerConf: JaegerConf | undefined;
37
+ scriptLogsConf: ScriptLogsConf | undefined;
38
+ smsConf: SMSConf | undefined;
39
+ invitationCode: InvitationCode | undefined;
40
+ models: ModelConf[];
41
+ wechat: Wechat | undefined;
42
+ }
43
+ export interface Server {
44
+ http: Server_HTTP | undefined;
45
+ grpc: Server_GRPC | undefined;
46
+ }
47
+ export interface Server_HTTP {
48
+ network: string;
49
+ addr: string;
50
+ timeout: Duration | undefined;
51
+ corsAllowOrigins: string[];
52
+ }
53
+ export interface Server_GRPC {
54
+ network: string;
55
+ addr: string;
56
+ timeout: Duration | undefined;
57
+ }
58
+ export interface S3 {
59
+ accessKeyID: string;
60
+ accessKeySecret: string;
61
+ region: string;
62
+ endpoint: string;
63
+ endpointPublic: string;
64
+ usePathStyle: boolean;
65
+ presignExpires: Duration | undefined;
66
+ defaultBucket: string;
67
+ /** bool useDownloadProxy = 9; */
68
+ publicBucket: string;
69
+ }
70
+ export interface Data {
71
+ database: Data_Database | undefined;
72
+ redis: Data_Redis | undefined;
73
+ rabbitmq: Data_Rabbitmq | undefined;
74
+ clickhouse: Data_Clickhouse | undefined;
75
+ temporal: Data_Temporal | undefined;
76
+ s3: S3 | undefined;
77
+ }
78
+ export interface Data_Database {
79
+ driver: string;
80
+ database: string;
81
+ dsn: string;
82
+ maxOpenConns: number;
83
+ maxIdleConns: number;
84
+ connMaxLifetime: number;
85
+ replicaDSN: string;
86
+ }
87
+ export interface Data_Redis {
88
+ network: string;
89
+ /** if cluster use comma to split */
90
+ addr: string;
91
+ readTimeout: Duration | undefined;
92
+ writeTimeout: Duration | undefined;
93
+ sentinel: Data_Redis_Sentinel | undefined;
94
+ db: number;
95
+ username: string;
96
+ password: string;
97
+ poolSize: number;
98
+ }
99
+ export interface Data_Redis_Sentinel {
100
+ enabled: boolean;
101
+ masterName: string;
102
+ sentinelAddr: string;
103
+ username: string;
104
+ password: string;
105
+ }
106
+ export interface Data_Rabbitmq {
107
+ addr: string;
108
+ cluster: Data_Rabbitmq_Cluster | undefined;
109
+ eventSync: boolean;
110
+ enabled: boolean;
111
+ }
112
+ export interface Data_Rabbitmq_Cluster {
113
+ enabled: boolean;
114
+ username: string;
115
+ password: string;
116
+ /** use comma to split */
117
+ addr: string;
118
+ vhost: string;
119
+ schema: string;
120
+ }
121
+ export interface Data_Clickhouse {
122
+ dsn: string;
123
+ }
124
+ export interface Data_Temporal {
125
+ addr: string;
126
+ namespace: string;
127
+ workerTaskQueue: string;
128
+ }
129
+ export interface Service {
130
+ apply: Service_RpcService | undefined;
131
+ fileExchange: Service_RpcService | undefined;
132
+ nodeRuntime: Service_RpcService | undefined;
133
+ pythonRuntime: Service_RpcService | undefined;
134
+ yuumi: Service_HttpService | undefined;
135
+ }
136
+ export interface Service_RpcService {
137
+ addr: string;
138
+ network: string;
139
+ timeout: Duration | undefined;
140
+ }
141
+ export interface Service_HttpService {
142
+ addr: string;
143
+ timeout: Duration | undefined;
144
+ }
145
+ export interface Admin {
146
+ user: string;
147
+ password: string;
148
+ }
149
+ export interface ExtraConf {
150
+ celldataMaxSize: number;
151
+ }
152
+ export interface LicenseArgs {
153
+ maxUnits: number;
154
+ maxMemberInRoom: number;
155
+ concurrentUnits: number;
156
+ maxImportSize: number;
157
+ maxNumberOfCells: number;
158
+ print: Print | undefined;
159
+ }
160
+ export interface LicenseV2 {
161
+ id: string;
162
+ version: string;
163
+ /** LicenseBiz json string */
164
+ jsonData: string;
165
+ signature: string;
166
+ /** only for upgrade shell */
167
+ upgradeDeadline: number;
168
+ }
169
+ export interface LicenseBiz {
170
+ id: string;
171
+ version: string;
172
+ domain: string[];
173
+ /** dev、no-commercial、commercial */
174
+ releaseType: ReleaseType;
175
+ feature: Feature | undefined;
176
+ upgradeDeadline: number;
177
+ issuedAt: number;
178
+ /** optional */
179
+ email: string;
180
+ /** optional */
181
+ difficulty: number;
182
+ /** optional */
183
+ nonce: number;
184
+ }
185
+ export interface Feature {
186
+ unitFeature: UnitFeature | undefined;
187
+ sheetFeature: SheetFeature | undefined;
188
+ docFeature: DocFeature | undefined;
189
+ workspaceFeature: WorkspaceFeature | undefined;
190
+ }
191
+ export interface SheetFeature {
192
+ expirationTime: number;
193
+ reviews: boolean;
194
+ pivotTableNum: number;
195
+ maxImportSize: number;
196
+ maxPrintNum: number;
197
+ }
198
+ export interface DocFeature {
199
+ expirationTime: number;
200
+ reviews: boolean;
201
+ maxImportSize: number;
202
+ maxPrintNum: number;
203
+ }
204
+ export interface UnitFeature {
205
+ expirationTime: number;
206
+ maxUnits: number;
207
+ maxMemberInRoom: number;
208
+ concurrentUnits: number;
209
+ }
210
+ export interface WorkspaceFeature {
211
+ expirationTime: number;
212
+ maxHistoryNum: number;
213
+ }
214
+ export interface Print {
215
+ pageLimit: number;
216
+ }
217
+ export interface Config {
218
+ confDir: string;
219
+ confName: string;
220
+ }
221
+ export interface Auth {
222
+ enabled: boolean;
223
+ oidc: Auth_OIDC | undefined;
224
+ oauth2: Auth_Oauth2 | undefined;
225
+ permission: Auth_Permission | undefined;
226
+ univerEnabled: boolean;
227
+ anonymous: Auth_Anonymous | undefined;
228
+ cookieDomain: string;
229
+ casdoorSDK: Auth_CasdoorSDK | undefined;
230
+ admin: Auth_Admin | undefined;
231
+ loginErrorURL: string;
232
+ mobileBindURL: string;
233
+ homepageURL: string;
234
+ }
235
+ export interface Auth_OIDC {
236
+ issuer: string;
237
+ clientID: string;
238
+ clientSecret: string;
239
+ redirectURL: string;
240
+ /** @deprecated */
241
+ cookieDomain: string;
242
+ enabled: boolean;
243
+ }
244
+ export interface Auth_CasdoorSDK {
245
+ organizationName: string;
246
+ applicationName: string;
247
+ /** casdoor domain eg. https://login.univer.work */
248
+ domain: string;
249
+ }
250
+ export interface Auth_Oauth2 {
251
+ clientID: string;
252
+ clientSecret: string;
253
+ redirectURL: string;
254
+ /** @deprecated */
255
+ cookieDomain: string;
256
+ enabled: boolean;
257
+ authURL: string;
258
+ tokenURL: string;
259
+ apiURL: string;
260
+ scopes: string;
261
+ openidPath: string;
262
+ emailPath: string;
263
+ namePath: string;
264
+ avatarPath: string;
265
+ }
266
+ export interface Auth_Anonymous {
267
+ enabled: boolean;
268
+ }
269
+ export interface Auth_Permission {
270
+ enabled: boolean;
271
+ defaultShareScope: string;
272
+ defaultShareRole: string;
273
+ enableObjInherit: boolean;
274
+ customerStrategies: string;
275
+ }
276
+ export interface Auth_Admin {
277
+ userIDs: string[];
278
+ liteServer: boolean;
279
+ }
280
+ export interface ApiLimit {
281
+ method: ApiLimit_TokenLimit | undefined;
282
+ ip: ApiLimit_TokenLimit | undefined;
283
+ perMethod: {
284
+ [key: string]: ApiLimit_TokenLimit;
285
+ };
286
+ /** for every user limit */
287
+ user: ApiLimit_TokenLimit | undefined;
288
+ perMethodUser: {
289
+ [key: string]: ApiLimit_TokenLimit;
290
+ };
291
+ /** for specific method limit */
292
+ perMethodIp: {
293
+ [key: string]: ApiLimit_TokenLimit;
294
+ };
295
+ }
296
+ export interface ApiLimit_TokenLimit {
297
+ tokens: number;
298
+ interval: Duration | undefined;
299
+ }
300
+ export interface ApiLimit_PerMethodEntry {
301
+ key: string;
302
+ value: ApiLimit_TokenLimit | undefined;
303
+ }
304
+ export interface ApiLimit_PerMethodUserEntry {
305
+ key: string;
306
+ value: ApiLimit_TokenLimit | undefined;
307
+ }
308
+ export interface ApiLimit_PerMethodIpEntry {
309
+ key: string;
310
+ value: ApiLimit_TokenLimit | undefined;
311
+ }
312
+ export interface SentryConfig {
313
+ dsn: string;
314
+ debug: boolean;
315
+ enableTracing: boolean;
316
+ TracesSampleRate: number;
317
+ }
318
+ /** Univer Server Integration Protocol */
319
+ export interface USIP {
320
+ enabled: boolean;
321
+ uri: USIP_USIPUri | undefined;
322
+ }
323
+ export interface USIP_USIPUri {
324
+ userinfo: string;
325
+ collaborators: string;
326
+ role: string;
327
+ credential: string;
328
+ }
329
+ export interface DataProtectionConf {
330
+ enableProtection: boolean;
331
+ dataKeyRotate: Duration | undefined;
332
+ dataKeyCacheExpiration: Duration | undefined;
333
+ /** if enableProtection=true, choose one for current */
334
+ awskms: DataProtectionConf_AwsKMSConf | undefined;
335
+ localKMS: DataProtectionConf_LocalKMSConf | undefined;
336
+ }
337
+ export interface DataProtectionConf_AwsKMSConf {
338
+ accessKeyID: string;
339
+ accessKeySecret: string;
340
+ region: string;
341
+ kmsKeyID: string;
342
+ }
343
+ export interface DataProtectionConf_LocalKMSConf {
344
+ cmkAlias: string;
345
+ cmkBase64: string;
346
+ }
347
+ export interface SESConf {
348
+ accessKey: string;
349
+ accessSecret: string;
350
+ region: string;
351
+ /** @deprecated */
352
+ templateName: string;
353
+ redirectURL: string;
354
+ template: SESConf_SESTemplate | undefined;
355
+ }
356
+ export interface SESConf_SESTemplate {
357
+ login: string;
358
+ clipsheetWorkflow: string;
359
+ emailAuthCode: string;
360
+ }
361
+ export interface WorkspaceConf {
362
+ enabled: boolean;
363
+ }
364
+ export interface PostHogConf {
365
+ enabled: boolean;
366
+ endpoint: string;
367
+ projectKey: string;
368
+ }
369
+ export interface EntitlementConf {
370
+ enable: boolean;
371
+ defaultEntiConf: EntitlementConf_DefaultEntiConf | undefined;
372
+ cronConf: EntitlementConf_CronConf | undefined;
373
+ stripeConf: EntitlementConf_StripeConf | undefined;
374
+ }
375
+ export interface EntitlementConf_DefaultEntiConf {
376
+ anonymousDefaultEntiId: number;
377
+ registeredDefaultEntiId: number;
378
+ }
379
+ export interface EntitlementConf_CronConf {
380
+ reportRetryCron: string;
381
+ minRetryInterval: number;
382
+ retryRate: number;
383
+ pendingSubCleanCron: string;
384
+ detectInterval: number;
385
+ cleanRate: number;
386
+ }
387
+ export interface EntitlementConf_StripeConf {
388
+ apiPK: string;
389
+ apiSK: string;
390
+ whSK: string;
391
+ timeout: number;
392
+ }
393
+ export interface StatsConf {
394
+ /** seconds */
395
+ timeInterval: number;
396
+ maxRecords: number;
397
+ addr: string;
398
+ }
399
+ export interface JaegerConf {
400
+ enabled: boolean;
401
+ grpcEndpoint: string;
402
+ }
403
+ export interface ScriptLogsConf {
404
+ enable: boolean;
405
+ retentionDuration: Duration | undefined;
406
+ }
407
+ export interface SMSConf {
408
+ accessKey: string;
409
+ accessSecret: string;
410
+ endpoint: string;
411
+ signName: string;
412
+ templateCodeForLogin: string;
413
+ }
414
+ export interface InvitationCode {
415
+ enabled: boolean;
416
+ }
417
+ export interface ModelConf {
418
+ id: string;
419
+ name: string;
420
+ }
421
+ export interface Wechat {
422
+ appID: string;
423
+ appSecret: string;
424
+ }
@@ -0,0 +1,74 @@
1
+ import { Metadata } from '@grpc/grpc-js';
2
+ import { Observable } from 'rxjs';
3
+ import { Error } from '../univer/constants/errors';
4
+ import { RowData } from '../univer/workbook';
5
+ import { DisplayerConfig } from './source_connector/displayer';
6
+ import { SelectColumn, WhereGroup as WhereGroup1 } from './source_connector/stream_view';
7
+ export declare const protobufPackage = "universer.v1";
8
+ export interface Connector {
9
+ connectorID: string;
10
+ name: string;
11
+ }
12
+ export interface Displayer {
13
+ diplayerID: string;
14
+ name: string;
15
+ }
16
+ export interface WhereGroup {
17
+ group: string;
18
+ conditions: WhereCondition[];
19
+ }
20
+ export interface WhereCondition {
21
+ column: string;
22
+ value: any[];
23
+ }
24
+ export interface ListDisplayersRequest {
25
+ }
26
+ export interface ListDisplayersResponse {
27
+ error: Error | undefined;
28
+ displayers: Displayer[];
29
+ }
30
+ export interface GetDisplayerRequest {
31
+ displayerID: string;
32
+ }
33
+ export interface GetDisplayerResponse {
34
+ error: Error | undefined;
35
+ display: DisplayerConfig | undefined;
36
+ }
37
+ export interface GetStreamViewRequest {
38
+ viewID: string;
39
+ }
40
+ export interface GetStreamViewResponse {
41
+ error: Error | undefined;
42
+ select: SelectColumn[];
43
+ where: WhereGroup1[];
44
+ }
45
+ export interface GetStreamViewRownumResponse {
46
+ error: Error | undefined;
47
+ rownum: number;
48
+ }
49
+ export interface StreamViewQueryRequest {
50
+ viewID: string;
51
+ schedule: string;
52
+ select: string[];
53
+ where: WhereGroup[];
54
+ }
55
+ export interface QueryResponse {
56
+ error: Error | undefined;
57
+ nextCursor: string;
58
+ dataformID: string;
59
+ celldatas: RowData[];
60
+ columns: string[];
61
+ }
62
+ export interface DataformQueryRequest {
63
+ dataformID: string;
64
+ cursor: string;
65
+ }
66
+ export interface ConnectorService {
67
+ ListDisplayers(request: ListDisplayersRequest, metadata?: Metadata): Observable<ListDisplayersResponse>;
68
+ GetDisplayer(request: GetDisplayerRequest, metadata?: Metadata): Observable<GetDisplayerResponse>;
69
+ GetStreamView(request: GetStreamViewRequest, metadata?: Metadata): Observable<GetStreamViewResponse>;
70
+ GetStreamViewRownum(request: StreamViewQueryRequest, metadata?: Metadata): Observable<GetStreamViewRownumResponse>;
71
+ StreamViewPreview(request: StreamViewQueryRequest, metadata?: Metadata): Observable<QueryResponse>;
72
+ StreamViewQuery(request: StreamViewQueryRequest, metadata?: Metadata): Observable<QueryResponse>;
73
+ DataformQuery(request: DataformQueryRequest, metadata?: Metadata): Observable<QueryResponse>;
74
+ }