@alis-build/alis-open-validation-v1 1.13.0 → 1.14.0

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.
@@ -1,7 +1,30 @@
1
- // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js,json_types=true"
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
2
2
  // @generated from file alis/open/validation/v1/test.proto (package alis.open.validation.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
+ // Checks protobuf messages against the validation rules of the service that
6
+ // uses them, and lists those rules.
7
+ //
8
+ // `ValidationService` defines two RPCs:
9
+ //
10
+ // - `ValidateMessage` takes a message type name and the message as bytes, and
11
+ // returns the rules it violates (`Rule`) and the violations per field
12
+ // (`FieldViolation`). `field_paths` limits validation to some fields.
13
+ // - `RetrieveRules` returns the rules that apply to a message type.
14
+ //
15
+ // Other services expose the same two RPCs with these request and response
16
+ // messages, for example `alis.open.iam.v1.UsersService`, so that clients can
17
+ // validate messages, most commonly requests built by a client-side
18
+ // application, and read the service's validation rules as live
19
+ // documentation.
20
+ //
21
+ // A `Rule` is identified by an expression-like `id`, such as
22
+ // `length(F(name), I(1), I(64))`, and has a plain-language `description`, the
23
+ // field paths it evaluates together, and any nested rules.
24
+ //
25
+ // `BookService` and `Book` in `test.proto` are a sample API for testing, not
26
+ // part of the validation contract.
27
+
5
28
  import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
29
  import type { Message } from "@bufbuild/protobuf";
7
30
  import type { Date, DateJson } from "@alis-build/google-type/google/type/date_pb.js";
@@ -13,80 +36,114 @@ import type { EmptySchema, FieldMask, FieldMaskJson, Timestamp, TimestampJson }
13
36
  export declare const file_alis_open_validation_v1_test: GenFile;
14
37
 
15
38
  /**
39
+ * Definition of a Book resource
40
+ *
16
41
  * @generated from message alis.open.validation.v1.Book
17
42
  */
18
43
  export declare type Book = Message<"alis.open.validation.v1.Book"> & {
19
44
  /**
45
+ * The name of the Book.
46
+ * Format: "books/*".
47
+ *
20
48
  * @generated from field: string name = 1;
21
49
  */
22
50
  name: string;
23
51
 
24
52
  /**
53
+ * The display name of the Book.
54
+ *
25
55
  * @generated from field: string display_name = 2;
26
56
  */
27
57
  displayName: string;
28
58
 
29
59
  /**
60
+ * The author of the Book.
61
+ *
30
62
  * @generated from field: string author = 3;
31
63
  */
32
64
  author: string;
33
65
 
34
66
  /**
67
+ * The publication date of the Book.
68
+ *
35
69
  * @generated from field: google.type.Date publication_date = 4;
36
70
  */
37
71
  publicationDate?: Date | undefined;
38
72
 
39
73
  /**
74
+ * The last time the Book was updated.
75
+ *
40
76
  * @generated from field: google.protobuf.Timestamp update_time = 5;
41
77
  */
42
78
  updateTime?: Timestamp | undefined;
43
79
 
44
80
  /**
81
+ * The page count of the Book.
82
+ *
45
83
  * @generated from field: int32 page_count = 6;
46
84
  */
47
85
  pageCount: number;
48
86
 
49
87
  /**
88
+ * The type of the Book.
89
+ *
50
90
  * @generated from field: alis.open.validation.v1.Type type = 7;
51
91
  */
52
92
  type: Type;
53
93
  };
54
94
 
55
95
  /**
96
+ * Definition of a Book resource
97
+ *
56
98
  * @generated from message alis.open.validation.v1.Book
57
99
  */
