@metal-stack/api 0.0.40-beta.0 → 0.0.44

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 (44) hide show
  1. package/js/Makefile +4 -2
  2. package/js/buf/validate/validate_pb.d.ts +172 -3
  3. package/js/buf/validate/validate_pb.js +12 -7
  4. package/js/metalstack/admin/v2/filesystem_pb.js +1 -1
  5. package/js/metalstack/admin/v2/image_pb.js +1 -1
  6. package/js/metalstack/admin/v2/ip_pb.js +1 -1
  7. package/js/metalstack/admin/v2/machine_pb.js +1 -1
  8. package/js/metalstack/admin/v2/network_pb.js +1 -1
  9. package/js/metalstack/admin/v2/partition_pb.js +1 -1
  10. package/js/metalstack/admin/v2/project_pb.js +1 -1
  11. package/js/metalstack/admin/v2/size_pb.js +1 -1
  12. package/js/metalstack/admin/v2/switch_pb.d.ts +1 -7
  13. package/js/metalstack/admin/v2/switch_pb.js +2 -2
  14. package/js/metalstack/admin/v2/tenant_pb.js +1 -1
  15. package/js/metalstack/admin/v2/token_pb.js +1 -1
  16. package/js/metalstack/admin/v2/vpn_pb.d.ts +151 -0
  17. package/js/metalstack/admin/v2/vpn_pb.js +38 -0
  18. package/js/metalstack/api/v2/common_pb.js +1 -1
  19. package/js/metalstack/api/v2/filesystem_pb.js +1 -1
  20. package/js/metalstack/api/v2/health_pb.js +1 -1
  21. package/js/metalstack/api/v2/image_pb.js +1 -1
  22. package/js/metalstack/api/v2/ip_pb.js +1 -1
  23. package/js/metalstack/api/v2/machine_pb.d.ts +12 -2
  24. package/js/metalstack/api/v2/machine_pb.js +2 -2
  25. package/js/metalstack/api/v2/method_pb.js +1 -1
  26. package/js/metalstack/api/v2/network_pb.js +1 -1
  27. package/js/metalstack/api/v2/partition_pb.js +1 -1
  28. package/js/metalstack/api/v2/predefined_rules_pb.js +1 -1
  29. package/js/metalstack/api/v2/project_pb.js +1 -1
  30. package/js/metalstack/api/v2/size_pb.js +1 -1
  31. package/js/metalstack/api/v2/switch_pb.d.ts +43 -1
  32. package/js/metalstack/api/v2/switch_pb.js +8 -3
  33. package/js/metalstack/api/v2/tenant_pb.js +1 -1
  34. package/js/metalstack/api/v2/token_pb.js +1 -1
  35. package/js/metalstack/api/v2/user_pb.js +1 -1
  36. package/js/metalstack/api/v2/version_pb.js +1 -1
  37. package/js/metalstack/api/v2/vpn_pb.d.ts +55 -0
  38. package/js/metalstack/api/v2/vpn_pb.js +14 -0
  39. package/js/metalstack/infra/v2/bmc_pb.d.ts +32 -0
  40. package/js/metalstack/infra/v2/bmc_pb.js +12 -2
  41. package/js/metalstack/infra/v2/event_pb.js +1 -1
  42. package/js/metalstack/infra/v2/switch_pb.d.ts +4 -34
  43. package/js/metalstack/infra/v2/switch_pb.js +3 -8
  44. package/package.json +5 -3
package/js/Makefile CHANGED
@@ -1,3 +1,5 @@
1
+ VERSION_STRIPPED := $(patsubst v%,%,$(VERSION))
2
+
1
3
  .PHONY: install
2
4
  install:
3
5
  bun install -dd
@@ -10,7 +12,7 @@ clean:
10
12
  build: install
11
13
  ifeq ($(CI),true)
12
14
  cd .. &&\
13
- yq e -i -o=json ".version=\"$(VERSION)\"" package.json &&\
15
+ yq e -i -o=json ".version=\"$(VERSION_STRIPPED)\"" package.json &&\
14
16
  yq e -o=json ".version" package.json
15
17
  endif
16
- cd .. && bun run build
18
+ cd .. && bun run build
@@ -1,5 +1,5 @@
1
1
  import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
- import type { Duration, FieldDescriptorProto_Type, FieldOptions, MessageOptions, OneofOptions, Timestamp } from "@bufbuild/protobuf/wkt";
2
+ import type { Duration, FieldDescriptorProto_Type, FieldMask, FieldOptions, MessageOptions, OneofOptions, Timestamp } from "@bufbuild/protobuf/wkt";
3
3
  import type { Message } from "@bufbuild/protobuf";
