@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.
@@ -14,7 +14,7 @@ export declare enum KnownRegex {
14
14
  * field, the correct set should be used to ensure proper validations.
15
15
  */
16
16
  export interface FieldRules {
17
- message: MessageRules | undefined;
17
+ message?: MessageRules | undefined;
18
18
  /** Scalar Field Types */
19
19
  float?: FloatRules | undefined;
20
20
  double?: DoubleRules | undefined;
@@ -43,29 +43,29 @@ export interface FieldRules {
43
43
  /** FloatRules describes the constraints applied to `float` values */
44
44
  export interface FloatRules {
45
45
  /** Const specifies that this field must be exactly the specified value */
46
- const: number;
46
+ const?: number | undefined;
47
47
  /**
48
48
  * Lt specifies that this field must be less than the specified value,
49
49
  * exclusive
50
50
  */
51
- lt: number;
51
+ lt?: number | undefined;
52
52
  /**
53
53
  * Lte specifies that this field must be less than or equal to the
54
54
  * specified value, inclusive
55
55
  */
56
- lte: number;
56
+ lte?: number | undefined;
57
57
  /**
58
58
  * Gt specifies that this field must be greater than the specified value,
59
59
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
60
60
  * range is reversed.
61
61
  */
62
- gt: number;
62
+ gt?: number | undefined;
63
63
  /**
64
64
  * Gte specifies that this field must be greater than or equal to the
65
65
  * specified value, inclusive. If the value of Gte is larger than a
66
66
  * specified Lt or Lte, the range is reversed.
67
67
  */
68
- gte: number;
68
+ gte?: number | undefined;
69
69
  /**
70
70
  * In specifies that this field must be equal to one of the specified
71
71
  * values
@@ -80,34 +80,34 @@ export interface FloatRules {
80
80
  * IgnoreEmpty specifies that the validation rules of this field should be
81
81
  * evaluated only if the field is not empty
82
82
  */
83
- ignoreEmpty: boolean;
83
+ ignoreEmpty?: boolean | undefined;
84
84
  }
85
85
  /** DoubleRules describes the constraints applied to `double` values */
86
86
  export interface DoubleRules {
87
87
  /** Const specifies that this field must be exactly the specified value */
88
- const: number;
88
+ const?: number | undefined;
89
89
  /**
90
90
  * Lt specifies that this field must be less than the specified value,
91
91
  * exclusive
92
92
  */
93
- lt: number;
93
+ lt?: number | undefined;
94
94
  /**
95
95
  * Lte specifies that this field must be less than or equal to the
96
96
  * specified value, inclusive
97
97
  */
98
- lte: number;
98
+ lte?: number | undefined;
99
99
  /**
100
100
  * Gt specifies that this field must be greater than the specified value,
101
101
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
102
102
  * range is reversed.
103
103
  */
104
- gt: number;
104
+ gt?: number | undefined;
105
105
  /**
106
106
  * Gte specifies that this field must be greater than or equal to the
107
107
  * specified value, inclusive. If the value of Gte is larger than a
108
108
  * specified Lt or Lte, the range is reversed.
109
109
  */
110
- gte: number;
110
+ gte?: number | undefined;
111
111
  /**
112
112
  * In specifies that this field must be equal to one of the specified
113
113
  * values
@@ -122,34 +122,34 @@ export interface DoubleRules {
122
122
  * IgnoreEmpty specifies that the validation rules of this field should be
123
123
  * evaluated only if the field is not empty
124
124
  */
125
- ignoreEmpty: boolean;
125
+ ignoreEmpty?: boolean | undefined;
126
126
  }
127
127
  /** Int32Rules describes the constraints applied to `int32` values */
128
128
  export interface Int32Rules {
129
129
  /** Const specifies that this field must be exactly the specified value */
130
- const: number;
130
+ const?: number | undefined;
131
131
  /**
132
132
  * Lt specifies that this field must be less than the specified value,
133
133
  * exclusive
134
134
  */
135
- lt: number;
135
+ lt?: number | undefined;
136
136
  /**
137
137
  * Lte specifies that this field must be less than or equal to the
138
138
  * specified value, inclusive
139
139
  */
140
- lte: number;
140
+ lte?: number | undefined;
141
141
  /**
142
142
  * Gt specifies that this field must be greater than the specified value,
143
143
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
144
144
  * range is reversed.
145
145
  */
146
- gt: number;
146
+ gt?: number | undefined;
147
147
  /**
148
148
  * Gte specifies that this field must be greater than or equal to the
149
149
  * specified value, inclusive. If the value of Gte is larger than a
150
150
  * specified Lt or Lte, the range is reversed.
151
151
  */
152
- gte: number;
152
+ gte?: number | undefined;
153
153
  /**
154
154
  * In specifies that this field must be equal to one of the specified
155
155
  * values
@@ -164,34 +164,34 @@ export interface Int32Rules {
164
164
  * IgnoreEmpty specifies that the validation rules of this field should be
165
165
  * evaluated only if the field is not empty
166
166
  */
167
- ignoreEmpty: boolean;
167
+ ignoreEmpty?: boolean | undefined;
168
168
  }
169
169
  /** Int64Rules describes the constraints applied to `int64` values */
170
170
  export interface Int64Rules {
171
171
  /** Const specifies that this field must be exactly the specified value */
172
- const: number;
172
+ const?: number | undefined;
173
173
  /**
174
174
  * Lt specifies that this field must be less than the specified value,
175
175
  * exclusive
176
176
  */
177
- lt: number;
177
+ lt?: number | undefined;
178
178
  /**
179
179
  * Lte specifies that this field must be less than or equal to the
180
180
  * specified value, inclusive
181
181
  */
182
- lte: number;
182
+ lte?: number | undefined;
183
183
  /**
184
184
  * Gt specifies that this field must be greater than the specified value,
185
185
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
186
186
  * range is reversed.
187
187
  */
188
- gt: number;
188
+ gt?: number | undefined;
189
189
  /**
190
190
  * Gte specifies that this field must be greater than or equal to the
191
191
  * specified value, inclusive. If the value of Gte is larger than a
192
192
  * specified Lt or Lte, the range is reversed.
193
193
  */
194
- gte: number;
194
+ gte?: number | undefined;
195
195
  /**
196
196
  * In specifies that this field must be equal to one of the specified
197
197
  * values
@@ -206,34 +206,34 @@ export interface Int64Rules {
206
206
  * IgnoreEmpty specifies that the validation rules of this field should be
207
207
  * evaluated only if the field is not empty
208
208
  */
209
- ignoreEmpty: boolean;
209
+ ignoreEmpty?: boolean | undefined;
210
210
  }
211
211
  /** UInt32Rules describes the constraints applied to `uint32` values */
212
212
  export interface UInt32Rules {
213
213
  /** Const specifies that this field must be exactly the specified value */
214
- const: number;
214
+ const?: number | undefined;
215
215
  /**
216
216
  * Lt specifies that this field must be less than the specified value,
217
217
  * exclusive
218
218
  */
219
- lt: number;
219
+ lt?: number | undefined;
220
220
  /**
221
221
  * Lte specifies that this field must be less than or equal to the
222
222
  * specified value, inclusive
223
223
  */
224
- lte: number;
224
+ lte?: number | undefined;
225
225
  /**
226
226
  * Gt specifies that this field must be greater than the specified value,
227
227
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
228
228
  * range is reversed.
229
229
  */
230
- gt: number;
230
+ gt?: number | undefined;
231
231
  /**
232
232
  * Gte specifies that this field must be greater than or equal to the
233
233
  * specified value, inclusive. If the value of Gte is larger than a
234
234
  * specified Lt or Lte, the range is reversed.
235
235
  */
236
- gte: number;
236
+ gte?: number | undefined;
237
237
  /**
238
238
  * In specifies that this field must be equal to one of the specified
239
239
  * values
@@ -248,34 +248,34 @@ export interface UInt32Rules {
248
248
  * IgnoreEmpty specifies that the validation rules of this field should be
249
249
  * evaluated only if the field is not empty
250
250
  */
251
- ignoreEmpty: boolean;
251
+ ignoreEmpty?: boolean | undefined;
252
252
  }
253
253
  /** UInt64Rules describes the constraints applied to `uint64` values */
254
254
  export interface UInt64Rules {
255
255
  /** Const specifies that this field must be exactly the specified value */
256
- const: number;
256
+ const?: number | undefined;
257
257
  /**
258
258
  * Lt specifies that this field must be less than the specified value,
259
259
  * exclusive
260
260
  */
261
- lt: number;
261
+ lt?: number | undefined;
262
262
  /**
263
263
  * Lte specifies that this field must be less than or equal to the
264
264
  * specified value, inclusive
265
265
  */
266
- lte: number;
266
+ lte?: number | undefined;
267
267
  /**
268
268
  * Gt specifies that this field must be greater than the specified value,
269
269
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
270
270
  * range is reversed.
271
271
  */
272
- gt: number;
272
+ gt?: number | undefined;
273
273
  /**
274
274
  * Gte specifies that this field must be greater than or equal to the
275
275
  * specified value, inclusive. If the value of Gte is larger than a
276
276
  * specified Lt or Lte, the range is reversed.
277
277
  */
278
- gte: number;
278
+ gte?: number | undefined;
279
279
  /**
280
280
  * In specifies that this field must be equal to one of the specified
281
281
  * values
@@ -290,34 +290,34 @@ export interface UInt64Rules {
290
290
  * IgnoreEmpty specifies that the validation rules of this field should be
291
291
  * evaluated only if the field is not empty
292
292
  */
293
- ignoreEmpty: boolean;
293
+ ignoreEmpty?: boolean | undefined;
294
294
  }
295
295
  /** SInt32Rules describes the constraints applied to `sint32` values */
296
296
  export interface SInt32Rules {
297
297
  /** Const specifies that this field must be exactly the specified value */
298
- const: number;
298
+ const?: number | undefined;
299
299
  /**
300
300
  * Lt specifies that this field must be less than the specified value,
301
301
  * exclusive
302
302
  */
303
- lt: number;
303
+ lt?: number | undefined;
304
304
  /**
305
305
  * Lte specifies that this field must be less than or equal to the
306
306
  * specified value, inclusive
307
307
  */
308
- lte: number;
308
+ lte?: number | undefined;
309
309
  /**
310
310
  * Gt specifies that this field must be greater than the specified value,
311
311
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
312
312
  * range is reversed.
313
313
  */
314
- gt: number;
314
+ gt?: number | undefined;
315
315
  /**
316
316
  * Gte specifies that this field must be greater than or equal to the
317
317
  * specified value, inclusive. If the value of Gte is larger than a
318
318
  * specified Lt or Lte, the range is reversed.
319
319
  */
320
- gte: number;
320
+ gte?: number | undefined;
321
321
  /**
322
322
  * In specifies that this field must be equal to one of the specified
323
323
  * values
@@ -332,34 +332,34 @@ export interface SInt32Rules {
332
332
  * IgnoreEmpty specifies that the validation rules of this field should be
333
333
  * evaluated only if the field is not empty
334
334
  */
335
- ignoreEmpty: boolean;
335
+ ignoreEmpty?: boolean | undefined;
336
336
  }
337
337
  /** SInt64Rules describes the constraints applied to `sint64` values */
338
338
  export interface SInt64Rules {
339
339
  /** Const specifies that this field must be exactly the specified value */
340
- const: number;
340
+ const?: number | undefined;
341
341
  /**
342
342
  * Lt specifies that this field must be less than the specified value,
343
343
  * exclusive
344
344
  */
345
- lt: number;
345
+ lt?: number | undefined;
346
346
  /**
347
347
  * Lte specifies that this field must be less than or equal to the
348
348
  * specified value, inclusive
349
349
  */
350
- lte: number;
350
+ lte?: number | undefined;
351
351
  /**
352
352
  * Gt specifies that this field must be greater than the specified value,
353
353
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
354
354
  * range is reversed.
355
355
  */
356
- gt: number;
356
+ gt?: number | undefined;
357
357
  /**
358
358
  * Gte specifies that this field must be greater than or equal to the
359
359
  * specified value, inclusive. If the value of Gte is larger than a
360
360
  * specified Lt or Lte, the range is reversed.
361
361
  */
362
- gte: number;
362
+ gte?: number | undefined;
363
363
  /**
364
364
  * In specifies that this field must be equal to one of the specified
365
365
  * values
@@ -374,34 +374,34 @@ export interface SInt64Rules {
374
374
  * IgnoreEmpty specifies that the validation rules of this field should be
375
375
  * evaluated only if the field is not empty
376
376
  */
377
- ignoreEmpty: boolean;
377
+ ignoreEmpty?: boolean | undefined;
378
378
  }
379
379
  /** Fixed32Rules describes the constraints applied to `fixed32` values */
380
380
  export interface Fixed32Rules {
381
381
  /** Const specifies that this field must be exactly the specified value */
382
- const: number;
382
+ const?: number | undefined;
383
383
  /**
384
384
  * Lt specifies that this field must be less than the specified value,
385
385
  * exclusive
386
386
  */
387
- lt: number;
387
+ lt?: number | undefined;
388
388
  /**
389
389
  * Lte specifies that this field must be less than or equal to the
390
390
  * specified value, inclusive
391
391
  */
392
- lte: number;
392
+ lte?: number | undefined;
393
393
  /**
394
394
  * Gt specifies that this field must be greater than the specified value,
395
395
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
396
396
  * range is reversed.
397
397
  */
398
- gt: number;
398
+ gt?: number | undefined;
399
399
  /**
400
400
  * Gte specifies that this field must be greater than or equal to the
401
401
  * specified value, inclusive. If the value of Gte is larger than a
402
402
  * specified Lt or Lte, the range is reversed.
403
403
  */
404
- gte: number;
404
+ gte?: number | undefined;
405
405
  /**
406
406
  * In specifies that this field must be equal to one of the specified
407
407
  * values
@@ -416,34 +416,34 @@ export interface Fixed32Rules {
416
416
  * IgnoreEmpty specifies that the validation rules of this field should be
417
417
  * evaluated only if the field is not empty
418
418
  */
419
- ignoreEmpty: boolean;
419
+ ignoreEmpty?: boolean | undefined;
420
420
  }
421
421
  /** Fixed64Rules describes the constraints applied to `fixed64` values */
422
422
  export interface Fixed64Rules {
423
423
  /** Const specifies that this field must be exactly the specified value */
424
- const: number;
424
+ const?: number | undefined;
425
425
  /**
426
426
  * Lt specifies that this field must be less than the specified value,
427
427
  * exclusive
428
428
  */
429
- lt: number;
429
+ lt?: number | undefined;
430
430
  /**
431
431
  * Lte specifies that this field must be less than or equal to the
432
432
  * specified value, inclusive
433
433
  */
434
- lte: number;
434
+ lte?: number | undefined;
435
435
  /**
436
436
  * Gt specifies that this field must be greater than the specified value,
437
437
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
438
438
  * range is reversed.
439
439
  */
440
- gt: number;
440
+ gt?: number | undefined;
441
441
  /**
442
442
  * Gte specifies that this field must be greater than or equal to the
443
443
  * specified value, inclusive. If the value of Gte is larger than a
444
444
  * specified Lt or Lte, the range is reversed.
445
445
  */
446
- gte: number;
446
+ gte?: number | undefined;
447
447
  /**
448
448
  * In specifies that this field must be equal to one of the specified
449
449
  * values
@@ -458,34 +458,34 @@ export interface Fixed64Rules {
458
458
  * IgnoreEmpty specifies that the validation rules of this field should be
459
459
  * evaluated only if the field is not empty
460
460
  */
461
- ignoreEmpty: boolean;
461
+ ignoreEmpty?: boolean | undefined;
462
462
  }
463
463
  /** SFixed32Rules describes the constraints applied to `sfixed32` values */
464
464
  export interface SFixed32Rules {
465
465
  /** Const specifies that this field must be exactly the specified value */
466
- const: number;
466
+ const?: number | undefined;
467
467
  /**
468
468
  * Lt specifies that this field must be less than the specified value,
469
469
  * exclusive
470
470
  */
471
- lt: number;
471
+ lt?: number | undefined;
472
472
  /**
473
473
  * Lte specifies that this field must be less than or equal to the
474
474
  * specified value, inclusive
475
475
  */
476
- lte: number;
476
+ lte?: number | undefined;
477
477
  /**
478
478
  * Gt specifies that this field must be greater than the specified value,
479
479
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
480
480
  * range is reversed.
481
481
  */
482
- gt: number;
482
+ gt?: number | undefined;
483
483
  /**
484
484
  * Gte specifies that this field must be greater than or equal to the
485
485
  * specified value, inclusive. If the value of Gte is larger than a
486
486
  * specified Lt or Lte, the range is reversed.
487
487
  */
488
- gte: number;
488
+ gte?: number | undefined;
489
489
  /**
490
490
  * In specifies that this field must be equal to one of the specified
491
491
  * values
@@ -500,34 +500,34 @@ export interface SFixed32Rules {
500
500
  * IgnoreEmpty specifies that the validation rules of this field should be
501
501
  * evaluated only if the field is not empty
502
502
  */
503
- ignoreEmpty: boolean;
503
+ ignoreEmpty?: boolean | undefined;
504
504
  }
505
505
  /** SFixed64Rules describes the constraints applied to `sfixed64` values */
506
506
  export interface SFixed64Rules {
507
507
  /** Const specifies that this field must be exactly the specified value */
508
- const: number;
508
+ const?: number | undefined;
509
509
  /**
510
510
  * Lt specifies that this field must be less than the specified value,
511
511
  * exclusive
512
512
  */
513
- lt: number;
513
+ lt?: number | undefined;
514
514
  /**
515
515
  * Lte specifies that this field must be less than or equal to the
516
516
  * specified value, inclusive
517
517
  */
518
- lte: number;
518
+ lte?: number | undefined;
519
519
  /**
520
520
  * Gt specifies that this field must be greater than the specified value,
521
521
  * exclusive. If the value of Gt is larger than a specified Lt or Lte, the
522
522
  * range is reversed.
523
523
  */
524
- gt: number;
524
+ gt?: number | undefined;
525
525
  /**
526
526
  * Gte specifies that this field must be greater than or equal to the
527
527
  * specified value, inclusive. If the value of Gte is larger than a
528
528
  * specified Lt or Lte, the range is reversed.
529
529
  */
530
- gte: number;
530
+ gte?: number | undefined;
531
531
  /**
532
532
  * In specifies that this field must be equal to one of the specified
533
533
  * values
@@ -542,76 +542,76 @@ export interface SFixed64Rules {
542
542
  * IgnoreEmpty specifies that the validation rules of this field should be
543
543
  * evaluated only if the field is not empty
544
544
  */
545
- ignoreEmpty: boolean;
545
+ ignoreEmpty?: boolean | undefined;
546
546
  }
547
547
  /** BoolRules describes the constraints applied to `bool` values */
548
548
  export interface BoolRules {
549
549
  /** Const specifies that this field must be exactly the specified value */
550
- const: boolean;
550
+ const?: boolean | undefined;
551
551
  }
552
552
  /** StringRules describe the constraints applied to `string` values */
553
553
  export interface StringRules {
554
554
  /** Const specifies that this field must be exactly the specified value */
555
- const: string;
555
+ const?: string | undefined;
556
556
  /**
557
557
  * Len specifies that this field must be the specified number of
558
558
  * characters (Unicode code points). Note that the number of
559
559
  * characters may differ from the number of bytes in the string.
560
560
  */
561
- len: number;
561
+ len?: number | undefined;
562
562
  /**
563
563
  * MinLen specifies that this field must be the specified number of
564
564
  * characters (Unicode code points) at a minimum. Note that the number of
565
565
  * characters may differ from the number of bytes in the string.
566
566
  */
567
- minLen: number;
567
+ minLen?: number | undefined;
568
568
  /**
569
569
  * MaxLen specifies that this field must be the specified number of
570
570
  * characters (Unicode code points) at a maximum. Note that the number of
571
571
  * characters may differ from the number of bytes in the string.
572
572
  */
573
- maxLen: number;
573
+ maxLen?: number | undefined;
574
574
  /**
575
575
  * LenBytes specifies that this field must be the specified number of bytes
576
576
  * at a minimum
577
577
  */
578
- lenBytes: number;
578
+ lenBytes?: number | undefined;
579
579
  /**
580
580
  * MinBytes specifies that this field must be the specified number of bytes
581
581
  * at a minimum
582
582
  */
583
- minBytes: number;
583
+ minBytes?: number | undefined;
584
584
  /**
585
585
  * MaxBytes specifies that this field must be the specified number of bytes
586
586
  * at a maximum
587
587
  */
588
- maxBytes: number;
588
+ maxBytes?: number | undefined;
589
589
  /**
590
590
  * Pattern specifes that this field must match against the specified
591
591
  * regular expression (RE2 syntax). The included expression should elide
592
592
  * any delimiters.
593
593
  */
594
- pattern: string;
594
+ pattern?: string | undefined;
595
595
  /**
596
596
  * Prefix specifies that this field must have the specified substring at
597
597
  * the beginning of the string.
598
598
  */
599
- prefix: string;
599
+ prefix?: string | undefined;
600
600
  /**
601
601
  * Suffix specifies that this field must have the specified substring at
602
602
  * the end of the string.
603
603
  */
604
- suffix: string;
604
+ suffix?: string | undefined;
605
605
  /**
606
606
  * Contains specifies that this field must have the specified substring
607
607
  * anywhere in the string.
608
608
  */
609
- contains: string;
609
+ contains?: string | undefined;
610
610
  /**
611
611
  * NotContains specifies that this field cannot have the specified substring
612
612
  * anywhere in the string.
613
613
  */
614
- notContains: string;
614
+ notContains?: string | undefined;
615
615
  /**
616
616
  * In specifies that this field must be equal to one of the specified
617
617
  * values
@@ -675,50 +675,50 @@ export interface StringRules {
675
675
  * Setting to false will enable a looser validations that only disallows
676
676
  * \r\n\0 characters, which can be used to bypass header matching rules.
677
677
  */
678
- strict: boolean;
678
+ strict?: boolean | undefined;
679
679
  /**
680
680
  * IgnoreEmpty specifies that the validation rules of this field should be
681
681
  * evaluated only if the field is not empty
682
682
  */
683
- ignoreEmpty: boolean;
683
+ ignoreEmpty?: boolean | undefined;
684
684
  }
685
685
  /** BytesRules describe the constraints applied to `bytes` values */
686
686
  export interface BytesRules {
687
687
  /** Const specifies that this field must be exactly the specified value */
688
- const: Uint8Array;
688
+ const?: Uint8Array | undefined;
689
689
  /** Len specifies that this field must be the specified number of bytes */
690
- len: number;
690
+ len?: number | undefined;
691
691
  /**
692
692
  * MinLen specifies that this field must be the specified number of bytes
693
693
  * at a minimum
694
694
  */
695
- minLen: number;
695
+ minLen?: number | undefined;
696
696
  /**
697
697
  * MaxLen specifies that this field must be the specified number of bytes
698
698
  * at a maximum
699
699
  */
700
- maxLen: number;
700
+ maxLen?: number | undefined;
701
701
  /**
702
702
  * Pattern specifes that this field must match against the specified
703
703
  * regular expression (RE2 syntax). The included expression should elide
704
704
  * any delimiters.
705
705
  */
706
- pattern: string;
706
+ pattern?: string | undefined;
707
707
  /**
708
708
  * Prefix specifies that this field must have the specified bytes at the
709
709
  * beginning of the string.
710
710
  */
711
- prefix: Uint8Array;
711
+ prefix?: Uint8Array | undefined;
712
712
  /**
713
713
  * Suffix specifies that this field must have the specified bytes at the
714
714
  * end of the string.
715
715
  */
716
- suffix: Uint8Array;
716
+ suffix?: Uint8Array | undefined;
717
717
  /**
718
718
  * Contains specifies that this field must have the specified bytes
719
719
  * anywhere in the string.
720
720
  */
721
- contains: Uint8Array;
721
+ contains?: Uint8Array | undefined;
722
722
  /**
723
723
  * In specifies that this field must be equal to one of the specified
724
724
  * values
@@ -748,17 +748,17 @@ export interface BytesRules {
748
748
  * IgnoreEmpty specifies that the validation rules of this field should be
749
749
  * evaluated only if the field is not empty
750
750
  */
751
- ignoreEmpty: boolean;
751
+ ignoreEmpty?: boolean | undefined;
752
752
  }
753
753
  /** EnumRules describe the constraints applied to enum values */
754
754
  export interface EnumRules {
755
755
  /** Const specifies that this field must be exactly the specified value */
756
- const: number;
756
+ const?: number | undefined;
757
757
  /**
758
758
  * DefinedOnly specifies that this field must be only one of the defined
759
759
  * values for this enum, failing on any undefined value.
760
760
  */
761
- definedOnly: boolean;
761
+ definedOnly?: boolean | undefined;
762
762
  /**
763
763
  * In specifies that this field must be equal to one of the specified
764
764
  * values
@@ -779,9 +779,9 @@ export interface MessageRules {
779
779
  * Skip specifies that the validation rules of this field should not be
780
780
  * evaluated
781
781
  */
782
- skip: boolean;
782
+ skip?: boolean | undefined;
783
783
  /** Required specifies that this field must be set */
784
- required: boolean;
784
+ required?: boolean | undefined;
785
785
  }
786
786
  /** RepeatedRules describe the constraints applied to `repeated` values */
787
787
  export interface RepeatedRules {
@@ -789,29 +789,29 @@ export interface RepeatedRules {
789
789
  * MinItems specifies that this field must have the specified number of
790
790
  * items at a minimum
791
791
  */
792
- minItems: number;
792
+ minItems?: number | undefined;
793
793
  /**
794
794
  * MaxItems specifies that this field must have the specified number of
795
795
  * items at a maximum
796
796
  */
797
- maxItems: number;
797
+ maxItems?: number | undefined;
798
798
  /**
799
799
  * Unique specifies that all elements in this field must be unique. This
800
800
  * contraint is only applicable to scalar and enum types (messages are not
801
801
  * supported).
802
802
  */
803
- unique: boolean;
803
+ unique?: boolean | undefined;
804
804
  /**
805
805
  * Items specifies the contraints to be applied to each item in the field.
806
806
  * Repeated message fields will still execute validation against each item
807
807
  * unless skip is specified here.
808
808
  */
809
- items: FieldRules | undefined;
809
+ items?: FieldRules | undefined;
810
810
  /**
811
811
  * IgnoreEmpty specifies that the validation rules of this field should be
812
812
  * evaluated only if the field is not empty
813
813
  */
814
- ignoreEmpty: boolean;
814
+ ignoreEmpty?: boolean | undefined;
815
815
  }
816
816
  /** MapRules describe the constraints applied to `map` values */
817
817
  export interface MapRules {
@@ -819,30 +819,30 @@ export interface MapRules {
819
819
  * MinPairs specifies that this field must have the specified number of
820
820
  * KVs at a minimum
821
821
  */
822
- minPairs: number;
822
+ minPairs?: number | undefined;
823
823
  /**
824
824
  * MaxPairs specifies that this field must have the specified number of
825
825
  * KVs at a maximum
826
826
  */
827
- maxPairs: number;
827
+ maxPairs?: number | undefined;
828
828
  /**
829
829
  * NoSparse specifies values in this field cannot be unset. This only
830
830
  * applies to map's with message value types.
831
831
  */
832
- noSparse: boolean;
832
+ noSparse?: boolean | undefined;
833
833
  /** Keys specifies the constraints to be applied to each key in the field. */
834
- keys: FieldRules | undefined;
834
+ keys?: FieldRules | undefined;
835
835
  /**
836
836
  * Values specifies the constraints to be applied to the value of each key
837
837
  * in the field. Message values will still have their validations evaluated
838
838
  * unless skip is specified here.
839
839
  */
840
- values: FieldRules | undefined;
840
+ values?: FieldRules | undefined;
841
841
  /**
842
842
  * IgnoreEmpty specifies that the validation rules of this field should be
843
843
  * evaluated only if the field is not empty
844
844
  */
845
- ignoreEmpty: boolean;
845
+ ignoreEmpty?: boolean | undefined;
846
846
  }
847
847
  /**
848
848
  * AnyRules describe constraints applied exclusively to the
@@ -850,7 +850,7 @@ export interface MapRules {
850
850
  */
851
851
  export interface AnyRules {
852
852
  /** Required specifies that this field must be set */
853
- required: boolean;
853
+ required?: boolean | undefined;
854
854
  /**
855
855
  * In specifies that this field's `type_url` must be equal to one of the
856
856
  * specified values.
@@ -868,29 +868,29 @@ export interface AnyRules {
868
868
  */
869
869
  export interface DurationRules {
870
870
  /** Required specifies that this field must be set */
871
- required: boolean;
871
+ required?: boolean | undefined;
872
872
  /** Const specifies that this field must be exactly the specified value */
873
- const: Duration | undefined;
873
+ const?: Duration | undefined;
874
874
  /**
875
875
  * Lt specifies that this field must be less than the specified value,
876
876
  * exclusive
877
877
  */
878
- lt: Duration | undefined;
878
+ lt?: Duration | undefined;
879
879
  /**
880
880
  * Lt specifies that this field must be less than the specified value,
881
881
  * inclusive
882
882
  */
883
- lte: Duration | undefined;
883
+ lte?: Duration | undefined;
884
884
  /**
885
885
  * Gt specifies that this field must be greater than the specified value,
886
886
  * exclusive
887
887
  */
888
- gt: Duration | undefined;
888
+ gt?: Duration | undefined;
889
889
  /**
890
890
  * Gte specifies that this field must be greater than the specified value,
891
891
  * inclusive
892
892
  */
893
- gte: Duration | undefined;
893
+ gte?: Duration | undefined;
894
894
  /**
895
895
  * In specifies that this field must be equal to one of the specified
896
896
  * values
@@ -908,43 +908,43 @@ export interface DurationRules {
908
908
  */
909
909
  export interface TimestampRules {
910
910
  /** Required specifies that this field must be set */
911
- required: boolean;
911
+ required?: boolean | undefined;
912
912
  /** Const specifies that this field must be exactly the specified value */
913
- const: Date | undefined;
913
+ const?: Date | undefined;
914
914
  /**
915
915
  * Lt specifies that this field must be less than the specified value,
916
916
  * exclusive
917
917
  */
918
- lt: Date | undefined;
918
+ lt?: Date | undefined;
919
919
  /**
920
920
  * Lte specifies that this field must be less than the specified value,
921
921
  * inclusive
922
922
  */
923
- lte: Date | undefined;
923
+ lte?: Date | undefined;
924
924
  /**
925
925
  * Gt specifies that this field must be greater than the specified value,
926
926
  * exclusive
927
927
  */
928
- gt: Date | undefined;
928
+ gt?: Date | undefined;
929
929
  /**
930
930
  * Gte specifies that this field must be greater than the specified value,
931
931
  * inclusive
932
932
  */
933
- gte: Date | undefined;
933
+ gte?: Date | undefined;
934
934
  /**
935
935
  * LtNow specifies that this must be less than the current time. LtNow
936
936
  * can only be used with the Within rule.
937
937
  */
938
- ltNow: boolean;
938
+ ltNow?: boolean | undefined;
939
939
  /**
940
940
  * GtNow specifies that this must be greater than the current time. GtNow
941
941
  * can only be used with the Within rule.
942
942
  */
943
- gtNow: boolean;
943
+ gtNow?: boolean | undefined;
944
944
  /**
945
945
  * Within specifies that this field must be within this duration of the
946
946
  * current time. This constraint can be used alone or with the LtNow and
947
947
  * GtNow rules.
948
948
  */
949
- within: Duration | undefined;
949
+ within?: Duration | undefined;
950
950
  }