58
100
  export declare type BookJson = {
59
101
  /**
102
+ * The name of the Book.
103
+ * Format: "books/*".
104
+ *
60
105
  * @generated from field: string name = 1;
61
106
  */
62
107
  name?: string;
63
108
 
64
109
  /**
110
+ * The display name of the Book.
111
+ *
65
112
  * @generated from field: string display_name = 2;
66
113
  */
67
114
  displayName?: string;
68
115
 
69
116
  /**
117
+ * The author of the Book.
118
+ *
70
119
  * @generated from field: string author = 3;
71
120
  */
72
121
  author?: string;
73
122
 
74
123
  /**
124
+ * The publication date of the Book.
125
+ *
75
126
  * @generated from field: google.type.Date publication_date = 4;
76
127
  */
77
128
  publicationDate?: DateJson;
78
129
 
79
130
  /**
131
+ * The last time the Book was updated.
132
+ *
80
133
  * @generated from field: google.protobuf.Timestamp update_time = 5;
81
134
  */
82
135
  updateTime?: TimestampJson;
83
136
 
84
137
  /**
138
+ * The page count of the Book.
139
+ *
85
140
  * @generated from field: int32 page_count = 6;
86
141
  */
87
142
  pageCount?: number;
88
143
 
89
144
  /**
145
+ * The type of the Book.
146
+ *
90
147
  * @generated from field: alis.open.validation.v1.Type type = 7;
91
148
  */
92
149
  type?: TypeJson;
@@ -99,30 +156,48 @@ export declare type BookJson = {
99
156
  export declare const BookSchema: GenMessage<Book, {jsonType: BookJson}>;
100
157
 
101
158
  /**
159
+ * The request message for the GetBook method
160
+ *
102
161
  * @generated from message alis.open.validation.v1.GetBookRequest
103
162
  */
104
163
  export declare type GetBookRequest = Message<"alis.open.validation.v1.GetBookRequest"> & {
105
164
  /**
165
+ * The name of the Book to retrieve.
166
+ * Format: "books/*"
167
+ *
106
168
  * @generated from field: string name = 1;
107
169
  */
108
170
  name: string;
109
171
 
110
172
  /**
173
+ * The fields to return in snake_case, as defined in the proto
174
+ * e.g. &field_mask.FieldMask{Paths: []string{"name", "display_name"}} --> File{Name, DisplayName}
175
+ * All fields are returned if not provided
176
+ *
111
177
  * @generated from field: google.protobuf.FieldMask read_mask = 2;
112
178
  */
113
179
  readMask?: FieldMask | undefined;
114
180
  };
115
181
 
116
182
  /**
183
+ * The request message for the GetBook method
184
+ *
117
185
  * @generated from message alis.open.validation.v1.GetBookRequest
118
186
  */
119
187
  export declare type GetBookRequestJson = {
120
188
  /**
189
+ * The name of the Book to retrieve.
190
+ * Format: "books/*"
191
+ *
121
192
  * @generated from field: string name = 1;
122
193
  */
123
194
  name?: string;
124
195
 
125
196
  /**
197
+ * The fields to return in snake_case, as defined in the proto
198
+ * e.g. &field_mask.FieldMask{Paths: []string{"name", "display_name"}} --> File{Name, DisplayName}
199
+ * All fields are returned if not provided
200
+ *
126
201
  * @generated from field: google.protobuf.FieldMask read_mask = 2;
127
202
  */
128
203
  readMask?: FieldMaskJson;
@@ -135,20 +210,28 @@ export declare type GetBookRequestJson = {
135
210
  export declare const GetBookRequestSchema: GenMessage<GetBookRequest, {jsonType: GetBookRequestJson}>;
136
211
 
137
212
  /**
213
+ * The request message for the CreateBook method
214
+ *
138
215
  * @generated from message alis.open.validation.v1.CreateBookRequest
139
216
  */
140
217
  export declare type CreateBookRequest = Message<"alis.open.validation.v1.CreateBookRequest"> & {
141
218
  /**
219
+ * The Book to create.
220
+ *
142
221
  * @generated from field: alis.open.validation.v1.Book book = 2;
143
222
  */
144
223
  book?: Book | undefined;
145
224
  };
146
225
 
147
226
  /**
227
+ * The request message for the CreateBook method
228
+ *
148
229
  * @generated from message alis.open.validation.v1.CreateBookRequest
149
230
  */
150
231
  export declare type CreateBookRequestJson = {
151
232
  /**
233
+ * The Book to create.
234
+ *
152
235
  * @generated from field: alis.open.validation.v1.Book book = 2;
153
236
  */
154
237
  book?: BookJson;
@@ -161,30 +244,44 @@ export declare type CreateBookRequestJson = {
161
244
  export declare const CreateBookRequestSchema: GenMessage<CreateBookRequest, {jsonType: CreateBookRequestJson}>;
162
245
 
163
246
  /**
247
+ * The request message for the UpdateBook method
248
+ *
164
249
  * @generated from message alis.open.validation.v1.UpdateBookRequest
165
250
  */
166
251
  export declare type UpdateBookRequest = Message<"alis.open.validation.v1.UpdateBookRequest"> & {
167
252
  /**
253
+ * The Book to update.
254
+ * The Book's `name` field is used to identify the Book to update.
255
+ *
168
256
  * @generated from field: alis.open.validation.v1.Book book = 1;
169
257
  */
170
258
  book?: Book | undefined;
171
259
 
172
260
  /**
261
+ * The list of fields to update.
262
+ *
173
263
  * @generated from field: google.protobuf.FieldMask update_mask = 2;
174
264
  */
175
265
  updateMask?: FieldMask | undefined;
176
266
  };
177
267
 
178
268
  /**
269
+ * The request message for the UpdateBook method
270
+ *
179
271
  * @generated from message alis.open.validation.v1.UpdateBookRequest
180
272
  */
181
273
  export declare type UpdateBookRequestJson = {
182
274
  /**
275
+ * The Book to update.
276
+ * The Book's `name` field is used to identify the Book to update.
277
+ *
183
278
  * @generated from field: alis.open.validation.v1.Book book = 1;
184
279
  */
185
280
  book?: BookJson;
186
281
 
187
282
  /**
283
+ * The list of fields to update.
284
+ *
188
285
  * @generated from field: google.protobuf.FieldMask update_mask = 2;
189
286
  */
190
287
  updateMask?: FieldMaskJson;
@@ -197,20 +294,30 @@ export declare type UpdateBookRequestJson = {
197
294
  export declare const UpdateBookRequestSchema: GenMessage<UpdateBookRequest, {jsonType: UpdateBookRequestJson}>;
198
295
 
199
296
  /**
297
+ * The request message for the DeleteBook method
298
+ *
200
299
  * @generated from message alis.open.validation.v1.DeleteBookRequest
201
300
  */
202
301
  export declare type DeleteBookRequest = Message<"alis.open.validation.v1.DeleteBookRequest"> & {
203
302
  /**
303
+ * The name of the Book to delete.
304
+ * Format: "books/*"
305
+ *
204
306
  * @generated from field: string name = 1;
205
307
  */
206
308
  name: string;
207
309
  };
208
310
 
209
311
  /**
312
+ * The request message for the DeleteBook method
313
+ *
210
314
  * @generated from message alis.open.validation.v1.DeleteBookRequest
211
315
  */
212
316
  export declare type DeleteBookRequestJson = {
213
317
  /**
318
+ * The name of the Book to delete.
319
+ * Format: "books/*"
320
+ *
214
321
  * @generated from field: string name = 1;
215
322
  */
216
323
  name?: string;
@@ -223,40 +330,74 @@ export declare type DeleteBookRequestJson = {
223
330
  export declare const DeleteBookRequestSchema: GenMessage<DeleteBookRequest, {jsonType: DeleteBookRequestJson}>;
224
331
 
225
332
  /**
333
+ * The request message for the ListBooks method
334
+ *
226
335
  * @generated from message alis.open.validation.v1.ListBooksRequest
227
336
  */
228
337
  export declare type ListBooksRequest = Message<"alis.open.validation.v1.ListBooksRequest"> & {
229
338
  /**
339
+ * The maximum number of Books to return. The service may return fewer than
340
+ * this value.
341
+ * If unspecified, at most 50 Book will be returned.
342
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
343
+ *
230
344
  * @generated from field: int32 page_size = 2;
231
345
  */
232
346
  pageSize: number;
233
347
 
234
348
  /**
349
+ * A page token, received from a previous `ListBooks` call.
350
+ * Provide this to retrieve the subsequent page.
351
+ *
352
+ * When paginating, all other parameters provided to `ListBooks` must match
353
+ * the call that provided the page token.
354
+ *
235
355
  * @generated from field: string page_token = 3;
236
356
  */
237
357
  pageToken: string;
238
358
 
239
359
  /**
360
+ * The fields to return in snake_case, as defined in the proto
361
+ * e.g. &field_mask.FieldMask{Paths: []string{"name", "display_name"}} --> File{Name, DisplayName}
362
+ * All fields are returned if not provided
363
+ *
240
364
  * @generated from field: google.protobuf.FieldMask read_mask = 4;
241
365
  */
242
366
  readMask?: FieldMask | undefined;
243
367
  };
244
368
 
245
369
  /**
370
+ * The request message for the ListBooks method
371
+ *
246
372
  * @generated from message alis.open.validation.v1.ListBooksRequest
247
373
  */
248
374
  export declare type ListBooksRequestJson = {
249
375
  /**
376
+ * The maximum number of Books to return. The service may return fewer than
377
+ * this value.
378
+ * If unspecified, at most 50 Book will be returned.
379
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
380
+ *
250
381
  * @generated from field: int32 page_size = 2;
251
382
  */
252
383
  pageSize?: number;
253
384
 
254
385
  /**
386
+ * A page token, received from a previous `ListBooks` call.
387
+ * Provide this to retrieve the subsequent page.
388
+ *
389
+ * When paginating, all other parameters provided to `ListBooks` must match
390
+ * the call that provided the page token.
391
+ *
255
392
  * @generated from field: string page_token = 3;
256
393
  */
257
394
  pageToken?: string;
258
395
 
259
396
  /**
397
+ * The fields to return in snake_case, as defined in the proto
398
+ * e.g. &field_mask.FieldMask{Paths: []string{"name", "display_name"}} --> File{Name, DisplayName}
399
+ * All fields are returned if not provided
400
+ *
260
401
  * @generated from field: google.protobuf.FieldMask read_mask = 4;
261
402
  */
262
403
  readMask?: FieldMaskJson;
@@ -269,40 +410,62 @@ export declare type ListBooksRequestJson = {
269
410
  export declare const ListBooksRequestSchema: GenMessage<ListBooksRequest, {jsonType: ListBooksRequestJson}>;
270
411
 
271
412
  /**
413
+ * The response message for the ListBooks method
414
+ *
272
415
  * @generated from message alis.open.validation.v1.ListBooksResponse
273
416
  */
274
417
  export declare type ListBooksResponse = Message<"alis.open.validation.v1.ListBooksResponse"> & {
275
418
  /**
419
+ * The list of Books returned
420
+ *
276
421
  * @generated from field: repeated alis.open.validation.v1.Book books = 1;
277
422
  */
278
423
  books: Book[];
279
424
 
280
425
  /**
426
+ * A token, which can be sent as `page_token` to retrieve the next page.
427
+ * If this field is omitted, there are no subsequent pages.
428
+ *
281
429
  * @generated from field: string next_page_token = 2;
282
430
  */
283
431
  nextPageToken: string;
284
432
 
285
433
  /**
434
+ * The fields to return in snake_case, as defined in the proto
435
+ * e.g. &field_mask.FieldMask{Paths: []string{"name", "display_name"}} --> File{Name, DisplayName}
436
+ * All fields are returned if not provided
437
+ *
286
438
  * @generated from field: google.protobuf.FieldMask read_mask = 3;
287
439
  */
288
440
  readMask?: FieldMask | undefined;
289
441
  };
290
442
 
291
443
  /**
444
+ * The response message for the ListBooks method
445
+ *
292
446
  * @generated from message alis.open.validation.v1.ListBooksResponse
293
447
  */
294
448
  export declare type ListBooksResponseJson = {
295
449
  /**
450
+ * The list of Books returned
451
+ *
296
452
  * @generated from field: repeated alis.open.validation.v1.Book books = 1;
297
453
  */
298
454
  books?: BookJson[];
299
455
 
300
456
  /**
457
+ * A token, which can be sent as `page_token` to retrieve the next page.
458
+ * If this field is omitted, there are no subsequent pages.
459
+ *
301
460
  * @generated from field: string next_page_token = 2;
302
461
  */
303
462
  nextPageToken?: string;
304
463
 
305
464
  /**
465
+ * The fields to return in snake_case, as defined in the proto
466
+ * e.g. &field_mask.FieldMask{Paths: []string{"name", "display_name"}} --> File{Name, DisplayName}
467
+ * All fields are returned if not provided
468
+ *
306
469
  * @generated from field: google.protobuf.FieldMask read_mask = 3;
307
470
  */
308
471
  readMask?: FieldMaskJson;
@@ -315,31 +478,43 @@ export declare type ListBooksResponseJson = {
315
478
  export declare const ListBooksResponseSchema: GenMessage<ListBooksResponse, {jsonType: ListBooksResponseJson}>;
316
479
 
317
480
  /**
481
+ * The type of a Book.
482
+ *
318
483
  * @generated from enum alis.open.validation.v1.Type
319
484
  */
320
485
  export enum Type {
321
486
  /**
487
+ * Not set. The default value; should not be used.
488
+ *
322
489
  * @generated from enum value: TYPE_UNSPECIFIED = 0;
323
490
  */
324
491
  TYPE_UNSPECIFIED = 0,
325
492
 
326
493
  /**
494
+ * An anonymous book.
495
+ *
327
496
  * @generated from enum value: ANONYMOUS = 1;
328
497
  */
329
498
  ANONYMOUS = 1,
330
499
 
331
500
  /**
501
+ * A children's book.
502
+ *
332
503
  * @generated from enum value: CHILDREN = 2;
333
504
  */
334
505
  CHILDREN = 2,
335
506
 
336
507
  /**
508
+ * A book for adults.
509
+ *
337
510
  * @generated from enum value: ADULT = 3;
338
511
  */
339
512
  ADULT = 3,
340
513
  }
341
514
 
342
515
  /**
516
+ * The type of a Book.
517
+ *
343
518
  * @generated from enum alis.open.validation.v1.Type
344
519
  */
345
520
  export declare type TypeJson = "TYPE_UNSPECIFIED" | "ANONYMOUS" | "CHILDREN" | "ADULT";
@@ -350,10 +525,15 @@ export declare type TypeJson = "TYPE_UNSPECIFIED" | "ANONYMOUS" | "CHILDREN" | "
350
525
  export declare const TypeSchema: GenEnum<Type, TypeJson>;
351
526
 
352
527
  /**
528
+ * A sample book API defined for testing. It is not part of the validation
529
+ * contract.
530
+ *
353
531
  * @generated from service alis.open.validation.v1.BookService
354
532
  */
355
533
  export declare const BookService: GenService<{
356
534
  /**
535
+ * Get a Book resource
536
+ *
357
537
  * @generated from rpc alis.open.validation.v1.BookService.GetBook
358
538
  */
359
539
  getBook: {
@@ -362,6 +542,8 @@ export declare const BookService: GenService<{
362
542
  output: typeof BookSchema;
363
543
  },
364
544
  /**
545
+ * Create a new Book resource
546
+ *
365
547
  * @generated from rpc alis.open.validation.v1.BookService.CreateBook
366
548
  */
367
549
  createBook: {
@@ -370,6 +552,8 @@ export declare const BookService: GenService<{
370
552
  output: typeof BookSchema;
371
553
  },
372
554
  /**
555
+ * Update a Book resource
556
+ *
373
557
  * @generated from rpc alis.open.validation.v1.BookService.UpdateBook
374
558
  */
375
559
  updateBook: {
@@ -378,6 +562,8 @@ export declare const BookService: GenService<{
378
562
  output: typeof BookSchema;
379
563
  },
380
564
  /**
565
+ * Delete a Book
566
+ *
381
567
  * @generated from rpc alis.open.validation.v1.BookService.DeleteBook
382
568
  */
383
569
  deleteBook: {
@@ -386,6 +572,8 @@ export declare const BookService: GenService<{
386
572
  output: typeof EmptySchema;
387
573
  },
388
574
  /**
575
+ * Lists Book resources
576
+ *
389
577
  * @generated from rpc alis.open.validation.v1.BookService.ListBooks
390
578
  */
391
579
  listBooks: {
@@ -1,7 +1,30 @@
1
- // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js,json_types=true"
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
2
2
  // @generated from file alis/open/validation/v1/test.proto (package alis.open.validation.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
5
+ // Checks protobuf messages against the validation rules of the service that
6
+ // uses them, and lists those rules.
7
+ //
8
+ // `ValidationService` defines two RPCs:
9
+ //
10
+ // - `ValidateMessage` takes a message type name and the message as bytes, and
11
+ // returns the rules it violates (`Rule`) and the violations per field
12
+ // (`FieldViolation`). `field_paths` limits validation to some fields.
13
+ // - `RetrieveRules` returns the rules that apply to a message type.
14
+ //
15
+ // Other services expose the same two RPCs with these request and response
16
+ // messages, for example `alis.open.iam.v1.UsersService`, so that clients can
17
+ // validate messages, most commonly requests built by a client-side
18
+ // application, and read the service's validation rules as live
19
+ // documentation.
20
+ //
21
+ // A `Rule` is identified by an expression-like `id`, such as
22
+ // `length(F(name), I(1), I(64))`, and has a plain-language `description`, the
23
+ // field paths it evaluates together, and any nested rules.
24
+ //
25
+ // `BookService` and `Book` in `test.proto` are a sample API for testing, not
26
+ // part of the validation contract.
27
+
5
28
  import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
6
29
  import { file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
7
30
  import { file_google_type_date } from "@alis-build/google-type/google/type/date_pb.js";
@@ -68,12 +91,17 @@ export const TypeSchema = /*@__PURE__*/
68
91
  enumDesc(file_alis_open_validation_v1_test, 0);
69
92
 
70
93
  /**
94
+ * The type of a Book.
95
+ *
71
96
  * @generated from enum alis.open.validation.v1.Type
72
97
  */
73
98
  export const Type = /*@__PURE__*/
74
99
  tsEnum(TypeSchema);
75
100
 
76
101
  /**
102
+ * A sample book API defined for testing. It is not part of the validation
103
+ * contract.
104
+ *
77
105
  * @generated from service alis.open.validation.v1.BookService
78
106
  */
79
107
  export const BookService = /*@__PURE__*/
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js,json_types=true"
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
2
2
  // @generated from file alis/open/validation/v1/validation.proto (package alis.open.validation.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
@@ -11,20 +11,30 @@ import type { Message } from "@bufbuild/protobuf";
11
11
  export declare const file_alis_open_validation_v1_validation: GenFile;
12
12
 
13
13
  /**
14
+ * Request message for `RetrieveRules`.
15
+ *
14
16
  * @generated from message alis.open.validation.v1.RetrieveRulesRequest
15
17
  */
16
18
  export declare type RetrieveRulesRequest = Message<"alis.open.validation.v1.RetrieveRulesRequest"> & {
17
19
  /**
20
+ * REQUIRED: The message type to retrieve rules for.
21
+ * E.g. "alis.os.processes.v1.CreateProcess"
22
+ *
18
23
  * @generated from field: string msg_type = 1;
19
24
  */
20
25
  msgType: string;
21
26
  };
22
27
 
23
28
  /**
29
+ * Request message for `RetrieveRules`.
30
+ *
24
31
  * @generated from message alis.open.validation.v1.RetrieveRulesRequest
25
32
  */
26
33
  export declare type RetrieveRulesRequestJson = {
27
34
  /**
35
+ * REQUIRED: The message type to retrieve rules for.
36
+ * E.g. "alis.os.processes.v1.CreateProcess"
37
+ *
28
38
  * @generated from field: string msg_type = 1;
29
39
  */
30
40
  msgType?: string;
@@ -37,20 +47,28 @@ export declare type RetrieveRulesRequestJson = {
37
47
  export declare const RetrieveRulesRequestSchema: GenMessage<RetrieveRulesRequest, {jsonType: RetrieveRulesRequestJson}>;
38
48
 
39
49
  /**
50
+ * Response message for `RetrieveRules`.
51
+ *
40
52
  * @generated from message alis.open.validation.v1.RetrieveRulesResponse
41
53
  */
42
54
  export declare type RetrieveRulesResponse = Message<"alis.open.validation.v1.RetrieveRulesResponse"> & {
43
55
  /**
56
+ * The rules for the message type.
57
+ *
44
58
  * @generated from field: repeated alis.open.validation.v1.Rule rules = 1;
45
59
  */
46
60
  rules: Rule[];
47
61
  };
48
62
 
49
63
  /**
64
+ * Response message for `RetrieveRules`.
65
+ *
50
66
  * @generated from message alis.open.validation.v1.RetrieveRulesResponse
51
67
  */
52
68
  export declare type RetrieveRulesResponseJson = {
53
69
  /**
70
+ * The rules for the message type.
71
+ *
54
72
  * @generated from field: repeated alis.open.validation.v1.Rule rules = 1;
55
73
  */
56
74
  rules?: RuleJson[];
@@ -63,40 +81,60 @@ export declare type RetrieveRulesResponseJson = {
63
81
  export declare const RetrieveRulesResponseSchema: GenMessage<RetrieveRulesResponse, {jsonType: RetrieveRulesResponseJson}>;
64
82
 
65
83
  /**
84
+ * Request message for `ValidateMessage`.
85
+ *
66
86
  * @generated from message alis.open.validation.v1.ValidateMessageRequest
67
87
  */
68
88
  export declare type ValidateMessageRequest = Message<"alis.open.validation.v1.ValidateMessageRequest"> & {
69
89
  /**
90
+ * REQUIRED: The message type to validate.
91
+ * E.g. "alis.os.processes.v1.CreateProcess"
92
+ *
70
93
  * @generated from field: string msg_type = 1;
71
94
  */
72
95
  msgType: string;
73
96
 
74
97
  /**
98
+ * REQUIRED: The msg to validate
99
+ *
75
100
  * @generated from field: bytes msg = 2;
76
101
  */
77
102
  msg: Uint8Array;
78
103
 
79
104
  /**
105
+ * Optional list of fields to validate. If empty, all fields will be validated.
106
+ * If a rule contains more than one field_path, all field_paths must be in this list for the rule to be applied.
107
+ *
80
108
  * @generated from field: repeated string field_paths = 3;
81
109
  */
82
110
  fieldPaths: string[];
83
111
  };
84
112
 
85
113
  /**
114
+ * Request message for `ValidateMessage`.
115
+ *
86
116
  * @generated from message alis.open.validation.v1.ValidateMessageRequest
87
117
  */
88
118
  export declare type ValidateMessageRequestJson = {
89
119
  /**
120
+ * REQUIRED: The message type to validate.
121
+ * E.g. "alis.os.processes.v1.CreateProcess"
122
+ *
90
123
  * @generated from field: string msg_type = 1;
91
124
  */
92
125
  msgType?: string;
93
126
 
94
127
  /**
128
+ * REQUIRED: The msg to validate
129
+ *
95
130
  * @generated from field: bytes msg = 2;
96
131
  */
97
132
  msg?: string;
98
133
 
99
134
  /**
135
+ * Optional list of fields to validate. If empty, all fields will be validated.
136
+ * If a rule contains more than one field_path, all field_paths must be in this list for the rule to be applied.
137
+ *
100
138
  * @generated from field: repeated string field_paths = 3;
101
139
  */
102
140
  fieldPaths?: string[];
@@ -109,30 +147,42 @@ export declare type ValidateMessageRequestJson = {
109
147
  export declare const ValidateMessageRequestSchema: GenMessage<ValidateMessageRequest, {jsonType: ValidateMessageRequestJson}>;
110
148
 
111
149
  /**
150
+ * Response message for `ValidateMessage`.
151
+ *
112
152
  * @generated from message alis.open.validation.v1.ValidateMessageResponse
113
153
  */
114
154
  export declare type ValidateMessageResponse = Message<"alis.open.validation.v1.ValidateMessageResponse"> & {
115
155
  /**
156
+ * The list of rules violated
157
+ *
116
158
  * @generated from field: repeated alis.open.validation.v1.Rule violated_rules = 1;
117
159
  */
118
160
  violatedRules: Rule[];
119
161
 
120
162
  /**
163
+ * The list of fields with violations
164
+ *
121
165
  * @generated from field: repeated alis.open.validation.v1.FieldViolation violated_fields = 2;
122
166
  */
123
167
  violatedFields: FieldViolation[];
124
168
  };
125
169
 
126
170
  /**
171
+ * Response message for `ValidateMessage`.
172
+ *
127
173
  * @generated from message alis.open.validation.v1.ValidateMessageResponse
128
174
  */
129
175
  export declare type ValidateMessageResponseJson = {
130
176
  /**
177
+ * The list of rules violated
178
+ *
131
179
  * @generated from field: repeated alis.open.validation.v1.Rule violated_rules = 1;
132
180
  */
133
181
  violatedRules?: RuleJson[];
134
182
 
135
183
  /**
184
+ * The list of fields with violations
185
+ *
136
186
  * @generated from field: repeated alis.open.validation.v1.FieldViolation violated_fields = 2;
137
187
  */
138
188
  violatedFields?: FieldViolationJson[];
@@ -145,50 +195,90 @@ export declare type ValidateMessageResponseJson = {
145
195
  export declare const ValidateMessageResponseSchema: GenMessage<ValidateMessageResponse, {jsonType: ValidateMessageResponseJson}>;
146
196
 
147
197
  /**
198
+ * A validation rule over one or more fields of a message, possibly composed of
199
+ * nested rules.
200
+ *
148
201
  * @generated from message alis.open.validation.v1.Rule
149
202
  */
150
203
  export declare type Rule = Message<"alis.open.validation.v1.Rule"> & {
151
204
  /**
205
+ * Unique identifier for the rule which reads like code
206
+ * Examples:
207
+ * regex(F(name), S("^[a-z][a-z0-9_]*$"))
208
+ * length(F(name), I(1), I(64))
209
+ * or(regex(name, "^[a-z][a-z0-9_]*$"), regex(name, "^[A-Z][A-Z0-9_]*$"))
210
+ * not(regex(name, "^[a-z][a-z0-9_]*$")).if(e-eq(state,"ACTIVE"))
211
+ * and(regex(name, "^[a-z][a-z0-9_]*$"), length(name, 1, 64))
212
+ * nested(subm,update_mask)
213
+ *
152
214
  * @generated from field: string id = 1;
153
215
  */
154
216
  id: string;
155
217
 
156
218
  /**
219
+ * Clear description of the rule that can be understood by non-technical users.
220
+ *
157
221
  * @generated from field: string description = 2;
158
222
  */
159
223
  description: string;
160
224
 
161
225
  /**
226
+ * The field_paths that are evaluated together to determine if the rule is met.
227
+ * For most cases, this will be a single field_path.
228
+ * An example of a rule with multiple field paths is a rule that requires that the sum of two fields is less than a third field.
229
+ *
162
230
  * @generated from field: repeated string field_paths = 3;
163
231
  */
164
232
  fieldPaths: string[];
165
233
 
166
234
  /**
235
+ * A list of nested rules that this rule consists of.
236
+ *
167
237
  * @generated from field: repeated alis.open.validation.v1.Rule nested_rules = 4;
168
238
  */
169
239
  nestedRules: Rule[];
170
240
  };
171
241
 
172
242
  /**
243
+ * A validation rule over one or more fields of a message, possibly composed of
244
+ * nested rules.
245
+ *
173
246
  * @generated from message alis.open.validation.v1.Rule
174
247
  */
175
248
  export declare type RuleJson = {
176
249
  /**
250
+ * Unique identifier for the rule which reads like code
251
+ * Examples:
252
+ * regex(F(name), S("^[a-z][a-z0-9_]*$"))
253
+ * length(F(name), I(1), I(64))
254
+ * or(regex(name, "^[a-z][a-z0-9_]*$"), regex(name, "^[A-Z][A-Z0-9_]*$"))
255
+ * not(regex(name, "^[a-z][a-z0-9_]*$")).if(e-eq(state,"ACTIVE"))
256
+ * and(regex(name, "^[a-z][a-z0-9_]*$"), length(name, 1, 64))
257
+ * nested(subm,update_mask)
258
+ *
177
259
  * @generated from field: string id = 1;
178
260
  */
179
261
  id?: string;
180
262
 
181
263
  /**
264
+ * Clear description of the rule that can be understood by non-technical users.
265
+ *
182
266
  * @generated from field: string description = 2;
183
267
  */
184
268
  description?: string;
185
269
 
186
270
  /**
271
+ * The field_paths that are evaluated together to determine if the rule is met.
272
+ * For most cases, this will be a single field_path.
273
+ * An example of a rule with multiple field paths is a rule that requires that the sum of two fields is less than a third field.
274
+ *
187
275
  * @generated from field: repeated string field_paths = 3;
188
276
  */
189
277
  fieldPaths?: string[];
190
278
 
191
279
  /**
280
+ * A list of nested rules that this rule consists of.
281
+ *
192
282
  * @generated from field: repeated alis.open.validation.v1.Rule nested_rules = 4;
193
283
  */
194
284
  nestedRules?: RuleJson[];
@@ -201,30 +291,42 @@ export declare type RuleJson = {
201
291
  export declare const RuleSchema: GenMessage<Rule, {jsonType: RuleJson}>;
202
292
 
203
293
  /**
294
+ * The validation rules that a single field violates.
295
+ *
204
296
  * @generated from message alis.open.validation.v1.FieldViolation
205
297
  */
206
298
  export declare type FieldViolation = Message<"alis.open.validation.v1.FieldViolation"> & {
207
299
  /**
300
+ * The field path that has a violation
301
+ *
208
302
  * @generated from field: string field_path = 1;
209
303
  */
210
304
  fieldPath: string;
211
305
 
212
306
  /**
307
+ * The rules that were violated on this field
308
+ *
213
309
  * @generated from field: repeated alis.open.validation.v1.Rule violated_rules = 2;
214
310
  */
215
311
  violatedRules: Rule[];
216
312
  };
217
313
 
218
314
  /**
315
+ * The validation rules that a single field violates.
316
+ *
219
317
  * @generated from message alis.open.validation.v1.FieldViolation
220
318
  */
221
319
  export declare type FieldViolationJson = {
222
320
  /**
321
+ * The field path that has a violation
322
+ *
223
323
  * @generated from field: string field_path = 1;
224
324
  */
225
325
  fieldPath?: string;
226
326
 
227
327
  /**
328
+ * The rules that were violated on this field
329
+ *
228
330
  * @generated from field: repeated alis.open.validation.v1.Rule violated_rules = 2;
229
331
  */
230
332
  violatedRules?: RuleJson[];
@@ -237,10 +339,15 @@ export declare type FieldViolationJson = {
237
339
  export declare const FieldViolationSchema: GenMessage<FieldViolation, {jsonType: FieldViolationJson}>;
238
340
 
239
341
  /**
342
+ * Validates protobuf messages against their validation rules and returns
343
+ * those rules.
344
+ *
240
345
  * @generated from service alis.open.validation.v1.ValidationService
241
346
  */
242
347
  export declare const ValidationService: GenService<{
243
348
  /**
349
+ * Retrieve the validation rules for a given message type.
350
+ *
244
351
  * @generated from rpc alis.open.validation.v1.ValidationService.RetrieveRules
245
352
  */
246
353
  retrieveRules: {
@@ -249,6 +356,9 @@ export declare const ValidationService: GenService<{
249
356
  output: typeof RetrieveRulesResponseSchema;
250
357
  },
251
358
  /**
359
+ * Validates if the given bytes are valid for the given message type.
360
+ * If the bytes cannot be marshalled into the message type, the rpc will return an error instead of the violations.
361
+ *
252
362
  * @generated from rpc alis.open.validation.v1.ValidationService.ValidateMessage
253
363
  */
254
364
  validateMessage: {
@@ -1,4 +1,4 @@
1
- // @generated by protoc-gen-es v2.13.0 with parameter "target=js+dts,import_extension=js,json_types=true"
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js,json_types=true"
2
2
  // @generated from file alis/open/validation/v1/validation.proto (package alis.open.validation.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
 
@@ -53,6 +53,9 @@ export const FieldViolationSchema = /*@__PURE__*/
53
53
  messageDesc(file_alis_open_validation_v1_validation, 5);
54
54
 
55
55
  /**
56
+ * Validates protobuf messages against their validation rules and returns
57
+ * those rules.
58
+ *
56
59
  * @generated from service alis.open.validation.v1.ValidationService
57
60
  */
58
61
  export const ValidationService = /*@__PURE__*/
package/package.json CHANGED
@@ -25,5 +25,5 @@
25
25
  },
26
26
  "type": "module",
27
27
  "types": "./index.d.ts",
28
- "version": "1.13.0"
28
+ "version": "1.14.0"
29
29
  }