@univerjs/protocol 0.1.17 → 0.1.19

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.
@@ -11,3 +11,5 @@ export { CmdRspCode, CombCmd, type CombInfoResponse as ICombInfoResponse, type C
11
11
  export { type FetchMissingChangesetsRequest as IFetchMissingChangesetsRequest, type FetchMissingChangesetsResponse as IFetchMissingChangesetsResponse, type GetResourcesRequest as IGetResourcesRequest, type GetResourcesResponse as IGetResourcesResponse, type GetSheetBlockRequest as IGetSheetBlockRequest, type GetSheetBlockResponse as IGetSheetBlockResponse, type GetSnapshotRequest as IGetSnapshotRequest, type GetSnapshotResponse as IGetSnapshotResponse, type GetUnitOnRevRequest as IGetUnitOnRevRequest, type GetUnitOnRevResponse as IGetUnitOnRevResponse, type SaveChangesetRequest as ISaveChangesetRequest, type SaveChangesetResponse as ISaveChangesetResponse, type SaveSheetBlockRequest as ISaveSheetBlockRequest, type SaveSheetBlockResponse as ISaveSheetBlockResponse, type SaveSnapshotRequest as ISaveSnapshotRequest, type SaveSnapshotResponse as ISaveSnapshotResponse, type SnapshotService as ISnapshotService, } from './ts/v1/snapshot';
12
12
  export { type CollaMsg as ICollaMsg, type CollaMsgJoin as ICollaMsgJoin, type CollaMsgLeave as ICollaMsgLeave, type UpdateCursor as IUpdateCursor, type LiveShareRequestHost as ILiveShareRequestHost, type LiveShareNewHost as ILiveShareNewHost, type LiveShareOperation as ILiveShareOperation, type LiveShareOperation_Operation as ILiveShareOperation_Operation, type LiveShareOperation_OperationsEntry as ILiveShareOperation_OperationsEntry, type LiveShareTerminate as ILiveShareTerminate, type CollaMsgErrorEvent as ICollaMsgErrorEvent, } from './ts/univer/colla_msg';
13
13
  export { type FileService as IFileService, type FileUploadMeta as IuploadFileRequestMeta, type FileUploadRequest as IFileUploadRequest, type UploadResponse as IUploadResponse, } from './ts/v1/file';
14
+ export type { GetUserResponse as IGetUserResponse, User as IUser, GetUserRequest as IGetUserRequest } from './ts/v1/user';
15
+ export type { Collaborator as ICollaborator, CreateRequest as ICreateRequest, CreateRequest_SelectRangeObject as ICreateRequest_SelectRangeObject, CreateRequest_WorksheetObject as ICreateRequest_WorksheetObject, CreateResponse as ICreateResponse, CreateCollaboratorRequest as ICreateCollaboratorRequest, CreateCollaboratorResponse as ICreateCollaboratorResponse, UpdateCollaboratorRequest as IUpdateCollaboratorRequest, UpdateCollaboratorResponse as IUpdateCollaboratorResponse, DeleteCollaboratorRequest as IDeleteCollaboratorRequest, DeleteCollaboratorResponse as IDeleteCollaboratorResponse, ListCollaboratorRequest as IListCollaboratorRequest, ListCollaboratorResponse as IListCollaboratorResponse, AllowedRequest as IAllowedRequest, ActionInfo as IActionInfo, ActionInfo_InfoEntry as IActionInfo_InfoEntry, AllowedResponse as IAllowedResponse, AuthzService as IAuthzService, } from './ts/v1/authz';
@@ -9,9 +9,9 @@ export interface FileDescriptorSet {
9
9
  /** Describes a complete .proto file. */
10
10
  export interface FileDescriptorProto {
11
11
  /** file name, relative to root of source tree */
12
- name: string;
12
+ name?: string | undefined;
13
13
  /** e.g. "foo", "foo.bar", etc. */
14
- package: string;
14
+ package?: string | undefined;
15
15
  /** Names of files imported by this file. */
16
16
  dependency: string[];
17
17
  /** Indexes of the public imported files in the dependency list above. */
@@ -26,30 +26,30 @@ export interface FileDescriptorProto {
26
26
  enumType: EnumDescriptorProto[];
27
27
  service: ServiceDescriptorProto[];
28
28
  extension: FieldDescriptorProto[];
29
- options: FileOptions | undefined;
29
+ options?: FileOptions | undefined;
30
30
  /**
31
31
  * This field contains optional information about the original source code.
32
32
  * You may safely remove this entire field without harming runtime
33
33
  * functionality of the descriptors -- the information is needed only by
34
34
  * development tools.
35
35
  */
36
- sourceCodeInfo: SourceCodeInfo | undefined;
36
+ sourceCodeInfo?: SourceCodeInfo | undefined;
37
37
  /**
38
38
  * The syntax of the proto file.
39
39
  * The supported values are "proto2" and "proto3".
40
40
  */
41
- syntax: string;
41
+ syntax?: string | undefined;
42
42
  }
43
43
  /** Describes a message type. */
44
44
  export interface DescriptorProto {
45
- name: string;
45
+ name?: string | undefined;
46
46
  field: FieldDescriptorProto[];
47
47
  extension: FieldDescriptorProto[];
48
48
  nestedType: DescriptorProto[];
49
49
  enumType: EnumDescriptorProto[];
50
50
  extensionRange: DescriptorProto_ExtensionRange[];
51
51
  oneofDecl: OneofDescriptorProto[];
52
- options: MessageOptions | undefined;
52
+ options?: MessageOptions | undefined;
53
53
  reservedRange: DescriptorProto_ReservedRange[];
54
54
  /**
55
55
  * Reserved field names, which may not be used by fields in the same message.
@@ -59,10 +59,10 @@ export interface DescriptorProto {
59
59
  }
60
60
  export interface DescriptorProto_ExtensionRange {
61
61
  /** Inclusive. */
62
- start: number;
62
+ start?: number | undefined;
63
63
  /** Exclusive. */
64
- end: number;
65
- options: ExtensionRangeOptions | undefined;
64
+ end?: number | undefined;
65
+ options?: ExtensionRangeOptions | undefined;
66
66
  }
67
67
  /**
68
68
  * Range of reserved tag numbers. Reserved tag numbers may not be used by
@@ -71,9 +71,9 @@ export interface DescriptorProto_ExtensionRange {
71
71
  */
72
72
  export interface DescriptorProto_ReservedRange {
73
73
  /** Inclusive. */
74
- start: number;
74
+ start?: number | undefined;
75
75
  /** Exclusive. */
76
- end: number;
76
+ end?: number | undefined;
77
77
  }
78
78
  export interface ExtensionRangeOptions {
79
79
  /** The parser stores options it doesn't recognize here. See above. */
@@ -81,14 +81,14 @@ export interface ExtensionRangeOptions {
81
81
  }
82
82
  /** Describes a field within a message. */
83
83
  export interface FieldDescriptorProto {
84
- name: string;
85
- number: number;
86
- label: FieldDescriptorProto_Label;
84
+ name?: string | undefined;
85
+ number?: number | undefined;
86
+ label?: FieldDescriptorProto_Label | undefined;
87
87
  /**
88
88
  * If type_name is set, this need not be set. If both this and type_name
89
89
  * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
90
90
  */
91
- type: FieldDescriptorProto_Type;
91
+ type?: FieldDescriptorProto_Type | undefined;
92
92
  /**
93
93
  * For message and enum types, this is the name of the type. If the name
94
94
  * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
@@ -96,32 +96,32 @@ export interface FieldDescriptorProto {
96
96
  * message are searched, then within the parent, on up to the root
97
97
  * namespace).
98
98
  */
99
- typeName: string;
99
+ typeName?: string | undefined;
100
100
  /**
101
101
  * For extensions, this is the name of the type being extended. It is
102
102
  * resolved in the same manner as type_name.
103
103
  */
104
- extendee: string;
104
+ extendee?: string | undefined;
105
105
  /**
106
106
  * For numeric types, contains the original text representation of the value.
107
107
  * For booleans, "true" or "false".
108
108
  * For strings, contains the default text contents (not escaped in any way).
109
109
  * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
110
110
  */
111
- defaultValue: string;
111
+ defaultValue?: string | undefined;
112
112
  /**
113
113
  * If set, gives the index of a oneof in the containing type's oneof_decl
114
114
  * list. This field is a member of that oneof.
115
115
  */
116
- oneofIndex: number;
116
+ oneofIndex?: number | undefined;
117
117
  /**
118
118
  * JSON name of this field. The value is set by protocol compiler. If the
119
119
  * user has set a "json_name" option on this field, that option's value
120
120
  * will be used. Otherwise, it's deduced from the field's name by converting
121
121
  * it to camelCase.
122
122
  */
123
- jsonName: string;
124
- options: FieldOptions | undefined;
123
+ jsonName?: string | undefined;
124
+ options?: FieldOptions | undefined;
125
125
  /**
126
126
  * If true, this is a proto3 "optional". When a proto3 field is optional, it
127
127
  * tracks presence regardless of field type.
@@ -145,7 +145,7 @@ export interface FieldDescriptorProto {
145
145
  * Proto2 optional fields do not set this flag, because they already indicate
146
146
  * optional with `LABEL_OPTIONAL`.
147
147
  */
148
- proto3Optional: boolean;
148
+ proto3Optional?: boolean | undefined;
149
149
  }
150
150
  export declare enum FieldDescriptorProto_Type {
151
151
  /**
@@ -199,14 +199,14 @@ export declare enum FieldDescriptorProto_Label {
199
199
  }
200
200
  /** Describes a oneof. */
201
201
  export interface OneofDescriptorProto {
202
- name: string;
203
- options: OneofOptions | undefined;
202
+ name?: string | undefined;
203
+ options?: OneofOptions | undefined;
204
204
  }
205
205
  /** Describes an enum type. */
206
206
  export interface EnumDescriptorProto {
207
- name: string;
207
+ name?: string | undefined;
208
208
  value: EnumValueDescriptorProto[];
209
- options: EnumOptions | undefined;
209
+ options?: EnumOptions | undefined;
210
210
  /**
211
211
  * Range of reserved numeric values. Reserved numeric values may not be used
212
212
  * by enum values in the same enum declaration. Reserved ranges may not
@@ -229,36 +229,36 @@ export interface EnumDescriptorProto {
229
229
  */
230
230
  export interface EnumDescriptorProto_EnumReservedRange {
231
231
  /** Inclusive. */
232
- start: number;
232
+ start?: number | undefined;
233
233
  /** Inclusive. */
234
- end: number;
234
+ end?: number | undefined;
235
235
  }
236
236
  /** Describes a value within an enum. */
237
237
  export interface EnumValueDescriptorProto {
238
- name: string;
239
- number: number;
240
- options: EnumValueOptions | undefined;
238
+ name?: string | undefined;
239
+ number?: number | undefined;
240
+ options?: EnumValueOptions | undefined;
241
241
  }
242
242
  /** Describes a service. */
243
243
  export interface ServiceDescriptorProto {
244
- name: string;
244
+ name?: string | undefined;
245
245
  method: MethodDescriptorProto[];
246
- options: ServiceOptions | undefined;
246
+ options?: ServiceOptions | undefined;
247
247
  }
248
248
  /** Describes a method of a service. */
249
249
  export interface MethodDescriptorProto {
250
- name: string;
250
+ name?: string | undefined;
251
251
  /**
252
252
  * Input and output type names. These are resolved in the same way as
253
253
  * FieldDescriptorProto.type_name, but must refer to a message type.
254
254
  */
255
- inputType: string;
256
- outputType: string;
257
- options: MethodOptions | undefined;
255
+ inputType?: string | undefined;
256
+ outputType?: string | undefined;
257
+ options?: MethodOptions | undefined;
258
258
  /** Identifies if client streams multiple client messages */
259
- clientStreaming: boolean;
259
+ clientStreaming?: boolean | undefined;
260
260
  /** Identifies if server streams multiple server messages */
261
- serverStreaming: boolean;
261
+ serverStreaming?: boolean | undefined;
262
262
  }
263
263
  export interface FileOptions {
264
264
  /**
@@ -267,7 +267,7 @@ export interface FileOptions {
267
267
  * inappropriate because proto packages do not normally start with backwards
268
268
  * domain names.
269
269
  */
270
- javaPackage: string;
270
+ javaPackage?: string | undefined;
271
271
  /**
272
272
  * Controls the name of the wrapper Java class generated for the .proto file.
273
273
  * That class will always contain the .proto file's getDescriptor() method as
@@ -275,7 +275,7 @@ export interface FileOptions {
275
275
  * If java_multiple_files is disabled, then all the other classes from the
276
276
  * .proto file will be nested inside the single wrapper outer class.
277
277
  */
278
- javaOuterClassname: string;
278
+ javaOuterClassname?: string | undefined;
279
279
  /**
280
280
  * If enabled, then the Java code generator will generate a separate .java
281
281
  * file for each top-level message, enum, and service defined in the .proto
@@ -284,13 +284,13 @@ export interface FileOptions {
284
284
  * generated to contain the file's getDescriptor() method as well as any
285
285
  * top-level extensions defined in the file.
286
286
  */
287
- javaMultipleFiles: boolean;
287
+ javaMultipleFiles?: boolean | undefined;
288
288
  /**
289
289
  * This option does nothing.
290
290
  *
291
291
  * @deprecated
292
292
  */
293
- javaGenerateEqualsAndHash: boolean;
293
+ javaGenerateEqualsAndHash?: boolean | undefined;
294
294
  /**
295
295
  * If set true, then the Java2 code generator will generate code that
296
296
  * throws an exception whenever an attempt is made to assign a non-UTF-8
@@ -299,8 +299,8 @@ export interface FileOptions {
299
299
  * However, an extension field still accepts non-UTF-8 byte sequences.
300
300
  * This option has no effect on when used with the lite runtime.
301
301
  */
302
- javaStringCheckUtf8: boolean;
303
- optimizeFor: FileOptions_OptimizeMode;
302
+ javaStringCheckUtf8?: boolean | undefined;
303
+ optimizeFor?: FileOptions_OptimizeMode | undefined;
304
304
  /**
305
305
  * Sets the Go package where structs generated from this .proto will be
306
306
  * placed. If omitted, the Go package will be derived from the following:
@@ -308,7 +308,7 @@ export interface FileOptions {
308
308
  * - Otherwise, the package statement in the .proto file, if present.
309
309
  * - Otherwise, the basename of the .proto file, without extension.
310
310
  */
311
- goPackage: string;
311
+ goPackage?: string | undefined;
312
312
  /**
313
313
  * Should generic services be generated in each language? "Generic" services
314
314
  * are not specific to any particular RPC system. They are generated by the
@@ -321,59 +321,59 @@ export interface FileOptions {
321
321
  * these default to false. Old code which depends on generic services should
322
322
  * explicitly set them to true.
323
323
  */
324
- ccGenericServices: boolean;
325
- javaGenericServices: boolean;
326
- pyGenericServices: boolean;
327
- phpGenericServices: boolean;
324
+ ccGenericServices?: boolean | undefined;
325
+ javaGenericServices?: boolean | undefined;
326
+ pyGenericServices?: boolean | undefined;
327
+ phpGenericServices?: boolean | undefined;
328
328
  /**
329
329
  * Is this file deprecated?
330
330
  * Depending on the target platform, this can emit Deprecated annotations
331
331
  * for everything in the file, or it will be completely ignored; in the very
332
332
  * least, this is a formalization for deprecating files.
333
333
  */
334
- deprecated: boolean;
334
+ deprecated?: boolean | undefined;
335
335
  /**
336
336
  * Enables the use of arenas for the proto messages in this file. This applies
337
337
  * only to generated classes for C++.
338
338
  */
339
- ccEnableArenas: boolean;
339
+ ccEnableArenas?: boolean | undefined;
340
340
  /**
341
341
  * Sets the objective c class prefix which is prepended to all objective c
342
342
  * generated classes from this .proto. There is no default.
343
343
  */
344
- objcClassPrefix: string;
344
+ objcClassPrefix?: string | undefined;
345
345
  /** Namespace for generated classes; defaults to the package. */
346
- csharpNamespace: string;
346
+ csharpNamespace?: string | undefined;
347
347
  /**
348
348
  * By default Swift generators will take the proto package and CamelCase it
349
349
  * replacing '.' with underscore and use that to prefix the types/symbols
350
350
  * defined. When this options is provided, they will use this value instead
351
351
  * to prefix the types/symbols defined.
352
352
  */
353
- swiftPrefix: string;
353
+ swiftPrefix?: string | undefined;
354
354
  /**
355
355
  * Sets the php class prefix which is prepended to all php generated classes
356
356
  * from this .proto. Default is empty.
357
357
  */
358
- phpClassPrefix: string;
358
+ phpClassPrefix?: string | undefined;
359
359
  /**
360
360
  * Use this option to change the namespace of php generated classes. Default
361
361
  * is empty. When this option is empty, the package name will be used for
362
362
  * determining the namespace.
363
363
  */
364
- phpNamespace: string;
364
+ phpNamespace?: string | undefined;
365
365
  /**
366
366
  * Use this option to change the namespace of php generated metadata classes.
367
367
  * Default is empty. When this option is empty, the proto file name will be
368
368
  * used for determining the namespace.
369
369
  */
370
- phpMetadataNamespace: string;
370
+ phpMetadataNamespace?: string | undefined;
371
371
  /**
372
372
  * Use this option to change the package of ruby generated classes. Default
373
373
  * is empty. When this option is not set, the package name will be used for
374
374
  * determining the ruby package.
375
375
  */
376
- rubyPackage: string;
376
+ rubyPackage?: string | undefined;
377
377
  /**
378
378
  * The parser stores options it doesn't recognize here.
379
379
  * See the documentation for the "Options" section above.
@@ -411,20 +411,20 @@ export interface MessageOptions {
411
411
  * Because this is an option, the above two restrictions are not enforced by
412
412
  * the protocol compiler.
413
413
  */
414
- messageSetWireFormat: boolean;
414
+ messageSetWireFormat?: boolean | undefined;
415
415
  /**
416
416
  * Disables the generation of the standard "descriptor()" accessor, which can
417
417
  * conflict with a field of the same name. This is meant to make migration
418
418
  * from proto1 easier; new code should avoid fields named "descriptor".
419
419
  */
420
- noStandardDescriptorAccessor: boolean;
420
+ noStandardDescriptorAccessor?: boolean | undefined;
421
421
  /**
422
422
  * Is this message deprecated?
423
423
  * Depending on the target platform, this can emit Deprecated annotations
424
424
  * for the message, or it will be completely ignored; in the very least,
425
425
  * this is a formalization for deprecating messages.
426
426
  */
427
- deprecated: boolean;
427
+ deprecated?: boolean | undefined;
428
428
  /**
429
429
  * Whether the message is an automatically generated map entry type for the
430
430
  * maps field.
@@ -448,7 +448,7 @@ export interface MessageOptions {
448
448
  * instead. The option should only be implicitly set by the proto compiler
449
449
  * parser.
450
450
  */
451
- mapEntry: boolean;
451
+ mapEntry?: boolean | undefined;
452
452
  /** The parser stores options it doesn't recognize here. See above. */
453
453
  uninterpretedOption: UninterpretedOption[];
454
454
  }
@@ -459,7 +459,7 @@ export interface FieldOptions {
459
459
  * options below. This option is not yet implemented in the open source
460
460
  * release -- sorry, we'll try to include it in a future version!
461
461
  */
462
- ctype: FieldOptions_CType;
462
+ ctype?: FieldOptions_CType | undefined;
463
463
  /**
464
464
  * The packed option can be enabled for repeated primitive fields to enable
465
465
  * a more efficient representation on the wire. Rather than repeatedly
@@ -467,7 +467,7 @@ export interface FieldOptions {
467
467
  * a single length-delimited blob. In proto3, only explicit setting it to
468
468
  * false will avoid using packed encoding.
469
469
  */
470
- packed: boolean;
470
+ packed?: boolean | undefined;
471
471
  /**
472
472
  * The jstype option determines the JavaScript type used for values of the
473
473
  * field. The option is permitted only for 64 bit integral and fixed types
@@ -481,7 +481,7 @@ export interface FieldOptions {
481
481
  * This option is an enum to permit additional types to be added, e.g.
482
482
  * goog.math.Integer.
483
483
  */
484
- jstype: FieldOptions_JSType;
484
+ jstype?: FieldOptions_JSType | undefined;
485
485
  /**
486
486
  * Should this field be parsed lazily? Lazy applies only to message-type
487
487
  * fields. It means that when the outer message is initially parsed, the
@@ -517,22 +517,22 @@ export interface FieldOptions {
517
517
  *
518
518
  * TODO(b/211906113): Enable validation on lazy fields.
519
519
  */
520
- lazy: boolean;
520
+ lazy?: boolean | undefined;
521
521
  /**
522
522
  * unverified_lazy does no correctness checks on the byte stream. This should
523
523
  * only be used where lazy with verification is prohibitive for performance
524
524
  * reasons.
525
525
  */
526
- unverifiedLazy: boolean;
526
+ unverifiedLazy?: boolean | undefined;
527
527
  /**
528
528
  * Is this field deprecated?
529
529
  * Depending on the target platform, this can emit Deprecated annotations
530
530
  * for accessors, or it will be completely ignored; in the very least, this
531
531
  * is a formalization for deprecating fields.
532
532
  */
533
- deprecated: boolean;
533
+ deprecated?: boolean | undefined;
534
534
  /** For Google-internal migration only. Do not use. */
535
- weak: boolean;
535
+ weak?: boolean | undefined;
536
536
  /** The parser stores options it doesn't recognize here. See above. */
537
537
  uninterpretedOption: UninterpretedOption[];
538
538
  }
@@ -561,14 +561,14 @@ export interface EnumOptions {
561
561
  * Set this option to true to allow mapping different tag names to the same
562
562
  * value.
563
563
  */
564
- allowAlias: boolean;
564
+ allowAlias?: boolean | undefined;
565
565
  /**
566
566
  * Is this enum deprecated?
567
567
  * Depending on the target platform, this can emit Deprecated annotations
568
568
  * for the enum, or it will be completely ignored; in the very least, this
569
569
  * is a formalization for deprecating enums.
570
570
  */
571
- deprecated: boolean;
571
+ deprecated?: boolean | undefined;
572
572
  /** The parser stores options it doesn't recognize here. See above. */
573
573
  uninterpretedOption: UninterpretedOption[];
574
574
  }
@@ -579,7 +579,7 @@ export interface EnumValueOptions {
579
579
  * for the enum value, or it will be completely ignored; in the very least,
580
580
  * this is a formalization for deprecating enum values.
581
581
  */
582
- deprecated: boolean;
582
+ deprecated?: boolean | undefined;
583
583
  /** The parser stores options it doesn't recognize here. See above. */
584
584
  uninterpretedOption: UninterpretedOption[];
585
585
  }
@@ -590,7 +590,7 @@ export interface ServiceOptions {
590
590
  * for the service, or it will be completely ignored; in the very least,
591
591
  * this is a formalization for deprecating services.
592
592
  */
593
- deprecated: boolean;
593
+ deprecated?: boolean | undefined;
594
594
  /** The parser stores options it doesn't recognize here. See above. */
595
595
  uninterpretedOption: UninterpretedOption[];
596
596
  }
@@ -601,8 +601,8 @@ export interface MethodOptions {
601
601
  * for the method, or it will be completely ignored; in the very least,
602
602
  * this is a formalization for deprecating methods.
603
603
  */
604
- deprecated: boolean;
605
- idempotencyLevel: MethodOptions_IdempotencyLevel;
604
+ deprecated?: boolean | undefined;
605
+ idempotencyLevel?: MethodOptions_IdempotencyLevel | undefined;
606
606
  /** The parser stores options it doesn't recognize here. See above. */
607
607
  uninterpretedOption: UninterpretedOption[];
608
608
  }
@@ -633,12 +633,12 @@ export interface UninterpretedOption {
633
633
  * The value of the uninterpreted option, in whatever type the tokenizer
634
634
  * identified it as during parsing. Exactly one of these should be set.
635
635
  */
636
- identifierValue: string;
637
- positiveIntValue: number;
638
- negativeIntValue: number;
639
- doubleValue: number;
640
- stringValue: Uint8Array;
641
- aggregateValue: string;
636
+ identifierValue?: string | undefined;
637
+ positiveIntValue?: number | undefined;
638
+ negativeIntValue?: number | undefined;
639
+ doubleValue?: number | undefined;
640
+ stringValue?: Uint8Array | undefined;
641
+ aggregateValue?: string | undefined;
642
642
  }
643
643
  /**
644
644
  * The name of the uninterpreted option. Each string represents a segment in
@@ -787,8 +787,8 @@ export interface SourceCodeInfo_Location {
787
787
  *
788
788
  * // ignored detached comments.
789
789
  */
790
- leadingComments: string;
791
- trailingComments: string;
790
+ leadingComments?: string | undefined;
791
+ trailingComments?: string | undefined;
792
792
  leadingDetachedComments: string[];
793
793
  }
794
794
  /**
@@ -810,16 +810,16 @@ export interface GeneratedCodeInfo_Annotation {
810
810
  */
811
811
  path: number[];
812
812
  /** Identifies the filesystem path to the original source .proto. */
813
- sourceFile: string;
813
+ sourceFile?: string | undefined;
814
814
  /**
815
815
  * Identifies the starting offset in bytes in the generated code
816
816
  * that relates to the identified object.
817
817
  */
818
- begin: number;
818
+ begin?: number | undefined;
819
819
  /**
820
820
  * Identifies the ending offset in bytes in the generated code that
821
821
  * relates to the identified offset. The end offset should be one past
822
822
  * the last relevant byte (so the length of the text = end - begin).
823
823
  */
824
- end: number;
824
+ end?: number | undefined;
825
825
  }
@@ -0,0 +1,86 @@
1
+ import { Metadata } from "@grpc/grpc-js";
2
+ import { Observable } from "rxjs";
3
+ import type { Error } from "../univer/constants/errors";
4
+ export declare const protobufPackage = "universer.v1";
5
+ export interface Collaborator {
6
+ id: string;
7
+ role: string;
8
+ }
9
+ export interface CreateRequest {
10
+ objectType: string;
11
+ selectRangeObject?: CreateRequest_SelectRangeObject | undefined;
12
+ worksheetObject?: CreateRequest_WorksheetObject | undefined;
13
+ }
14
+ export interface CreateRequest_SelectRangeObject {
15
+ collaborators: Collaborator[];
16
+ unitID: string;
17
+ }
18
+ export interface CreateRequest_WorksheetObject {
19
+ collaborators: Collaborator[];
20
+ unitID: string;
21
+ }
22
+ export interface CreateResponse {
23
+ error: Error | undefined;
24
+ objectID: string;
25
+ }
26
+ export interface CreateCollaboratorRequest {
27
+ objectID: string;
28
+ collaborators: Collaborator[];
29
+ }
30
+ export interface CreateCollaboratorResponse {
31
+ error: Error | undefined;
32
+ }
33
+ export interface UpdateCollaboratorRequest {
34
+ objectID: string;
35
+ collaborator: Collaborator | undefined;
36
+ }
37
+ export interface UpdateCollaboratorResponse {
38
+ error: Error | undefined;
39
+ }
40
+ export interface DeleteCollaboratorRequest {
41
+ objectID: string;
42
+ collaborator: Collaborator | undefined;
43
+ }
44
+ export interface DeleteCollaboratorResponse {
45
+ error: Error | undefined;
46
+ }
47
+ export interface ListCollaboratorRequest {
48
+ objectID: string;
49
+ }
50
+ export interface ListCollaboratorResponse {
51
+ error: Error | undefined;
52
+ collaborators: Collaborator[];
53
+ }
54
+ export interface AllowedRequest {
55
+ objectID: string;
56
+ objectType: string;
57
+ actions: string[];
58
+ }
59
+ export interface ActionInfo {
60
+ /** key is action, value is permission */
61
+ info: {
62
+ [key: string]: number;
63
+ };
64
+ }
65
+ export interface ActionInfo_InfoEntry {
66
+ key: string;
67
+ value: number;
68
+ }
69
+ export interface AllowedResponse {
70
+ error: Error | undefined;
71
+ actions: ActionInfo | undefined;
72
+ }
73
+ export interface AuthzService {
74
+ /** create a permission mount point for specified type of object */
75
+ Create(request: CreateRequest, metadata?: Metadata): Observable<CreateResponse>;
76
+ /** request a couple of actions, return the allowed actions */
77
+ Allowed(request: AllowedRequest, metadata?: Metadata): Observable<AllowedResponse>;
78
+ /** new collaborator for specified object */
79
+ CreateCollaborator(request: CreateCollaboratorRequest, metadata?: Metadata): Observable<CreateCollaboratorResponse>;
80
+ /** list all collaborators for specified object */
81
+ ListCollaborators(request: ListCollaboratorRequest, metadata?: Metadata): Observable<ListCollaboratorResponse>;
82
+ /** update collaborator for specified object */
83
+ UpdateCollaborator(request: UpdateCollaboratorRequest, metadata?: Metadata): Observable<UpdateCollaboratorResponse>;
84
+ /** delete collaborator for specified object */
85
+ DeleteCollaborator(request: UpdateCollaboratorRequest, metadata?: Metadata): Observable<UpdateCollaboratorResponse>;
86
+ }
@@ -95,6 +95,7 @@ export interface Config {
95
95
  export interface Auth {
96
96
  enabled: boolean;
97
97
  oidc: Auth_OIDC | undefined;
98
+ oauth2: Auth_Oauth2 | undefined;
98
99
  }
99
100
  export interface Auth_OIDC {
100
101
  issuer: string;
@@ -102,6 +103,22 @@ export interface Auth_OIDC {
102
103
  clientSecret: string;
103
104
  redirectURL: string;
104
105
  cookieDomain: string;
106
+ enabled: boolean;
107
+ }
108
+ export interface Auth_Oauth2 {
109
+ clientID: string;
110
+ clientSecret: string;
111
+ redirectURL: string;
112
+ cookieDomain: string;
113
+ enabled: boolean;
114
+ authURL: string;
115
+ tokenURL: string;
116
+ apiURL: string;
117
+ scopes: string;
118
+ openidPath: string;
119
+ emailPath: string;
120
+ namePath: string;
121
+ avatarPath: string;
105
122
  }
106
123
  export interface ApiLimit {
107
124
  method: ApiLimit_TokenLimit | undefined;
@@ -0,0 +1,24 @@
1
+ import { Metadata } from "@grpc/grpc-js";
2
+ import { Observable } from "rxjs";
3
+ import type { Error } from "../univer/constants/errors";
4
+ export declare const protobufPackage = "universer.v1";
5
+ export interface Oauth2PageRequest {
6
+ url: string;
7
+ }
8
+ export interface Oauth2PageResponse {
9
+ error: Error | undefined;
10
+ redirectUri: string;
11
+ }
12
+ export interface Oauth2CallbackRequest {
13
+ code: string;
14
+ state: string;
15
+ redirectUri: string;
16
+ }
17
+ export interface Oauth2CallbackResponse {
18
+ error: Error | undefined;
19
+ redirectUri: string;
20
+ }
21
+ export interface Oauth2Service {
22
+ AuthPage(request: Oauth2PageRequest, metadata?: Metadata): Observable<Oauth2PageResponse>;
23
+ AuthCallback(request: Oauth2CallbackRequest, metadata?: Metadata): Observable<Oauth2CallbackResponse>;
24
+ }