@nebius/js-sdk 0.1.35 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/cjs/api/buf/validate/index.d.ts +482 -326
  2. package/dist/cjs/api/buf/validate/index.d.ts.map +1 -1
  3. package/dist/cjs/api/buf/validate/index.js +647 -386
  4. package/dist/cjs/api/buf/validate/index.js.map +1 -1
  5. package/dist/cjs/api/nebius/ai/v1/index.d.ts +0 -30
  6. package/dist/cjs/api/nebius/ai/v1/index.d.ts.map +1 -1
  7. package/dist/cjs/api/nebius/ai/v1/index.js +1 -150
  8. package/dist/cjs/api/nebius/ai/v1/index.js.map +1 -1
  9. package/dist/cjs/api/nebius/audit/v2/index.d.ts +5 -0
  10. package/dist/cjs/api/nebius/audit/v2/index.d.ts.map +1 -1
  11. package/dist/cjs/api/nebius/audit/v2/index.js +23 -0
  12. package/dist/cjs/api/nebius/audit/v2/index.js.map +1 -1
  13. package/dist/cjs/api/nebius/logging/v1/agentmanager/index.d.ts +7 -0
  14. package/dist/cjs/api/nebius/logging/v1/agentmanager/index.d.ts.map +1 -1
  15. package/dist/cjs/api/nebius/logging/v1/agentmanager/index.js +61 -0
  16. package/dist/cjs/api/nebius/logging/v1/agentmanager/index.js.map +1 -1
  17. package/dist/cjs/version.d.ts +1 -1
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/esm/api/buf/validate/index.d.ts +482 -326
  20. package/dist/esm/api/buf/validate/index.d.ts.map +1 -1
  21. package/dist/esm/api/nebius/ai/v1/index.d.ts +0 -30
  22. package/dist/esm/api/nebius/ai/v1/index.d.ts.map +1 -1
  23. package/dist/esm/api/nebius/audit/v2/index.d.ts +5 -0
  24. package/dist/esm/api/nebius/audit/v2/index.d.ts.map +1 -1
  25. package/dist/esm/api/nebius/logging/v1/agentmanager/index.d.ts +7 -0
  26. package/dist/esm/api/nebius/logging/v1/agentmanager/index.d.ts.map +1 -1
  27. package/dist/esm/version.d.ts +1 -1
  28. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /* Generated by Nebius TS generator. DO NOT EDIT! */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.FieldPathElement = exports.FieldPath = exports.Violation = exports.Violations = exports.TimestampRules = exports.DurationRules = exports.AnyRules = exports.MapRules = exports.RepeatedRules = exports.EnumRules = exports.BytesRules = exports.StringRules = exports.BoolRules = exports.SFixed64Rules = exports.SFixed32Rules = exports.Fixed64Rules = exports.Fixed32Rules = exports.SInt64Rules = exports.SInt32Rules = exports.UInt64Rules = exports.UInt32Rules = exports.Int64Rules = exports.Int32Rules = exports.DoubleRules = exports.FloatRules = exports.PredefinedConstraints = exports.FieldConstraints = exports.OneofConstraints = exports.MessageConstraints = exports.Constraint = exports.KnownRegex = exports.Ignore = void 0;
4
+ exports.FieldPathElement = exports.FieldPath = exports.Violation = exports.Violations = exports.TimestampRules = exports.FieldMaskRules = exports.DurationRules = exports.AnyRules = exports.MapRules = exports.RepeatedRules = exports.EnumRules = exports.BytesRules = exports.StringRules = exports.BoolRules = exports.SFixed64Rules = exports.SFixed32Rules = exports.Fixed64Rules = exports.Fixed32Rules = exports.SInt64Rules = exports.SInt32Rules = exports.UInt64Rules = exports.UInt32Rules = exports.Int64Rules = exports.Int32Rules = exports.DoubleRules = exports.FloatRules = exports.PredefinedRules = exports.FieldRules = exports.OneofRules = exports.MessageOneofRule = exports.MessageRules = exports.Rule = exports.KnownRegex = exports.Ignore = void 0;
5
5
  const index_1 = require("../../../runtime/protos/index");
6
6
  const util_1 = require("util");
7
7
  const protobuf_1 = require("../../protobuf");
@@ -9,199 +9,124 @@ const logging_1 = require("../../../runtime/util/logging");
9
9
  const protobuf_2 = require("../../google/protobuf");
10
10
  const __deprecatedWarned = new Set();
11
11
  const Ignore_VALUE_COMMENTS = {
12
- IGNORE_UNSPECIFIED: " Validation is only skipped if it's an unpopulated nullable fields.\n\n ```proto\n syntax=\"proto3\";\n\n message Request {\n // The uri rule applies to any value, including the empty string.\n string foo = 1 [\n (buf.validate.field).string.uri = true\n ];\n\n // The uri rule only applies if the field is set, including if it's\n // set to the empty string.\n optional string bar = 2 [\n (buf.validate.field).string.uri = true\n ];\n\n // The min_items rule always applies, even if the list is empty.\n repeated string baz = 3 [\n (buf.validate.field).repeated.min_items = 3\n ];\n\n // The custom CEL rule applies only if the field is set, including if\n // it's the \"zero\" value of that message.\n SomeMessage quux = 4 [\n (buf.validate.field).cel = {/* ... * /}\n ];\n }\n ```\n",
13
- IGNORE_IF_UNPOPULATED: " Validation is skipped if the field is unpopulated. This rule is redundant\n if the field is already nullable. This value is equivalent behavior to the\n deprecated ignore_empty rule.\n\n ```proto\n syntax=\"proto3\n\n message Request {\n // The uri rule applies only if the value is not the empty string.\n string foo = 1 [\n (buf.validate.field).string.uri = true,\n (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED\n ];\n\n // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this\n // case: the uri rule only applies if the field is set, including if\n // it's set to the empty string.\n optional string bar = 2 [\n (buf.validate.field).string.uri = true,\n (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED\n ];\n\n // The min_items rule only applies if the list has at least one item.\n repeated string baz = 3 [\n (buf.validate.field).repeated.min_items = 3,\n (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED\n ];\n\n // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this\n // case: the custom CEL rule applies only if the field is set, including\n // if it's the \"zero\" value of that message.\n SomeMessage quux = 4 [\n (buf.validate.field).cel = {/* ... * /},\n (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED\n ];\n }\n ```\n",
14
- IGNORE_IF_DEFAULT_VALUE: " Validation is skipped if the field is unpopulated or if it is a nullable\n field populated with its default value. This is typically the zero or\n empty value, but proto2 scalars support custom defaults. For messages, the\n default is a non-null message with all its fields unpopulated.\n\n ```proto\n syntax=\"proto3\n\n message Request {\n // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in\n // this case; the uri rule applies only if the value is not the empty\n // string.\n string foo = 1 [\n (buf.validate.field).string.uri = true,\n (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE\n ];\n\n // The uri rule only applies if the field is set to a value other than\n // the empty string.\n optional string bar = 2 [\n (buf.validate.field).string.uri = true,\n (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE\n ];\n\n // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in\n // this case; the min_items rule only applies if the list has at least\n // one item.\n repeated string baz = 3 [\n (buf.validate.field).repeated.min_items = 3,\n (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE\n ];\n\n // The custom CEL rule only applies if the field is set to a value other\n // than an empty message (i.e., fields are unpopulated).\n SomeMessage quux = 4 [\n (buf.validate.field).cel = {/* ... * /},\n (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE\n ];\n }\n ```\n\n This rule is affected by proto2 custom default values:\n\n ```proto\n syntax=\"proto2\";\n\n message Request {\n // The gt rule only applies if the field is set and it's value is not\n the default (i.e., not -42). The rule even applies if the field is set\n to zero since the default value differs.\n optional int32 value = 1 [\n default = -42,\n (buf.validate.field).int32.gt = 0,\n (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE\n ];\n }\n",
15
- IGNORE_ALWAYS: " The validation rules of this field will be skipped and not evaluated. This\n is useful for situations that necessitate turning off the rules of a field\n containing a message that may not make sense in the current context, or to\n temporarily disable constraints during development.\n\n ```proto\n message MyMessage {\n // The field's rules will always be ignored, including any validation's\n // on value's fields.\n MyOtherMessage value = 1 [\n (buf.validate.field).ignore = IGNORE_ALWAYS];\n }\n ```\n",
16
- IGNORE_EMPTY: " Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1.\n",
17
- IGNORE_DEFAULT: " Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1.\n",
12
+ IGNORE_UNSPECIFIED: " Ignore rules if the field tracks presence and is unset. This is the default\n behavior.\n\n In proto3, only message fields, members of a Protobuf `oneof`, and fields\n with the `optional` label track presence. Consequently, the following fields\n are always validated, whether a value is set or not:\n\n ```proto\n syntax=\"proto3\";\n\n message RulesApply {\n string email = 1 [\n (buf.validate.field).string.email = true\n ];\n int32 age = 2 [\n (buf.validate.field).int32.gt = 0\n ];\n repeated string labels = 3 [\n (buf.validate.field).repeated.min_items = 1\n ];\n }\n ```\n\n In contrast, the following fields track presence, and are only validated if\n a value is set:\n\n ```proto\n syntax=\"proto3\";\n\n message RulesApplyIfSet {\n optional string email = 1 [\n (buf.validate.field).string.email = true\n ];\n oneof ref {\n string reference = 2 [\n (buf.validate.field).string.uuid = true\n ];\n string name = 3 [\n (buf.validate.field).string.min_len = 4\n ];\n }\n SomeMessage msg = 4 [\n (buf.validate.field).cel = {/* ... * /}\n ];\n }\n ```\n\n To ensure that such a field is set, add the `required` rule.\n\n To learn which fields track presence, see the\n [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat).\n",
13
+ IGNORE_IF_ZERO_VALUE: " Ignore rules if the field is unset, or set to the zero value.\n\n The zero value depends on the field type:\n - For strings, the zero value is the empty string.\n - For bytes, the zero value is empty bytes.\n - For bool, the zero value is false.\n - For numeric types, the zero value is zero.\n - For enums, the zero value is the first defined enum value.\n - For repeated fields, the zero is an empty list.\n - For map fields, the zero is an empty map.\n - For message fields, absence of the message (typically a null-value) is considered zero value.\n\n For fields that track presence (e.g. adding the `optional` label in proto3),\n this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`.\n",
14
+ IGNORE_ALWAYS: " Always ignore rules, including the `required` rule.\n\n This is useful for ignoring the rules of a referenced message, or to\n temporarily ignore rules during development.\n\n ```proto\n message MyMessage {\n // The field's rules will always be ignored, including any validations\n // on value's fields.\n MyOtherMessage value = 1 [\n (buf.validate.field).ignore = IGNORE_ALWAYS\n ];\n }\n ```\n",
18
15
  };
