@mochabug/adapt-sdk 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api.cjs +1 -1
- package/dist/cjs/api.cjs.map +3 -3
- package/dist/cjs/frontend.cjs +1 -1
- package/dist/cjs/frontend.cjs.map +3 -3
- package/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +2 -2
- package/dist/esm/api.mjs +1 -1
- package/dist/esm/api.mjs.map +3 -3
- package/dist/esm/frontend.mjs +1 -1
- package/dist/esm/frontend.mjs.map +3 -3
- package/dist/esm/router.mjs +1 -1
- package/dist/esm/router.mjs.map +3 -3
- package/dist/frontend.d.ts +18 -14
- package/dist/frontend.d.ts.map +1 -1
- package/dist/genproto/buf/validate/validate_pb.d.ts +334 -5
- package/dist/genproto/buf/validate/validate_pb.d.ts.map +1 -1
- package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts +536 -11
- package/dist/genproto/mochabugapis/adapt/automations/v1/automations_pb.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/frontend.d.ts
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Frontend utilities for Adapt plugins running in browser/iframe contexts
|
|
3
|
+
*
|
|
4
|
+
* Iframe resizing is handled automatically - no initialization required.
|
|
5
|
+
* Just import the functions you need and the resize communication starts automatically.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Get the authentication token from the URL hash.
|
|
9
|
+
* @param isDevelopment If true, returns a dev token for local development
|
|
3
10
|
*/
|
|
4
11
|
export declare function getToken(isDevelopment?: boolean): string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export declare function initIframeCommunication(onDarkModeChange?: (darkMode: boolean) => void): () => void;
|
|
17
|
-
export declare function sendResize(): void;
|
|
18
|
-
export declare function sendToParent(message: AdaptChildMessage): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get the current dark mode state.
|
|
14
|
+
* Returns null if dark mode state hasn't been received from parent yet.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getDarkMode(): boolean | null;
|
|
17
|
+
/**
|
|
18
|
+
* Listen for dark mode changes from the parent window.
|
|
19
|
+
* Returns an unsubscribe function.
|
|
20
|
+
* @param callback Called immediately with current state (if known) and on every change
|
|
21
|
+
*/
|
|
22
|
+
export declare function listenDarkMode(callback: (darkMode: boolean) => void): () => void;
|
|
19
23
|
//# sourceMappingURL=frontend.d.ts.map
|
package/dist/frontend.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,aAAa,UAAQ,GAAG,MAAM,CAgBtD;AASD;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,GAAG,IAAI,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,GACpC,MAAM,IAAI,CAaZ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
-
import type { Duration, DurationJson, FieldDescriptorProto_Type, FieldDescriptorProto_TypeJson, FieldOptions, MessageOptions, OneofOptions, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
2
|
+
import type { Duration, DurationJson, FieldDescriptorProto_Type, FieldDescriptorProto_TypeJson, FieldMask, FieldMaskJson, FieldOptions, MessageOptions, OneofOptions, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
3
3
|
import type { Message } from "@bufbuild/protobuf";
|
|
4
4
|
/**
|
|
5
5
|
* Describes the file buf/validate/validate.proto.
|
|
@@ -111,6 +111,29 @@ export declare const RuleSchema: GenMessage<Rule, {
|
|
|
111
111
|
* @generated from message buf.validate.MessageRules
|
|
112
112
|
*/
|
|
113
113
|
export type MessageRules = Message<"buf.validate.MessageRules"> & {
|
|
114
|
+
/**
|
|
115
|
+
* `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
|
|
116
|
+
* rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
|
|
117
|
+
*
|
|
118
|
+
* This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
|
|
119
|
+
* simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
|
|
120
|
+
* be same as the `expression`.
|
|
121
|
+
*
|
|
122
|
+
* For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
|
|
123
|
+
*
|
|
124
|
+
* ```proto
|
|
125
|
+
* message MyMessage {
|
|
126
|
+
* // The field `foo` must be greater than 42.
|
|
127
|
+
* option (buf.validate.message).cel_expression = "this.foo > 42";
|
|
128
|
+
* // The field `foo` must be less than 84.
|
|
129
|
+
* option (buf.validate.message).cel_expression = "this.foo < 84";
|
|
130
|
+
* optional int32 foo = 1;
|
|
131
|
+
* }
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @generated from field: repeated string cel_expression = 5;
|
|
135
|
+
*/
|
|
136
|
+
celExpression: string[];
|
|
114
137
|
/**
|
|
115
138
|
* `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
|
|
116
139
|
* These rules are written in Common Expression Language (CEL) syntax. For more information,
|
|
@@ -179,6 +202,29 @@ export type MessageRules = Message<"buf.validate.MessageRules"> & {
|
|
|
179
202
|
* @generated from message buf.validate.MessageRules
|
|
180
203
|
*/
|
|
181
204
|
export type MessageRulesJson = {
|
|
205
|
+
/**
|
|
206
|
+
* `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
|
|
207
|
+
* rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
|
|
208
|
+
*
|
|
209
|
+
* This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
|
|
210
|
+
* simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
|
|
211
|
+
* be same as the `expression`.
|
|
212
|
+
*
|
|
213
|
+
* For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
|
|
214
|
+
*
|
|
215
|
+
* ```proto
|
|
216
|
+
* message MyMessage {
|
|
217
|
+
* // The field `foo` must be greater than 42.
|
|
218
|
+
* option (buf.validate.message).cel_expression = "this.foo > 42";
|
|
219
|
+
* // The field `foo` must be less than 84.
|
|
220
|
+
* option (buf.validate.message).cel_expression = "this.foo < 84";
|
|
221
|
+
* optional int32 foo = 1;
|
|
222
|
+
* }
|
|
223
|
+
* ```
|
|
224
|
+
*
|
|
225
|
+
* @generated from field: repeated string cel_expression = 5;
|
|
226
|
+
*/
|
|
227
|
+
celExpression?: string[];
|
|
182
228
|
/**
|
|
183
229
|
* `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
|
|
184
230
|
* These rules are written in Common Expression Language (CEL) syntax. For more information,
|
|
@@ -364,6 +410,26 @@ export declare const OneofRulesSchema: GenMessage<OneofRules, {
|
|
|
364
410
|
* @generated from message buf.validate.FieldRules
|
|
365
411
|
*/
|
|
366
412
|
export type FieldRules = Message<"buf.validate.FieldRules"> & {
|
|
413
|
+
/**
|
|
414
|
+
* `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
|
|
415
|
+
* rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
|
|
416
|
+
*
|
|
417
|
+
* This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
|
|
418
|
+
* simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
|
|
419
|
+
* be same as the `expression`.
|
|
420
|
+
*
|
|
421
|
+
* For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
|
|
422
|
+
*
|
|
423
|
+
* ```proto
|
|
424
|
+
* message MyMessage {
|
|
425
|
+
* // The field `value` must be greater than 42.
|
|
426
|
+
* optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"];
|
|
427
|
+
* }
|
|
428
|
+
* ```
|
|
429
|
+
*
|
|
430
|
+
* @generated from field: repeated string cel_expression = 29;
|
|
431
|
+
*/
|
|
432
|
+
celExpression: string[];
|
|
367
433
|
/**
|
|
368
434
|
* `cel` is a repeated field used to represent a textual expression
|
|
369
435
|
* in the Common Expression Language (CEL) syntax. For more information,
|
|
@@ -590,6 +656,12 @@ export type FieldRules = Message<"buf.validate.FieldRules"> & {
|
|
|
590
656
|
*/
|
|
591
657
|
value: DurationRules;
|
|
592
658
|
case: "duration";
|
|
659
|
+
} | {
|
|
660
|
+
/**
|
|
661
|
+
* @generated from field: buf.validate.FieldMaskRules field_mask = 28;
|
|
662
|
+
*/
|
|
663
|
+
value: FieldMaskRules;
|
|
664
|
+
case: "fieldMask";
|
|
593
665
|
} | {
|
|
594
666
|
/**
|
|
595
667
|
* @generated from field: buf.validate.TimestampRules timestamp = 22;
|
|
@@ -608,6 +680,26 @@ export type FieldRules = Message<"buf.validate.FieldRules"> & {
|
|
|
608
680
|
* @generated from message buf.validate.FieldRules
|
|
609
681
|
*/
|
|
610
682
|
export type FieldRulesJson = {
|
|
683
|
+
/**
|
|
684
|
+
* `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
|
|
685
|
+
* rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
|
|
686
|
+
*
|
|
687
|
+
* This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
|
|
688
|
+
* simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
|
|
689
|
+
* be same as the `expression`.
|
|
690
|
+
*
|
|
691
|
+
* For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
|
|
692
|
+
*
|
|
693
|
+
* ```proto
|
|
694
|
+
* message MyMessage {
|
|
695
|
+
* // The field `value` must be greater than 42.
|
|
696
|
+
* optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"];
|
|
697
|
+
* }
|
|
698
|
+
* ```
|
|
699
|
+
*
|
|
700
|
+
* @generated from field: repeated string cel_expression = 29;
|
|
701
|
+
*/
|
|
702
|
+
celExpression?: string[];
|
|
611
703
|
/**
|
|
612
704
|
* `cel` is a repeated field used to represent a textual expression
|
|
613
705
|
* in the Common Expression Language (CEL) syntax. For more information,
|
|
@@ -791,6 +883,10 @@ export type FieldRulesJson = {
|
|
|
791
883
|
* @generated from field: buf.validate.DurationRules duration = 21;
|
|
792
884
|
*/
|
|
793
885
|
duration?: DurationRulesJson;
|
|
886
|
+
/**
|
|
887
|
+
* @generated from field: buf.validate.FieldMaskRules field_mask = 28;
|
|
888
|
+
*/
|
|
889
|
+
fieldMask?: FieldMaskRulesJson;
|
|
794
890
|
/**
|
|
795
891
|
* @generated from field: buf.validate.TimestampRules timestamp = 22;
|
|
796
892
|
*/
|
|
@@ -5366,6 +5462,23 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
|
|
|
5366
5462
|
*/
|
|
5367
5463
|
value: boolean;
|
|
5368
5464
|
case: "hostAndPort";
|
|
5465
|
+
} | {
|
|
5466
|
+
/**
|
|
5467
|
+
* `ulid` specifies that the field value must be a valid ULID (Universally Unique
|
|
5468
|
+
* Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec).
|
|
5469
|
+
* If the field value isn't a valid ULID, an error message will be generated.
|
|
5470
|
+
*
|
|
5471
|
+
* ```proto
|
|
5472
|
+
* message MyString {
|
|
5473
|
+
* // value must be a valid ULID
|
|
5474
|
+
* string value = 1 [(buf.validate.field).string.ulid = true];
|
|
5475
|
+
* }
|
|
5476
|
+
* ```
|
|
5477
|
+
*
|
|
5478
|
+
* @generated from field: bool ulid = 35;
|
|
5479
|
+
*/
|
|
5480
|
+
value: boolean;
|
|
5481
|
+
case: "ulid";
|
|
5369
5482
|
} | {
|
|
5370
5483
|
/**
|
|
5371
5484
|
* `well_known_regex` specifies a common well-known pattern
|
|
@@ -5965,6 +6078,21 @@ export type StringRulesJson = {
|
|
|
5965
6078
|
* @generated from field: bool host_and_port = 32;
|
|
5966
6079
|
*/
|
|
5967
6080
|
hostAndPort?: boolean;
|
|
6081
|
+
/**
|
|
6082
|
+
* `ulid` specifies that the field value must be a valid ULID (Universally Unique
|
|
6083
|
+
* Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec).
|
|
6084
|
+
* If the field value isn't a valid ULID, an error message will be generated.
|
|
6085
|
+
*
|
|
6086
|
+
* ```proto
|
|
6087
|
+
* message MyString {
|
|
6088
|
+
* // value must be a valid ULID
|
|
6089
|
+
* string value = 1 [(buf.validate.field).string.ulid = true];
|
|
6090
|
+
* }
|
|
6091
|
+
* ```
|
|
6092
|
+
*
|
|
6093
|
+
* @generated from field: bool ulid = 35;
|
|
6094
|
+
*/
|
|
6095
|
+
ulid?: boolean;
|
|
5968
6096
|
/**
|
|
5969
6097
|
* `well_known_regex` specifies a common well-known pattern
|
|
5970
6098
|
* defined as a regex. If the field value doesn't match the well-known
|
|
@@ -6149,7 +6277,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
|
|
|
6149
6277
|
* the string.
|
|
6150
6278
|
* If the field value doesn't meet the requirement, an error message is generated.
|
|
6151
6279
|
*
|
|
6152
|
-
* ```
|
|
6280
|
+
* ```proto
|
|
6153
6281
|
* message MyBytes {
|
|
6154
6282
|
* // value does not contain \x02\x03
|
|
6155
6283
|
* optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
|
|
@@ -6164,7 +6292,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
|
|
|
6164
6292
|
* values. If the field value doesn't match any of the specified values, an
|
|
6165
6293
|
* error message is generated.
|
|
6166
6294
|
*
|
|
6167
|
-
* ```
|
|
6295
|
+
* ```proto
|
|
6168
6296
|
* message MyBytes {
|
|
6169
6297
|
* // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
|
|
6170
6298
|
* optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
|
|
@@ -6243,6 +6371,25 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
|
|
|
6243
6371
|
*/
|
|
6244
6372
|
value: boolean;
|
|
6245
6373
|
case: "ipv6";
|
|
6374
|
+
} | {
|
|
6375
|
+
/**
|
|
6376
|
+
* `uuid` ensures that the field `value` encodes the 128-bit UUID data as
|
|
6377
|
+
* defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2).
|
|
6378
|
+
* The field must contain exactly 16 bytes
|
|
6379
|
+
* representing the UUID. If the field value isn't a valid UUID, an error
|
|
6380
|
+
* message will be generated.
|
|
6381
|
+
*
|
|
6382
|
+
* ```proto
|
|
6383
|
+
* message MyBytes {
|
|
6384
|
+
* // value must be a valid UUID
|
|
6385
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.uuid = true];
|
|
6386
|
+
* }
|
|
6387
|
+
* ```
|
|
6388
|
+
*
|
|
6389
|
+
* @generated from field: bool uuid = 15;
|
|
6390
|
+
*/
|
|
6391
|
+
value: boolean;
|
|
6392
|
+
case: "uuid";
|
|
6246
6393
|
} | {
|
|
6247
6394
|
case: undefined;
|
|
6248
6395
|
value?: undefined;
|
|
@@ -6382,7 +6529,7 @@ export type BytesRulesJson = {
|
|
|
6382
6529
|
* the string.
|
|
6383
6530
|
* If the field value doesn't meet the requirement, an error message is generated.
|
|
6384
6531
|
*
|
|
6385
|
-
* ```
|
|
6532
|
+
* ```proto
|
|
6386
6533
|
* message MyBytes {
|
|
6387
6534
|
* // value does not contain \x02\x03
|
|
6388
6535
|
* optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
|
|
@@ -6397,7 +6544,7 @@ export type BytesRulesJson = {
|
|
|
6397
6544
|
* values. If the field value doesn't match any of the specified values, an
|
|
6398
6545
|
* error message is generated.
|
|
6399
6546
|
*
|
|
6400
|
-
* ```
|
|
6547
|
+
* ```proto
|
|
6401
6548
|
* message MyBytes {
|
|
6402
6549
|
* // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
|
|
6403
6550
|
* optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
|
|
@@ -6464,6 +6611,23 @@ export type BytesRulesJson = {
|
|
|
6464
6611
|
* @generated from field: bool ipv6 = 12;
|
|
6465
6612
|
*/
|
|
6466
6613
|
ipv6?: boolean;
|
|
6614
|
+
/**
|
|
6615
|
+
* `uuid` ensures that the field `value` encodes the 128-bit UUID data as
|
|
6616
|
+
* defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2).
|
|
6617
|
+
* The field must contain exactly 16 bytes
|
|
6618
|
+
* representing the UUID. If the field value isn't a valid UUID, an error
|
|
6619
|
+
* message will be generated.
|
|
6620
|
+
*
|
|
6621
|
+
* ```proto
|
|
6622
|
+
* message MyBytes {
|
|
6623
|
+
* // value must be a valid UUID
|
|
6624
|
+
* optional bytes value = 1 [(buf.validate.field).bytes.uuid = true];
|
|
6625
|
+
* }
|
|
6626
|
+
* ```
|
|
6627
|
+
*
|
|
6628
|
+
* @generated from field: bool uuid = 15;
|
|
6629
|
+
*/
|
|
6630
|
+
uuid?: boolean;
|
|
6467
6631
|
/**
|
|
6468
6632
|
* `example` specifies values that the field may have. These values SHOULD
|
|
6469
6633
|
* conform to other rules. `example` values will not impact validation
|
|
@@ -7442,6 +7606,171 @@ export type DurationRulesJson = {
|
|
|
7442
7606
|
export declare const DurationRulesSchema: GenMessage<DurationRules, {
|
|
7443
7607
|
jsonType: DurationRulesJson;
|
|
7444
7608
|
}>;
|
|
7609
|
+
/**
|
|
7610
|
+
* FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type.
|
|
7611
|
+
*
|
|
7612
|
+
* @generated from message buf.validate.FieldMaskRules
|
|
7613
|
+
*/
|
|
7614
|
+
export type FieldMaskRules = Message<"buf.validate.FieldMaskRules"> & {
|
|
7615
|
+
/**
|
|
7616
|
+
* `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly.
|
|
7617
|
+
* If the field's value deviates from the specified value, an error message
|
|
7618
|
+
* will be generated.
|
|
7619
|
+
*
|
|
7620
|
+
* ```proto
|
|
7621
|
+
* message MyFieldMask {
|
|
7622
|
+
* // value must equal ["a"]
|
|
7623
|
+
* google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = {
|
|
7624
|
+
* paths: ["a"]
|
|
7625
|
+
* }];
|
|
7626
|
+
* }
|
|
7627
|
+
* ```
|
|
7628
|
+
*
|
|
7629
|
+
* @generated from field: optional google.protobuf.FieldMask const = 1;
|
|
7630
|
+
*/
|
|
7631
|
+
const?: FieldMask;
|
|
7632
|
+
/**
|
|
7633
|
+
* `in` requires the field value to only contain paths matching specified
|
|
7634
|
+
* values or their subpaths.
|
|
7635
|
+
* If any of the field value's paths doesn't match the rule,
|
|
7636
|
+
* an error message is generated.
|
|
7637
|
+
* See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
|
|
7638
|
+
*
|
|
7639
|
+
* ```proto
|
|
7640
|
+
* message MyFieldMask {
|
|
7641
|
+
* // The `value` FieldMask must only contain paths listed in `in`.
|
|
7642
|
+
* google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
|
|
7643
|
+
* in: ["a", "b", "c.a"]
|
|
7644
|
+
* }];
|
|
7645
|
+
* }
|
|
7646
|
+
* ```
|
|
7647
|
+
*
|
|
7648
|
+
* @generated from field: repeated string in = 2;
|
|
7649
|
+
*/
|
|
7650
|
+
in: string[];
|
|
7651
|
+
/**
|
|
7652
|
+
* `not_in` requires the field value to not contain paths matching specified
|
|
7653
|
+
* values or their subpaths.
|
|
7654
|
+
* If any of the field value's paths matches the rule,
|
|
7655
|
+
* an error message is generated.
|
|
7656
|
+
* See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
|
|
7657
|
+
*
|
|
7658
|
+
* ```proto
|
|
7659
|
+
* message MyFieldMask {
|
|
7660
|
+
* // The `value` FieldMask shall not contain paths listed in `not_in`.
|
|
7661
|
+
* google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
|
|
7662
|
+
* not_in: ["forbidden", "immutable", "c.a"]
|
|
7663
|
+
* }];
|
|
7664
|
+
* }
|
|
7665
|
+
* ```
|
|
7666
|
+
*
|
|
7667
|
+
* @generated from field: repeated string not_in = 3;
|
|
7668
|
+
*/
|
|
7669
|
+
notIn: string[];
|
|
7670
|
+
/**
|
|
7671
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
7672
|
+
* conform to other rules. `example` values will not impact validation
|
|
7673
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
7674
|
+
*
|
|
7675
|
+
* ```proto
|
|
7676
|
+
* message MyFieldMask {
|
|
7677
|
+
* google.protobuf.FieldMask value = 1 [
|
|
7678
|
+
* (buf.validate.field).field_mask.example = { paths: ["a", "b"] },
|
|
7679
|
+
* (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] },
|
|
7680
|
+
* ];
|
|
7681
|
+
* }
|
|
7682
|
+
* ```
|
|
7683
|
+
*
|
|
7684
|
+
* @generated from field: repeated google.protobuf.FieldMask example = 4;
|
|
7685
|
+
*/
|
|
7686
|
+
example: FieldMask[];
|
|
7687
|
+
};
|
|
7688
|
+
/**
|
|
7689
|
+
* FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type.
|
|
7690
|
+
*
|
|
7691
|
+
* @generated from message buf.validate.FieldMaskRules
|
|
7692
|
+
*/
|
|
7693
|
+
export type FieldMaskRulesJson = {
|
|
7694
|
+
/**
|
|
7695
|
+
* `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly.
|
|
7696
|
+
* If the field's value deviates from the specified value, an error message
|
|
7697
|
+
* will be generated.
|
|
7698
|
+
*
|
|
7699
|
+
* ```proto
|
|
7700
|
+
* message MyFieldMask {
|
|
7701
|
+
* // value must equal ["a"]
|
|
7702
|
+
* google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = {
|
|
7703
|
+
* paths: ["a"]
|
|
7704
|
+
* }];
|
|
7705
|
+
* }
|
|
7706
|
+
* ```
|
|
7707
|
+
*
|
|
7708
|
+
* @generated from field: optional google.protobuf.FieldMask const = 1;
|
|
7709
|
+
*/
|
|
7710
|
+
const?: FieldMaskJson;
|
|
7711
|
+
/**
|
|
7712
|
+
* `in` requires the field value to only contain paths matching specified
|
|
7713
|
+
* values or their subpaths.
|
|
7714
|
+
* If any of the field value's paths doesn't match the rule,
|
|
7715
|
+
* an error message is generated.
|
|
7716
|
+
* See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
|
|
7717
|
+
*
|
|
7718
|
+
* ```proto
|
|
7719
|
+
* message MyFieldMask {
|
|
7720
|
+
* // The `value` FieldMask must only contain paths listed in `in`.
|
|
7721
|
+
* google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
|
|
7722
|
+
* in: ["a", "b", "c.a"]
|
|
7723
|
+
* }];
|
|
7724
|
+
* }
|
|
7725
|
+
* ```
|
|
7726
|
+
*
|
|
7727
|
+
* @generated from field: repeated string in = 2;
|
|
7728
|
+
*/
|
|
7729
|
+
in?: string[];
|
|
7730
|
+
/**
|
|
7731
|
+
* `not_in` requires the field value to not contain paths matching specified
|
|
7732
|
+
* values or their subpaths.
|
|
7733
|
+
* If any of the field value's paths matches the rule,
|
|
7734
|
+
* an error message is generated.
|
|
7735
|
+
* See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
|
|
7736
|
+
*
|
|
7737
|
+
* ```proto
|
|
7738
|
+
* message MyFieldMask {
|
|
7739
|
+
* // The `value` FieldMask shall not contain paths listed in `not_in`.
|
|
7740
|
+
* google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
|
|
7741
|
+
* not_in: ["forbidden", "immutable", "c.a"]
|
|
7742
|
+
* }];
|
|
7743
|
+
* }
|
|
7744
|
+
* ```
|
|
7745
|
+
*
|
|
7746
|
+
* @generated from field: repeated string not_in = 3;
|
|
7747
|
+
*/
|
|
7748
|
+
notIn?: string[];
|
|
7749
|
+
/**
|
|
7750
|
+
* `example` specifies values that the field may have. These values SHOULD
|
|
7751
|
+
* conform to other rules. `example` values will not impact validation
|
|
7752
|
+
* but may be used as helpful guidance on how to populate the given field.
|
|
7753
|
+
*
|
|
7754
|
+
* ```proto
|
|
7755
|
+
* message MyFieldMask {
|
|
7756
|
+
* google.protobuf.FieldMask value = 1 [
|
|
7757
|
+
* (buf.validate.field).field_mask.example = { paths: ["a", "b"] },
|
|
7758
|
+
* (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] },
|
|
7759
|
+
* ];
|
|
7760
|
+
* }
|
|
7761
|
+
* ```
|
|
7762
|
+
*
|
|
7763
|
+
* @generated from field: repeated google.protobuf.FieldMask example = 4;
|
|
7764
|
+
*/
|
|
7765
|
+
example?: FieldMaskJson[];
|
|
7766
|
+
};
|
|
7767
|
+
/**
|
|
7768
|
+
* Describes the message buf.validate.FieldMaskRules.
|
|
7769
|
+
* Use `create(FieldMaskRulesSchema)` to create a new message.
|
|
7770
|
+
*/
|
|
7771
|
+
export declare const FieldMaskRulesSchema: GenMessage<FieldMaskRules, {
|
|
7772
|
+
jsonType: FieldMaskRulesJson;
|
|
7773
|
+
}>;
|
|
7445
7774
|
/**
|
|
7446
7775
|
* TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
|
|
7447
7776
|
*
|