4
4
  /**
5
5
  * Describes the file buf/validate/validate.proto.
@@ -63,6 +63,29 @@ export declare const RuleSchema: GenMessage<Rule>;
63
63
  * @generated from message buf.validate.MessageRules
64
64
  */
65
65
  export type MessageRules = Message<"buf.validate.MessageRules"> & {
66
+ /**
67
+ * `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
68
+ * rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
69
+ *
70
+ * This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
71
+ * simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
72
+ * be same as the `expression`.
73
+ *
74
+ * For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
75
+ *
76
+ * ```proto
77
+ * message MyMessage {
78
+ * // The field `foo` must be greater than 42.
79
+ * option (buf.validate.message).cel_expression = "this.foo > 42";
80
+ * // The field `foo` must be less than 84.
81
+ * option (buf.validate.message).cel_expression = "this.foo < 84";
82
+ * optional int32 foo = 1;
83
+ * }
84
+ * ```
85
+ *
86
+ * @generated from field: repeated string cel_expression = 5;
87
+ */
88
+ celExpression: string[];
66
89
  /**
67
90
  * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
68
91
  * These rules are written in Common Expression Language (CEL) syntax. For more information,
@@ -194,6 +217,26 @@ export declare const OneofRulesSchema: GenMessage<OneofRules>;
194
217
  * @generated from message buf.validate.FieldRules
195
218
  */
196
219
  export type FieldRules = Message<"buf.validate.FieldRules"> & {
220
+ /**
221
+ * `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
222
+ * rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
223
+ *
224
+ * This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
225
+ * simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
226
+ * be same as the `expression`.
227
+ *
228
+ * For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
229
+ *
230
+ * ```proto
231
+ * message MyMessage {
232
+ * // The field `value` must be greater than 42.
233
+ * optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"];
234
+ * }
235
+ * ```
236
+ *
237
+ * @generated from field: repeated string cel_expression = 29;
238
+ */
239
+ celExpression: string[];
197
240
  /**
198
241
  * `cel` is a repeated field used to represent a textual expression
199
242
  * in the Common Expression Language (CEL) syntax. For more information,
@@ -420,6 +463,12 @@ export type FieldRules = Message<"buf.validate.FieldRules"> & {
420
463
  */
421
464
  value: DurationRules;
422
465
  case: "duration";
466
+ } | {
467
+ /**
468
+ * @generated from field: buf.validate.FieldMaskRules field_mask = 28;
469
+ */
470
+ value: FieldMaskRules;
471
+ case: "fieldMask";
423
472
  } | {
424
473
  /**
425
474
  * @generated from field: buf.validate.TimestampRules timestamp = 22;
@@ -3157,6 +3206,23 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
3157
3206
  */
3158
3207
  value: boolean;
3159
3208
  case: "hostAndPort";
3209
+ } | {
3210
+ /**
3211
+ * `ulid` specifies that the field value must be a valid ULID (Universally Unique
3212
+ * Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec).
3213
+ * If the field value isn't a valid ULID, an error message will be generated.
3214
+ *
3215
+ * ```proto
3216
+ * message MyString {
3217
+ * // value must be a valid ULID
3218
+ * string value = 1 [(buf.validate.field).string.ulid = true];
3219
+ * }
3220
+ * ```
3221
+ *
3222
+ * @generated from field: bool ulid = 35;
3223
+ */
3224
+ value: boolean;
3225
+ case: "ulid";
3160
3226
  } | {
3161
3227
  /**
3162
3228
  * `well_known_regex` specifies a common well-known pattern
@@ -3345,7 +3411,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
3345
3411
  * the string.
3346
3412
  * If the field value doesn't meet the requirement, an error message is generated.
3347
3413
  *
3348
- * ```protobuf
3414
+ * ```proto
3349
3415
  * message MyBytes {
3350
3416
  * // value does not contain \x02\x03
3351
3417
  * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
@@ -3360,7 +3426,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
3360
3426
  * values. If the field value doesn't match any of the specified values, an
3361
3427
  * error message is generated.
3362
3428
  *
3363
- * ```protobuf
3429
+ * ```proto
3364
3430
  * message MyBytes {
3365
3431
  * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
3366
3432
  * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
@@ -3439,6 +3505,25 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
3439
3505
  */
3440
3506
  value: boolean;
3441
3507
  case: "ipv6";
3508
+ } | {
3509
+ /**
3510
+ * `uuid` ensures that the field `value` encodes the 128-bit UUID data as
3511
+ * defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2).
3512
+ * The field must contain exactly 16 bytes
3513
+ * representing the UUID. If the field value isn't a valid UUID, an error
3514
+ * message will be generated.
3515
+ *
3516
+ * ```proto
3517
+ * message MyBytes {
3518
+ * // value must be a valid UUID
3519
+ * optional bytes value = 1 [(buf.validate.field).bytes.uuid = true];
3520
+ * }
3521
+ * ```
3522
+ *
3523
+ * @generated from field: bool uuid = 15;
3524
+ */
3525
+ value: boolean;
3526
+ case: "uuid";
3442
3527
  } | {
3443
3528
  case: undefined;
3444
3529
  value?: undefined;
@@ -3961,6 +4046,90 @@ export type DurationRules = Message<"buf.validate.DurationRules"> & {
3961
4046
  * Use `create(DurationRulesSchema)` to create a new message.
3962
4047
  */
3963
4048
  export declare const DurationRulesSchema: GenMessage<DurationRules>;
4049
+ /**
4050
+ * FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type.
4051
+ *
4052
+ * @generated from message buf.validate.FieldMaskRules
4053
+ */
4054
+ export type FieldMaskRules = Message<"buf.validate.FieldMaskRules"> & {
4055
+ /**
4056
+ * `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly.
4057
+ * If the field's value deviates from the specified value, an error message
4058
+ * will be generated.
4059
+ *
4060
+ * ```proto
4061
+ * message MyFieldMask {
4062
+ * // value must equal ["a"]
4063
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = {
4064
+ * paths: ["a"]
4065
+ * }];
4066
+ * }
4067
+ * ```
4068
+ *
4069
+ * @generated from field: optional google.protobuf.FieldMask const = 1;
4070
+ */
4071
+ const?: FieldMask;
4072
+ /**
4073
+ * `in` requires the field value to only contain paths matching specified
4074
+ * values or their subpaths.
4075
+ * If any of the field value's paths doesn't match the rule,
4076
+ * an error message is generated.
4077
+ * See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
4078
+ *
4079
+ * ```proto
4080
+ * message MyFieldMask {
4081
+ * // The `value` FieldMask must only contain paths listed in `in`.
4082
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
4083
+ * in: ["a", "b", "c.a"]
4084
+ * }];
4085
+ * }
4086
+ * ```
4087
+ *
4088
+ * @generated from field: repeated string in = 2;
4089
+ */
4090
+ in: string[];
4091
+ /**
4092
+ * `not_in` requires the field value to not contain paths matching specified
4093
+ * values or their subpaths.
4094
+ * If any of the field value's paths matches the rule,
4095
+ * an error message is generated.
4096
+ * See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
4097
+ *
4098
+ * ```proto
4099
+ * message MyFieldMask {
4100
+ * // The `value` FieldMask shall not contain paths listed in `not_in`.
4101
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
4102
+ * not_in: ["forbidden", "immutable", "c.a"]
4103
+ * }];
4104
+ * }
4105
+ * ```
4106
+ *
4107
+ * @generated from field: repeated string not_in = 3;
4108
+ */
4109
+ notIn: string[];
4110
+ /**
4111
+ * `example` specifies values that the field may have. These values SHOULD
4112
+ * conform to other rules. `example` values will not impact validation
4113
+ * but may be used as helpful guidance on how to populate the given field.
4114
+ *
4115
+ * ```proto
4116
+ * message MyFieldMask {
4117
+ * google.protobuf.FieldMask value = 1 [
4118
+ * (buf.validate.field).field_mask.example = { paths: ["a", "b"] },
4119
+ * (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] },
4120
+ * ];
4121
+ * }
4122
+ * ```
4123
+ *
4124
+ * @generated from field: repeated google.protobuf.FieldMask example = 4;
4125
+ */
4126
+ example: FieldMask[];
4127
+ };
4128
+ /**
4129
+ * Describes the message buf.validate.FieldMaskRules.
4130
+ * Use `create(FieldMaskRulesSchema)` to create a new message.
4131
+ */
4132
+ export declare const FieldMaskRulesSchema: GenMessage<FieldMaskRules>;
3964
4133
  /**
3965
4134
  * TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
3966
4135
  *