19
16
  exports.Ignore = (0, index_1.createEnum)("buf.validate.Ignore", {
20
17
  /**
21
- * Validation is only skipped if it's an unpopulated nullable fields.
18
+ * Ignore rules if the field tracks presence and is unset. This is the default
19
+ * behavior.
20
+ *
21
+ * In proto3, only message fields, members of a Protobuf `oneof`, and fields
22
+ * with the `optional` label track presence. Consequently, the following fields
23
+ * are always validated, whether a value is set or not:
22
24
  *
23
25
  * ```proto
24
26
  * syntax="proto3";
25
27
  *
26
- * message Request {
27
- * // The uri rule applies to any value, including the empty string.
28
- * string foo = 1 [
29
- * (buf.validate.field).string.uri = true
28
+ * message RulesApply {
29
+ * string email = 1 [
30
+ * (buf.validate.field).string.email = true
30
31
  * ];
31
- *
32
- * // The uri rule only applies if the field is set, including if it's
33
- * // set to the empty string.
34
- * optional string bar = 2 [
35
- * (buf.validate.field).string.uri = true
32
+ * int32 age = 2 [
33
+ * (buf.validate.field).int32.gt = 0
36
34
  * ];
37
- *
38
- * // The min_items rule always applies, even if the list is empty.
39
- * repeated string baz = 3 [
40
- * (buf.validate.field).repeated.min_items = 3
41
- * ];
42
- *
43
- * // The custom CEL rule applies only if the field is set, including if
44
- * // it's the "zero" value of that message.
45
- * SomeMessage quux = 4 [
46
- * (buf.validate.field).cel = {/* ... * /}
35
+ * repeated string labels = 3 [
36
+ * (buf.validate.field).repeated.min_items = 1
47
37
  * ];
48
38
  * }
49
39
  * ```
50
40
  *
51
- */
52
- IGNORE_UNSPECIFIED: 0,
53
- /**
54
- * Validation is skipped if the field is unpopulated. This rule is redundant
55
- * if the field is already nullable. This value is equivalent behavior to the
56
- * deprecated ignore_empty rule.
41
+ * In contrast, the following fields track presence, and are only validated if
42
+ * a value is set:
57
43
  *
58
44
  * ```proto
59
- * syntax="proto3
60
- *
61
- * message Request {
62
- * // The uri rule applies only if the value is not the empty string.
63
- * string foo = 1 [
64
- * (buf.validate.field).string.uri = true,
65
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
66
- * ];
67
- *
68
- * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
69
- * // case: the uri rule only applies if the field is set, including if
70
- * // it's set to the empty string.
71
- * optional string bar = 2 [
72
- * (buf.validate.field).string.uri = true,
73
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
74
- * ];
45
+ * syntax="proto3";
75
46
  *
76
- * // The min_items rule only applies if the list has at least one item.
77
- * repeated string baz = 3 [
78
- * (buf.validate.field).repeated.min_items = 3,
79
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
47
+ * message RulesApplyIfSet {
48
+ * optional string email = 1 [
49
+ * (buf.validate.field).string.email = true
80
50
  * ];
81
- *
82
- * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
83
- * // case: the custom CEL rule applies only if the field is set, including
84
- * // if it's the "zero" value of that message.
85
- * SomeMessage quux = 4 [
86
- * (buf.validate.field).cel = {/* ... * /},
87
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
51
+ * oneof ref {
52
+ * string reference = 2 [
53
+ * (buf.validate.field).string.uuid = true
54
+ * ];
55
+ * string name = 3 [
56
+ * (buf.validate.field).string.min_len = 4
57
+ * ];
58
+ * }
59
+ * SomeMessage msg = 4 [
60
+ * (buf.validate.field).cel = {/* ... * /}
88
61
  * ];
89
62
  * }
90
63
  * ```
91
64
  *
92
- */
93
- IGNORE_IF_UNPOPULATED: 1,
94
- /**
95
- * Validation is skipped if the field is unpopulated or if it is a nullable
96
- * field populated with its default value. This is typically the zero or
97
- * empty value, but proto2 scalars support custom defaults. For messages, the
98
- * default is a non-null message with all its fields unpopulated.
99
- *
100
- * ```proto
101
- * syntax="proto3
102
- *
103
- * message Request {
104
- * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
105
- * // this case; the uri rule applies only if the value is not the empty
106
- * // string.
107
- * string foo = 1 [
108
- * (buf.validate.field).string.uri = true,
109
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
110
- * ];
65
+ * To ensure that such a field is set, add the `required` rule.
111
66
  *
112
- * // The uri rule only applies if the field is set to a value other than
113
- * // the empty string.
114
- * optional string bar = 2 [
115
- * (buf.validate.field).string.uri = true,
116
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
117
- * ];
118
- *
119
- * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
120
- * // this case; the min_items rule only applies if the list has at least
121
- * // one item.
122
- * repeated string baz = 3 [
123
- * (buf.validate.field).repeated.min_items = 3,
124
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
125
- * ];
67
+ * To learn which fields track presence, see the
68
+ * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat).
126
69
  *
127
- * // The custom CEL rule only applies if the field is set to a value other
128
- * // than an empty message (i.e., fields are unpopulated).
129
- * SomeMessage quux = 4 [
130
- * (buf.validate.field).cel = {/* ... * /},
131
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
132
- * ];
133
- * }
134
- * ```
135
- *
136
- * This rule is affected by proto2 custom default values:
70
+ */
71
+ IGNORE_UNSPECIFIED: 0,
72
+ /**
73
+ * Ignore rules if the field is unset, or set to the zero value.
137
74
  *
138
- * ```proto
139
- * syntax="proto2";
75
+ * The zero value depends on the field type:
76
+ * - For strings, the zero value is the empty string.
77
+ * - For bytes, the zero value is empty bytes.
78
+ * - For bool, the zero value is false.
79
+ * - For numeric types, the zero value is zero.
80
+ * - For enums, the zero value is the first defined enum value.
81
+ * - For repeated fields, the zero is an empty list.
82
+ * - For map fields, the zero is an empty map.
83
+ * - For message fields, absence of the message (typically a null-value) is considered zero value.
140
84
  *
141
- * message Request {
142
- * // The gt rule only applies if the field is set and it's value is not
143
- * the default (i.e., not -42). The rule even applies if the field is set
144
- * to zero since the default value differs.
145
- * optional int32 value = 1 [
146
- * default = -42,
147
- * (buf.validate.field).int32.gt = 0,
148
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
149
- * ];
150
- * }
85
+ * For fields that track presence (e.g. adding the `optional` label in proto3),
86
+ * this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`.
151
87
  *
152
88
  */
153
- IGNORE_IF_DEFAULT_VALUE: 2,
89
+ IGNORE_IF_ZERO_VALUE: 1,
154
90
  /**
155
- * The validation rules of this field will be skipped and not evaluated. This
156
- * is useful for situations that necessitate turning off the rules of a field
157
- * containing a message that may not make sense in the current context, or to
158
- * temporarily disable constraints during development.
91
+ * Always ignore rules, including the `required` rule.
92
+ *
93
+ * This is useful for ignoring the rules of a referenced message, or to
94
+ * temporarily ignore rules during development.
159
95
  *
160
96
  * ```proto
161
97
  * message MyMessage {
162
- * // The field's rules will always be ignored, including any validation's
98
+ * // The field's rules will always be ignored, including any validations
163
99
  * // on value's fields.
164
100
  * MyOtherMessage value = 1 [
165
- * (buf.validate.field).ignore = IGNORE_ALWAYS];
101
+ * (buf.validate.field).ignore = IGNORE_ALWAYS
102
+ * ];
166
103
  * }
167
104
  * ```
168
105
  *
169
106
  */
170
107
  IGNORE_ALWAYS: 3,
171
- /**
172
- * Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1.
173
- *
174
- * @deprecated Deprecated.
175
- */
176
- IGNORE_EMPTY: 1,
177
- /**
178
- * Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1.
179
- *
180
- * @deprecated Deprecated.
181
- */
182
- IGNORE_DEFAULT: 2,
183
108
  }, Ignore_VALUE_COMMENTS);
184
109
  protobuf_1.protoRegistry.registerEnum(exports.Ignore);
185
110
  const KnownRegex_VALUE_COMMENTS = {
186
- KNOWN_REGEX_HTTP_HEADER_NAME: " HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).\n",
187
- KNOWN_REGEX_HTTP_HEADER_VALUE: " HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).\n",
111
+ KNOWN_REGEX_HTTP_HEADER_NAME: " HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2).\n",
112
+ KNOWN_REGEX_HTTP_HEADER_VALUE: " HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4).\n",
188
113
  };
189
114
  exports.KnownRegex = (0, index_1.createEnum)("buf.validate.KnownRegex", {
190
115
  KNOWN_REGEX_UNSPECIFIED: 0,
191
116
  /**
192
- * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).
117
+ * HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2).
193
118
  *
194
119
  */
195
120
  KNOWN_REGEX_HTTP_HEADER_NAME: 1,
196
121
  /**
197
- * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).
122
+ * HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4).
198
123
  *
199
124
  */
200
125
  KNOWN_REGEX_HTTP_HEADER_VALUE: 2,
201
126
  }, KnownRegex_VALUE_COMMENTS);
202
127
  protobuf_1.protoRegistry.registerEnum(exports.KnownRegex);
203
- exports.Constraint = {
204
- $type: "buf.validate.Constraint",
128
+ exports.Rule = {
129
+ $type: "buf.validate.Rule",
205
130
  encode(message, writer = new index_1.BinaryWriter()) {
206
131
  if (message.id !== undefined) {
207
132
  writer.uint32(10).string(message.id);
@@ -220,7 +145,7 @@ exports.Constraint = {
220
145
  decode(input, length) {
221
146
  const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
222
147
  const end = length === undefined ? reader.len : reader.pos + length;
223
- const message = createBaseConstraint();
148
+ const message = createBaseRule();
224
149
  let writer = undefined;
225
150
  while (reader.pos < end) {
226
151
  const tag = reader.uint32();
@@ -262,8 +187,8 @@ exports.Constraint = {
262
187
  return message;
263
188
  },
264
189
  fromJSON(object) {
265
- return applyConstraintCustom({
266
- $type: "buf.validate.Constraint",
190
+ return applyRuleCustom({
191
+ $type: "buf.validate.Rule",
267
192
  id: (0, index_1.isSet)(object.id ?? object.id)
268
193
  ? String(object.id ?? object.id)
269
194
  : undefined,
@@ -290,10 +215,10 @@ exports.Constraint = {
290
215
  return obj;
291
216
  },
292
217
  create(base) {
293
- return exports.Constraint.fromPartial(base ?? {});
218
+ return exports.Rule.fromPartial(base ?? {});
294
219
  },
295
220
  fromPartial(object) {
296
- const message = createBaseConstraint();
221
+ const message = createBaseRule();
297
222
  message.id = (object.id !== undefined && object.id !== null)
298
223
  ? object.id
299
224
  : undefined;
@@ -306,8 +231,8 @@ exports.Constraint = {
306
231
  return message;
307
232
  },
308
233
  };
309
- protobuf_1.protoRegistry.registerMessage(exports.Constraint);
310
- function ConstraintCustomInspect() {
234
+ protobuf_1.protoRegistry.registerMessage(exports.Rule);
235
+ function RuleCustomInspect() {
311
236
  const parts = [];
312
237
  if (this.id !== undefined)
313
238
  parts.push("id" + "=" + (0, util_1.inspect)(this.id));
@@ -317,7 +242,7 @@ function ConstraintCustomInspect() {
317
242
  parts.push("expression" + "=" + (0, util_1.inspect)(this.expression));
318
243
  return `${this.$type}(${parts.join(", ")})`;
319
244
  }
320
- function ConstraintCustomJson() {
245
+ function RuleCustomJson() {
321
246
  const obj = {
322
247
  type: this.$type,
323
248
  };
@@ -329,29 +254,34 @@ function ConstraintCustomJson() {
329
254
  obj.expression = (0, logging_1.inspectJson)(this.expression);
330
255
  return obj;
331
256
  }
332
- function applyConstraintCustom(message) {
333
- message[logging_1.custom] = ConstraintCustomInspect;
334
- message[logging_1.customJson] = ConstraintCustomJson;
257
+ function applyRuleCustom(message) {
258
+ message[logging_1.custom] = RuleCustomInspect;
259
+ message[logging_1.customJson] = RuleCustomJson;
335
260
  return message;
336
261
  }
337
- function createBaseConstraint() {
262
+ function createBaseRule() {
338
263
  const message = {
339
- $type: "buf.validate.Constraint",
264
+ $type: "buf.validate.Rule",
340
265
  id: undefined,
341
266
  message: undefined,
342
267
  expression: undefined,
343
268
  };
344
- return applyConstraintCustom(message);
269
+ return applyRuleCustom(message);
345
270
  }
346
- exports.MessageConstraints = {
347
- $type: "buf.validate.MessageConstraints",
271
+ exports.MessageRules = {
272
+ $type: "buf.validate.MessageRules",
348
273
  encode(message, writer = new index_1.BinaryWriter()) {
349
- if (message.disabled !== undefined) {
350
- writer.uint32(8).bool(message.disabled);
274
+ for (const v of (message.celExpression ?? [])) {
275
+ writer.uint32(42).string(v);
351
276
  }
352
277
  for (const v of (message.cel ?? [])) {
353
278
  const w = writer.uint32(26).fork();
354
- exports.Constraint.encode(v, w);
279
+ exports.Rule.encode(v, w);
280
+ w.join();
281
+ }
282
+ for (const v of (message.oneof ?? [])) {
283
+ const w = writer.uint32(34).fork();
284
+ exports.MessageOneofRule.encode(v, w);
355
285
  w.join();
356
286
  }
357
287
  if (message[index_1.unknownFieldsSymbol]) {
@@ -362,21 +292,27 @@ exports.MessageConstraints = {
362
292
  decode(input, length) {
363
293
  const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
364
294
  const end = length === undefined ? reader.len : reader.pos + length;
365
- const message = createBaseMessageConstraints();
295
+ const message = createBaseMessageRules();
366
296
  let writer = undefined;
367
297
  while (reader.pos < end) {
368
298
  const tag = reader.uint32();
369
299
  switch (tag >>> 3) {
370
- case 1: {
371
- if (tag !== 8)
300
+ case 5: {
301
+ if (tag !== 42)
372
302
  break;
373
- message.disabled = reader.bool();
303
+ message.celExpression.push(reader.string());
374
304
  continue;
375
305
  }
376
306
  case 3: {
377
307
  if (tag !== 26)
378
308
  break;
379
- message.cel.push(exports.Constraint.decode(reader, reader.uint32()));
309
+ message.cel.push(exports.Rule.decode(reader, reader.uint32()));
310
+ continue;
311
+ }
312
+ case 4: {
313
+ if (tag !== 34)
314
+ break;
315
+ message.oneof.push(exports.MessageOneofRule.decode(reader, reader.uint32()));
380
316
  continue;
381
317
  }
382
318
  default:
@@ -398,76 +334,89 @@ exports.MessageConstraints = {
398
334
  return message;
399
335
  },
400
336
  fromJSON(object) {
401
- return applyMessageConstraintsCustom({
402
- $type: "buf.validate.MessageConstraints",
403
- disabled: (0, index_1.isSet)(object.disabled ?? object.disabled)
404
- ? Boolean(object.disabled ?? object.disabled)
405
- : undefined,
337
+ return applyMessageRulesCustom({
338
+ $type: "buf.validate.MessageRules",
339
+ celExpression: globalThis.Array.isArray(object?.celExpression ?? object?.cel_expression)
340
+ ? (object.celExpression ?? object.cel_expression).map((e) => String(e))
341
+ : [],
406
342
  cel: globalThis.Array.isArray(object?.cel ?? object?.cel)
407
- ? (object.cel ?? object.cel).map((e) => exports.Constraint.fromJSON(e))
343
+ ? (object.cel ?? object.cel).map((e) => exports.Rule.fromJSON(e))
344
+ : [],
345
+ oneof: globalThis.Array.isArray(object?.oneof ?? object?.oneof)
346
+ ? (object.oneof ?? object.oneof).map((e) => exports.MessageOneofRule.fromJSON(e))
408
347
  : [],
409
348
  });
410
349
  },
411
350
  toJSON(message, use = "json") {
412
351
  const obj = {};
413
352
  const pick = (json, pb) => (use === "json" ? json : pb);
414
- if (message.disabled !== undefined) {
415
- obj[pick("disabled", "disabled")] = message.disabled;
353
+ if (message.celExpression?.length) {
354
+ obj[pick("celExpression", "cel_expression")] = message.celExpression.map((e) => e);
416
355
  }
417
356
  if (message.cel?.length) {
418
- obj[pick("cel", "cel")] = message.cel.map((e) => e ? exports.Constraint.toJSON(e, use) : undefined);
357
+ obj[pick("cel", "cel")] = message.cel.map((e) => e ? exports.Rule.toJSON(e, use) : undefined);
358
+ }
359
+ if (message.oneof?.length) {
360
+ obj[pick("oneof", "oneof")] = message.oneof.map((e) => e ? exports.MessageOneofRule.toJSON(e, use) : undefined);
419
361
  }
420
362
  return obj;
421
363
  },
422
364
  create(base) {
423
- return exports.MessageConstraints.fromPartial(base ?? {});
365
+ return exports.MessageRules.fromPartial(base ?? {});
424
366
  },
425
367
  fromPartial(object) {
426
- const message = createBaseMessageConstraints();
427
- message.disabled = (object.disabled !== undefined && object.disabled !== null)
428
- ? object.disabled
429
- : undefined;
430
- message.cel = object.cel?.map((e) => exports.Constraint.fromPartial(e)) || [];
368
+ const message = createBaseMessageRules();
369
+ message.celExpression = object.celExpression?.map((e) => e) || [];
370
+ message.cel = object.cel?.map((e) => exports.Rule.fromPartial(e)) || [];
371
+ message.oneof = object.oneof?.map((e) => exports.MessageOneofRule.fromPartial(e)) || [];
431
372
  return message;
432
373
  },
433
374
  };
434
- protobuf_1.protoRegistry.registerMessage(exports.MessageConstraints);
435
- function MessageConstraintsCustomInspect() {
375
+ protobuf_1.protoRegistry.registerMessage(exports.MessageRules);
376
+ function MessageRulesCustomInspect() {
436
377
  const parts = [];
437
- if (this.disabled !== undefined)
438
- parts.push("disabled" + "=" + (0, util_1.inspect)(this.disabled));
378
+ if ((this.celExpression?.length ?? 0) !== 0)
379
+ parts.push("celExpression" + "=" + (0, util_1.inspect)(this.celExpression));
439
380
  if ((this.cel?.length ?? 0) !== 0)
440
381
  parts.push("cel" + "=" + (0, util_1.inspect)(this.cel));
382
+ if ((this.oneof?.length ?? 0) !== 0)
383
+ parts.push("oneof" + "=" + (0, util_1.inspect)(this.oneof));
441
384
  return `${this.$type}(${parts.join(", ")})`;
442
385
  }
443
- function MessageConstraintsCustomJson() {
386
+ function MessageRulesCustomJson() {
444
387
  const obj = {
445
388
  type: this.$type,
446
389
  };
447
- if (this.disabled !== undefined)
448
- obj.disabled = (0, logging_1.inspectJson)(this.disabled);
390
+ if ((this.celExpression?.length ?? 0) !== 0)
391
+ obj.celExpression = (0, logging_1.inspectJson)(this.celExpression);
449
392
  if ((this.cel?.length ?? 0) !== 0)
450
393
  obj.cel = (0, logging_1.inspectJson)(this.cel);
394
+ if ((this.oneof?.length ?? 0) !== 0)
395
+ obj.oneof = (0, logging_1.inspectJson)(this.oneof);
451
396
  return obj;
452
397
  }
453
- function applyMessageConstraintsCustom(message) {
454
- message[logging_1.custom] = MessageConstraintsCustomInspect;
455
- message[logging_1.customJson] = MessageConstraintsCustomJson;
398
+ function applyMessageRulesCustom(message) {
399
+ message[logging_1.custom] = MessageRulesCustomInspect;
400
+ message[logging_1.customJson] = MessageRulesCustomJson;
456
401
  return message;
457
402
  }
458
- function createBaseMessageConstraints() {
403
+ function createBaseMessageRules() {
459
404
  const message = {
460
- $type: "buf.validate.MessageConstraints",
461
- disabled: undefined,
405
+ $type: "buf.validate.MessageRules",
406
+ celExpression: [],
462
407
  cel: [],
408
+ oneof: [],
463
409
  };
464
- return applyMessageConstraintsCustom(message);
410
+ return applyMessageRulesCustom(message);
465
411
  }
466
- exports.OneofConstraints = {
467
- $type: "buf.validate.OneofConstraints",
412
+ exports.MessageOneofRule = {
413
+ $type: "buf.validate.MessageOneofRule",
468
414
  encode(message, writer = new index_1.BinaryWriter()) {
415
+ for (const v of (message.fields ?? [])) {
416
+ writer.uint32(10).string(v);
417
+ }
469
418
  if (message.required !== undefined) {
470
- writer.uint32(8).bool(message.required);
419
+ writer.uint32(16).bool(message.required);
471
420
  }
472
421
  if (message[index_1.unknownFieldsSymbol]) {
473
422
  writer.raw(message[index_1.unknownFieldsSymbol]);
@@ -477,13 +426,19 @@ exports.OneofConstraints = {
477
426
  decode(input, length) {
478
427
  const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
479
428
  const end = length === undefined ? reader.len : reader.pos + length;
480
- const message = createBaseOneofConstraints();
429
+ const message = createBaseMessageOneofRule();
481
430
  let writer = undefined;
482
431
  while (reader.pos < end) {
483
432
  const tag = reader.uint32();
484
433
  switch (tag >>> 3) {
485
434
  case 1: {
486
- if (tag !== 8)
435
+ if (tag !== 10)
436
+ break;
437
+ message.fields.push(reader.string());
438
+ continue;
439
+ }
440
+ case 2: {
441
+ if (tag !== 16)
487
442
  break;
488
443
  message.required = reader.bool();
489
444
  continue;
@@ -507,8 +462,11 @@ exports.OneofConstraints = {
507
462
  return message;
508
463
  },
509
464
  fromJSON(object) {
510
- return applyOneofConstraintsCustom({
511
- $type: "buf.validate.OneofConstraints",
465
+ return applyMessageOneofRuleCustom({
466
+ $type: "buf.validate.MessageOneofRule",
467
+ fields: globalThis.Array.isArray(object?.fields ?? object?.fields)
468
+ ? (object.fields ?? object.fields).map((e) => String(e))
469
+ : [],
512
470
  required: (0, index_1.isSet)(object.required ?? object.required)
513
471
  ? Boolean(object.required ?? object.required)
514
472
  : undefined,
@@ -517,67 +475,164 @@ exports.OneofConstraints = {
517
475
  toJSON(message, use = "json") {
518
476
  const obj = {};
519
477
  const pick = (json, pb) => (use === "json" ? json : pb);
478
+ if (message.fields?.length) {
479
+ obj[pick("fields", "fields")] = message.fields.map((e) => e);
480
+ }
520
481
  if (message.required !== undefined) {
521
482
  obj[pick("required", "required")] = message.required;
522
483
  }
523
484
  return obj;
524
485
  },
525
486
  create(base) {
526
- return exports.OneofConstraints.fromPartial(base ?? {});
487
+ return exports.MessageOneofRule.fromPartial(base ?? {});
527
488
  },
528
489
  fromPartial(object) {
529
- const message = createBaseOneofConstraints();
490
+ const message = createBaseMessageOneofRule();
491
+ message.fields = object.fields?.map((e) => e) || [];
530
492
  message.required = (object.required !== undefined && object.required !== null)
531
493
  ? object.required
532
494
  : undefined;
533
495
  return message;
534
496
  },
535
497
  };
536
- protobuf_1.protoRegistry.registerMessage(exports.OneofConstraints);
537
- function OneofConstraintsCustomInspect() {
498
+ protobuf_1.protoRegistry.registerMessage(exports.MessageOneofRule);
499
+ function MessageOneofRuleCustomInspect() {
538
500
  const parts = [];
501
+ if ((this.fields?.length ?? 0) !== 0)
502
+ parts.push("fields" + "=" + (0, util_1.inspect)(this.fields));
539
503
  if (this.required !== undefined)
540
504
  parts.push("required" + "=" + (0, util_1.inspect)(this.required));
541
505
  return `${this.$type}(${parts.join(", ")})`;
542
506
  }
543
- function OneofConstraintsCustomJson() {
507
+ function MessageOneofRuleCustomJson() {
544
508
  const obj = {
545
509
  type: this.$type,
546
510
  };
511
+ if ((this.fields?.length ?? 0) !== 0)
512
+ obj.fields = (0, logging_1.inspectJson)(this.fields);
547
513
  if (this.required !== undefined)
548
514
  obj.required = (0, logging_1.inspectJson)(this.required);
549
515
  return obj;
550
516
  }
551
- function applyOneofConstraintsCustom(message) {
552
- message[logging_1.custom] = OneofConstraintsCustomInspect;
553
- message[logging_1.customJson] = OneofConstraintsCustomJson;
517
+ function applyMessageOneofRuleCustom(message) {
518
+ message[logging_1.custom] = MessageOneofRuleCustomInspect;
519
+ message[logging_1.customJson] = MessageOneofRuleCustomJson;
554
520
  return message;
555
521
  }
556
- function createBaseOneofConstraints() {
522
+ function createBaseMessageOneofRule() {
557
523
  const message = {
558
- $type: "buf.validate.OneofConstraints",
524
+ $type: "buf.validate.MessageOneofRule",
525
+ fields: [],
559
526
  required: undefined,
560
527
  };
561
- return applyOneofConstraintsCustom(message);
528
+ return applyMessageOneofRuleCustom(message);
562
529
  }
563
- exports.FieldConstraints = {
564
- $type: "buf.validate.FieldConstraints",
530
+ exports.OneofRules = {
531
+ $type: "buf.validate.OneofRules",
565
532
  encode(message, writer = new index_1.BinaryWriter()) {
566
- if (message.skipped !== undefined) {
567
- if (!__deprecatedWarned.has("buf.validate.FieldConstraints.skipped")) {
568
- __deprecatedWarned.add("buf.validate.FieldConstraints.skipped");
569
- (0, logging_1.deprecatedWarn)("", "field", "buf.validate.FieldConstraints.skipped", undefined);
570
- }
533
+ if (message.required !== undefined) {
534
+ writer.uint32(8).bool(message.required);
571
535
  }
572
- if (message.ignoreEmpty !== undefined) {
573
- if (!__deprecatedWarned.has("buf.validate.FieldConstraints.ignore_empty")) {
574
- __deprecatedWarned.add("buf.validate.FieldConstraints.ignore_empty");
575
- (0, logging_1.deprecatedWarn)("", "field", "buf.validate.FieldConstraints.ignore_empty", undefined);
536
+ if (message[index_1.unknownFieldsSymbol]) {
537
+ writer.raw(message[index_1.unknownFieldsSymbol]);
538
+ }
539
+ return writer;
540
+ },
541
+ decode(input, length) {
542
+ const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
543
+ const end = length === undefined ? reader.len : reader.pos + length;
544
+ const message = createBaseOneofRules();
545
+ let writer = undefined;
546
+ while (reader.pos < end) {
547
+ const tag = reader.uint32();
548
+ switch (tag >>> 3) {
549
+ case 1: {
550
+ if (tag !== 8)
551
+ break;
552
+ message.required = reader.bool();
553
+ continue;
554
+ }
555
+ default:
556
+ break;
557
+ }
558
+ if ((tag & 7) === 4 || tag === 0) {
559
+ break;
560
+ }
561
+ {
562
+ if (!writer)
563
+ writer = new index_1.BinaryWriter();
564
+ const skipped = reader.skip(tag & 7, tag >>> 3);
565
+ writer.uint32(tag).raw(skipped);
576
566
  }
577
567
  }
568
+ if (writer) {
569
+ message[index_1.unknownFieldsSymbol] = writer.finish();
570
+ }
571
+ return message;
572
+ },
573
+ fromJSON(object) {
574
+ return applyOneofRulesCustom({
575
+ $type: "buf.validate.OneofRules",
576
+ required: (0, index_1.isSet)(object.required ?? object.required)
577
+ ? Boolean(object.required ?? object.required)
578
+ : undefined,
579
+ });
580
+ },
581
+ toJSON(message, use = "json") {
582
+ const obj = {};
583
+ const pick = (json, pb) => (use === "json" ? json : pb);
584
+ if (message.required !== undefined) {
585
+ obj[pick("required", "required")] = message.required;
586
+ }
587
+ return obj;
588
+ },
589
+ create(base) {
590
+ return exports.OneofRules.fromPartial(base ?? {});
591
+ },
592
+ fromPartial(object) {
593
+ const message = createBaseOneofRules();
594
+ message.required = (object.required !== undefined && object.required !== null)
595
+ ? object.required
596
+ : undefined;
597
+ return message;
598
+ },
599
+ };
600
+ protobuf_1.protoRegistry.registerMessage(exports.OneofRules);
601
+ function OneofRulesCustomInspect() {
602
+ const parts = [];
603
+ if (this.required !== undefined)
604
+ parts.push("required" + "=" + (0, util_1.inspect)(this.required));
605
+ return `${this.$type}(${parts.join(", ")})`;
606
+ }
607
+ function OneofRulesCustomJson() {
608
+ const obj = {
609
+ type: this.$type,
610
+ };
611
+ if (this.required !== undefined)
612
+ obj.required = (0, logging_1.inspectJson)(this.required);
613
+ return obj;
614
+ }
615
+ function applyOneofRulesCustom(message) {
616
+ message[logging_1.custom] = OneofRulesCustomInspect;
617
+ message[logging_1.customJson] = OneofRulesCustomJson;
618
+ return message;
619
+ }
620
+ function createBaseOneofRules() {
621
+ const message = {
622
+ $type: "buf.validate.OneofRules",
623
+ required: undefined,
624
+ };
625
+ return applyOneofRulesCustom(message);
626
+ }
627
+ exports.FieldRules = {
628
+ $type: "buf.validate.FieldRules",
629
+ encode(message, writer = new index_1.BinaryWriter()) {
630
+ for (const v of (message.celExpression ?? [])) {
631
+ writer.uint32(234).string(v);
632
+ }
578
633
  for (const v of (message.cel ?? [])) {
579
634
  const w = writer.uint32(186).fork();
580
- exports.Constraint.encode(v, w);
635
+ exports.Rule.encode(v, w);
581
636
  w.join();
582
637
  }
583
638
  if (message.required !== undefined) {
@@ -586,12 +641,6 @@ exports.FieldConstraints = {
586
641
  if (message.ignore !== undefined) {
587
642
  exports.Ignore.encodeField(writer, 27, message.ignore);
588
643
  }
589
- if (message.skipped !== undefined) {
590
- writer.uint32(192).bool(message.skipped);
591
- }
592
- if (message.ignoreEmpty !== undefined) {
593
- writer.uint32(208).bool(message.ignoreEmpty);
594
- }
595
644
  if (message.type?.$case === undefined) { /* noop */ }
596
645
  else if (message.type?.$case === "float") {
597
646
  const w = writer.uint32(10).fork();
@@ -693,6 +742,11 @@ exports.FieldConstraints = {
693
742
  exports.DurationRules.encode(message.type.duration, w);
694
743
  w.join();
695
744
  }
745
+ else if (message.type?.$case === "fieldMask") {
746
+ const w = writer.uint32(226).fork();
747
+ exports.FieldMaskRules.encode(message.type.fieldMask, w);
748
+ w.join();
749
+ }
696
750
  else if (message.type?.$case === "timestamp") {
697
751
  const w = writer.uint32(178).fork();
698
752
  exports.TimestampRules.encode(message.type.timestamp, w);
@@ -706,15 +760,21 @@ exports.FieldConstraints = {
706
760
  decode(input, length) {
707
761
  const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
708
762
  const end = length === undefined ? reader.len : reader.pos + length;
709
- const message = createBaseFieldConstraints();
763
+ const message = createBaseFieldRules();
710
764
  let writer = undefined;
711
765
  while (reader.pos < end) {
712
766
  const tag = reader.uint32();
713
767
  switch (tag >>> 3) {
768
+ case 29: {
769
+ if (tag !== 234)
770
+ break;
771
+ message.celExpression.push(reader.string());
772
+ continue;
773
+ }
714
774
  case 23: {
715
775
  if (tag !== 186)
716
776
  break;
717
- message.cel.push(exports.Constraint.decode(reader, reader.uint32()));
777
+ message.cel.push(exports.Rule.decode(reader, reader.uint32()));
718
778
  continue;
719
779
  }
720
780
  case 25: {
@@ -729,18 +789,6 @@ exports.FieldConstraints = {
729
789
  message.ignore = exports.Ignore.fromNumber(reader.int32());
730
790
  continue;
731
791
  }
732
- case 24: {
733
- if (tag !== 192)
734
- break;
735
- message.skipped = reader.bool();
736
- continue;
737
- }
738
- case 26: {
739
- if (tag !== 208)
740
- break;
741
- message.ignoreEmpty = reader.bool();
742
- continue;
743
- }
744
792
  case 1: {
745
793
  if (tag !== 10)
746
794
  break;
@@ -921,6 +969,15 @@ exports.FieldConstraints = {
921
969
  };
922
970
  continue;
923
971
  }
972
+ case 28: {
973
+ if (tag !== 226)
974
+ break;
975
+ message.type = {
976
+ $case: "fieldMask",
977
+ fieldMask: exports.FieldMaskRules.decode(reader, reader.uint32())
978
+ };
979
+ continue;
980
+ }
924
981
  case 22: {
925
982
  if (tag !== 178)
926
983
  break;
@@ -949,10 +1006,13 @@ exports.FieldConstraints = {
949
1006
  return message;
950
1007
  },
951
1008
  fromJSON(object) {
952
- return applyFieldConstraintsCustom({
953
- $type: "buf.validate.FieldConstraints",
1009
+ return applyFieldRulesCustom({
1010
+ $type: "buf.validate.FieldRules",
1011
+ celExpression: globalThis.Array.isArray(object?.celExpression ?? object?.cel_expression)
1012
+ ? (object.celExpression ?? object.cel_expression).map((e) => String(e))
1013
+ : [],
954
1014
  cel: globalThis.Array.isArray(object?.cel ?? object?.cel)
955
- ? (object.cel ?? object.cel).map((e) => exports.Constraint.fromJSON(e))
1015
+ ? (object.cel ?? object.cel).map((e) => exports.Rule.fromJSON(e))
956
1016
  : [],
957
1017
  required: (0, index_1.isSet)(object.required ?? object.required)
958
1018
  ? Boolean(object.required ?? object.required)
@@ -960,12 +1020,6 @@ exports.FieldConstraints = {
960
1020
  ignore: (0, index_1.isSet)(object.ignore ?? object.ignore)
961
1021
  ? exports.Ignore.fromJSON(object.ignore ?? object.ignore)
962
1022
  : undefined,
963
- skipped: (0, index_1.isSet)(object.skipped ?? object.skipped)
964
- ? Boolean(object.skipped ?? object.skipped)
965
- : undefined,
966
- ignoreEmpty: (0, index_1.isSet)(object.ignoreEmpty ?? object.ignore_empty)
967
- ? Boolean(object.ignoreEmpty ?? object.ignore_empty)
968
- : undefined,
969
1023
  type: (() => {
970
1024
  if ((0, index_1.isSet)(object.float) || (0, index_1.isSet)(object.float)) {
971
1025
  return {
@@ -1087,6 +1141,12 @@ exports.FieldConstraints = {
1087
1141
  duration: exports.DurationRules.fromJSON(object.duration ?? object.duration)
1088
1142
  };
1089
1143
  }
1144
+ if ((0, index_1.isSet)(object.fieldMask) || (0, index_1.isSet)(object.field_mask)) {
1145
+ return {
1146
+ $case: "fieldMask",
1147
+ fieldMask: exports.FieldMaskRules.fromJSON(object.fieldMask ?? object.field_mask)
1148
+ };
1149
+ }
1090
1150
  if ((0, index_1.isSet)(object.timestamp) || (0, index_1.isSet)(object.timestamp)) {
1091
1151
  return {
1092
1152
  $case: "timestamp",
@@ -1100,8 +1160,11 @@ exports.FieldConstraints = {
1100
1160
  toJSON(message, use = "json") {
1101
1161
  const obj = {};
1102
1162
  const pick = (json, pb) => (use === "json" ? json : pb);
1163
+ if (message.celExpression?.length) {
1164
+ obj[pick("celExpression", "cel_expression")] = message.celExpression.map((e) => e);
1165
+ }
1103
1166
  if (message.cel?.length) {
1104
- obj[pick("cel", "cel")] = message.cel.map((e) => e ? exports.Constraint.toJSON(e, use) : undefined);
1167
+ obj[pick("cel", "cel")] = message.cel.map((e) => e ? exports.Rule.toJSON(e, use) : undefined);
1105
1168
  }
1106
1169
  if (message.required !== undefined) {
1107
1170
  obj[pick("required", "required")] = message.required;
@@ -1109,12 +1172,6 @@ exports.FieldConstraints = {
1109
1172
  if (message.ignore !== undefined) {
1110
1173
  obj[pick("ignore", "ignore")] = exports.Ignore.toJSON(message.ignore);
1111
1174
  }
1112
- if (message.skipped !== undefined) {
1113
- obj[pick("skipped", "skipped")] = message.skipped;
1114
- }
1115
- if (message.ignoreEmpty !== undefined) {
1116
- obj[pick("ignoreEmpty", "ignore_empty")] = message.ignoreEmpty;
1117
- }
1118
1175
  switch (message.type?.$case) {
1119
1176
  case "float": {
1120
1177
  obj[pick("float", "float")] = exports.FloatRules.toJSON(message.type.float, use);
@@ -1196,6 +1253,10 @@ exports.FieldConstraints = {
1196
1253
  obj[pick("duration", "duration")] = exports.DurationRules.toJSON(message.type.duration, use);
1197
1254
  break;
1198
1255
  }
1256
+ case "fieldMask": {
1257
+ obj[pick("fieldMask", "field_mask")] = exports.FieldMaskRules.toJSON(message.type.fieldMask, use);
1258
+ break;
1259
+ }
1199
1260
  case "timestamp": {
1200
1261
  obj[pick("timestamp", "timestamp")] = exports.TimestampRules.toJSON(message.type.timestamp, use);
1201
1262
  break;
@@ -1205,23 +1266,18 @@ exports.FieldConstraints = {
1205
1266
  return obj;
1206
1267
  },
1207
1268
  create(base) {
1208
- return exports.FieldConstraints.fromPartial(base ?? {});
1269
+ return exports.FieldRules.fromPartial(base ?? {});
1209
1270
  },
1210
1271
  fromPartial(object) {
1211
- const message = createBaseFieldConstraints();
1212
- message.cel = object.cel?.map((e) => exports.Constraint.fromPartial(e)) || [];
1272
+ const message = createBaseFieldRules();
1273
+ message.celExpression = object.celExpression?.map((e) => e) || [];
1274
+ message.cel = object.cel?.map((e) => exports.Rule.fromPartial(e)) || [];
1213
1275
  message.required = (object.required !== undefined && object.required !== null)
1214
1276
  ? object.required
1215
1277
  : undefined;
1216
1278
  message.ignore = (object.ignore !== undefined && object.ignore !== null)
1217
1279
  ? exports.Ignore.fromJSON(object.ignore.name)
1218
1280
  : undefined;
1219
- message.skipped = (object.skipped !== undefined && object.skipped !== null)
1220
- ? object.skipped
1221
- : undefined;
1222
- message.ignoreEmpty = (object.ignoreEmpty !== undefined && object.ignoreEmpty !== null)
1223
- ? object.ignoreEmpty
1224
- : undefined;
1225
1281
  switch (object.type?.$case) {
1226
1282
  case "float": {
1227
1283
  if (object.type.float !== undefined && object.type.float !== null) {
@@ -1403,6 +1459,15 @@ exports.FieldConstraints = {
1403
1459
  }
1404
1460
  break;
1405
1461
  }
1462
+ case "fieldMask": {
1463
+ if (object.type.fieldMask !== undefined && object.type.fieldMask !== null) {
1464
+ message.type = {
1465
+ $case: "fieldMask",
1466
+ fieldMask: exports.FieldMaskRules.fromPartial(object.type.fieldMask),
1467
+ };
1468
+ }
1469
+ break;
1470
+ }
1406
1471
  case "timestamp": {
1407
1472
  if (object.type.timestamp !== undefined && object.type.timestamp !== null) {
1408
1473
  message.type = {
@@ -1417,60 +1482,55 @@ exports.FieldConstraints = {
1417
1482
  return message;
1418
1483
  },
1419
1484
  };
1420
- protobuf_1.protoRegistry.registerMessage(exports.FieldConstraints);
1421
- function FieldConstraintsCustomInspect() {
1485
+ protobuf_1.protoRegistry.registerMessage(exports.FieldRules);
1486
+ function FieldRulesCustomInspect() {
1422
1487
  const parts = [];
1488
+ if ((this.celExpression?.length ?? 0) !== 0)
1489
+ parts.push("celExpression" + "=" + (0, util_1.inspect)(this.celExpression));
1423
1490
  if ((this.cel?.length ?? 0) !== 0)
1424
1491
  parts.push("cel" + "=" + (0, util_1.inspect)(this.cel));
1425
1492
  if (this.required !== undefined)
1426
1493
  parts.push("required" + "=" + (0, util_1.inspect)(this.required));
1427
1494
  if (this.ignore !== undefined)
1428
1495
  parts.push("ignore" + "=" + (0, util_1.inspect)(this.ignore));
1429
- if (this.skipped !== undefined)
1430
- parts.push("skipped" + "=" + (0, util_1.inspect)(this.skipped));
1431
- if (this.ignoreEmpty !== undefined)
1432
- parts.push("ignoreEmpty" + "=" + (0, util_1.inspect)(this.ignoreEmpty));
1433
1496
  return `${this.$type}(${parts.join(", ")})`;
1434
1497
  }
1435
- function FieldConstraintsCustomJson() {
1498
+ function FieldRulesCustomJson() {
1436
1499
  const obj = {
1437
1500
  type: this.$type,
1438
1501
  };
1502
+ if ((this.celExpression?.length ?? 0) !== 0)
1503
+ obj.celExpression = (0, logging_1.inspectJson)(this.celExpression);
1439
1504
  if ((this.cel?.length ?? 0) !== 0)
1440
1505
  obj.cel = (0, logging_1.inspectJson)(this.cel);
1441
1506
  if (this.required !== undefined)
1442
1507
  obj.required = (0, logging_1.inspectJson)(this.required);
1443
1508
  if (this.ignore !== undefined)
1444
1509
  obj.ignore = (0, logging_1.inspectJson)(this.ignore);
1445
- if (this.skipped !== undefined)
1446
- obj.skipped = (0, logging_1.inspectJson)(this.skipped);
1447
- if (this.ignoreEmpty !== undefined)
1448
- obj.ignoreEmpty = (0, logging_1.inspectJson)(this.ignoreEmpty);
1449
1510
  return obj;
1450
1511
  }
1451
- function applyFieldConstraintsCustom(message) {
1452
- message[logging_1.custom] = FieldConstraintsCustomInspect;
1453
- message[logging_1.customJson] = FieldConstraintsCustomJson;
1512
+ function applyFieldRulesCustom(message) {
1513
+ message[logging_1.custom] = FieldRulesCustomInspect;
1514
+ message[logging_1.customJson] = FieldRulesCustomJson;
1454
1515
  return message;
1455
1516
  }
1456
- function createBaseFieldConstraints() {
1517
+ function createBaseFieldRules() {
1457
1518
  const message = {
1458
- $type: "buf.validate.FieldConstraints",
1519
+ $type: "buf.validate.FieldRules",
1520
+ celExpression: [],
1459
1521
  cel: [],
1460
1522
  required: undefined,
1461
1523
  ignore: undefined,
1462
- skipped: undefined,
1463
- ignoreEmpty: undefined,
1464
1524
  type: undefined,
1465
1525
  };
1466
- return applyFieldConstraintsCustom(message);
1526
+ return applyFieldRulesCustom(message);
1467
1527
  }
1468
- exports.PredefinedConstraints = {
1469
- $type: "buf.validate.PredefinedConstraints",
1528
+ exports.PredefinedRules = {
1529
+ $type: "buf.validate.PredefinedRules",
1470
1530
  encode(message, writer = new index_1.BinaryWriter()) {
1471
1531
  for (const v of (message.cel ?? [])) {
1472
1532
  const w = writer.uint32(10).fork();
1473
- exports.Constraint.encode(v, w);
1533
+ exports.Rule.encode(v, w);
1474
1534
  w.join();
1475
1535
  }
1476
1536
  if (message[index_1.unknownFieldsSymbol]) {
@@ -1481,7 +1541,7 @@ exports.PredefinedConstraints = {
1481
1541
  decode(input, length) {
1482
1542
  const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
1483
1543
  const end = length === undefined ? reader.len : reader.pos + length;
1484
- const message = createBasePredefinedConstraints();
1544
+ const message = createBasePredefinedRules();
1485
1545
  let writer = undefined;
1486
1546
  while (reader.pos < end) {
1487
1547
  const tag = reader.uint32();
@@ -1489,7 +1549,7 @@ exports.PredefinedConstraints = {
1489
1549
  case 1: {
1490
1550
  if (tag !== 10)
1491
1551
  break;
1492
- message.cel.push(exports.Constraint.decode(reader, reader.uint32()));
1552
+ message.cel.push(exports.Rule.decode(reader, reader.uint32()));
1493
1553
  continue;
1494
1554
  }
1495
1555
  default:
@@ -1511,10 +1571,10 @@ exports.PredefinedConstraints = {
1511
1571
  return message;
1512
1572
  },
1513
1573
  fromJSON(object) {
1514
- return applyPredefinedConstraintsCustom({
1515
- $type: "buf.validate.PredefinedConstraints",
1574
+ return applyPredefinedRulesCustom({
1575
+ $type: "buf.validate.PredefinedRules",
1516
1576
  cel: globalThis.Array.isArray(object?.cel ?? object?.cel)
1517
- ? (object.cel ?? object.cel).map((e) => exports.Constraint.fromJSON(e))
1577
+ ? (object.cel ?? object.cel).map((e) => exports.Rule.fromJSON(e))
1518
1578
  : [],
1519
1579
  });
1520
1580
  },
@@ -1522,27 +1582,27 @@ exports.PredefinedConstraints = {
1522
1582
  const obj = {};
1523
1583
  const pick = (json, pb) => (use === "json" ? json : pb);
1524
1584
  if (message.cel?.length) {
1525
- obj[pick("cel", "cel")] = message.cel.map((e) => e ? exports.Constraint.toJSON(e, use) : undefined);
1585
+ obj[pick("cel", "cel")] = message.cel.map((e) => e ? exports.Rule.toJSON(e, use) : undefined);
1526
1586
  }
1527
1587
  return obj;
1528
1588
  },
1529
1589
  create(base) {
1530
- return exports.PredefinedConstraints.fromPartial(base ?? {});
1590
+ return exports.PredefinedRules.fromPartial(base ?? {});
1531
1591
  },
1532
1592
  fromPartial(object) {
1533
- const message = createBasePredefinedConstraints();
1534
- message.cel = object.cel?.map((e) => exports.Constraint.fromPartial(e)) || [];
1593
+ const message = createBasePredefinedRules();
1594
+ message.cel = object.cel?.map((e) => exports.Rule.fromPartial(e)) || [];
1535
1595
  return message;
1536
1596
  },
1537
1597
  };
1538
- protobuf_1.protoRegistry.registerMessage(exports.PredefinedConstraints);
1539
- function PredefinedConstraintsCustomInspect() {
1598
+ protobuf_1.protoRegistry.registerMessage(exports.PredefinedRules);
1599
+ function PredefinedRulesCustomInspect() {
1540
1600
  const parts = [];
1541
1601
  if ((this.cel?.length ?? 0) !== 0)
1542
1602
  parts.push("cel" + "=" + (0, util_1.inspect)(this.cel));
1543
1603
  return `${this.$type}(${parts.join(", ")})`;
1544
1604
  }
1545
- function PredefinedConstraintsCustomJson() {
1605
+ function PredefinedRulesCustomJson() {
1546
1606
  const obj = {
1547
1607
  type: this.$type,
1548
1608
  };
@@ -1550,17 +1610,17 @@ function PredefinedConstraintsCustomJson() {
1550
1610
  obj.cel = (0, logging_1.inspectJson)(this.cel);
1551
1611
  return obj;
1552
1612
  }
1553
- function applyPredefinedConstraintsCustom(message) {
1554
- message[logging_1.custom] = PredefinedConstraintsCustomInspect;
1555
- message[logging_1.customJson] = PredefinedConstraintsCustomJson;
1613
+ function applyPredefinedRulesCustom(message) {
1614
+ message[logging_1.custom] = PredefinedRulesCustomInspect;
1615
+ message[logging_1.customJson] = PredefinedRulesCustomJson;
1556
1616
  return message;
1557
1617
  }
1558
- function createBasePredefinedConstraints() {
1618
+ function createBasePredefinedRules() {
1559
1619
  const message = {
1560
- $type: "buf.validate.PredefinedConstraints",
1620
+ $type: "buf.validate.PredefinedRules",
1561
1621
  cel: [],
1562
1622
  };
1563
- return applyPredefinedConstraintsCustom(message);
1623
+ return applyPredefinedRulesCustom(message);
1564
1624
  }
1565
1625
  exports.FloatRules = {
1566
1626
  $type: "buf.validate.FloatRules",
@@ -5945,6 +6005,9 @@ exports.StringRules = {
5945
6005
  else if (message.wellKnown?.$case === "hostAndPort") {
5946
6006
  writer.uint32(256).bool(message.wellKnown.hostAndPort);
5947
6007
  }
6008
+ else if (message.wellKnown?.$case === "ulid") {
6009
+ writer.uint32(280).bool(message.wellKnown.ulid);
6010
+ }
5948
6011
  else if (message.wellKnown?.$case === "wellKnownRegex") {
5949
6012
  exports.KnownRegex.encodeField(writer, 24, message.wellKnown.wellKnownRegex);
5950
6013
  }
@@ -6210,6 +6273,15 @@ exports.StringRules = {
6210
6273
  };
6211
6274
  continue;
6212
6275
  }
6276
+ case 35: {
6277
+ if (tag !== 280)
6278
+ break;
6279
+ message.wellKnown = {
6280
+ $case: "ulid",
6281
+ ulid: reader.bool()
6282
+ };
6283
+ continue;
6284
+ }
6213
6285
  case 24: {
6214
6286
  if (tag !== 192)
6215
6287
  break;
@@ -6391,6 +6463,12 @@ exports.StringRules = {
6391
6463
  hostAndPort: Boolean(object.hostAndPort ?? object.host_and_port)
6392
6464
  };
6393
6465
  }
6466
+ if ((0, index_1.isSet)(object.ulid) || (0, index_1.isSet)(object.ulid)) {
6467
+ return {
6468
+ $case: "ulid",
6469
+ ulid: Boolean(object.ulid ?? object.ulid)
6470
+ };
6471
+ }
6394
6472
  if ((0, index_1.isSet)(object.wellKnownRegex) || (0, index_1.isSet)(object.well_known_regex)) {
6395
6473
  return {
6396
6474
  $case: "wellKnownRegex",
@@ -6521,6 +6599,10 @@ exports.StringRules = {
6521
6599
  obj[pick("hostAndPort", "host_and_port")] = message.wellKnown.hostAndPort;
6522
6600
  break;
6523
6601
  }
6602
+ case "ulid": {
6603
+ obj[pick("ulid", "ulid")] = message.wellKnown.ulid;
6604
+ break;
6605
+ }
6524
6606
  case "wellKnownRegex": {
6525
6607
  obj[pick("wellKnownRegex", "well_known_regex")] = exports.KnownRegex.toJSON(message.wellKnown.wellKnownRegex);
6526
6608
  break;
@@ -6730,6 +6812,15 @@ exports.StringRules = {
6730
6812
  }
6731
6813
  break;
6732
6814
  }
6815
+ case "ulid": {
6816
+ if (object.wellKnown?.ulid !== undefined && object.wellKnown?.ulid !== null) {
6817
+ message.wellKnown = {
6818
+ $case: "ulid",
6819
+ ulid: object.wellKnown.ulid,
6820
+ };
6821
+ }
6822
+ break;
6823
+ }
6733
6824
  case "wellKnownRegex": {
6734
6825
  if (object.wellKnown?.wellKnownRegex !== undefined && object.wellKnown?.wellKnownRegex !== null) {
6735
6826
  message.wellKnown = {
@@ -6893,6 +6984,9 @@ exports.BytesRules = {
6893
6984
  else if (message.wellKnown?.$case === "ipv6") {
6894
6985
  writer.uint32(96).bool(message.wellKnown.ipv6);
6895
6986
  }
6987
+ else if (message.wellKnown?.$case === "uuid") {
6988
+ writer.uint32(120).bool(message.wellKnown.uuid);
6989
+ }
6896
6990
  if (message[index_1.unknownFieldsSymbol]) {
6897
6991
  writer.raw(message[index_1.unknownFieldsSymbol]);
6898
6992
  }
@@ -6999,6 +7093,15 @@ exports.BytesRules = {
6999
7093
  };
7000
7094
  continue;
7001
7095
  }
7096
+ case 15: {
7097
+ if (tag !== 120)
7098
+ break;
7099
+ message.wellKnown = {
7100
+ $case: "uuid",
7101
+ uuid: reader.bool()
7102
+ };
7103
+ continue;
7104
+ }
7002
7105
  default:
7003
7106
  break;
7004
7107
  }
@@ -7072,6 +7175,12 @@ exports.BytesRules = {
7072
7175
  ipv6: Boolean(object.ipv6 ?? object.ipv6)
7073
7176
  };
7074
7177
  }
7178
+ if ((0, index_1.isSet)(object.uuid) || (0, index_1.isSet)(object.uuid)) {
7179
+ return {
7180
+ $case: "uuid",
7181
+ uuid: Boolean(object.uuid ?? object.uuid)
7182
+ };
7183
+ }
7075
7184
  return undefined;
7076
7185
  })(),
7077
7186
  });
@@ -7125,6 +7234,10 @@ exports.BytesRules = {
7125
7234
  obj[pick("ipv6", "ipv6")] = message.wellKnown.ipv6;
7126
7235
  break;
7127
7236
  }
7237
+ case "uuid": {
7238
+ obj[pick("uuid", "uuid")] = message.wellKnown.uuid;
7239
+ break;
7240
+ }
7128
7241
  default: break;
7129
7242
  }
7130
7243
  return obj;
@@ -7189,6 +7302,15 @@ exports.BytesRules = {
7189
7302
  }
7190
7303
  break;
7191
7304
  }
7305
+ case "uuid": {
7306
+ if (object.wellKnown?.uuid !== undefined && object.wellKnown?.uuid !== null) {
7307
+ message.wellKnown = {
7308
+ $case: "uuid",
7309
+ uuid: object.wellKnown.uuid,
7310
+ };
7311
+ }
7312
+ break;
7313
+ }
7192
7314
  default: break;
7193
7315
  }
7194
7316
  return message;
@@ -7505,7 +7627,7 @@ exports.RepeatedRules = {
7505
7627
  }
7506
7628
  if (message.items !== undefined) {
7507
7629
  const w = writer.uint32(34).fork();
7508
- exports.FieldConstraints.encode(message.items, w);
7630
+ exports.FieldRules.encode(message.items, w);
7509
7631
  w.join();
7510
7632
  }
7511
7633
  if (message[index_1.unknownFieldsSymbol]) {
@@ -7542,7 +7664,7 @@ exports.RepeatedRules = {
7542
7664
  case 4: {
7543
7665
  if (tag !== 34)
7544
7666
  break;
7545
- message.items = exports.FieldConstraints.decode(reader, reader.uint32());
7667
+ message.items = exports.FieldRules.decode(reader, reader.uint32());
7546
7668
  continue;
7547
7669
  }
7548
7670
  default:
@@ -7576,7 +7698,7 @@ exports.RepeatedRules = {
7576
7698
  ? Boolean(object.unique ?? object.unique)
7577
7699
  : undefined,
7578
7700
  items: (0, index_1.isSet)(object.items ?? object.items)
7579
- ? exports.FieldConstraints.fromJSON(object.items ?? object.items)
7701
+ ? exports.FieldRules.fromJSON(object.items ?? object.items)
7580
7702
  : undefined,
7581
7703
  });
7582
7704
  },
@@ -7594,7 +7716,7 @@ exports.RepeatedRules = {
7594
7716
  }
7595
7717
  if (message.items !== undefined) {
7596
7718
  obj[pick("items", "items")] = message.items
7597
- ? exports.FieldConstraints.toJSON(message.items, use)
7719
+ ? exports.FieldRules.toJSON(message.items, use)
7598
7720
  : undefined;
7599
7721
  }
7600
7722
  return obj;
@@ -7614,7 +7736,7 @@ exports.RepeatedRules = {
7614
7736
  ? object.unique
7615
7737
  : undefined;
7616
7738
  message.items = (object.items !== undefined && object.items !== null)
7617
- ? exports.FieldConstraints.fromPartial(object.items)
7739
+ ? exports.FieldRules.fromPartial(object.items)
7618
7740
  : undefined;
7619
7741
  return message;
7620
7742
  },
@@ -7672,12 +7794,12 @@ exports.MapRules = {
7672
7794
  }
7673
7795
  if (message.keys !== undefined) {
7674
7796
  const w = writer.uint32(34).fork();
7675
- exports.FieldConstraints.encode(message.keys, w);
7797
+ exports.FieldRules.encode(message.keys, w);
7676
7798
  w.join();
7677
7799
  }
7678
7800
  if (message.values !== undefined) {
7679
7801
  const w = writer.uint32(42).fork();
7680
- exports.FieldConstraints.encode(message.values, w);
7802
+ exports.FieldRules.encode(message.values, w);
7681
7803
  w.join();
7682
7804
  }
7683
7805
  if (message[index_1.unknownFieldsSymbol]) {
@@ -7708,13 +7830,13 @@ exports.MapRules = {
7708
7830
  case 4: {
7709
7831
  if (tag !== 34)
7710
7832
  break;
7711
- message.keys = exports.FieldConstraints.decode(reader, reader.uint32());
7833
+ message.keys = exports.FieldRules.decode(reader, reader.uint32());
7712
7834
  continue;
7713
7835
  }
7714
7836
  case 5: {
7715
7837
  if (tag !== 42)
7716
7838
  break;
7717
- message.values = exports.FieldConstraints.decode(reader, reader.uint32());
7839
+ message.values = exports.FieldRules.decode(reader, reader.uint32());
7718
7840
  continue;
7719
7841
  }
7720
7842
  default:
@@ -7745,10 +7867,10 @@ exports.MapRules = {
7745
7867
  ? index_1.Long.fromValue(object.maxPairs ?? object.max_pairs)
7746
7868
  : undefined,
7747
7869
  keys: (0, index_1.isSet)(object.keys ?? object.keys)
7748
- ? exports.FieldConstraints.fromJSON(object.keys ?? object.keys)
7870
+ ? exports.FieldRules.fromJSON(object.keys ?? object.keys)
7749
7871
  : undefined,
7750
7872
  values: (0, index_1.isSet)(object.values ?? object.values)
7751
- ? exports.FieldConstraints.fromJSON(object.values ?? object.values)
7873
+ ? exports.FieldRules.fromJSON(object.values ?? object.values)
7752
7874
  : undefined,
7753
7875
  });
7754
7876
  },
@@ -7763,12 +7885,12 @@ exports.MapRules = {
7763
7885
  }
7764
7886
  if (message.keys !== undefined) {
7765
7887
  obj[pick("keys", "keys")] = message.keys
7766
- ? exports.FieldConstraints.toJSON(message.keys, use)
7888
+ ? exports.FieldRules.toJSON(message.keys, use)
7767
7889
  : undefined;
7768
7890
  }
7769
7891
  if (message.values !== undefined) {
7770
7892
  obj[pick("values", "values")] = message.values
7771
- ? exports.FieldConstraints.toJSON(message.values, use)
7893
+ ? exports.FieldRules.toJSON(message.values, use)
7772
7894
  : undefined;
7773
7895
  }
7774
7896
  return obj;
@@ -7785,10 +7907,10 @@ exports.MapRules = {
7785
7907
  ? index_1.Long.fromValue(object.maxPairs)
7786
7908
  : undefined;
7787
7909
  message.keys = (object.keys !== undefined && object.keys !== null)
7788
- ? exports.FieldConstraints.fromPartial(object.keys)
7910
+ ? exports.FieldRules.fromPartial(object.keys)
7789
7911
  : undefined;
7790
7912
  message.values = (object.values !== undefined && object.values !== null)
7791
- ? exports.FieldConstraints.fromPartial(object.values)
7913
+ ? exports.FieldRules.fromPartial(object.values)
7792
7914
  : undefined;
7793
7915
  return message;
7794
7916
  },
@@ -8287,6 +8409,174 @@ function createBaseDurationRules() {
8287
8409
  };
8288
8410
  return applyDurationRulesCustom(message);
8289
8411
  }
8412
+ exports.FieldMaskRules = {
8413
+ $type: "buf.validate.FieldMaskRules",
8414
+ encode(message, writer = new index_1.BinaryWriter()) {
8415
+ if (message.const !== undefined) {
8416
+ const w = writer.uint32(10).fork();
8417
+ index_1.wkt[".google.protobuf.FieldMask"].writeMessage(w, message.const);
8418
+ w.join();
8419
+ }
8420
+ for (const v of (message.in ?? [])) {
8421
+ writer.uint32(18).string(v);
8422
+ }
8423
+ for (const v of (message.notIn ?? [])) {
8424
+ writer.uint32(26).string(v);
8425
+ }
8426
+ for (const v of (message.example ?? [])) {
8427
+ const w = writer.uint32(34).fork();
8428
+ index_1.wkt[".google.protobuf.FieldMask"].writeMessage(w, v);
8429
+ w.join();
8430
+ }
8431
+ if (message[index_1.unknownFieldsSymbol]) {
8432
+ writer.raw(message[index_1.unknownFieldsSymbol]);
8433
+ }
8434
+ return writer;
8435
+ },
8436
+ decode(input, length) {
8437
+ const reader = input instanceof index_1.BinaryReader ? input : new index_1.BinaryReader(input);
8438
+ const end = length === undefined ? reader.len : reader.pos + length;
8439
+ const message = createBaseFieldMaskRules();
8440
+ let writer = undefined;
8441
+ while (reader.pos < end) {
8442
+ const tag = reader.uint32();
8443
+ switch (tag >>> 3) {
8444
+ case 1: {
8445
+ if (tag !== 10)
8446
+ break;
8447
+ const len = reader.uint32();
8448
+ message.const = index_1.wkt[".google.protobuf.FieldMask"].readMessage(reader, len);
8449
+ continue;
8450
+ }
8451
+ case 2: {
8452
+ if (tag !== 18)
8453
+ break;
8454
+ message.in.push(reader.string());
8455
+ continue;
8456
+ }
8457
+ case 3: {
8458
+ if (tag !== 26)
8459
+ break;
8460
+ message.notIn.push(reader.string());
8461
+ continue;
8462
+ }
8463
+ case 4: {
8464
+ if (tag !== 34)
8465
+ break;
8466
+ const len = reader.uint32();
8467
+ message.example.push(index_1.wkt[".google.protobuf.FieldMask"].readMessage(reader, len));
8468
+ continue;
8469
+ }
8470
+ default:
8471
+ break;
8472
+ }
8473
+ if ((tag & 7) === 4 || tag === 0) {
8474
+ break;
8475
+ }
8476
+ {
8477
+ if (!writer)
8478
+ writer = new index_1.BinaryWriter();
8479
+ const skipped = reader.skip(tag & 7, tag >>> 3);
8480
+ writer.uint32(tag).raw(skipped);
8481
+ }
8482
+ }
8483
+ if (writer) {
8484
+ message[index_1.unknownFieldsSymbol] = writer.finish();
8485
+ }
8486
+ return message;
8487
+ },
8488
+ fromJSON(object) {
8489
+ return applyFieldMaskRulesCustom({
8490
+ $type: "buf.validate.FieldMaskRules",
8491
+ const: (0, index_1.isSet)(object.const ?? object.const)
8492
+ ? index_1.wkt[".google.protobuf.FieldMask"].fromJSON(object.const ?? object.const)
8493
+ : undefined,
8494
+ in: globalThis.Array.isArray(object?.in ?? object?.in)
8495
+ ? (object.in ?? object.in).map((e) => String(e))
8496
+ : [],
8497
+ notIn: globalThis.Array.isArray(object?.notIn ?? object?.not_in)
8498
+ ? (object.notIn ?? object.not_in).map((e) => String(e))
8499
+ : [],
8500
+ example: globalThis.Array.isArray(object?.example ?? object?.example)
8501
+ ? (object.example ?? object.example).map((e) => index_1.wkt[".google.protobuf.FieldMask"].fromJSON(e))
8502
+ : [],
8503
+ });
8504
+ },
8505
+ toJSON(message, use = "json") {
8506
+ const obj = {};
8507
+ const pick = (json, pb) => (use === "json" ? json : pb);
8508
+ if (message.const !== undefined) {
8509
+ obj[pick("const", "const")] = index_1.wkt[".google.protobuf.FieldMask"].toJSON(message.const, use);
8510
+ }
8511
+ if (message.in?.length) {
8512
+ obj[pick("in", "in")] = message.in.map((e) => e);
8513
+ }
8514
+ if (message.notIn?.length) {
8515
+ obj[pick("notIn", "not_in")] = message.notIn.map((e) => e);
8516
+ }
8517
+ if (message.example?.length) {
8518
+ obj[pick("example", "example")] = message.example.map((e) => e ? index_1.wkt[".google.protobuf.FieldMask"].toJSON(e, use) : undefined);
8519
+ }
8520
+ return obj;
8521
+ },
8522
+ create(base) {
8523
+ return exports.FieldMaskRules.fromPartial(base ?? {});
8524
+ },
8525
+ fromPartial(object) {
8526
+ const message = createBaseFieldMaskRules();
8527
+ message.const = (object.const !== undefined && object.const !== null)
8528
+ ? index_1.wkt[".google.protobuf.FieldMask"].fromPartial(object.const)
8529
+ : undefined;
8530
+ message.in = object.in?.map((e) => e) || [];
8531
+ message.notIn = object.notIn?.map((e) => e) || [];
8532
+ message.example = object.example?.map((e) => {
8533
+ return index_1.wkt[".google.protobuf.FieldMask"].fromPartial(e);
8534
+ }) || [];
8535
+ return message;
8536
+ },
8537
+ };
8538
+ protobuf_1.protoRegistry.registerMessage(exports.FieldMaskRules);
8539
+ function FieldMaskRulesCustomInspect() {
8540
+ const parts = [];
8541
+ if (this.const !== undefined)
8542
+ parts.push("const" + "=" + (0, util_1.inspect)(this.const));
8543
+ if ((this.in?.length ?? 0) !== 0)
8544
+ parts.push("in" + "=" + (0, util_1.inspect)(this.in));
8545
+ if ((this.notIn?.length ?? 0) !== 0)
8546
+ parts.push("notIn" + "=" + (0, util_1.inspect)(this.notIn));
8547
+ if ((this.example?.length ?? 0) !== 0)
8548
+ parts.push("example" + "=" + (0, util_1.inspect)(this.example));
8549
+ return `${this.$type}(${parts.join(", ")})`;
8550
+ }
8551
+ function FieldMaskRulesCustomJson() {
8552
+ const obj = {
8553
+ type: this.$type,
8554
+ };
8555
+ if (this.const !== undefined)
8556
+ obj.const = (0, logging_1.inspectJson)(this.const);
8557
+ if ((this.in?.length ?? 0) !== 0)
8558
+ obj.in = (0, logging_1.inspectJson)(this.in);
8559
+ if ((this.notIn?.length ?? 0) !== 0)
8560
+ obj.notIn = (0, logging_1.inspectJson)(this.notIn);
8561
+ if ((this.example?.length ?? 0) !== 0)
8562
+ obj.example = (0, logging_1.inspectJson)(this.example);
8563
+ return obj;
8564
+ }
8565
+ function applyFieldMaskRulesCustom(message) {
8566
+ message[logging_1.custom] = FieldMaskRulesCustomInspect;
8567
+ message[logging_1.customJson] = FieldMaskRulesCustomJson;
8568
+ return message;
8569
+ }
8570
+ function createBaseFieldMaskRules() {
8571
+ const message = {
8572
+ $type: "buf.validate.FieldMaskRules",
8573
+ const: undefined,
8574
+ in: [],
8575
+ notIn: [],
8576
+ example: [],
8577
+ };
8578
+ return applyFieldMaskRulesCustom(message);
8579
+ }
8290
8580
  exports.TimestampRules = {
8291
8581
  $type: "buf.validate.TimestampRules",
8292
8582
  encode(message, writer = new index_1.BinaryWriter()) {
@@ -8759,12 +9049,6 @@ function createBaseViolations() {
8759
9049
  exports.Violation = {
8760
9050
  $type: "buf.validate.Violation",
8761
9051
  encode(message, writer = new index_1.BinaryWriter()) {
8762
- if (message.fieldPath !== undefined) {
8763
- if (!__deprecatedWarned.has("buf.validate.Violation.field_path")) {
8764
- __deprecatedWarned.add("buf.validate.Violation.field_path");
8765
- (0, logging_1.deprecatedWarn)("", "field", "buf.validate.Violation.field_path", undefined);
8766
- }
8767
- }
8768
9052
  if (message.field !== undefined) {
8769
9053
  const w = writer.uint32(42).fork();
8770
9054
  exports.FieldPath.encode(message.field, w);
@@ -8775,11 +9059,8 @@ exports.Violation = {
8775
9059
  exports.FieldPath.encode(message.rule, w);
8776
9060
  w.join();
8777
9061
  }
8778
- if (message.fieldPath !== undefined) {
8779
- writer.uint32(10).string(message.fieldPath);
8780
- }
8781
- if (message.constraintId !== undefined) {
8782
- writer.uint32(18).string(message.constraintId);
9062
+ if (message.ruleId !== undefined) {
9063
+ writer.uint32(18).string(message.ruleId);
8783
9064
  }
8784
9065
  if (message.message !== undefined) {
8785
9066
  writer.uint32(26).string(message.message);
@@ -8812,16 +9093,10 @@ exports.Violation = {
8812
9093
  message.rule = exports.FieldPath.decode(reader, reader.uint32());
8813
9094
  continue;
8814
9095
  }
8815
- case 1: {
8816
- if (tag !== 10)
8817
- break;
8818
- message.fieldPath = reader.string();
8819
- continue;
8820
- }
8821
9096
  case 2: {
8822
9097
  if (tag !== 18)
8823
9098
  break;
8824
- message.constraintId = reader.string();
9099
+ message.ruleId = reader.string();
8825
9100
  continue;
8826
9101
  }
8827
9102
  case 3: {
@@ -8863,11 +9138,8 @@ exports.Violation = {
8863
9138
  rule: (0, index_1.isSet)(object.rule ?? object.rule)
8864
9139
  ? exports.FieldPath.fromJSON(object.rule ?? object.rule)
8865
9140
  : undefined,
8866
- fieldPath: (0, index_1.isSet)(object.fieldPath ?? object.field_path)
8867
- ? String(object.fieldPath ?? object.field_path)
8868
- : undefined,
8869
- constraintId: (0, index_1.isSet)(object.constraintId ?? object.constraint_id)
8870
- ? String(object.constraintId ?? object.constraint_id)
9141
+ ruleId: (0, index_1.isSet)(object.ruleId ?? object.rule_id)
9142
+ ? String(object.ruleId ?? object.rule_id)
8871
9143
  : undefined,
8872
9144
  message: (0, index_1.isSet)(object.message ?? object.message)
8873
9145
  ? String(object.message ?? object.message)
@@ -8890,11 +9162,8 @@ exports.Violation = {
8890
9162
  ? exports.FieldPath.toJSON(message.rule, use)
8891
9163
  : undefined;
8892
9164
  }
8893
- if (message.fieldPath !== undefined) {
8894
- obj[pick("fieldPath", "field_path")] = message.fieldPath;
8895
- }
8896
- if (message.constraintId !== undefined) {
8897
- obj[pick("constraintId", "constraint_id")] = message.constraintId;
9165
+ if (message.ruleId !== undefined) {
9166
+ obj[pick("ruleId", "rule_id")] = message.ruleId;
8898
9167
  }
8899
9168
  if (message.message !== undefined) {
8900
9169
  obj[pick("message", "message")] = message.message;
@@ -8915,11 +9184,8 @@ exports.Violation = {
8915
9184
  message.rule = (object.rule !== undefined && object.rule !== null)
8916
9185
  ? exports.FieldPath.fromPartial(object.rule)
8917
9186
  : undefined;
8918
- message.fieldPath = (object.fieldPath !== undefined && object.fieldPath !== null)
8919
- ? object.fieldPath
8920
- : undefined;
8921
- message.constraintId = (object.constraintId !== undefined && object.constraintId !== null)
8922
- ? object.constraintId
9187
+ message.ruleId = (object.ruleId !== undefined && object.ruleId !== null)
9188
+ ? object.ruleId
8923
9189
  : undefined;
8924
9190
  message.message = (object.message !== undefined && object.message !== null)
8925
9191
  ? object.message
@@ -8937,10 +9203,8 @@ function ViolationCustomInspect() {
8937
9203
  parts.push("field" + "=" + (0, util_1.inspect)(this.field));
8938
9204
  if (this.rule !== undefined)
8939
9205
  parts.push("rule" + "=" + (0, util_1.inspect)(this.rule));
8940
- if (this.fieldPath !== undefined)
8941
- parts.push("fieldPath" + "=" + (0, util_1.inspect)(this.fieldPath));
8942
- if (this.constraintId !== undefined)
8943
- parts.push("constraintId" + "=" + (0, util_1.inspect)(this.constraintId));
9206
+ if (this.ruleId !== undefined)
9207
+ parts.push("ruleId" + "=" + (0, util_1.inspect)(this.ruleId));
8944
9208
  if (this.message !== undefined)
8945
9209
  parts.push("message" + "=" + (0, util_1.inspect)(this.message));
8946
9210
  if (this.forKey !== undefined)
@@ -8955,10 +9219,8 @@ function ViolationCustomJson() {
8955
9219
  obj.field = (0, logging_1.inspectJson)(this.field);
8956
9220
  if (this.rule !== undefined)
8957
9221
  obj.rule = (0, logging_1.inspectJson)(this.rule);
8958
- if (this.fieldPath !== undefined)
8959
- obj.fieldPath = (0, logging_1.inspectJson)(this.fieldPath);
8960
- if (this.constraintId !== undefined)
8961
- obj.constraintId = (0, logging_1.inspectJson)(this.constraintId);
9222
+ if (this.ruleId !== undefined)
9223
+ obj.ruleId = (0, logging_1.inspectJson)(this.ruleId);
8962
9224
  if (this.message !== undefined)
8963
9225
  obj.message = (0, logging_1.inspectJson)(this.message);
8964
9226
  if (this.forKey !== undefined)
@@ -8975,8 +9237,7 @@ function createBaseViolation() {
8975
9237
  $type: "buf.validate.Violation",
8976
9238
  field: undefined,
8977
9239
  rule: undefined,
8978
- fieldPath: undefined,
8979
- constraintId: undefined,
9240
+ ruleId: undefined,
8980
9241
  message: undefined,
8981
9242
  forKey: undefined,
8982
9243
  };
@@ -9440,12 +9701,12 @@ protobuf_1.protoRegistry.registerExtension({
9440
9701
  fieldNo: 1159,
9441
9702
  name: "message",
9442
9703
  kind: "message",
9443
- messageType: "buf.validate.MessageConstraints",
9704
+ messageType: "buf.validate.MessageRules",
9444
9705
  encode(message, writer) {
9445
9706
  const v = message.message;
9446
9707
  if (v !== undefined) {
9447
9708
  const w2 = writer.uint32(9274).fork();
9448
- exports.MessageConstraints.encode(v, w2);
9709
+ exports.MessageRules.encode(v, w2);
9449
9710
  w2.join();
9450
9711
  }
9451
9712
  },
@@ -9456,19 +9717,19 @@ protobuf_1.protoRegistry.registerExtension({
9456
9717
  return false;
9457
9718
  if (wt !== 2)
9458
9719
  return false;
9459
- message.message = exports.MessageConstraints.decode(reader, reader.uint32());
9720
+ message.message = exports.MessageRules.decode(reader, reader.uint32());
9460
9721
  return true;
9461
9722
  },
9462
9723
  fromJSON(message, object) {
9463
9724
  const _v = object?.message ?? object?.message;
9464
9725
  if (_v === undefined || _v === null)
9465
9726
  return;
9466
- message.message = exports.MessageConstraints.fromJSON(_v);
9727
+ message.message = exports.MessageRules.fromJSON(_v);
9467
9728
  },
9468
9729
  toJSON(message, obj, use) {
9469
9730
  const _val = message.message;
9470
9731
  if (_val !== undefined)
9471
- obj[(use === "json" ? "message" : "message")] = exports.MessageConstraints.toJSON(_val, use);
9732
+ obj[(use === "json" ? "message" : "message")] = exports.MessageRules.toJSON(_val, use);
9472
9733
  }
9473
9734
  });
9474
9735
  require("../../google/protobuf/index"); // ensure module exists for augmentation
@@ -9478,12 +9739,12 @@ protobuf_1.protoRegistry.registerExtension({
9478
9739
  fieldNo: 1159,
9479
9740
  name: "oneof",
9480
9741
  kind: "message",
9481
- messageType: "buf.validate.OneofConstraints",
9742
+ messageType: "buf.validate.OneofRules",
9482
9743
  encode(message, writer) {
9483
9744
  const v = message.oneof;
9484
9745
  if (v !== undefined) {
9485
9746
  const w2 = writer.uint32(9274).fork();
9486
- exports.OneofConstraints.encode(v, w2);
9747
+ exports.OneofRules.encode(v, w2);
9487
9748
  w2.join();
9488
9749
  }
9489
9750
  },
@@ -9494,19 +9755,19 @@ protobuf_1.protoRegistry.registerExtension({
9494
9755
  return false;
9495
9756
  if (wt !== 2)
9496
9757
  return false;
9497
- message.oneof = exports.OneofConstraints.decode(reader, reader.uint32());
9758
+ message.oneof = exports.OneofRules.decode(reader, reader.uint32());
9498
9759
  return true;
9499
9760
  },
9500
9761
  fromJSON(message, object) {
9501
9762
  const _v = object?.oneof ?? object?.oneof;
9502
9763
  if (_v === undefined || _v === null)
9503
9764
  return;
9504
- message.oneof = exports.OneofConstraints.fromJSON(_v);
9765
+ message.oneof = exports.OneofRules.fromJSON(_v);
9505
9766
  },
9506
9767
  toJSON(message, obj, use) {
9507
9768
  const _val = message.oneof;
9508
9769
  if (_val !== undefined)
9509
- obj[(use === "json" ? "oneof" : "oneof")] = exports.OneofConstraints.toJSON(_val, use);
9770
+ obj[(use === "json" ? "oneof" : "oneof")] = exports.OneofRules.toJSON(_val, use);
9510
9771
  }
9511
9772
  });
9512
9773
  protobuf_1.protoRegistry.registerExtension({
@@ -9515,12 +9776,12 @@ protobuf_1.protoRegistry.registerExtension({
9515
9776
  fieldNo: 1159,
9516
9777
  name: "field",
9517
9778
  kind: "message",
9518
- messageType: "buf.validate.FieldConstraints",
9779
+ messageType: "buf.validate.FieldRules",
9519
9780
  encode(message, writer) {
9520
9781
  const v = message.field;
9521
9782
  if (v !== undefined) {
9522
9783
  const w2 = writer.uint32(9274).fork();
9523
- exports.FieldConstraints.encode(v, w2);
9784
+ exports.FieldRules.encode(v, w2);
9524
9785
  w2.join();
9525
9786
  }
9526
9787
  },
@@ -9531,19 +9792,19 @@ protobuf_1.protoRegistry.registerExtension({
9531
9792
  return false;
9532
9793
  if (wt !== 2)
9533
9794
  return false;
9534
- message.field = exports.FieldConstraints.decode(reader, reader.uint32());
9795
+ message.field = exports.FieldRules.decode(reader, reader.uint32());
9535
9796
  return true;
9536
9797
  },
9537
9798
  fromJSON(message, object) {
9538
9799
  const _v = object?.field ?? object?.field;
9539
9800
  if (_v === undefined || _v === null)
9540
9801
  return;
9541
- message.field = exports.FieldConstraints.fromJSON(_v);
9802
+ message.field = exports.FieldRules.fromJSON(_v);
9542
9803
  },
9543
9804
  toJSON(message, obj, use) {
9544
9805
  const _val = message.field;
9545
9806
  if (_val !== undefined)
9546
- obj[(use === "json" ? "field" : "field")] = exports.FieldConstraints.toJSON(_val, use);
9807
+ obj[(use === "json" ? "field" : "field")] = exports.FieldRules.toJSON(_val, use);
9547
9808
  }
9548
9809
  });
9549
9810
  protobuf_1.protoRegistry.registerExtension({
@@ -9552,12 +9813,12 @@ protobuf_1.protoRegistry.registerExtension({
9552
9813
  fieldNo: 1160,
9553
9814
  name: "predefined",
9554
9815
  kind: "message",
9555
- messageType: "buf.validate.PredefinedConstraints",
9816
+ messageType: "buf.validate.PredefinedRules",
9556
9817
  encode(message, writer) {
9557
9818
  const v = message.predefined;
9558
9819
  if (v !== undefined) {
9559
9820
  const w2 = writer.uint32(9282).fork();
9560
- exports.PredefinedConstraints.encode(v, w2);
9821
+ exports.PredefinedRules.encode(v, w2);
9561
9822
  w2.join();
9562
9823
  }
9563
9824
  },
@@ -9568,19 +9829,19 @@ protobuf_1.protoRegistry.registerExtension({
9568
9829
  return false;
9569
9830
  if (wt !== 2)
9570
9831
  return false;
9571
- message.predefined = exports.PredefinedConstraints.decode(reader, reader.uint32());
9832
+ message.predefined = exports.PredefinedRules.decode(reader, reader.uint32());
9572
9833
  return true;
9573
9834
  },
9574
9835
  fromJSON(message, object) {
9575
9836
  const _v = object?.predefined ?? object?.predefined;
9576
9837
  if (_v === undefined || _v === null)
9577
9838
  return;
9578
- message.predefined = exports.PredefinedConstraints.fromJSON(_v);
9839
+ message.predefined = exports.PredefinedRules.fromJSON(_v);
9579
9840
  },
9580
9841
  toJSON(message, obj, use) {
9581
9842
  const _val = message.predefined;
9582
9843
  if (_val !== undefined)
9583
- obj[(use === "json" ? "predefined" : "predefined")] = exports.PredefinedConstraints.toJSON(_val, use);
9844
+ obj[(use === "json" ? "predefined" : "predefined")] = exports.PredefinedRules.toJSON(_val, use);
9584
9845
  }
9585
9846
  });
9586
9847
  //# sourceMappingURL=index.js.map