From 71a4534c9cc793e55fcd7860ec523ab2d782a831 Mon Sep 17 00:00:00 2001 From: d34dscene Date: Fri, 1 Aug 2025 22:45:28 +0200 Subject: [PATCH] feat: realtime updates --- .../v1/mantraev1connect/util.connect.go | 28 + proto/gen/mantrae/v1/traefik_instance.pb.go | 60 +- proto/gen/mantrae/v1/util.pb.go | 429 +- proto/gen/openapi/openapi.yaml | 203 + proto/mantrae/v1/traefik_instance.proto | 23 +- proto/mantrae/v1/util.proto | 39 + server/cmd/main.go | 11 +- server/internal/api/server/server.go | 11 +- server/internal/api/service/agent.go | 32 + server/internal/api/service/dns.go | 25 + server/internal/api/service/entrypoint.go | 24 + server/internal/api/service/middleware_ops.go | 42 + server/internal/api/service/router_ops.go | 61 + .../api/service/servers_transport_ops.go | 50 + server/internal/api/service/service_ops.go | 96 +- .../internal/api/service/traefik_instance.go | 11 + server/internal/api/service/user.go | 30 +- server/internal/api/service/util.go | 24 + server/internal/config/setup.go | 5 +- server/internal/event/event.go | 114 + server/internal/store/db/db.go | 42 +- server/internal/store/db/http_services.sql.go | 14 +- server/internal/store/db/querier.go | 6 +- server/internal/store/db/tcp_services.sql.go | 14 +- server/internal/store/db/udp_services.sql.go | 14 +- .../internal/store/queries/http_services.sql | 5 +- .../internal/store/queries/tcp_services.sql | 5 +- .../internal/store/queries/udp_services.sql | 5 +- sqlc.yml | 40 +- web/src/lib/api.ts | 94 +- .../lib/components/modals/AgentModal.svelte | 22 +- web/src/lib/components/modals/DNSModal.svelte | 12 +- .../components/modals/EntryPointModal.svelte | 13 +- .../components/modals/MiddlewareModal.svelte | 20 +- .../lib/components/modals/RouterModal.svelte | 20 +- .../modals/ServerTransportModal.svelte | 12 +- .../lib/components/modals/UserModal.svelte | 13 +- web/src/lib/components/nav/AppSidebar.svelte | 2 +- .../lib/components/tables/DataTable.svelte | 324 +- web/src/lib/gen/buf/validate/validate_pb.ts | 8360 +++++++++-------- web/src/lib/gen/mantrae/v1/agent_pb.ts | 497 +- web/src/lib/gen/mantrae/v1/auditlog_pb.ts | 173 +- web/src/lib/gen/mantrae/v1/backup_pb.ts | 256 +- web/src/lib/gen/mantrae/v1/dns_provider_pb.ts | 474 +- web/src/lib/gen/mantrae/v1/entry_point_pb.ts | 382 +- web/src/lib/gen/mantrae/v1/middleware_pb.ts | 679 +- web/src/lib/gen/mantrae/v1/profile_pb.ts | 350 +- web/src/lib/gen/mantrae/v1/protocol_pb.ts | 49 +- web/src/lib/gen/mantrae/v1/router_pb.ts | 487 +- .../gen/mantrae/v1/servers_transport_pb.ts | 473 +- web/src/lib/gen/mantrae/v1/service_pb.ts | 501 +- web/src/lib/gen/mantrae/v1/setting_pb.ts | 194 +- .../lib/gen/mantrae/v1/traefik_instance_pb.ts | 291 +- web/src/lib/gen/mantrae/v1/user_pb.ts | 735 +- web/src/lib/gen/mantrae/v1/util_pb.ts | 289 +- web/src/lib/gen/zen/traefik-schemas.ts | 1075 +-- web/src/lib/stores/realtime.ts | 262 + web/src/routes/+layout.svelte | 11 + web/src/routes/+page.svelte | 438 +- web/src/routes/agents/+page.svelte | 55 +- web/src/routes/dns/+page.svelte | 33 +- web/src/routes/entrypoints/+page.svelte | 37 +- web/src/routes/middlewares/+page.svelte | 36 +- web/src/routes/router/+page.svelte | 37 +- web/src/routes/transport/+page.svelte | 37 +- web/src/routes/users/+page.svelte | 33 +- web/vite.config.ts | 12 +- 67 files changed, 9904 insertions(+), 8347 deletions(-) create mode 100644 server/internal/event/event.go create mode 100644 web/src/lib/stores/realtime.ts diff --git a/proto/gen/mantrae/v1/mantraev1connect/util.connect.go b/proto/gen/mantrae/v1/mantraev1connect/util.connect.go index c66215a..59ffa98 100644 --- a/proto/gen/mantrae/v1/mantraev1connect/util.connect.go +++ b/proto/gen/mantrae/v1/mantraev1connect/util.connect.go @@ -37,12 +37,15 @@ const ( UtilServiceGetVersionProcedure = "/mantrae.v1.UtilService/GetVersion" // UtilServiceGetPublicIPProcedure is the fully-qualified name of the UtilService's GetPublicIP RPC. UtilServiceGetPublicIPProcedure = "/mantrae.v1.UtilService/GetPublicIP" + // UtilServiceEventStreamProcedure is the fully-qualified name of the UtilService's EventStream RPC. + UtilServiceEventStreamProcedure = "/mantrae.v1.UtilService/EventStream" ) // UtilServiceClient is a client for the mantrae.v1.UtilService service. type UtilServiceClient interface { GetVersion(context.Context, *connect.Request[v1.GetVersionRequest]) (*connect.Response[v1.GetVersionResponse], error) GetPublicIP(context.Context, *connect.Request[v1.GetPublicIPRequest]) (*connect.Response[v1.GetPublicIPResponse], error) + EventStream(context.Context, *connect.Request[v1.EventStreamRequest]) (*connect.ServerStreamForClient[v1.EventStreamResponse], error) } // NewUtilServiceClient constructs a client for the mantrae.v1.UtilService service. By default, it @@ -68,6 +71,12 @@ func NewUtilServiceClient(httpClient connect.HTTPClient, baseURL string, opts .. connect.WithSchema(utilServiceMethods.ByName("GetPublicIP")), connect.WithClientOptions(opts...), ), + eventStream: connect.NewClient[v1.EventStreamRequest, v1.EventStreamResponse]( + httpClient, + baseURL+UtilServiceEventStreamProcedure, + connect.WithSchema(utilServiceMethods.ByName("EventStream")), + connect.WithClientOptions(opts...), + ), } } @@ -75,6 +84,7 @@ func NewUtilServiceClient(httpClient connect.HTTPClient, baseURL string, opts .. type utilServiceClient struct { getVersion *connect.Client[v1.GetVersionRequest, v1.GetVersionResponse] getPublicIP *connect.Client[v1.GetPublicIPRequest, v1.GetPublicIPResponse] + eventStream *connect.Client[v1.EventStreamRequest, v1.EventStreamResponse] } // GetVersion calls mantrae.v1.UtilService.GetVersion. @@ -87,10 +97,16 @@ func (c *utilServiceClient) GetPublicIP(ctx context.Context, req *connect.Reques return c.getPublicIP.CallUnary(ctx, req) } +// EventStream calls mantrae.v1.UtilService.EventStream. +func (c *utilServiceClient) EventStream(ctx context.Context, req *connect.Request[v1.EventStreamRequest]) (*connect.ServerStreamForClient[v1.EventStreamResponse], error) { + return c.eventStream.CallServerStream(ctx, req) +} + // UtilServiceHandler is an implementation of the mantrae.v1.UtilService service. type UtilServiceHandler interface { GetVersion(context.Context, *connect.Request[v1.GetVersionRequest]) (*connect.Response[v1.GetVersionResponse], error) GetPublicIP(context.Context, *connect.Request[v1.GetPublicIPRequest]) (*connect.Response[v1.GetPublicIPResponse], error) + EventStream(context.Context, *connect.Request[v1.EventStreamRequest], *connect.ServerStream[v1.EventStreamResponse]) error } // NewUtilServiceHandler builds an HTTP handler from the service implementation. It returns the path @@ -112,12 +128,20 @@ func NewUtilServiceHandler(svc UtilServiceHandler, opts ...connect.HandlerOption connect.WithSchema(utilServiceMethods.ByName("GetPublicIP")), connect.WithHandlerOptions(opts...), ) + utilServiceEventStreamHandler := connect.NewServerStreamHandler( + UtilServiceEventStreamProcedure, + svc.EventStream, + connect.WithSchema(utilServiceMethods.ByName("EventStream")), + connect.WithHandlerOptions(opts...), + ) return "/mantrae.v1.UtilService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { case UtilServiceGetVersionProcedure: utilServiceGetVersionHandler.ServeHTTP(w, r) case UtilServiceGetPublicIPProcedure: utilServiceGetPublicIPHandler.ServeHTTP(w, r) + case UtilServiceEventStreamProcedure: + utilServiceEventStreamHandler.ServeHTTP(w, r) default: http.NotFound(w, r) } @@ -134,3 +158,7 @@ func (UnimplementedUtilServiceHandler) GetVersion(context.Context, *connect.Requ func (UnimplementedUtilServiceHandler) GetPublicIP(context.Context, *connect.Request[v1.GetPublicIPRequest]) (*connect.Response[v1.GetPublicIPResponse], error) { return nil, connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UtilService.GetPublicIP is not implemented")) } + +func (UnimplementedUtilServiceHandler) EventStream(context.Context, *connect.Request[v1.EventStreamRequest], *connect.ServerStream[v1.EventStreamResponse]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("mantrae.v1.UtilService.EventStream is not implemented")) +} diff --git a/proto/gen/mantrae/v1/traefik_instance.pb.go b/proto/gen/mantrae/v1/traefik_instance.pb.go index bdfc886..c8b402f 100644 --- a/proto/gen/mantrae/v1/traefik_instance.pb.go +++ b/proto/gen/mantrae/v1/traefik_instance.pb.go @@ -27,17 +27,18 @@ const ( type TraefikInstance struct { state protoimpl.MessageState `protogen:"open.v1"` Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"` - Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` - Tls bool `protobuf:"varint,6,opt,name=tls,proto3" json:"tls,omitempty"` - EntryPoints *structpb.Struct `protobuf:"bytes,7,opt,name=entry_points,json=entryPoints,proto3" json:"entry_points,omitempty"` - Overview *structpb.Struct `protobuf:"bytes,8,opt,name=overview,proto3" json:"overview,omitempty"` - Config *structpb.Struct `protobuf:"bytes,9,opt,name=config,proto3" json:"config,omitempty"` - Version *structpb.Struct `protobuf:"bytes,10,opt,name=version,proto3" json:"version,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + ProfileId int64 `protobuf:"varint,2,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` + Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` + Tls bool `protobuf:"varint,7,opt,name=tls,proto3" json:"tls,omitempty"` + EntryPoints *structpb.Struct `protobuf:"bytes,8,opt,name=entry_points,json=entryPoints,proto3" json:"entry_points,omitempty"` + Overview *structpb.Struct `protobuf:"bytes,9,opt,name=overview,proto3" json:"overview,omitempty"` + Config *structpb.Struct `protobuf:"bytes,10,opt,name=config,proto3" json:"config,omitempty"` + Version *structpb.Struct `protobuf:"bytes,11,opt,name=version,proto3" json:"version,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -79,6 +80,13 @@ func (x *TraefikInstance) GetId() int64 { return 0 } +func (x *TraefikInstance) GetProfileId() int64 { + if x != nil { + return x.ProfileId + } + return 0 +} + func (x *TraefikInstance) GetName() string { if x != nil { return x.Name @@ -441,23 +449,25 @@ var File_mantrae_v1_traefik_instance_proto protoreflect.FileDescriptor const file_mantrae_v1_traefik_instance_proto_rawDesc = "" + "\n" + "!mantrae/v1/traefik_instance.proto\x12\n" + - "mantrae.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdc\x03\n" + + "mantrae.v1\x1a\x1bbuf/validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfb\x03\n" + "\x0fTraefikInstance\x12\x0e\n" + - "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" + - "\x03url\x18\x03 \x01(\tR\x03url\x12\x1a\n" + - "\busername\x18\x04 \x01(\tR\busername\x12\x1a\n" + - "\bpassword\x18\x05 \x01(\tR\bpassword\x12\x10\n" + - "\x03tls\x18\x06 \x01(\bR\x03tls\x12:\n" + - "\fentry_points\x18\a \x01(\v2\x17.google.protobuf.StructR\ventryPoints\x123\n" + - "\boverview\x18\b \x01(\v2\x17.google.protobuf.StructR\boverview\x12/\n" + - "\x06config\x18\t \x01(\v2\x17.google.protobuf.StructR\x06config\x121\n" + - "\aversion\x18\n" + - " \x01(\v2\x17.google.protobuf.StructR\aversion\x129\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1d\n" + "\n" + - "created_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "profile_id\x18\x02 \x01(\x03R\tprofileId\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12\x10\n" + + "\x03url\x18\x04 \x01(\tR\x03url\x12\x1a\n" + + "\busername\x18\x05 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x06 \x01(\tR\bpassword\x12\x10\n" + + "\x03tls\x18\a \x01(\bR\x03tls\x12:\n" + + "\fentry_points\x18\b \x01(\v2\x17.google.protobuf.StructR\ventryPoints\x123\n" + + "\boverview\x18\t \x01(\v2\x17.google.protobuf.StructR\boverview\x12/\n" + + "\x06config\x18\n" + + " \x01(\v2\x17.google.protobuf.StructR\x06config\x121\n" + + "\aversion\x18\v \x01(\v2\x17.google.protobuf.StructR\aversion\x129\n" + "\n" + - "updated_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"4\n" + + "created_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"4\n" + "\x19GetTraefikInstanceRequest\x12\x17\n" + "\x02id\x18\x01 \x01(\x03B\a\xbaH\x04\"\x02 \x00R\x02id\"d\n" + "\x1aGetTraefikInstanceResponse\x12F\n" + diff --git a/proto/gen/mantrae/v1/util.pb.go b/proto/gen/mantrae/v1/util.pb.go index 14c2eed..cb8a5ec 100644 --- a/proto/gen/mantrae/v1/util.pb.go +++ b/proto/gen/mantrae/v1/util.pb.go @@ -7,6 +7,7 @@ package mantraev1 import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -21,6 +22,58 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type EventAction int32 + +const ( + EventAction_EVENT_ACTION_UNSPECIFIED EventAction = 0 + EventAction_EVENT_ACTION_CREATED EventAction = 1 + EventAction_EVENT_ACTION_UPDATED EventAction = 2 + EventAction_EVENT_ACTION_DELETED EventAction = 3 +) + +// Enum value maps for EventAction. +var ( + EventAction_name = map[int32]string{ + 0: "EVENT_ACTION_UNSPECIFIED", + 1: "EVENT_ACTION_CREATED", + 2: "EVENT_ACTION_UPDATED", + 3: "EVENT_ACTION_DELETED", + } + EventAction_value = map[string]int32{ + "EVENT_ACTION_UNSPECIFIED": 0, + "EVENT_ACTION_CREATED": 1, + "EVENT_ACTION_UPDATED": 2, + "EVENT_ACTION_DELETED": 3, + } +) + +func (x EventAction) Enum() *EventAction { + p := new(EventAction) + *p = x + return p +} + +func (x EventAction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (EventAction) Descriptor() protoreflect.EnumDescriptor { + return file_mantrae_v1_util_proto_enumTypes[0].Descriptor() +} + +func (EventAction) Type() protoreflect.EnumType { + return &file_mantrae_v1_util_proto_enumTypes[0] +} + +func (x EventAction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use EventAction.Descriptor instead. +func (EventAction) EnumDescriptor() ([]byte, []int) { + return file_mantrae_v1_util_proto_rawDescGZIP(), []int{0} +} + type GetVersionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -189,23 +242,311 @@ func (x *GetPublicIPResponse) GetIpv6() string { return "" } +type EventStreamRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProfileId int64 `protobuf:"varint,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventStreamRequest) Reset() { + *x = EventStreamRequest{} + mi := &file_mantrae_v1_util_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventStreamRequest) ProtoMessage() {} + +func (x *EventStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_mantrae_v1_util_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventStreamRequest.ProtoReflect.Descriptor instead. +func (*EventStreamRequest) Descriptor() ([]byte, []int) { + return file_mantrae_v1_util_proto_rawDescGZIP(), []int{4} +} + +func (x *EventStreamRequest) GetProfileId() int64 { + if x != nil { + return x.ProfileId + } + return 0 +} + +type EventStreamResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Action EventAction `protobuf:"varint,1,opt,name=action,proto3,enum=mantrae.v1.EventAction" json:"action,omitempty"` + // Types that are valid to be assigned to Data: + // + // *EventStreamResponse_Profile + // *EventStreamResponse_User + // *EventStreamResponse_Agent + // *EventStreamResponse_DnsProvider + // *EventStreamResponse_TraefikInstance + // *EventStreamResponse_Router + // *EventStreamResponse_Service + // *EventStreamResponse_Middleware + // *EventStreamResponse_ServersTransport + // *EventStreamResponse_EntryPoint + Data isEventStreamResponse_Data `protobuf_oneof:"data"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EventStreamResponse) Reset() { + *x = EventStreamResponse{} + mi := &file_mantrae_v1_util_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EventStreamResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventStreamResponse) ProtoMessage() {} + +func (x *EventStreamResponse) ProtoReflect() protoreflect.Message { + mi := &file_mantrae_v1_util_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventStreamResponse.ProtoReflect.Descriptor instead. +func (*EventStreamResponse) Descriptor() ([]byte, []int) { + return file_mantrae_v1_util_proto_rawDescGZIP(), []int{5} +} + +func (x *EventStreamResponse) GetAction() EventAction { + if x != nil { + return x.Action + } + return EventAction_EVENT_ACTION_UNSPECIFIED +} + +func (x *EventStreamResponse) GetData() isEventStreamResponse_Data { + if x != nil { + return x.Data + } + return nil +} + +func (x *EventStreamResponse) GetProfile() *Profile { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_Profile); ok { + return x.Profile + } + } + return nil +} + +func (x *EventStreamResponse) GetUser() *User { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_User); ok { + return x.User + } + } + return nil +} + +func (x *EventStreamResponse) GetAgent() *Agent { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_Agent); ok { + return x.Agent + } + } + return nil +} + +func (x *EventStreamResponse) GetDnsProvider() *DnsProvider { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_DnsProvider); ok { + return x.DnsProvider + } + } + return nil +} + +func (x *EventStreamResponse) GetTraefikInstance() *TraefikInstance { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_TraefikInstance); ok { + return x.TraefikInstance + } + } + return nil +} + +func (x *EventStreamResponse) GetRouter() *Router { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_Router); ok { + return x.Router + } + } + return nil +} + +func (x *EventStreamResponse) GetService() *Service { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_Service); ok { + return x.Service + } + } + return nil +} + +func (x *EventStreamResponse) GetMiddleware() *Middleware { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_Middleware); ok { + return x.Middleware + } + } + return nil +} + +func (x *EventStreamResponse) GetServersTransport() *ServersTransport { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_ServersTransport); ok { + return x.ServersTransport + } + } + return nil +} + +func (x *EventStreamResponse) GetEntryPoint() *EntryPoint { + if x != nil { + if x, ok := x.Data.(*EventStreamResponse_EntryPoint); ok { + return x.EntryPoint + } + } + return nil +} + +type isEventStreamResponse_Data interface { + isEventStreamResponse_Data() +} + +type EventStreamResponse_Profile struct { + Profile *Profile `protobuf:"bytes,2,opt,name=profile,proto3,oneof"` +} + +type EventStreamResponse_User struct { + User *User `protobuf:"bytes,3,opt,name=user,proto3,oneof"` +} + +type EventStreamResponse_Agent struct { + Agent *Agent `protobuf:"bytes,4,opt,name=agent,proto3,oneof"` +} + +type EventStreamResponse_DnsProvider struct { + DnsProvider *DnsProvider `protobuf:"bytes,5,opt,name=dns_provider,json=dnsProvider,proto3,oneof"` +} + +type EventStreamResponse_TraefikInstance struct { + TraefikInstance *TraefikInstance `protobuf:"bytes,6,opt,name=traefik_instance,json=traefikInstance,proto3,oneof"` +} + +type EventStreamResponse_Router struct { + Router *Router `protobuf:"bytes,7,opt,name=router,proto3,oneof"` +} + +type EventStreamResponse_Service struct { + Service *Service `protobuf:"bytes,8,opt,name=service,proto3,oneof"` +} + +type EventStreamResponse_Middleware struct { + Middleware *Middleware `protobuf:"bytes,9,opt,name=middleware,proto3,oneof"` +} + +type EventStreamResponse_ServersTransport struct { + ServersTransport *ServersTransport `protobuf:"bytes,10,opt,name=servers_transport,json=serversTransport,proto3,oneof"` +} + +type EventStreamResponse_EntryPoint struct { + EntryPoint *EntryPoint `protobuf:"bytes,11,opt,name=entry_point,json=entryPoint,proto3,oneof"` +} + +func (*EventStreamResponse_Profile) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_User) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_Agent) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_DnsProvider) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_TraefikInstance) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_Router) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_Service) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_Middleware) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_ServersTransport) isEventStreamResponse_Data() {} + +func (*EventStreamResponse_EntryPoint) isEventStreamResponse_Data() {} + var File_mantrae_v1_util_proto protoreflect.FileDescriptor const file_mantrae_v1_util_proto_rawDesc = "" + "\n" + "\x15mantrae/v1/util.proto\x12\n" + - "mantrae.v1\"\x13\n" + + "mantrae.v1\x1a\x1bbuf/validate/validate.proto\x1a\x16mantrae/v1/agent.proto\x1a\x1dmantrae/v1/dns_provider.proto\x1a\x1cmantrae/v1/entry_point.proto\x1a\x1bmantrae/v1/middleware.proto\x1a\x18mantrae/v1/profile.proto\x1a\x17mantrae/v1/router.proto\x1a\"mantrae/v1/servers_transport.proto\x1a\x18mantrae/v1/service.proto\x1a!mantrae/v1/traefik_instance.proto\x1a\x15mantrae/v1/user.proto\"\x13\n" + "\x11GetVersionRequest\".\n" + "\x12GetVersionResponse\x12\x18\n" + "\aversion\x18\x01 \x01(\tR\aversion\"\x14\n" + "\x12GetPublicIPRequest\"=\n" + "\x13GetPublicIPResponse\x12\x12\n" + "\x04ipv4\x18\x01 \x01(\tR\x04ipv4\x12\x12\n" + - "\x04ipv6\x18\x02 \x01(\tR\x04ipv62\xaa\x01\n" + + "\x04ipv6\x18\x02 \x01(\tR\x04ipv6\"<\n" + + "\x12EventStreamRequest\x12&\n" + + "\n" + + "profile_id\x18\x01 \x01(\x03B\a\xbaH\x04\"\x02 \x00R\tprofileId\"\xfb\x04\n" + + "\x13EventStreamResponse\x12/\n" + + "\x06action\x18\x01 \x01(\x0e2\x17.mantrae.v1.EventActionR\x06action\x12/\n" + + "\aprofile\x18\x02 \x01(\v2\x13.mantrae.v1.ProfileH\x00R\aprofile\x12&\n" + + "\x04user\x18\x03 \x01(\v2\x10.mantrae.v1.UserH\x00R\x04user\x12)\n" + + "\x05agent\x18\x04 \x01(\v2\x11.mantrae.v1.AgentH\x00R\x05agent\x12<\n" + + "\fdns_provider\x18\x05 \x01(\v2\x17.mantrae.v1.DnsProviderH\x00R\vdnsProvider\x12H\n" + + "\x10traefik_instance\x18\x06 \x01(\v2\x1b.mantrae.v1.TraefikInstanceH\x00R\x0ftraefikInstance\x12,\n" + + "\x06router\x18\a \x01(\v2\x12.mantrae.v1.RouterH\x00R\x06router\x12/\n" + + "\aservice\x18\b \x01(\v2\x13.mantrae.v1.ServiceH\x00R\aservice\x128\n" + + "\n" + + "middleware\x18\t \x01(\v2\x16.mantrae.v1.MiddlewareH\x00R\n" + + "middleware\x12K\n" + + "\x11servers_transport\x18\n" + + " \x01(\v2\x1c.mantrae.v1.ServersTransportH\x00R\x10serversTransport\x129\n" + + "\ventry_point\x18\v \x01(\v2\x16.mantrae.v1.EntryPointH\x00R\n" + + "entryPointB\x06\n" + + "\x04data*y\n" + + "\vEventAction\x12\x1c\n" + + "\x18EVENT_ACTION_UNSPECIFIED\x10\x00\x12\x18\n" + + "\x14EVENT_ACTION_CREATED\x10\x01\x12\x18\n" + + "\x14EVENT_ACTION_UPDATED\x10\x02\x12\x18\n" + + "\x14EVENT_ACTION_DELETED\x10\x032\xfc\x01\n" + "\vUtilService\x12K\n" + "\n" + "GetVersion\x12\x1d.mantrae.v1.GetVersionRequest\x1a\x1e.mantrae.v1.GetVersionResponse\x12N\n" + - "\vGetPublicIP\x12\x1e.mantrae.v1.GetPublicIPRequest\x1a\x1f.mantrae.v1.GetPublicIPResponseB\xa3\x01\n" + + "\vGetPublicIP\x12\x1e.mantrae.v1.GetPublicIPRequest\x1a\x1f.mantrae.v1.GetPublicIPResponse\x12P\n" + + "\vEventStream\x12\x1e.mantrae.v1.EventStreamRequest\x1a\x1f.mantrae.v1.EventStreamResponse0\x01B\xa3\x01\n" + "\x0ecom.mantrae.v1B\tUtilProtoP\x01Z=github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1;mantraev1\xa2\x02\x03MXX\xaa\x02\n" + "Mantrae.V1\xca\x02\n" + "Mantrae\\V1\xe2\x02\x16Mantrae\\V1\\GPBMetadata\xea\x02\vMantrae::V1b\x06proto3" @@ -222,23 +563,50 @@ func file_mantrae_v1_util_proto_rawDescGZIP() []byte { return file_mantrae_v1_util_proto_rawDescData } -var file_mantrae_v1_util_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_mantrae_v1_util_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mantrae_v1_util_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_mantrae_v1_util_proto_goTypes = []any{ - (*GetVersionRequest)(nil), // 0: mantrae.v1.GetVersionRequest - (*GetVersionResponse)(nil), // 1: mantrae.v1.GetVersionResponse - (*GetPublicIPRequest)(nil), // 2: mantrae.v1.GetPublicIPRequest - (*GetPublicIPResponse)(nil), // 3: mantrae.v1.GetPublicIPResponse + (EventAction)(0), // 0: mantrae.v1.EventAction + (*GetVersionRequest)(nil), // 1: mantrae.v1.GetVersionRequest + (*GetVersionResponse)(nil), // 2: mantrae.v1.GetVersionResponse + (*GetPublicIPRequest)(nil), // 3: mantrae.v1.GetPublicIPRequest + (*GetPublicIPResponse)(nil), // 4: mantrae.v1.GetPublicIPResponse + (*EventStreamRequest)(nil), // 5: mantrae.v1.EventStreamRequest + (*EventStreamResponse)(nil), // 6: mantrae.v1.EventStreamResponse + (*Profile)(nil), // 7: mantrae.v1.Profile + (*User)(nil), // 8: mantrae.v1.User + (*Agent)(nil), // 9: mantrae.v1.Agent + (*DnsProvider)(nil), // 10: mantrae.v1.DnsProvider + (*TraefikInstance)(nil), // 11: mantrae.v1.TraefikInstance + (*Router)(nil), // 12: mantrae.v1.Router + (*Service)(nil), // 13: mantrae.v1.Service + (*Middleware)(nil), // 14: mantrae.v1.Middleware + (*ServersTransport)(nil), // 15: mantrae.v1.ServersTransport + (*EntryPoint)(nil), // 16: mantrae.v1.EntryPoint } var file_mantrae_v1_util_proto_depIdxs = []int32{ - 0, // 0: mantrae.v1.UtilService.GetVersion:input_type -> mantrae.v1.GetVersionRequest - 2, // 1: mantrae.v1.UtilService.GetPublicIP:input_type -> mantrae.v1.GetPublicIPRequest - 1, // 2: mantrae.v1.UtilService.GetVersion:output_type -> mantrae.v1.GetVersionResponse - 3, // 3: mantrae.v1.UtilService.GetPublicIP:output_type -> mantrae.v1.GetPublicIPResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: mantrae.v1.EventStreamResponse.action:type_name -> mantrae.v1.EventAction + 7, // 1: mantrae.v1.EventStreamResponse.profile:type_name -> mantrae.v1.Profile + 8, // 2: mantrae.v1.EventStreamResponse.user:type_name -> mantrae.v1.User + 9, // 3: mantrae.v1.EventStreamResponse.agent:type_name -> mantrae.v1.Agent + 10, // 4: mantrae.v1.EventStreamResponse.dns_provider:type_name -> mantrae.v1.DnsProvider + 11, // 5: mantrae.v1.EventStreamResponse.traefik_instance:type_name -> mantrae.v1.TraefikInstance + 12, // 6: mantrae.v1.EventStreamResponse.router:type_name -> mantrae.v1.Router + 13, // 7: mantrae.v1.EventStreamResponse.service:type_name -> mantrae.v1.Service + 14, // 8: mantrae.v1.EventStreamResponse.middleware:type_name -> mantrae.v1.Middleware + 15, // 9: mantrae.v1.EventStreamResponse.servers_transport:type_name -> mantrae.v1.ServersTransport + 16, // 10: mantrae.v1.EventStreamResponse.entry_point:type_name -> mantrae.v1.EntryPoint + 1, // 11: mantrae.v1.UtilService.GetVersion:input_type -> mantrae.v1.GetVersionRequest + 3, // 12: mantrae.v1.UtilService.GetPublicIP:input_type -> mantrae.v1.GetPublicIPRequest + 5, // 13: mantrae.v1.UtilService.EventStream:input_type -> mantrae.v1.EventStreamRequest + 2, // 14: mantrae.v1.UtilService.GetVersion:output_type -> mantrae.v1.GetVersionResponse + 4, // 15: mantrae.v1.UtilService.GetPublicIP:output_type -> mantrae.v1.GetPublicIPResponse + 6, // 16: mantrae.v1.UtilService.EventStream:output_type -> mantrae.v1.EventStreamResponse + 14, // [14:17] is the sub-list for method output_type + 11, // [11:14] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_mantrae_v1_util_proto_init() } @@ -246,18 +614,41 @@ func file_mantrae_v1_util_proto_init() { if File_mantrae_v1_util_proto != nil { return } + file_mantrae_v1_agent_proto_init() + file_mantrae_v1_dns_provider_proto_init() + file_mantrae_v1_entry_point_proto_init() + file_mantrae_v1_middleware_proto_init() + file_mantrae_v1_profile_proto_init() + file_mantrae_v1_router_proto_init() + file_mantrae_v1_servers_transport_proto_init() + file_mantrae_v1_service_proto_init() + file_mantrae_v1_traefik_instance_proto_init() + file_mantrae_v1_user_proto_init() + file_mantrae_v1_util_proto_msgTypes[5].OneofWrappers = []any{ + (*EventStreamResponse_Profile)(nil), + (*EventStreamResponse_User)(nil), + (*EventStreamResponse_Agent)(nil), + (*EventStreamResponse_DnsProvider)(nil), + (*EventStreamResponse_TraefikInstance)(nil), + (*EventStreamResponse_Router)(nil), + (*EventStreamResponse_Service)(nil), + (*EventStreamResponse_Middleware)(nil), + (*EventStreamResponse_ServersTransport)(nil), + (*EventStreamResponse_EntryPoint)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_mantrae_v1_util_proto_rawDesc), len(file_mantrae_v1_util_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, + NumEnums: 1, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, GoTypes: file_mantrae_v1_util_proto_goTypes, DependencyIndexes: file_mantrae_v1_util_proto_depIdxs, + EnumInfos: file_mantrae_v1_util_proto_enumTypes, MessageInfos: file_mantrae_v1_util_proto_msgTypes, }.Build() File_mantrae_v1_util_proto = out.File diff --git a/proto/gen/openapi/openapi.yaml b/proto/gen/openapi/openapi.yaml index 90b2d3f..31bf59f 100644 --- a/proto/gen/openapi/openapi.yaml +++ b/proto/gen/openapi/openapi.yaml @@ -2338,6 +2338,12 @@ components: - string title: id format: int64 + profileId: + type: + - integer + - string + title: profile_id + format: int64 name: type: string title: name @@ -2675,6 +2681,105 @@ components: $ref: '#/components/schemas/mantrae.v1.User' title: VerifyOTPResponse additionalProperties: false + mantrae.v1.EventAction: + type: string + title: EventAction + enum: + - EVENT_ACTION_UNSPECIFIED + - EVENT_ACTION_CREATED + - EVENT_ACTION_UPDATED + - EVENT_ACTION_DELETED + mantrae.v1.EventStreamRequest: + type: object + properties: + profileId: + exclusiveMinimum: 0 + type: + - integer + - string + title: profile_id + format: int64 + title: EventStreamRequest + additionalProperties: false + mantrae.v1.EventStreamResponse: + type: object + oneOf: + - properties: + agent: + title: agent + $ref: '#/components/schemas/mantrae.v1.Agent' + title: agent + required: + - agent + - properties: + dnsProvider: + title: dns_provider + $ref: '#/components/schemas/mantrae.v1.DnsProvider' + title: dns_provider + required: + - dnsProvider + - properties: + entryPoint: + title: entry_point + $ref: '#/components/schemas/mantrae.v1.EntryPoint' + title: entry_point + required: + - entryPoint + - properties: + middleware: + title: middleware + $ref: '#/components/schemas/mantrae.v1.Middleware' + title: middleware + required: + - middleware + - properties: + profile: + title: profile + $ref: '#/components/schemas/mantrae.v1.Profile' + title: profile + required: + - profile + - properties: + router: + title: router + $ref: '#/components/schemas/mantrae.v1.Router' + title: router + required: + - router + - properties: + serversTransport: + title: servers_transport + $ref: '#/components/schemas/mantrae.v1.ServersTransport' + title: servers_transport + required: + - serversTransport + - properties: + service: + title: service + $ref: '#/components/schemas/mantrae.v1.Service' + title: service + required: + - service + - properties: + traefikInstance: + title: traefik_instance + $ref: '#/components/schemas/mantrae.v1.TraefikInstance' + title: traefik_instance + required: + - traefikInstance + - properties: + user: + title: user + $ref: '#/components/schemas/mantrae.v1.User' + title: user + required: + - user + properties: + action: + title: action + $ref: '#/components/schemas/mantrae.v1.EventAction' + title: EventStreamResponse + additionalProperties: false mantrae.v1.GetPublicIPRequest: type: object title: GetPublicIPRequest @@ -6356,6 +6461,104 @@ paths: application/json: schema: $ref: '#/components/schemas/mantrae.v1.GetPublicIPResponse' + /mantrae.v1.UtilService/EventStream: + post: + tags: + - mantrae.v1.UtilService + summary: EventStream + operationId: mantrae.v1.UtilService.EventStream + parameters: + - name: Connect-Protocol-Version + in: header + required: true + schema: + $ref: '#/components/schemas/connect-protocol-version' + - name: Connect-Timeout-Ms + in: header + schema: + $ref: '#/components/schemas/connect-timeout-header' + requestBody: + content: + application/connect+json: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/connect+proto: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/grpc: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/grpc+proto: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/grpc+json: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/grpc-web: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/grpc-web+proto: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + application/grpc-web+json: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamRequest' + required: true + responses: + default: + description: Error + content: + application/connect+json: + schema: + $ref: '#/components/schemas/connect.error' + application/connect+proto: + schema: + $ref: '#/components/schemas/connect.error' + application/grpc: + schema: + $ref: '#/components/schemas/connect.error' + application/grpc+proto: + schema: + $ref: '#/components/schemas/connect.error' + application/grpc+json: + schema: + $ref: '#/components/schemas/connect.error' + application/grpc-web: + schema: + $ref: '#/components/schemas/connect.error' + application/grpc-web+proto: + schema: + $ref: '#/components/schemas/connect.error' + application/grpc-web+json: + schema: + $ref: '#/components/schemas/connect.error' + "200": + description: Success + content: + application/connect+json: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/connect+proto: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/grpc: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/grpc+proto: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/grpc+json: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/grpc-web: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/grpc-web+proto: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' + application/grpc-web+json: + schema: + $ref: '#/components/schemas/mantrae.v1.EventStreamResponse' tags: - name: mantrae.v1.AgentService - name: mantrae.v1.AuditLogService diff --git a/proto/mantrae/v1/traefik_instance.proto b/proto/mantrae/v1/traefik_instance.proto index 080fbc5..8c70581 100644 --- a/proto/mantrae/v1/traefik_instance.proto +++ b/proto/mantrae/v1/traefik_instance.proto @@ -18,17 +18,18 @@ service TraefikInstanceService { message TraefikInstance { int64 id = 1; - string name = 2; - string url = 3; - string username = 4; - string password = 5; - bool tls = 6; - google.protobuf.Struct entry_points = 7; - google.protobuf.Struct overview = 8; - google.protobuf.Struct config = 9; - google.protobuf.Struct version = 10; - google.protobuf.Timestamp created_at = 11; - google.protobuf.Timestamp updated_at = 12; + int64 profile_id = 2; + string name = 3; + string url = 4; + string username = 5; + string password = 6; + bool tls = 7; + google.protobuf.Struct entry_points = 8; + google.protobuf.Struct overview = 9; + google.protobuf.Struct config = 10; + google.protobuf.Struct version = 11; + google.protobuf.Timestamp created_at = 12; + google.protobuf.Timestamp updated_at = 13; } message GetTraefikInstanceRequest { diff --git a/proto/mantrae/v1/util.proto b/proto/mantrae/v1/util.proto index dd0ae01..5330f5e 100644 --- a/proto/mantrae/v1/util.proto +++ b/proto/mantrae/v1/util.proto @@ -2,9 +2,29 @@ syntax = "proto3"; package mantrae.v1; +import "buf/validate/validate.proto"; +import "mantrae/v1/agent.proto"; +import "mantrae/v1/dns_provider.proto"; +import "mantrae/v1/entry_point.proto"; +import "mantrae/v1/middleware.proto"; +import "mantrae/v1/profile.proto"; +import "mantrae/v1/router.proto"; +import "mantrae/v1/servers_transport.proto"; +import "mantrae/v1/service.proto"; +import "mantrae/v1/traefik_instance.proto"; +import "mantrae/v1/user.proto"; + service UtilService { rpc GetVersion(GetVersionRequest) returns (GetVersionResponse); rpc GetPublicIP(GetPublicIPRequest) returns (GetPublicIPResponse); + rpc EventStream(EventStreamRequest) returns (stream EventStreamResponse); +} + +enum EventAction { + EVENT_ACTION_UNSPECIFIED = 0; + EVENT_ACTION_CREATED = 1; + EVENT_ACTION_UPDATED = 2; + EVENT_ACTION_DELETED = 3; } message GetVersionRequest {} @@ -17,3 +37,22 @@ message GetPublicIPResponse { string ipv4 = 1; string ipv6 = 2; } + +message EventStreamRequest { + int64 profile_id = 1 [(buf.validate.field).int64.gt = 0]; +} +message EventStreamResponse { + EventAction action = 1; + oneof data { + Profile profile = 2; + User user = 3; + Agent agent = 4; + DnsProvider dns_provider = 5; + TraefikInstance traefik_instance = 6; + Router router = 7; + Service service = 8; + Middleware middleware = 9; + ServersTransport servers_transport = 10; + EntryPoint entry_point = 11; + } +} diff --git a/server/cmd/main.go b/server/cmd/main.go index fb6ea91..86a879d 100644 --- a/server/cmd/main.go +++ b/server/cmd/main.go @@ -13,8 +13,8 @@ import ( func main() { // Graceful shutdown - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) + defer stop() app, err := config.Setup(ctx) if err != nil { @@ -22,13 +22,6 @@ func main() { return } - go func() { - sigCh := make(chan os.Signal, 1) - signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM) - <-sigCh - cancel() - }() - srv := server.NewServer(app) if err := srv.Start(ctx); err != nil { slog.Error("Server error", "error", err) diff --git a/server/internal/api/server/server.go b/server/internal/api/server/server.go index 8233c9c..2c089bc 100644 --- a/server/internal/api/server/server.go +++ b/server/internal/api/server/server.go @@ -7,6 +7,7 @@ import ( "log" "log/slog" "net/http" + "net/http/pprof" "runtime/debug" "time" @@ -166,11 +167,11 @@ func (s *Server) registerServices() { s.mux.Handle(grpcreflect.NewHandlerV1Alpha(reflector)) // PProf debug endpoints - // s.mux.HandleFunc("/debug/pprof/", pprof.Index) - // s.mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) - // s.mux.HandleFunc("/debug/pprof/profile", pprof.Profile) - // s.mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) - // s.mux.HandleFunc("/debug/pprof/trace", pprof.Trace) + s.mux.HandleFunc("/debug/pprof/", pprof.Index) + s.mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) + s.mux.HandleFunc("/debug/pprof/profile", pprof.Profile) + s.mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) + s.mux.HandleFunc("/debug/pprof/trace", pprof.Trace) // Static files s.WithStatic() diff --git a/server/internal/api/service/agent.go b/server/internal/api/service/agent.go index daa2802..d9c684d 100644 --- a/server/internal/api/service/agent.go +++ b/server/internal/api/service/agent.go @@ -51,6 +51,13 @@ func (s *AgentService) CreateAgent( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Agent{ + Agent: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.CreateAgentResponse{ Agent: result.ToProto(), }), nil @@ -78,6 +85,13 @@ func (s *AgentService) UpdateAgent( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Agent{ + Agent: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.UpdateAgentResponse{ Agent: result.ToProto(), }), nil @@ -87,9 +101,21 @@ func (s *AgentService) DeleteAgent( ctx context.Context, req *connect.Request[mantraev1.DeleteAgentRequest], ) (*connect.Response[mantraev1.DeleteAgentResponse], error) { + agent, err := s.app.Conn.GetQuery().GetAgent(ctx, req.Msg.Id) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } + if err := s.app.Conn.GetQuery().DeleteAgent(ctx, req.Msg.Id); err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Agent{ + Agent: agent.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.DeleteAgentResponse{}), nil } @@ -155,6 +181,12 @@ func (s *AgentService) HealthCheck( return nil, connect.NewError(connect.CodeInternal, err) } + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Agent{ + Agent: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.HealthCheckResponse{ Agent: result.ToProto(), }), nil diff --git a/server/internal/api/service/dns.go b/server/internal/api/service/dns.go index ddaaede..c367856 100644 --- a/server/internal/api/service/dns.go +++ b/server/internal/api/service/dns.go @@ -75,6 +75,13 @@ func (s *DnsProviderService) CreateDnsProvider( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_DnsProvider{ + DnsProvider: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.CreateDnsProviderResponse{ DnsProvider: result.ToProto(), }), nil @@ -123,6 +130,13 @@ func (s *DnsProviderService) UpdateDnsProvider( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_DnsProvider{ + DnsProvider: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.UpdateDnsProviderResponse{ DnsProvider: result.ToProto(), }), nil @@ -132,9 +146,20 @@ func (s *DnsProviderService) DeleteDnsProvider( ctx context.Context, req *connect.Request[mantraev1.DeleteDnsProviderRequest], ) (*connect.Response[mantraev1.DeleteDnsProviderResponse], error) { + dnsProvider, err := s.app.Conn.GetQuery().GetDnsProvider(ctx, req.Msg.Id) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } if err := s.app.Conn.GetQuery().DeleteDnsProvider(ctx, req.Msg.Id); err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_DnsProvider{ + DnsProvider: dnsProvider.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.DeleteDnsProviderResponse{}), nil } diff --git a/server/internal/api/service/entrypoint.go b/server/internal/api/service/entrypoint.go index 592a201..65b3d97 100644 --- a/server/internal/api/service/entrypoint.go +++ b/server/internal/api/service/entrypoint.go @@ -52,6 +52,13 @@ func (s *EntryPointService) CreateEntryPoint( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_EntryPoint{ + EntryPoint: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.CreateEntryPointResponse{ EntryPoint: result.ToProto(), }), nil @@ -82,6 +89,13 @@ func (s *EntryPointService) UpdateEntryPoint( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_EntryPoint{ + EntryPoint: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.UpdateEntryPointResponse{ EntryPoint: result.ToProto(), }), nil @@ -91,12 +105,22 @@ func (s *EntryPointService) DeleteEntryPoint( ctx context.Context, req *connect.Request[mantraev1.DeleteEntryPointRequest], ) (*connect.Response[mantraev1.DeleteEntryPointResponse], error) { + entryPoint, err := s.app.Conn.GetQuery().GetEntryPoint(ctx, req.Msg.Id) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } if err := s.updateRouterEntrypoints(ctx, req.Msg.Id, ""); err != nil { return nil, connect.NewError(connect.CodeInternal, err) } if err := s.app.Conn.GetQuery().DeleteEntryPointByID(ctx, req.Msg.Id); err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_EntryPoint{ + EntryPoint: entryPoint.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.DeleteEntryPointResponse{}), nil } diff --git a/server/internal/api/service/middleware_ops.go b/server/internal/api/service/middleware_ops.go index 30451d0..1c9415a 100644 --- a/server/internal/api/service/middleware_ops.go +++ b/server/internal/api/service/middleware_ops.go @@ -94,6 +94,13 @@ func (s *HTTPMiddlewareOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Middleware{ + Middleware: result.ToProto(), + }, + }) return &mantraev1.CreateMiddlewareResponse{ Middleware: result.ToProto(), }, nil @@ -159,6 +166,13 @@ func (s *HTTPMiddlewareOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Middleware{ + Middleware: result.ToProto(), + }, + }) return &mantraev1.UpdateMiddlewareResponse{ Middleware: result.ToProto(), }, nil @@ -199,6 +213,13 @@ func (s *HTTPMiddlewareOps) Delete( if err := s.app.Conn.GetQuery().DeleteHttpMiddleware(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Middleware{ + Middleware: middleware.ToProto(), + }, + }) return &mantraev1.DeleteMiddlewareResponse{}, nil } @@ -277,6 +298,13 @@ func (s *TCPMiddlewareOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Middleware{ + Middleware: result.ToProto(), + }, + }) return &mantraev1.CreateMiddlewareResponse{ Middleware: result.ToProto(), }, nil @@ -339,6 +367,13 @@ func (s *TCPMiddlewareOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Middleware{ + Middleware: result.ToProto(), + }, + }) return &mantraev1.UpdateMiddlewareResponse{ Middleware: result.ToProto(), }, nil @@ -379,6 +414,13 @@ func (s *TCPMiddlewareOps) Delete( if err := s.app.Conn.GetQuery().DeleteTcpMiddleware(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Middleware{ + Middleware: middleware.ToProto(), + }, + }) return &mantraev1.DeleteMiddlewareResponse{}, nil } diff --git a/server/internal/api/service/router_ops.go b/server/internal/api/service/router_ops.go index c308152..9bf1c38 100644 --- a/server/internal/api/service/router_ops.go +++ b/server/internal/api/service/router_ops.go @@ -104,6 +104,12 @@ func (s *HTTPRouterOps) Create( router.DnsProviders = append(router.DnsProviders, p.ToProto()) } + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: router, + }, + }) return &mantraev1.CreateRouterResponse{ Router: router, }, nil @@ -183,6 +189,12 @@ func (s *HTTPRouterOps) Update( router.DnsProviders = append(router.DnsProviders, p.ToProto()) } + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: router, + }, + }) return &mantraev1.UpdateRouterResponse{ Router: router, }, nil @@ -213,6 +225,13 @@ func (s *HTTPRouterOps) Delete( if err := s.app.Conn.GetQuery().DeleteHttpRouter(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: router.ToProto(), + }, + }) return &mantraev1.DeleteRouterResponse{}, nil } @@ -284,6 +303,13 @@ func (s *TCPRouterOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: result.ToProto(), + }, + }) return &mantraev1.CreateRouterResponse{ Router: result.ToProto(), }, nil @@ -352,6 +378,13 @@ func (s *TCPRouterOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: result.ToProto(), + }, + }) return &mantraev1.UpdateRouterResponse{ Router: result.ToProto(), }, nil @@ -381,6 +414,13 @@ func (s *TCPRouterOps) Delete( if err := s.app.Conn.GetQuery().DeleteTcpRouter(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: router.ToProto(), + }, + }) return &mantraev1.DeleteRouterResponse{}, nil } @@ -452,6 +492,13 @@ func (s *UDPRouterOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: result.ToProto(), + }, + }) return &mantraev1.CreateRouterResponse{ Router: result.ToProto(), }, nil @@ -478,6 +525,13 @@ func (s *UDPRouterOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: result.ToProto(), + }, + }) return &mantraev1.UpdateRouterResponse{ Router: result.ToProto(), }, nil @@ -507,6 +561,13 @@ func (s *UDPRouterOps) Delete( if err := s.app.Conn.GetQuery().DeleteUdpRouter(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Router{ + Router: router.ToProto(), + }, + }) return &mantraev1.DeleteRouterResponse{}, nil } diff --git a/server/internal/api/service/servers_transport_ops.go b/server/internal/api/service/servers_transport_ops.go index 23040c9..782c230 100644 --- a/server/internal/api/service/servers_transport_ops.go +++ b/server/internal/api/service/servers_transport_ops.go @@ -83,6 +83,13 @@ func (s *HTTPServersTransportOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_ServersTransport{ + ServersTransport: result.ToProto(), + }, + }) return &mantraev1.CreateServersTransportResponse{ ServersTransport: result.ToProto(), }, nil @@ -108,6 +115,13 @@ func (s *HTTPServersTransportOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_ServersTransport{ + ServersTransport: result.ToProto(), + }, + }) return &mantraev1.UpdateServersTransportResponse{ ServersTransport: result.ToProto(), }, nil @@ -117,9 +131,20 @@ func (s *HTTPServersTransportOps) Delete( ctx context.Context, req *mantraev1.DeleteServersTransportRequest, ) (*mantraev1.DeleteServersTransportResponse, error) { + serversTransport, err := s.app.Conn.GetQuery().GetHttpServersTransport(ctx, req.Id) + if err != nil { + return nil, err + } if err := s.app.Conn.GetQuery().DeleteHttpServersTransport(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_ServersTransport{ + ServersTransport: serversTransport.ToProto(), + }, + }) return &mantraev1.DeleteServersTransportResponse{}, nil } @@ -191,6 +216,13 @@ func (s *TCPServersTransportOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_ServersTransport{ + ServersTransport: result.ToProto(), + }, + }) return &mantraev1.CreateServersTransportResponse{ ServersTransport: result.ToProto(), }, nil @@ -216,6 +248,13 @@ func (s *TCPServersTransportOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_ServersTransport{ + ServersTransport: result.ToProto(), + }, + }) return &mantraev1.UpdateServersTransportResponse{ ServersTransport: result.ToProto(), }, nil @@ -225,9 +264,20 @@ func (s *TCPServersTransportOps) Delete( ctx context.Context, req *mantraev1.DeleteServersTransportRequest, ) (*mantraev1.DeleteServersTransportResponse, error) { + serversTransport, err := s.app.Conn.GetQuery().GetTcpServersTransport(ctx, req.Id) + if err != nil { + return nil, err + } if err := s.app.Conn.GetQuery().DeleteTcpServersTransport(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_ServersTransport{ + ServersTransport: serversTransport.ToProto(), + }, + }) return &mantraev1.DeleteServersTransportResponse{}, nil } diff --git a/server/internal/api/service/service_ops.go b/server/internal/api/service/service_ops.go index aed5766..b92317a 100644 --- a/server/internal/api/service/service_ops.go +++ b/server/internal/api/service/service_ops.go @@ -68,14 +68,10 @@ func (s *HTTPServiceOps) Get( switch id := req.GetIdentifier().(type) { case *mantraev1.GetServiceRequest_Id: - result, err = s.app.Conn.GetQuery().GetHttpServiceByID(ctx, db.GetHttpServiceByIDParams{ - ProfileID: req.ProfileId, - ID: id.Id, - }) + result, err = s.app.Conn.GetQuery().GetHttpService(ctx, id.Id) if err != nil { return nil, err } - break case *mantraev1.GetServiceRequest_Name: result, err = s.app.Conn.GetQuery().GetHttpServiceByName(ctx, db.GetHttpServiceByNameParams{ ProfileID: req.ProfileId, @@ -84,7 +80,6 @@ func (s *HTTPServiceOps) Get( if err != nil { return nil, err } - break default: return nil, errors.New("invalid service identifier") } @@ -114,6 +109,13 @@ func (s *HTTPServiceOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: result.ToProto(), + }, + }) return &mantraev1.CreateServiceResponse{ Service: result.ToProto(), }, nil @@ -139,6 +141,13 @@ func (s *HTTPServiceOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: result.ToProto(), + }, + }) return &mantraev1.UpdateServiceResponse{ Service: result.ToProto(), }, nil @@ -148,9 +157,20 @@ func (s *HTTPServiceOps) Delete( ctx context.Context, req *mantraev1.DeleteServiceRequest, ) (*mantraev1.DeleteServiceResponse, error) { + service, err := s.app.Conn.GetQuery().GetHttpService(ctx, req.Id) + if err != nil { + return nil, err + } if err := s.app.Conn.GetQuery().DeleteHttpService(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: service.ToProto(), + }, + }) return &mantraev1.DeleteServiceResponse{}, nil } @@ -197,14 +217,10 @@ func (s *TCPServiceOps) Get( switch id := req.GetIdentifier().(type) { case *mantraev1.GetServiceRequest_Id: - result, err = s.app.Conn.GetQuery().GetTcpServiceByID(ctx, db.GetTcpServiceByIDParams{ - ProfileID: req.ProfileId, - ID: id.Id, - }) + result, err = s.app.Conn.GetQuery().GetTcpService(ctx, id.Id) if err != nil { return nil, err } - break case *mantraev1.GetServiceRequest_Name: result, err = s.app.Conn.GetQuery().GetTcpServiceByName(ctx, db.GetTcpServiceByNameParams{ ProfileID: req.ProfileId, @@ -213,7 +229,6 @@ func (s *TCPServiceOps) Get( if err != nil { return nil, err } - break default: return nil, errors.New("invalid service identifier") } @@ -243,6 +258,13 @@ func (s *TCPServiceOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: result.ToProto(), + }, + }) return &mantraev1.CreateServiceResponse{ Service: result.ToProto(), }, nil @@ -268,6 +290,13 @@ func (s *TCPServiceOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: result.ToProto(), + }, + }) return &mantraev1.UpdateServiceResponse{ Service: result.ToProto(), }, nil @@ -277,9 +306,20 @@ func (s *TCPServiceOps) Delete( ctx context.Context, req *mantraev1.DeleteServiceRequest, ) (*mantraev1.DeleteServiceResponse, error) { + service, err := s.app.Conn.GetQuery().GetTcpService(ctx, req.Id) + if err != nil { + return nil, err + } if err := s.app.Conn.GetQuery().DeleteTcpService(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: service.ToProto(), + }, + }) return &mantraev1.DeleteServiceResponse{}, nil } @@ -326,14 +366,10 @@ func (s *UDPServiceOps) Get( switch id := req.GetIdentifier().(type) { case *mantraev1.GetServiceRequest_Id: - result, err = s.app.Conn.GetQuery().GetUdpServiceByID(ctx, db.GetUdpServiceByIDParams{ - ProfileID: req.ProfileId, - ID: id.Id, - }) + result, err = s.app.Conn.GetQuery().GetUdpService(ctx, id.Id) if err != nil { return nil, err } - break case *mantraev1.GetServiceRequest_Name: result, err = s.app.Conn.GetQuery().GetUdpServiceByName(ctx, db.GetUdpServiceByNameParams{ ProfileID: req.ProfileId, @@ -342,7 +378,6 @@ func (s *UDPServiceOps) Get( if err != nil { return nil, err } - break default: return nil, errors.New("invalid service identifier") } @@ -372,6 +407,13 @@ func (s *UDPServiceOps) Create( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: result.ToProto(), + }, + }) return &mantraev1.CreateServiceResponse{ Service: result.ToProto(), }, nil @@ -397,6 +439,13 @@ func (s *UDPServiceOps) Update( if err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: result.ToProto(), + }, + }) return &mantraev1.UpdateServiceResponse{ Service: result.ToProto(), }, nil @@ -406,9 +455,20 @@ func (s *UDPServiceOps) Delete( ctx context.Context, req *mantraev1.DeleteServiceRequest, ) (*mantraev1.DeleteServiceResponse, error) { + service, err := s.app.Conn.GetQuery().GetUdpService(ctx, req.Id) + if err != nil { + return nil, err + } if err := s.app.Conn.GetQuery().DeleteUdpService(ctx, req.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_Service{ + Service: service.ToProto(), + }, + }) return &mantraev1.DeleteServiceResponse{}, nil } diff --git a/server/internal/api/service/traefik_instance.go b/server/internal/api/service/traefik_instance.go index e54a669..10badde 100644 --- a/server/internal/api/service/traefik_instance.go +++ b/server/internal/api/service/traefik_instance.go @@ -34,9 +34,20 @@ func (s *TraefikInstanceService) DeleteTraefikInstance( ctx context.Context, req *connect.Request[mantraev1.DeleteTraefikInstanceRequest], ) (*connect.Response[mantraev1.DeleteTraefikInstanceResponse], error) { + instance, err := s.app.Conn.GetQuery().GetTraefikInstanceByID(ctx, req.Msg.Id) + if err != nil { + return nil, err + } if err := s.app.Conn.GetQuery().DeleteTraefikInstance(ctx, req.Msg.Id); err != nil { return nil, err } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_TraefikInstance{ + TraefikInstance: instance.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.DeleteTraefikInstanceResponse{}), nil } diff --git a/server/internal/api/service/user.go b/server/internal/api/service/user.go index 1d1d2d1..cae1931 100644 --- a/server/internal/api/service/user.go +++ b/server/internal/api/service/user.go @@ -248,6 +248,13 @@ func (s *UserService) CreateUser( if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_CREATED, + Data: &mantraev1.EventStreamResponse_User{ + User: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.CreateUserResponse{ User: result.ToProto(), }), nil @@ -262,7 +269,7 @@ func (s *UserService) UpdateUser( Username: req.Msg.Username, Email: req.Msg.Email, } - user, err := s.app.Conn.GetQuery().UpdateUser(ctx, params) + result, err := s.app.Conn.GetQuery().UpdateUser(ctx, params) if err != nil { return nil, connect.NewError(connect.CodeInternal, err) } @@ -275,15 +282,21 @@ func (s *UserService) UpdateUser( } if err := s.app.Conn.GetQuery().UpdateUserPassword(ctx, db.UpdateUserPasswordParams{ - ID: user.ID, + ID: result.ID, Password: hash, }); err != nil { return nil, connect.NewError(connect.CodeInternal, err) } } + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_UPDATED, + Data: &mantraev1.EventStreamResponse_User{ + User: result.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.UpdateUserResponse{ - User: user.ToProto(), + User: result.ToProto(), }), nil } @@ -291,9 +304,20 @@ func (s *UserService) DeleteUser( ctx context.Context, req *connect.Request[mantraev1.DeleteUserRequest], ) (*connect.Response[mantraev1.DeleteUserResponse], error) { + user, err := s.app.Conn.GetQuery().GetUserByID(ctx, req.Msg.Id) + if err != nil { + return nil, connect.NewError(connect.CodeInternal, err) + } if err := s.app.Conn.GetQuery().DeleteUser(ctx, req.Msg.Id); err != nil { return nil, connect.NewError(connect.CodeInternal, err) } + + s.app.Event.Broadcast(&mantraev1.EventStreamResponse{ + Action: mantraev1.EventAction_EVENT_ACTION_DELETED, + Data: &mantraev1.EventStreamResponse_User{ + User: user.ToProto(), + }, + }) return connect.NewResponse(&mantraev1.DeleteUserResponse{}), nil } diff --git a/server/internal/api/service/util.go b/server/internal/api/service/util.go index c75f264..8e9ea28 100644 --- a/server/internal/api/service/util.go +++ b/server/internal/api/service/util.go @@ -41,3 +41,27 @@ func (s *UtilService) GetPublicIP( Ipv6: ips.IPv6, }), nil } + +func (s *UtilService) EventStream( + ctx context.Context, + req *connect.Request[mantraev1.EventStreamRequest], + stream *connect.ServerStream[mantraev1.EventStreamResponse], +) error { + id, ch := s.app.Event.Subscribe(req.Msg.ProfileId) + defer s.app.Event.Unsubscribe(id) + + for { + select { + case <-ctx.Done(): + return ctx.Err() + + case event, ok := <-ch: + if !ok { + return nil + } + if err := stream.Send(event); err != nil { + return err + } + } + } +} diff --git a/server/internal/config/setup.go b/server/internal/config/setup.go index 6205d7e..ffd5995 100644 --- a/server/internal/config/setup.go +++ b/server/internal/config/setup.go @@ -13,6 +13,7 @@ import ( "github.com/mizuchilabs/mantrae/pkg/logger" "github.com/mizuchilabs/mantrae/pkg/util" "github.com/mizuchilabs/mantrae/server/internal/backup" + "github.com/mizuchilabs/mantrae/server/internal/event" "github.com/mizuchilabs/mantrae/server/internal/settings" "github.com/mizuchilabs/mantrae/server/internal/store" "github.com/mizuchilabs/mantrae/server/internal/store/db" @@ -23,6 +24,7 @@ type App struct { Conn *store.Connection BM *backup.BackupManager SM *settings.SettingsManager + Event *event.Broadcaster } func Setup(ctx context.Context) (*App, error) { @@ -38,7 +40,6 @@ func Setup(ctx context.Context) (*App, error) { return nil, err } - // app.Event = events.NewEventBroadcaster() app.Conn = store.NewConnection("") app.SM = settings.NewManager(app.Conn) app.SM.Start(ctx) @@ -46,6 +47,8 @@ func Setup(ctx context.Context) (*App, error) { app.BM = backup.NewManager(app.Conn, app.SM) app.BM.Start(ctx) + app.Event = event.NewBroadcaster(ctx) + if err := app.setupDefaultData(ctx); err != nil { return nil, err } diff --git a/server/internal/event/event.go b/server/internal/event/event.go new file mode 100644 index 0000000..2af992c --- /dev/null +++ b/server/internal/event/event.go @@ -0,0 +1,114 @@ +package event + +import ( + "context" + "log/slog" + "sync" + + mantraev1 "github.com/mizuchilabs/mantrae/proto/gen/mantrae/v1" +) + +type Broadcaster struct { + mu sync.RWMutex + clients map[int]*subscriber + nextID int + ctx context.Context + cancel context.CancelFunc +} + +type subscriber struct { + profileID int64 + ch chan *mantraev1.EventStreamResponse +} + +func NewBroadcaster(parent context.Context) *Broadcaster { + ctx, cancel := context.WithCancel(parent) + b := &Broadcaster{ + clients: make(map[int]*subscriber), + ctx: ctx, + cancel: cancel, + } + + go b.cleanup() + return b +} + +func (b *Broadcaster) Subscribe( + profileID int64, +) (id int, ch <-chan *mantraev1.EventStreamResponse) { + b.mu.Lock() + defer b.mu.Unlock() + id = b.nextID + b.nextID++ + c := make(chan *mantraev1.EventStreamResponse, 32) + b.clients[id] = &subscriber{ + profileID: profileID, + ch: c, + } + return id, c +} + +func (b *Broadcaster) Unsubscribe(id int) { + b.mu.Lock() + defer b.mu.Unlock() + if sub, ok := b.clients[id]; ok { + close(sub.ch) + delete(b.clients, id) + } +} + +func (b *Broadcaster) Broadcast(event *mantraev1.EventStreamResponse) { + profileID, isGlobal := getProfileIDFromEvent(event) + + b.mu.RLock() + defer b.mu.RUnlock() + for _, sub := range b.clients { + if !isGlobal && sub.profileID != profileID { + continue + } + select { + case sub.ch <- event: + default: + close(sub.ch) + } + } +} + +func (b *Broadcaster) cleanup() { + <-b.ctx.Done() + slog.Info("Broadcaster is shutting down") + b.mu.Lock() + defer b.mu.Unlock() + + for _, client := range b.clients { + close(client.ch) + } + b.clients = nil +} + +func getProfileIDFromEvent(event *mantraev1.EventStreamResponse) (int64, bool) { + switch d := event.Data.(type) { + case *mantraev1.EventStreamResponse_Profile: + return d.Profile.Id, false + case *mantraev1.EventStreamResponse_Agent: + return d.Agent.ProfileId, false + case *mantraev1.EventStreamResponse_EntryPoint: + return d.EntryPoint.ProfileId, false + case *mantraev1.EventStreamResponse_Router: + return d.Router.ProfileId, false + case *mantraev1.EventStreamResponse_Service: + return d.Service.ProfileId, false + case *mantraev1.EventStreamResponse_Middleware: + return d.Middleware.ProfileId, false + case *mantraev1.EventStreamResponse_ServersTransport: + return d.ServersTransport.ProfileId, false + case *mantraev1.EventStreamResponse_TraefikInstance: + return d.TraefikInstance.ProfileId, false + case *mantraev1.EventStreamResponse_DnsProvider: + return 0, true + case *mantraev1.EventStreamResponse_User: + return 0, true + default: + return 0, false + } +} diff --git a/server/internal/store/db/db.go b/server/internal/store/db/db.go index 6151a87..da1ec68 100644 --- a/server/internal/store/db/db.go +++ b/server/internal/store/db/db.go @@ -249,8 +249,8 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) { if q.getHttpServersTransportStmt, err = db.PrepareContext(ctx, getHttpServersTransport); err != nil { return nil, fmt.Errorf("error preparing query GetHttpServersTransport: %w", err) } - if q.getHttpServiceByIDStmt, err = db.PrepareContext(ctx, getHttpServiceByID); err != nil { - return nil, fmt.Errorf("error preparing query GetHttpServiceByID: %w", err) + if q.getHttpServiceStmt, err = db.PrepareContext(ctx, getHttpService); err != nil { + return nil, fmt.Errorf("error preparing query GetHttpService: %w", err) } if q.getHttpServiceByNameStmt, err = db.PrepareContext(ctx, getHttpServiceByName); err != nil { return nil, fmt.Errorf("error preparing query GetHttpServiceByName: %w", err) @@ -282,8 +282,8 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) { if q.getTcpServersTransportStmt, err = db.PrepareContext(ctx, getTcpServersTransport); err != nil { return nil, fmt.Errorf("error preparing query GetTcpServersTransport: %w", err) } - if q.getTcpServiceByIDStmt, err = db.PrepareContext(ctx, getTcpServiceByID); err != nil { - return nil, fmt.Errorf("error preparing query GetTcpServiceByID: %w", err) + if q.getTcpServiceStmt, err = db.PrepareContext(ctx, getTcpService); err != nil { + return nil, fmt.Errorf("error preparing query GetTcpService: %w", err) } if q.getTcpServiceByNameStmt, err = db.PrepareContext(ctx, getTcpServiceByName); err != nil { return nil, fmt.Errorf("error preparing query GetTcpServiceByName: %w", err) @@ -300,8 +300,8 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) { if q.getUdpRoutersUsingEntryPointStmt, err = db.PrepareContext(ctx, getUdpRoutersUsingEntryPoint); err != nil { return nil, fmt.Errorf("error preparing query GetUdpRoutersUsingEntryPoint: %w", err) } - if q.getUdpServiceByIDStmt, err = db.PrepareContext(ctx, getUdpServiceByID); err != nil { - return nil, fmt.Errorf("error preparing query GetUdpServiceByID: %w", err) + if q.getUdpServiceStmt, err = db.PrepareContext(ctx, getUdpService); err != nil { + return nil, fmt.Errorf("error preparing query GetUdpService: %w", err) } if q.getUdpServiceByNameStmt, err = db.PrepareContext(ctx, getUdpServiceByName); err != nil { return nil, fmt.Errorf("error preparing query GetUdpServiceByName: %w", err) @@ -866,9 +866,9 @@ func (q *Queries) Close() error { err = fmt.Errorf("error closing getHttpServersTransportStmt: %w", cerr) } } - if q.getHttpServiceByIDStmt != nil { - if cerr := q.getHttpServiceByIDStmt.Close(); cerr != nil { - err = fmt.Errorf("error closing getHttpServiceByIDStmt: %w", cerr) + if q.getHttpServiceStmt != nil { + if cerr := q.getHttpServiceStmt.Close(); cerr != nil { + err = fmt.Errorf("error closing getHttpServiceStmt: %w", cerr) } } if q.getHttpServiceByNameStmt != nil { @@ -921,9 +921,9 @@ func (q *Queries) Close() error { err = fmt.Errorf("error closing getTcpServersTransportStmt: %w", cerr) } } - if q.getTcpServiceByIDStmt != nil { - if cerr := q.getTcpServiceByIDStmt.Close(); cerr != nil { - err = fmt.Errorf("error closing getTcpServiceByIDStmt: %w", cerr) + if q.getTcpServiceStmt != nil { + if cerr := q.getTcpServiceStmt.Close(); cerr != nil { + err = fmt.Errorf("error closing getTcpServiceStmt: %w", cerr) } } if q.getTcpServiceByNameStmt != nil { @@ -951,9 +951,9 @@ func (q *Queries) Close() error { err = fmt.Errorf("error closing getUdpRoutersUsingEntryPointStmt: %w", cerr) } } - if q.getUdpServiceByIDStmt != nil { - if cerr := q.getUdpServiceByIDStmt.Close(); cerr != nil { - err = fmt.Errorf("error closing getUdpServiceByIDStmt: %w", cerr) + if q.getUdpServiceStmt != nil { + if cerr := q.getUdpServiceStmt.Close(); cerr != nil { + err = fmt.Errorf("error closing getUdpServiceStmt: %w", cerr) } } if q.getUdpServiceByNameStmt != nil { @@ -1375,7 +1375,7 @@ type Queries struct { getHttpRoutersUsingEntryPointStmt *sql.Stmt getHttpRoutersUsingMiddlewareStmt *sql.Stmt getHttpServersTransportStmt *sql.Stmt - getHttpServiceByIDStmt *sql.Stmt + getHttpServiceStmt *sql.Stmt getHttpServiceByNameStmt *sql.Stmt getProfileStmt *sql.Stmt getProfileByNameStmt *sql.Stmt @@ -1386,13 +1386,13 @@ type Queries struct { getTcpRoutersUsingEntryPointStmt *sql.Stmt getTcpRoutersUsingMiddlewareStmt *sql.Stmt getTcpServersTransportStmt *sql.Stmt - getTcpServiceByIDStmt *sql.Stmt + getTcpServiceStmt *sql.Stmt getTcpServiceByNameStmt *sql.Stmt getTraefikInstanceByIDStmt *sql.Stmt getTraefikInstanceByNameStmt *sql.Stmt getUdpRouterStmt *sql.Stmt getUdpRoutersUsingEntryPointStmt *sql.Stmt - getUdpServiceByIDStmt *sql.Stmt + getUdpServiceStmt *sql.Stmt getUdpServiceByNameStmt *sql.Stmt getUserByEmailStmt *sql.Stmt getUserByIDStmt *sql.Stmt @@ -1535,7 +1535,7 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries { getHttpRoutersUsingEntryPointStmt: q.getHttpRoutersUsingEntryPointStmt, getHttpRoutersUsingMiddlewareStmt: q.getHttpRoutersUsingMiddlewareStmt, getHttpServersTransportStmt: q.getHttpServersTransportStmt, - getHttpServiceByIDStmt: q.getHttpServiceByIDStmt, + getHttpServiceStmt: q.getHttpServiceStmt, getHttpServiceByNameStmt: q.getHttpServiceByNameStmt, getProfileStmt: q.getProfileStmt, getProfileByNameStmt: q.getProfileByNameStmt, @@ -1546,13 +1546,13 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries { getTcpRoutersUsingEntryPointStmt: q.getTcpRoutersUsingEntryPointStmt, getTcpRoutersUsingMiddlewareStmt: q.getTcpRoutersUsingMiddlewareStmt, getTcpServersTransportStmt: q.getTcpServersTransportStmt, - getTcpServiceByIDStmt: q.getTcpServiceByIDStmt, + getTcpServiceStmt: q.getTcpServiceStmt, getTcpServiceByNameStmt: q.getTcpServiceByNameStmt, getTraefikInstanceByIDStmt: q.getTraefikInstanceByIDStmt, getTraefikInstanceByNameStmt: q.getTraefikInstanceByNameStmt, getUdpRouterStmt: q.getUdpRouterStmt, getUdpRoutersUsingEntryPointStmt: q.getUdpRoutersUsingEntryPointStmt, - getUdpServiceByIDStmt: q.getUdpServiceByIDStmt, + getUdpServiceStmt: q.getUdpServiceStmt, getUdpServiceByNameStmt: q.getUdpServiceByNameStmt, getUserByEmailStmt: q.getUserByEmailStmt, getUserByIDStmt: q.getUserByIDStmt, diff --git a/server/internal/store/db/http_services.sql.go b/server/internal/store/db/http_services.sql.go index e14c678..5064493 100644 --- a/server/internal/store/db/http_services.sql.go +++ b/server/internal/store/db/http_services.sql.go @@ -89,23 +89,17 @@ func (q *Queries) DeleteHttpService(ctx context.Context, id int64) error { return err } -const getHttpServiceByID = `-- name: GetHttpServiceByID :one +const getHttpService = `-- name: GetHttpService :one SELECT id, profile_id, agent_id, name, config, enabled, created_at, updated_at FROM http_services WHERE - profile_id = ? - AND id = ? + id = ? ` -type GetHttpServiceByIDParams struct { - ProfileID int64 `json:"profileId"` - ID int64 `json:"id"` -} - -func (q *Queries) GetHttpServiceByID(ctx context.Context, arg GetHttpServiceByIDParams) (HttpService, error) { - row := q.queryRow(ctx, q.getHttpServiceByIDStmt, getHttpServiceByID, arg.ProfileID, arg.ID) +func (q *Queries) GetHttpService(ctx context.Context, id int64) (HttpService, error) { + row := q.queryRow(ctx, q.getHttpServiceStmt, getHttpService, id) var i HttpService err := row.Scan( &i.ID, diff --git a/server/internal/store/db/querier.go b/server/internal/store/db/querier.go index 8133aca..d8ed741 100644 --- a/server/internal/store/db/querier.go +++ b/server/internal/store/db/querier.go @@ -84,7 +84,7 @@ type Querier interface { GetHttpRoutersUsingEntryPoint(ctx context.Context, arg GetHttpRoutersUsingEntryPointParams) ([]GetHttpRoutersUsingEntryPointRow, error) GetHttpRoutersUsingMiddleware(ctx context.Context, arg GetHttpRoutersUsingMiddlewareParams) ([]GetHttpRoutersUsingMiddlewareRow, error) GetHttpServersTransport(ctx context.Context, id int64) (HttpServersTransport, error) - GetHttpServiceByID(ctx context.Context, arg GetHttpServiceByIDParams) (HttpService, error) + GetHttpService(ctx context.Context, id int64) (HttpService, error) GetHttpServiceByName(ctx context.Context, arg GetHttpServiceByNameParams) (HttpService, error) GetProfile(ctx context.Context, id int64) (Profile, error) GetProfileByName(ctx context.Context, name string) (Profile, error) @@ -95,13 +95,13 @@ type Querier interface { GetTcpRoutersUsingEntryPoint(ctx context.Context, arg GetTcpRoutersUsingEntryPointParams) ([]GetTcpRoutersUsingEntryPointRow, error) GetTcpRoutersUsingMiddleware(ctx context.Context, arg GetTcpRoutersUsingMiddlewareParams) ([]GetTcpRoutersUsingMiddlewareRow, error) GetTcpServersTransport(ctx context.Context, id int64) (TcpServersTransport, error) - GetTcpServiceByID(ctx context.Context, arg GetTcpServiceByIDParams) (TcpService, error) + GetTcpService(ctx context.Context, id int64) (TcpService, error) GetTcpServiceByName(ctx context.Context, arg GetTcpServiceByNameParams) (TcpService, error) GetTraefikInstanceByID(ctx context.Context, id int64) (TraefikInstance, error) GetTraefikInstanceByName(ctx context.Context, arg GetTraefikInstanceByNameParams) (TraefikInstance, error) GetUdpRouter(ctx context.Context, id int64) (UdpRouter, error) GetUdpRoutersUsingEntryPoint(ctx context.Context, arg GetUdpRoutersUsingEntryPointParams) ([]GetUdpRoutersUsingEntryPointRow, error) - GetUdpServiceByID(ctx context.Context, arg GetUdpServiceByIDParams) (UdpService, error) + GetUdpService(ctx context.Context, id int64) (UdpService, error) GetUdpServiceByName(ctx context.Context, arg GetUdpServiceByNameParams) (UdpService, error) GetUserByEmail(ctx context.Context, email *string) (User, error) GetUserByID(ctx context.Context, id string) (User, error) diff --git a/server/internal/store/db/tcp_services.sql.go b/server/internal/store/db/tcp_services.sql.go index cc33bd5..c484834 100644 --- a/server/internal/store/db/tcp_services.sql.go +++ b/server/internal/store/db/tcp_services.sql.go @@ -89,23 +89,17 @@ func (q *Queries) DeleteTcpService(ctx context.Context, id int64) error { return err } -const getTcpServiceByID = `-- name: GetTcpServiceByID :one +const getTcpService = `-- name: GetTcpService :one SELECT id, profile_id, agent_id, name, config, enabled, created_at, updated_at FROM tcp_services WHERE - profile_id = ? - AND id = ? + id = ? ` -type GetTcpServiceByIDParams struct { - ProfileID int64 `json:"profileId"` - ID int64 `json:"id"` -} - -func (q *Queries) GetTcpServiceByID(ctx context.Context, arg GetTcpServiceByIDParams) (TcpService, error) { - row := q.queryRow(ctx, q.getTcpServiceByIDStmt, getTcpServiceByID, arg.ProfileID, arg.ID) +func (q *Queries) GetTcpService(ctx context.Context, id int64) (TcpService, error) { + row := q.queryRow(ctx, q.getTcpServiceStmt, getTcpService, id) var i TcpService err := row.Scan( &i.ID, diff --git a/server/internal/store/db/udp_services.sql.go b/server/internal/store/db/udp_services.sql.go index 4f7e0ae..5ad3508 100644 --- a/server/internal/store/db/udp_services.sql.go +++ b/server/internal/store/db/udp_services.sql.go @@ -89,23 +89,17 @@ func (q *Queries) DeleteUdpService(ctx context.Context, id int64) error { return err } -const getUdpServiceByID = `-- name: GetUdpServiceByID :one +const getUdpService = `-- name: GetUdpService :one SELECT id, profile_id, agent_id, name, config, enabled, created_at, updated_at FROM udp_services WHERE - profile_id = ? - AND id = ? + id = ? ` -type GetUdpServiceByIDParams struct { - ProfileID int64 `json:"profileId"` - ID int64 `json:"id"` -} - -func (q *Queries) GetUdpServiceByID(ctx context.Context, arg GetUdpServiceByIDParams) (UdpService, error) { - row := q.queryRow(ctx, q.getUdpServiceByIDStmt, getUdpServiceByID, arg.ProfileID, arg.ID) +func (q *Queries) GetUdpService(ctx context.Context, id int64) (UdpService, error) { + row := q.queryRow(ctx, q.getUdpServiceStmt, getUdpService, id) var i UdpService err := row.Scan( &i.ID, diff --git a/server/internal/store/queries/http_services.sql b/server/internal/store/queries/http_services.sql index bb34e2f..8bcd948 100644 --- a/server/internal/store/queries/http_services.sql +++ b/server/internal/store/queries/http_services.sql @@ -11,14 +11,13 @@ INSERT INTO VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) RETURNING *; --- name: GetHttpServiceByID :one +-- name: GetHttpService :one SELECT * FROM http_services WHERE - profile_id = ? - AND id = ?; + id = ?; -- name: GetHttpServiceByName :one SELECT diff --git a/server/internal/store/queries/tcp_services.sql b/server/internal/store/queries/tcp_services.sql index 7352296..4e0e90f 100644 --- a/server/internal/store/queries/tcp_services.sql +++ b/server/internal/store/queries/tcp_services.sql @@ -11,14 +11,13 @@ INSERT INTO VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) RETURNING *; --- name: GetTcpServiceByID :one +-- name: GetTcpService :one SELECT * FROM tcp_services WHERE - profile_id = ? - AND id = ?; + id = ?; -- name: GetTcpServiceByName :one SELECT diff --git a/server/internal/store/queries/udp_services.sql b/server/internal/store/queries/udp_services.sql index 0d6c901..4fc47f1 100644 --- a/server/internal/store/queries/udp_services.sql +++ b/server/internal/store/queries/udp_services.sql @@ -11,14 +11,13 @@ INSERT INTO VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP) RETURNING *; --- name: GetUdpServiceByID :one +-- name: GetUdpService :one SELECT * FROM udp_services WHERE - profile_id = ? - AND id = ?; + id = ?; -- name: GetUdpServiceByName :one SELECT diff --git a/sqlc.yml b/sqlc.yml index 7d85149..e94b4d4 100644 --- a/sqlc.yml +++ b/sqlc.yml @@ -1,12 +1,12 @@ version: "2" sql: - engine: "sqlite" - schema: "internal/store/migrations" - queries: "internal/store/queries" + schema: "server/internal/store/migrations" + queries: "server/internal/store/queries" gen: go: package: "db" - out: "internal/store/db" + out: "server/internal/store/db" json_tags_case_style: "camel" emit_json_tags: true # Adds JSON tags to generated structs emit_interface: true # Output a Querier interface in the generated package @@ -15,86 +15,86 @@ sql: overrides: - column: "http_routers.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "HTTPRouter" pointer: true - column: "tcp_routers.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "TCPRouter" pointer: true - column: "udp_routers.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "UDPRouter" pointer: true - column: "http_services.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "HTTPService" pointer: true - column: "tcp_services.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "TCPService" pointer: true - column: "udp_services.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "UDPService" pointer: true - column: "http_middlewares.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "HTTPMiddleware" pointer: true - column: "tcp_middlewares.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "TCPMiddleware" pointer: true - column: "http_servers_transports.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "HTTPServersTransport" pointer: true - column: "tcp_servers_transports.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "TCPServersTransport" pointer: true - column: "traefik_instances.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "Configuration" pointer: true - column: "traefik_instances.entrypoints" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "EntryPoints" pointer: true - column: "traefik_instances.overview" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "Overview" pointer: true - column: "traefik_instances.version" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "Version" pointer: true - column: "dns_providers.config" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "DNSProviderConfig" pointer: true - column: "agents.private_ips" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "AgentPrivateIPs" pointer: true - column: "agents.containers" go_type: - import: "github.com/mizuchilabs/mantrae/internal/store/schema" + import: "github.com/mizuchilabs/mantrae/server/internal/store/schema" type: "AgentContainers" pointer: true diff --git a/web/src/lib/api.ts b/web/src/lib/api.ts index 6f76fc1..a65cabc 100644 --- a/web/src/lib/api.ts +++ b/web/src/lib/api.ts @@ -1,54 +1,52 @@ -import type { DescService } from "@bufbuild/protobuf"; -import { createClient, type Client } from "@connectrpc/connect"; -import { createConnectTransport } from "@connectrpc/connect-web"; -import { ProfileService, type Profile } from "./gen/mantrae/v1/profile_pb"; -import { UserService } from "./gen/mantrae/v1/user_pb"; -import { RouterService } from "./gen/mantrae/v1/router_pb"; -import { ServiceService } from "./gen/mantrae/v1/service_pb"; -import { MiddlewareService } from "./gen/mantrae/v1/middleware_pb"; -import { SettingService } from "./gen/mantrae/v1/setting_pb"; -import { BackupService } from "./gen/mantrae/v1/backup_pb"; -import { EntryPointService } from "./gen/mantrae/v1/entry_point_pb"; -import { DnsProviderService } from "./gen/mantrae/v1/dns_provider_pb"; -import { UtilService } from "./gen/mantrae/v1/util_pb"; -import { AgentService } from "./gen/mantrae/v1/agent_pb"; -import { AuditLogService } from "./gen/mantrae/v1/auditlog_pb"; -import { ServersTransportService } from "./gen/mantrae/v1/servers_transport_pb"; -import { TraefikInstanceService } from "./gen/mantrae/v1/traefik_instance_pb"; -import { toast } from "svelte-sonner"; -import { profile } from "./stores/profile"; -import { baseURL } from "./stores/common"; +import type { DescService } from '@bufbuild/protobuf'; +import { createClient, type Client } from '@connectrpc/connect'; +import { createConnectTransport } from '@connectrpc/connect-web'; +import { ProfileService, type Profile } from './gen/mantrae/v1/profile_pb'; +import { UserService } from './gen/mantrae/v1/user_pb'; +import { RouterService } from './gen/mantrae/v1/router_pb'; +import { ServiceService } from './gen/mantrae/v1/service_pb'; +import { MiddlewareService } from './gen/mantrae/v1/middleware_pb'; +import { SettingService } from './gen/mantrae/v1/setting_pb'; +import { BackupService } from './gen/mantrae/v1/backup_pb'; +import { EntryPointService } from './gen/mantrae/v1/entry_point_pb'; +import { DnsProviderService } from './gen/mantrae/v1/dns_provider_pb'; +import { UtilService } from './gen/mantrae/v1/util_pb'; +import { AgentService } from './gen/mantrae/v1/agent_pb'; +import { AuditLogService } from './gen/mantrae/v1/auditlog_pb'; +import { ServersTransportService } from './gen/mantrae/v1/servers_transport_pb'; +import { TraefikInstanceService } from './gen/mantrae/v1/traefik_instance_pb'; +import { toast } from 'svelte-sonner'; +import { profile } from './stores/profile'; +import { baseURL } from './stores/common'; export function useClient( service: T, - customFetch?: typeof fetch, + customFetch?: typeof fetch ): Client { const wrappedFetch: typeof fetch = (input, init = {}) => { return (customFetch || fetch)(input, { ...init, headers: new Headers(init.headers || {}), - credentials: "include", + credentials: 'include' }); }; - if (!baseURL.value) throw new Error("Base URL not set"); + if (!baseURL.value) throw new Error('Base URL not set'); const transport = createConnectTransport({ baseUrl: baseURL.value, - fetch: wrappedFetch, + fetch: wrappedFetch }); return createClient(service, transport); } // Basic health check function -export async function checkHealth( - customFetch?: typeof fetch, -): Promise { +export async function checkHealth(customFetch?: typeof fetch): Promise { try { - if (!baseURL.value) throw new Error("Base URL not set"); + if (!baseURL.value) throw new Error('Base URL not set'); if (!customFetch) customFetch = fetch; const res = await customFetch(`${baseURL.value}/healthz`, { - method: "GET", + method: 'GET' }); return res.ok; } catch { @@ -64,52 +62,48 @@ export async function upload(input: HTMLInputElement | null, endpoint: string) { if (!input?.files?.length) return; const body = new FormData(); - body.append("file", input.files[0]); + body.append('file', input.files[0]); const response = await fetch(`${baseURL.value}/upload/${endpoint}`, { - method: "POST", + method: 'POST', body, - credentials: "include", + credentials: 'include' }); if (!response.ok) { - throw new Error("Failed to upload"); + throw new Error('Failed to upload'); } - toast.success("Uploaded successfully"); + toast.success('Uploaded successfully'); } // Get dynamic traefik config export async function getConfig(format: string) { - if (!profile.isValid() || !profile.token) return ""; + if (!profile.isValid() || !profile.token) return ''; const headers = new Headers(); - // headers.set("Mantrae-Traefik-Token", profile.token); - if (format === "yaml") { - headers.set("Accept", "application/x-yaml"); + if (format === 'yaml') { + headers.set('Accept', 'application/x-yaml'); } try { - const response = await fetch( - `${baseURL.value}/api/${profile.name}?token=${profile.token}`, - { - headers, - }, - ); - if (!response.ok) return ""; + const response = await fetch(`${baseURL.value}/api/${profile.name}?token=${profile.token}`, { + headers + }); + if (!response.ok) return ''; return await response.text(); } catch (err) { const e = err as Error; - toast.error("Failed to fetch config", { description: e.message }); + toast.error('Failed to fetch config', { description: e.message }); } - return ""; + return ''; } // Build traefik connection string export async function buildConnectionString(p: Profile) { const item = p ?? profile?.value; - if (!item) return ""; - const serverUrl = await settingClient.getSetting({ key: "server_url" }); - if (!serverUrl.value) return ""; + if (!item) return ''; + const serverUrl = await settingClient.getSetting({ key: 'server_url' }); + if (!serverUrl.value) return ''; return `${serverUrl.value}/api/${item.name}?token=${item.token}`; } diff --git a/web/src/lib/components/modals/AgentModal.svelte b/web/src/lib/components/modals/AgentModal.svelte index 7be9149..3cc9dea 100644 --- a/web/src/lib/components/modals/AgentModal.svelte +++ b/web/src/lib/components/modals/AgentModal.svelte @@ -7,7 +7,7 @@ import { Label } from '$lib/components/ui/label/index.js'; import { toast } from 'svelte-sonner'; import Separator from '../ui/separator/separator.svelte'; - import { DateFormat, pageIndex, pageSize } from '$lib/stores/common'; + import { DateFormat } from '$lib/stores/common'; import { Check, Container, Copy, RotateCcw, X } from '@lucide/svelte'; import { agentClient, settingClient } from '$lib/api'; import { profile } from '$lib/stores/profile'; @@ -19,12 +19,11 @@ import { scale } from 'svelte/transition'; interface Props { - data: Agent[]; item: Agent; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); let newIP = $state(''); @@ -40,14 +39,6 @@ toast.success(`Agent ${item.hostname} created successfully`); open = false; } - - // Refresh data - let response = await agentClient.listAgents({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.agents; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to save agent', { description: e.message }); @@ -58,7 +49,6 @@ try { await agentClient.deleteAgent({ id: item.id }); - data = data.filter((e) => e.id !== item.id); toast.success('Agent deleted successfully'); } catch (err) { const e = ConnectError.from(err); @@ -73,14 +63,6 @@ if (!response.agent) throw new Error('Failed to rotate token'); item.token = response.agent.token; toast.success('Token rotated successfully'); - - // Refresh data - let response2 = await agentClient.listAgents({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response2.agents; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to rotate token', { description: e.message }); diff --git a/web/src/lib/components/modals/DNSModal.svelte b/web/src/lib/components/modals/DNSModal.svelte index 8a39939..bc7a411 100644 --- a/web/src/lib/components/modals/DNSModal.svelte +++ b/web/src/lib/components/modals/DNSModal.svelte @@ -17,17 +17,15 @@ } from '$lib/gen/mantrae/v1/dns_provider_pb'; import { dnsClient, utilClient } from '$lib/api'; import { ConnectError } from '@connectrpc/connect'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { dnsProviderTypes } from '$lib/types'; import CustomSwitch from '../ui/custom-switch/custom-switch.svelte'; interface Props { - data: DnsProvider[]; item: DnsProvider; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); const handleSubmit = async () => { try { @@ -49,13 +47,6 @@ }); toast.success('DNS Provider created successfully'); } - - // Refresh data - let response = await dnsClient.listDnsProviders({ - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.dnsProviders; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to save dnsProvider', { @@ -70,7 +61,6 @@ try { await dnsClient.deleteDnsProvider({ id: item.id }); - data = data.filter((e) => e.id !== item.id); toast.success('EntryPoint deleted successfully'); } catch (err) { const e = ConnectError.from(err); diff --git a/web/src/lib/components/modals/EntryPointModal.svelte b/web/src/lib/components/modals/EntryPointModal.svelte index 4ed41df..368718c 100644 --- a/web/src/lib/components/modals/EntryPointModal.svelte +++ b/web/src/lib/components/modals/EntryPointModal.svelte @@ -9,16 +9,14 @@ import { ConnectError } from '@connectrpc/connect'; import type { EntryPoint } from '$lib/gen/mantrae/v1/entry_point_pb'; import { profile } from '$lib/stores/profile'; - import { pageIndex, pageSize } from '$lib/stores/common'; import CustomSwitch from '../ui/custom-switch/custom-switch.svelte'; interface Props { - data: EntryPoint[]; item: EntryPoint; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); const handleSubmit = async () => { try { @@ -39,14 +37,6 @@ }); toast.success('EntryPoint created successfully'); } - - // Refresh data - let response = await entryPointClient.listEntryPoints({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.entryPoints; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to save entry point', { description: e.message }); @@ -59,7 +49,6 @@ try { await entryPointClient.deleteEntryPoint({ id: item.id }); - data = data.filter((e) => e.id !== item.id); toast.success('EntryPoint deleted successfully'); } catch (err) { const e = ConnectError.from(err); diff --git a/web/src/lib/components/modals/MiddlewareModal.svelte b/web/src/lib/components/modals/MiddlewareModal.svelte index 58c5a84..01db8c5 100644 --- a/web/src/lib/components/modals/MiddlewareModal.svelte +++ b/web/src/lib/components/modals/MiddlewareModal.svelte @@ -10,18 +10,16 @@ import { middlewareClient } from '$lib/api'; import { ConnectError } from '@connectrpc/connect'; import { profile } from '$lib/stores/profile'; - import { pageIndex, pageSize } from '$lib/stores/common'; import HTTPMiddlewareForm from '../forms/HTTPMiddlewareForm.svelte'; import TCPMiddlewareForm from '../forms/TCPMiddlewareForm.svelte'; import { ProtocolType } from '$lib/gen/mantrae/v1/protocol_pb'; import { protocolTypes } from '$lib/types'; interface Props { - data: Middleware[]; item: Middleware; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); const handleSubmit = async () => { try { @@ -43,14 +41,6 @@ }); toast.success('Middleware created successfully'); } - - // Refresh data - const response = await middlewareClient.listMiddlewares({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.middlewares; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to save item', { description: e.message }); @@ -64,14 +54,6 @@ try { await middlewareClient.deleteMiddleware({ id: item.id, type: item.type }); toast.success('Middleware deleted successfully'); - - // Refresh data - const response = await middlewareClient.listMiddlewares({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.middlewares; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to delete item', { description: e.message }); diff --git a/web/src/lib/components/modals/RouterModal.svelte b/web/src/lib/components/modals/RouterModal.svelte index 34068e2..97f83f4 100644 --- a/web/src/lib/components/modals/RouterModal.svelte +++ b/web/src/lib/components/modals/RouterModal.svelte @@ -11,7 +11,6 @@ import { Label } from '$lib/components/ui/label'; import { type Router } from '$lib/gen/mantrae/v1/router_pb'; import { type Service } from '$lib/gen/mantrae/v1/service_pb'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { profile } from '$lib/stores/profile'; import { protocolTypes, unmarshalConfig } from '$lib/types'; import { ConnectError } from '@connectrpc/connect'; @@ -35,12 +34,11 @@ import { ProtocolType } from '$lib/gen/mantrae/v1/protocol_pb'; interface Props { - data: Router[]; item: Router; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); let service = $state({} as Service); let hasLoadedService = $state(false); @@ -130,14 +128,6 @@ enabled: service.enabled }); } - - // Refresh data - const response = await routerClient.listRouters({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.routers; } catch (err) { const e = ConnectError.from(err); toast.error(`Failed to ${item.id ? 'update' : 'save'} router`, { @@ -153,7 +143,6 @@ try { await routerClient.deleteRouter({ id: item.id, type: item.type }); toast.success('Router deleted successfully'); - data = data.filter((r) => r.id !== item.id); } catch (err) { const e = ConnectError.from(err); toast.error('Failed to delete router', { description: e.message }); @@ -211,7 +200,6 @@ Manage DNS providers for this router @@ -288,11 +276,7 @@ - +
diff --git a/web/src/lib/components/modals/ServerTransportModal.svelte b/web/src/lib/components/modals/ServerTransportModal.svelte index e52355e..46a0058 100644 --- a/web/src/lib/components/modals/ServerTransportModal.svelte +++ b/web/src/lib/components/modals/ServerTransportModal.svelte @@ -21,12 +21,11 @@ import { protocolTypes } from '$lib/types'; interface Props { - data: ServersTransport[]; item: ServersTransport; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); const handleSubmit = async () => { try { @@ -48,14 +47,6 @@ }); toast.success('Transport created successfully'); } - - // Refresh data - let response = await serversTransportClient.listServersTransports({ - profileId: profile.id, - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.serversTransports; } catch (err) { const e = ConnectError.from(err); toast.error('Failed to save transport', { description: e.message }); @@ -68,7 +59,6 @@ try { await serversTransportClient.deleteServersTransport({ id: item.id }); - data = data.filter((e) => e.id !== item.id); toast.success('Transport deleted successfully'); } catch (err) { const e = ConnectError.from(err); diff --git a/web/src/lib/components/modals/UserModal.svelte b/web/src/lib/components/modals/UserModal.svelte index 9d7ff42..f33ba37 100644 --- a/web/src/lib/components/modals/UserModal.svelte +++ b/web/src/lib/components/modals/UserModal.svelte @@ -9,17 +9,15 @@ import { UpdateUserRequestSchema, type User } from '$lib/gen/mantrae/v1/user_pb'; import { userClient } from '$lib/api'; import { ConnectError } from '@connectrpc/connect'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { user } from '$lib/stores/user'; import { create } from '@bufbuild/protobuf'; interface Props { - data?: User[]; item: User; open?: boolean; } - let { data = $bindable(), item = $bindable(), open = $bindable(false) }: Props = $props(); + let { item = $bindable(), open = $bindable(false) }: Props = $props(); let password = $state(''); let isSelf = $derived(item?.id === user.value?.id); @@ -44,14 +42,6 @@ }); toast.success(`User ${item.username} created successfully.`); } - - // Refresh data - if (!data) return; - let response = await userClient.listUsers({ - limit: BigInt(pageSize.value ?? 10), - offset: BigInt(pageIndex.value ?? 0) - }); - data = response.users; } catch (err) { const e = ConnectError.from(err); toast.error(`Failed to update user`, { description: e.message }); @@ -65,7 +55,6 @@ try { await userClient.deleteUser({ id: item.id }); - if (data) data = data.filter((e) => e.id !== item.id); toast.success('User deleted successfully'); } catch (err) { const e = ConnectError.from(err); diff --git a/web/src/lib/components/nav/AppSidebar.svelte b/web/src/lib/components/nav/AppSidebar.svelte index fd7e221..3310eb7 100644 --- a/web/src/lib/components/nav/AppSidebar.svelte +++ b/web/src/lib/components/nav/AppSidebar.svelte @@ -69,7 +69,7 @@ {#if user.isLoggedIn() && user.value} - + {/if} diff --git a/web/src/lib/components/tables/DataTable.svelte b/web/src/lib/components/tables/DataTable.svelte index 5b452a7..af3dc8f 100644 --- a/web/src/lib/components/tables/DataTable.svelte +++ b/web/src/lib/components/tables/DataTable.svelte @@ -27,7 +27,6 @@ import { ArrowDown, ArrowUp, - Check, ChevronLeft, ChevronRight, ChevronsLeft, @@ -44,8 +43,6 @@ type DataTableProps = { data: TData[]; columns: ColumnDef[]; - rowCount: number; - viewMode?: 'table' | 'grid'; onPaginationChange?: (pagination: PaginationState) => void; onSortingChange?: (sorting: SortingState) => void; onRowSelection?: (rowSelection: RowSelectionState) => void; @@ -56,26 +53,18 @@ label: string; onClick: () => void; }; - cardConfig?: { - titleKey?: string; - subtitleKey?: string; - excludeColumns?: string[]; - }; }; let { data, columns, - rowCount, - viewMode = 'table', onPaginationChange, onSortingChange, onRowSelection, getRowClassName, rowClassModifiers, bulkActions, - createButton, - cardConfig = {} + createButton }: DataTableProps = $props(); // Pagination @@ -84,7 +73,6 @@ pageIndex: pageIndex.value ?? 0, pageSize: pageSize.value ?? 10 }); - let pageCount = $derived(Math.ceil(rowCount / pagination.pageSize)); let sorting = $state([]); let columnFilters = $derived([]); let columnVisibility = $state({}); @@ -118,13 +106,6 @@ }, ...columns ], - manualPagination: true, - get rowCount() { - return rowCount; - }, - get pageCount() { - return pageCount; - }, filterFns: { fuzzy: (row, columnId, value, addMeta) => { const itemRank = rankItem(row.getValue(columnId), value); @@ -232,17 +213,6 @@ const column = table.getColumn(columnId); if (column) column.setFilterValue(undefined); } - function getVisibleColumns() { - return table - .getAllColumns() - .filter( - (col) => - col.getIsVisible() && - col.id !== 'select' && - col.id !== 'actions' && - !cardConfig.excludeColumns?.includes(col.id) - ); - }
@@ -277,26 +247,24 @@ {/if} - {#if viewMode === 'table'} - - - {#snippet child({ props })} - - {/snippet} - - - {#each table.getAllColumns().filter((col) => col.getCanHide()) as column (column.id)} - column.getIsVisible(), (v) => column.toggleVisibility(!!v)} - > - {column.columnDef.header} - - {/each} - - - {/if} + + + {#snippet child({ props })} + + {/snippet} + + + {#each table.getAllColumns().filter((col) => col.getCanHide()) as column (column.id)} + column.getIsVisible(), (v) => column.toggleVisibility(!!v)} + > + {column.columnDef.header} + + {/each} + + {#if createButton}
- {#if viewMode === 'table'} - -
- {#key table.getRowModel().rows} - - - {#each table.getHeaderGroups() as headerGroup (headerGroup.id)} - - {#each headerGroup.headers as header (header.id)} - - {#if !header.isPlaceholder} -
- -
- {/if} -
- {/each} -
- {/each} -
- - {#each table.getRowModel().rows as row (row.id)} - - {#each row.getVisibleCells() as cell (cell.id)} - - - - {/each} - - {:else} - - No results. - - {/each} - - - - Total - - {table.getPaginationRowModel().rows.length} - - - -
- {/key} -
- {:else} - -
- {#each table.getRowModel().rows as row (row.id)} - {@const isSelected = row.getIsSelected()} - {@const titleCell = cardConfig.titleKey - ? row.getVisibleCells().find((c) => c.column.id === cardConfig.titleKey) - : null} - {@const subtitleCell = cardConfig.subtitleKey - ? row.getVisibleCells().find((c) => c.column.id === cardConfig.subtitleKey) - : null} - {@const actionsCell = row.getVisibleCells().find((c) => c.column.id === 'actions')} - {@const visibleColumns = getVisibleColumns()} - - - -
row.toggleSelected()} - ontouchstart={(e) => { - let touchTimer; - touchTimer = setTimeout(() => { - // Long press action - could show context menu - if (actionsCell) { - e.preventDefault(); - // You could dispatch a custom event here for showing actions menu - } - }, 500); - - // Clear timer on touch end - const clearTimer = () => { - clearTimeout(touchTimer); - document.removeEventListener('touchend', clearTimer); - document.removeEventListener('touchmove', clearTimer); - }; - - document.addEventListener('touchend', clearTimer); - document.addEventListener('touchmove', clearTimer); - }} - > - {#if isSelected} - - {/if} - -
- -
- {#if titleCell && cardConfig.titleKey} - {@const titleColumn = table.getColumn(cardConfig.titleKey)} -

- -

- {/if} - - {#if subtitleCell && cardConfig.subtitleKey} - {@const subtitleColumn = table.getColumn(cardConfig.subtitleKey)} -
- -
- {/if} -
- - - {#if visibleColumns.length > 0} -
- {#each visibleColumns as column (column.id)} - {@const cell = row.getVisibleCells().find((c) => c.column.id === column.id)} - {#if cell && column.id !== cardConfig.titleKey && column.id !== cardConfig.subtitleKey} -
- +
+ {#key table.getRowModel().rows} + + + {#each table.getHeaderGroups() as headerGroup (headerGroup.id)} + + {#each headerGroup.headers as header (header.id)} + + {#if !header.isPlaceholder} +
+
{/if} - {/each} -
- {/if} - - - {#if actionsCell} -
-
- -
-
- {/if} -
- - -
-
- {:else} -
-
-
📋
-

No results found

-

Try adjusting your search or filters

-
-
- {/each} -
- {/if} + + {/each} + + {/each} + + + {#each table.getRowModel().rows as row (row.id)} + + {#each row.getVisibleCells() as cell (cell.id)} + + + + {/each} + + {:else} + + No results. + + {/each} + + + + Total + + {table.getPaginationRowModel().rows.length} + + + + + {/key} +
{#if table.getSelectedRowModel().rows.length > 0 && bulkActions && bulkActions.length > 0} & { - /** - * `id` is a string that serves as a machine-readable name for this Rule. - * It should be unique within its scope, which could be either a message or a field. - * - * @generated from field: optional string id = 1; - */ - id: string; +export type Rule = Message<'buf.validate.Rule'> & { + /** + * `id` is a string that serves as a machine-readable name for this Rule. + * It should be unique within its scope, which could be either a message or a field. + * + * @generated from field: optional string id = 1; + */ + id: string; - /** - * `message` is an optional field that provides a human-readable error message - * for this Rule when the CEL expression evaluates to false. If a - * non-empty message is provided, any strings resulting from the CEL - * expression evaluation are ignored. - * - * @generated from field: optional string message = 2; - */ - message: string; + /** + * `message` is an optional field that provides a human-readable error message + * for this Rule when the CEL expression evaluates to false. If a + * non-empty message is provided, any strings resulting from the CEL + * expression evaluation are ignored. + * + * @generated from field: optional string message = 2; + */ + message: string; - /** - * `expression` is the actual CEL expression that will be evaluated for - * validation. This string must resolve to either a boolean or a string - * value. If the expression evaluates to false or a non-empty string, the - * validation is considered failed, and the message is rejected. - * - * @generated from field: optional string expression = 3; - */ - expression: string; + /** + * `expression` is the actual CEL expression that will be evaluated for + * validation. This string must resolve to either a boolean or a string + * value. If the expression evaluates to false or a non-empty string, the + * validation is considered failed, and the message is rejected. + * + * @generated from field: optional string expression = 3; + */ + expression: string; }; /** * Describes the message buf.validate.Rule. * Use `create(RuleSchema)` to create a new message. */ -export const RuleSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 0); +export const RuleSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 0); /** * MessageRules represents validation rules that are applied to the entire message. @@ -90,104 +106,106 @@ export const RuleSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.MessageRules */ -export type MessageRules = Message<"buf.validate.MessageRules"> & { - /** - * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message. - * These rules are written in Common Expression Language (CEL) syntax. For more information, - * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). - * - * - * ```proto - * message MyMessage { - * // The field `foo` must be greater than 42. - * option (buf.validate.message).cel = { - * id: "my_message.value", - * message: "value must be greater than 42", - * expression: "this.foo > 42", - * }; - * optional int32 foo = 1; - * } - * ``` - * - * @generated from field: repeated buf.validate.Rule cel = 3; - */ - cel: Rule[]; +export type MessageRules = Message<'buf.validate.MessageRules'> & { + /** + * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message. + * These rules are written in Common Expression Language (CEL) syntax. For more information, + * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + * + * + * ```proto + * message MyMessage { + * // The field `foo` must be greater than 42. + * option (buf.validate.message).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this.foo > 42", + * }; + * optional int32 foo = 1; + * } + * ``` + * + * @generated from field: repeated buf.validate.Rule cel = 3; + */ + cel: Rule[]; - /** - * `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields - * of which at most one can be present. If `required` is also specified, then exactly one - * of the specified fields _must_ be present. - * - * This will enforce oneof-like constraints with a few features not provided by - * actual Protobuf oneof declarations: - * 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof, - * only scalar fields are allowed. - * 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member - * fields have explicit presence. This means that, for the purpose of determining - * how many fields are set, explicitly setting such a field to its zero value is - * effectively the same as not setting it at all. - * 3. This will always generate validation errors for a message unmarshalled from - * serialized data that sets more than one field. With a Protobuf oneof, when - * multiple fields are present in the serialized form, earlier values are usually - * silently ignored when unmarshalling, with only the last field being set when - * unmarshalling completes. - * - * Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means - * only the field that is set will be validated and the unset fields are not validated according to the field rules. - * This behavior can be overridden by setting `ignore` against a field. - * - * ```proto - * message MyMessage { - * // Only one of `field1` or `field2` _can_ be present in this message. - * option (buf.validate.message).oneof = { fields: ["field1", "field2"] }; - * // Exactly one of `field3` or `field4` _must_ be present in this message. - * option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true }; - * string field1 = 1; - * bytes field2 = 2; - * bool field3 = 3; - * int32 field4 = 4; - * } - * ``` - * - * @generated from field: repeated buf.validate.MessageOneofRule oneof = 4; - */ - oneof: MessageOneofRule[]; + /** + * `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields + * of which at most one can be present. If `required` is also specified, then exactly one + * of the specified fields _must_ be present. + * + * This will enforce oneof-like constraints with a few features not provided by + * actual Protobuf oneof declarations: + * 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof, + * only scalar fields are allowed. + * 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member + * fields have explicit presence. This means that, for the purpose of determining + * how many fields are set, explicitly setting such a field to its zero value is + * effectively the same as not setting it at all. + * 3. This will always generate validation errors for a message unmarshalled from + * serialized data that sets more than one field. With a Protobuf oneof, when + * multiple fields are present in the serialized form, earlier values are usually + * silently ignored when unmarshalling, with only the last field being set when + * unmarshalling completes. + * + * Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means + * only the field that is set will be validated and the unset fields are not validated according to the field rules. + * This behavior can be overridden by setting `ignore` against a field. + * + * ```proto + * message MyMessage { + * // Only one of `field1` or `field2` _can_ be present in this message. + * option (buf.validate.message).oneof = { fields: ["field1", "field2"] }; + * // Exactly one of `field3` or `field4` _must_ be present in this message. + * option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true }; + * string field1 = 1; + * bytes field2 = 2; + * bool field3 = 3; + * int32 field4 = 4; + * } + * ``` + * + * @generated from field: repeated buf.validate.MessageOneofRule oneof = 4; + */ + oneof: MessageOneofRule[]; }; /** * Describes the message buf.validate.MessageRules. * Use `create(MessageRulesSchema)` to create a new message. */ -export const MessageRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 1); +export const MessageRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 1); /** * @generated from message buf.validate.MessageOneofRule */ -export type MessageOneofRule = Message<"buf.validate.MessageOneofRule"> & { - /** - * A list of field names to include in the oneof. All field names must be - * defined in the message. At least one field must be specified, and - * duplicates are not permitted. - * - * @generated from field: repeated string fields = 1; - */ - fields: string[]; +export type MessageOneofRule = Message<'buf.validate.MessageOneofRule'> & { + /** + * A list of field names to include in the oneof. All field names must be + * defined in the message. At least one field must be specified, and + * duplicates are not permitted. + * + * @generated from field: repeated string fields = 1; + */ + fields: string[]; - /** - * If true, one of the fields specified _must_ be set. - * - * @generated from field: optional bool required = 2; - */ - required: boolean; + /** + * If true, one of the fields specified _must_ be set. + * + * @generated from field: optional bool required = 2; + */ + required: boolean; }; /** * Describes the message buf.validate.MessageOneofRule. * Use `create(MessageOneofRuleSchema)` to create a new message. */ -export const MessageOneofRuleSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 2); +export const MessageOneofRuleSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 2); /** * The `OneofRules` message type enables you to manage rules for @@ -195,36 +213,37 @@ export const MessageOneofRuleSchema: GenMessage = /*@__PURE__* * * @generated from message buf.validate.OneofRules */ -export type OneofRules = Message<"buf.validate.OneofRules"> & { - /** - * If `required` is true, exactly one field of the oneof must be set. A - * validation error is returned if no fields in the oneof are set. Further rules - * should be placed on the fields themselves to ensure they are valid values, - * such as `min_len` or `gt`. - * - * ```proto - * message MyMessage { - * oneof value { - * // Either `a` or `b` must be set. If `a` is set, it must also be - * // non-empty; whereas if `b` is set, it can still be an empty string. - * option (buf.validate.oneof).required = true; - * string a = 1 [(buf.validate.field).string.min_len = 1]; - * string b = 2; - * } - * } - * ``` - * - * @generated from field: optional bool required = 1; - */ - required: boolean; +export type OneofRules = Message<'buf.validate.OneofRules'> & { + /** + * If `required` is true, exactly one field of the oneof must be set. A + * validation error is returned if no fields in the oneof are set. Further rules + * should be placed on the fields themselves to ensure they are valid values, + * such as `min_len` or `gt`. + * + * ```proto + * message MyMessage { + * oneof value { + * // Either `a` or `b` must be set. If `a` is set, it must also be + * // non-empty; whereas if `b` is set, it can still be an empty string. + * option (buf.validate.oneof).required = true; + * string a = 1 [(buf.validate.field).string.min_len = 1]; + * string b = 2; + * } + * } + * ``` + * + * @generated from field: optional bool required = 1; + */ + required: boolean; }; /** * Describes the message buf.validate.OneofRules. * Use `create(OneofRulesSchema)` to create a new message. */ -export const OneofRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 3); +export const OneofRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 3); /** * FieldRules encapsulates the rules for each type of field. Depending on @@ -232,245 +251,268 @@ export const OneofRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.FieldRules */ -export type FieldRules = Message<"buf.validate.FieldRules"> & { - /** - * `cel` is a repeated field used to represent a textual expression - * in the Common Expression Language (CEL) syntax. For more information, - * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). - * - * ```proto - * message MyMessage { - * // The field `value` must be greater than 42. - * optional int32 value = 1 [(buf.validate.field).cel = { - * id: "my_message.value", - * message: "value must be greater than 42", - * expression: "this > 42", - * }]; - * } - * ``` - * - * @generated from field: repeated buf.validate.Rule cel = 23; - */ - cel: Rule[]; +export type FieldRules = Message<'buf.validate.FieldRules'> & { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information, + * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.field).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from field: repeated buf.validate.Rule cel = 23; + */ + cel: Rule[]; - /** - * If `required` is true, the field must be set. A validation error is returned - * if the field is not set. - * - * ```proto - * syntax="proto3"; - * - * message FieldsWithPresence { - * // Requires any string to be set, including the empty string. - * optional string link = 1 [ - * (buf.validate.field).required = true - * ]; - * // Requires true or false to be set. - * optional bool disabled = 2 [ - * (buf.validate.field).required = true - * ]; - * // Requires a message to be set, including the empty message. - * SomeMessage msg = 4 [ - * (buf.validate.field).required = true - * ]; - * } - * ``` - * - * All fields in the example above track presence. By default, Protovalidate - * ignores rules on those fields if no value is set. `required` ensures that - * the fields are set and valid. - * - * Fields that don't track presence are always validated by Protovalidate, - * whether they are set or not. It is not necessary to add `required`: - * - * ```proto - * syntax="proto3"; - * - * message FieldsWithoutPresence { - * // `string.email` always applies, even to an empty string. - * string link = 1 [ - * (buf.validate.field).string.email = true - * ]; - * // `repeated.min_items` always applies, even to an empty list. - * repeated string labels = 4 [ - * (buf.validate.field).repeated.min_items = 1 - * ]; - * } - * ``` - * - * To learn which fields track presence, see the - * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). - * - * Note: While field rules can be applied to repeated items, map keys, and map - * values, the elements are always considered to be set. Consequently, - * specifying `repeated.items.required` is redundant. - * - * @generated from field: optional bool required = 25; - */ - required: boolean; + /** + * If `required` is true, the field must be set. A validation error is returned + * if the field is not set. + * + * ```proto + * syntax="proto3"; + * + * message FieldsWithPresence { + * // Requires any string to be set, including the empty string. + * optional string link = 1 [ + * (buf.validate.field).required = true + * ]; + * // Requires true or false to be set. + * optional bool disabled = 2 [ + * (buf.validate.field).required = true + * ]; + * // Requires a message to be set, including the empty message. + * SomeMessage msg = 4 [ + * (buf.validate.field).required = true + * ]; + * } + * ``` + * + * All fields in the example above track presence. By default, Protovalidate + * ignores rules on those fields if no value is set. `required` ensures that + * the fields are set and valid. + * + * Fields that don't track presence are always validated by Protovalidate, + * whether they are set or not. It is not necessary to add `required`: + * + * ```proto + * syntax="proto3"; + * + * message FieldsWithoutPresence { + * // `string.email` always applies, even to an empty string. + * string link = 1 [ + * (buf.validate.field).string.email = true + * ]; + * // `repeated.min_items` always applies, even to an empty list. + * repeated string labels = 4 [ + * (buf.validate.field).repeated.min_items = 1 + * ]; + * } + * ``` + * + * To learn which fields track presence, see the + * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). + * + * Note: While field rules can be applied to repeated items, map keys, and map + * values, the elements are always considered to be set. Consequently, + * specifying `repeated.items.required` is redundant. + * + * @generated from field: optional bool required = 25; + */ + required: boolean; - /** - * Ignore validation rules on the field if its value matches the specified - * criteria. See the `Ignore` enum for details. - * - * ```proto - * message UpdateRequest { - * // The uri rule only applies if the field is not an empty string. - * string url = 1 [ - * (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, - * (buf.validate.field).string.uri = true - * ]; - * } - * ``` - * - * @generated from field: optional buf.validate.Ignore ignore = 27; - */ - ignore: Ignore; + /** + * Ignore validation rules on the field if its value matches the specified + * criteria. See the `Ignore` enum for details. + * + * ```proto + * message UpdateRequest { + * // The uri rule only applies if the field is not an empty string. + * string url = 1 [ + * (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + * (buf.validate.field).string.uri = true + * ]; + * } + * ``` + * + * @generated from field: optional buf.validate.Ignore ignore = 27; + */ + ignore: Ignore; - /** - * @generated from oneof buf.validate.FieldRules.type - */ - type: { - /** - * Scalar Field Types - * - * @generated from field: buf.validate.FloatRules float = 1; - */ - value: FloatRules; - case: "float"; - } | { - /** - * @generated from field: buf.validate.DoubleRules double = 2; - */ - value: DoubleRules; - case: "double"; - } | { - /** - * @generated from field: buf.validate.Int32Rules int32 = 3; - */ - value: Int32Rules; - case: "int32"; - } | { - /** - * @generated from field: buf.validate.Int64Rules int64 = 4; - */ - value: Int64Rules; - case: "int64"; - } | { - /** - * @generated from field: buf.validate.UInt32Rules uint32 = 5; - */ - value: UInt32Rules; - case: "uint32"; - } | { - /** - * @generated from field: buf.validate.UInt64Rules uint64 = 6; - */ - value: UInt64Rules; - case: "uint64"; - } | { - /** - * @generated from field: buf.validate.SInt32Rules sint32 = 7; - */ - value: SInt32Rules; - case: "sint32"; - } | { - /** - * @generated from field: buf.validate.SInt64Rules sint64 = 8; - */ - value: SInt64Rules; - case: "sint64"; - } | { - /** - * @generated from field: buf.validate.Fixed32Rules fixed32 = 9; - */ - value: Fixed32Rules; - case: "fixed32"; - } | { - /** - * @generated from field: buf.validate.Fixed64Rules fixed64 = 10; - */ - value: Fixed64Rules; - case: "fixed64"; - } | { - /** - * @generated from field: buf.validate.SFixed32Rules sfixed32 = 11; - */ - value: SFixed32Rules; - case: "sfixed32"; - } | { - /** - * @generated from field: buf.validate.SFixed64Rules sfixed64 = 12; - */ - value: SFixed64Rules; - case: "sfixed64"; - } | { - /** - * @generated from field: buf.validate.BoolRules bool = 13; - */ - value: BoolRules; - case: "bool"; - } | { - /** - * @generated from field: buf.validate.StringRules string = 14; - */ - value: StringRules; - case: "string"; - } | { - /** - * @generated from field: buf.validate.BytesRules bytes = 15; - */ - value: BytesRules; - case: "bytes"; - } | { - /** - * Complex Field Types - * - * @generated from field: buf.validate.EnumRules enum = 16; - */ - value: EnumRules; - case: "enum"; - } | { - /** - * @generated from field: buf.validate.RepeatedRules repeated = 18; - */ - value: RepeatedRules; - case: "repeated"; - } | { - /** - * @generated from field: buf.validate.MapRules map = 19; - */ - value: MapRules; - case: "map"; - } | { - /** - * Well-Known Field Types - * - * @generated from field: buf.validate.AnyRules any = 20; - */ - value: AnyRules; - case: "any"; - } | { - /** - * @generated from field: buf.validate.DurationRules duration = 21; - */ - value: DurationRules; - case: "duration"; - } | { - /** - * @generated from field: buf.validate.TimestampRules timestamp = 22; - */ - value: TimestampRules; - case: "timestamp"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.FieldRules.type + */ + type: + | { + /** + * Scalar Field Types + * + * @generated from field: buf.validate.FloatRules float = 1; + */ + value: FloatRules; + case: 'float'; + } + | { + /** + * @generated from field: buf.validate.DoubleRules double = 2; + */ + value: DoubleRules; + case: 'double'; + } + | { + /** + * @generated from field: buf.validate.Int32Rules int32 = 3; + */ + value: Int32Rules; + case: 'int32'; + } + | { + /** + * @generated from field: buf.validate.Int64Rules int64 = 4; + */ + value: Int64Rules; + case: 'int64'; + } + | { + /** + * @generated from field: buf.validate.UInt32Rules uint32 = 5; + */ + value: UInt32Rules; + case: 'uint32'; + } + | { + /** + * @generated from field: buf.validate.UInt64Rules uint64 = 6; + */ + value: UInt64Rules; + case: 'uint64'; + } + | { + /** + * @generated from field: buf.validate.SInt32Rules sint32 = 7; + */ + value: SInt32Rules; + case: 'sint32'; + } + | { + /** + * @generated from field: buf.validate.SInt64Rules sint64 = 8; + */ + value: SInt64Rules; + case: 'sint64'; + } + | { + /** + * @generated from field: buf.validate.Fixed32Rules fixed32 = 9; + */ + value: Fixed32Rules; + case: 'fixed32'; + } + | { + /** + * @generated from field: buf.validate.Fixed64Rules fixed64 = 10; + */ + value: Fixed64Rules; + case: 'fixed64'; + } + | { + /** + * @generated from field: buf.validate.SFixed32Rules sfixed32 = 11; + */ + value: SFixed32Rules; + case: 'sfixed32'; + } + | { + /** + * @generated from field: buf.validate.SFixed64Rules sfixed64 = 12; + */ + value: SFixed64Rules; + case: 'sfixed64'; + } + | { + /** + * @generated from field: buf.validate.BoolRules bool = 13; + */ + value: BoolRules; + case: 'bool'; + } + | { + /** + * @generated from field: buf.validate.StringRules string = 14; + */ + value: StringRules; + case: 'string'; + } + | { + /** + * @generated from field: buf.validate.BytesRules bytes = 15; + */ + value: BytesRules; + case: 'bytes'; + } + | { + /** + * Complex Field Types + * + * @generated from field: buf.validate.EnumRules enum = 16; + */ + value: EnumRules; + case: 'enum'; + } + | { + /** + * @generated from field: buf.validate.RepeatedRules repeated = 18; + */ + value: RepeatedRules; + case: 'repeated'; + } + | { + /** + * @generated from field: buf.validate.MapRules map = 19; + */ + value: MapRules; + case: 'map'; + } + | { + /** + * Well-Known Field Types + * + * @generated from field: buf.validate.AnyRules any = 20; + */ + value: AnyRules; + case: 'any'; + } + | { + /** + * @generated from field: buf.validate.DurationRules duration = 21; + */ + value: DurationRules; + case: 'duration'; + } + | { + /** + * @generated from field: buf.validate.TimestampRules timestamp = 22; + */ + value: TimestampRules; + case: 'timestamp'; + } + | { case: undefined; value?: undefined }; }; /** * Describes the message buf.validate.FieldRules. * Use `create(FieldRulesSchema)` to create a new message. */ -export const FieldRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 4); +export const FieldRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 4); /** * PredefinedRules are custom rules that can be re-used with @@ -478,34 +520,35 @@ export const FieldRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.PredefinedRules */ -export type PredefinedRules = Message<"buf.validate.PredefinedRules"> & { - /** - * `cel` is a repeated field used to represent a textual expression - * in the Common Expression Language (CEL) syntax. For more information, - * [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/). - * - * ```proto - * message MyMessage { - * // The field `value` must be greater than 42. - * optional int32 value = 1 [(buf.validate.predefined).cel = { - * id: "my_message.value", - * message: "value must be greater than 42", - * expression: "this > 42", - * }]; - * } - * ``` - * - * @generated from field: repeated buf.validate.Rule cel = 1; - */ - cel: Rule[]; +export type PredefinedRules = Message<'buf.validate.PredefinedRules'> & { + /** + * `cel` is a repeated field used to represent a textual expression + * in the Common Expression Language (CEL) syntax. For more information, + * [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/). + * + * ```proto + * message MyMessage { + * // The field `value` must be greater than 42. + * optional int32 value = 1 [(buf.validate.predefined).cel = { + * id: "my_message.value", + * message: "value must be greater than 42", + * expression: "this > 42", + * }]; + * } + * ``` + * + * @generated from field: repeated buf.validate.Rule cel = 1; + */ + cel: Rule[]; }; /** * Describes the message buf.validate.PredefinedRules. * Use `create(PredefinedRulesSchema)` to create a new message. */ -export const PredefinedRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 5); +export const PredefinedRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 5); /** * FloatRules describes the rules applied to `float` values. These @@ -513,181 +556,188 @@ export const PredefinedRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.FloatRules */ -export type FloatRules = Message<"buf.validate.FloatRules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyFloat { - * // value must equal 42.0 - * float value = 1 [(buf.validate.field).float.const = 42.0]; - * } - * ``` - * - * @generated from field: optional float const = 1; - */ - const: number; +export type FloatRules = Message<'buf.validate.FloatRules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must equal 42.0 + * float value = 1 [(buf.validate.field).float.const = 42.0]; + * } + * ``` + * + * @generated from field: optional float const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.FloatRules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be less than 10.0 - * float value = 1 [(buf.validate.field).float.lt = 10.0]; - * } - * ``` - * - * @generated from field: float lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be less than or equal to 10.0 - * float value = 1 [(buf.validate.field).float.lte = 10.0]; - * } - * ``` - * - * @generated from field: float lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.FloatRules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than 10.0 + * float value = 1 [(buf.validate.field).float.lt = 10.0]; + * } + * ``` + * + * @generated from field: float lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be less than or equal to 10.0 + * float value = 1 [(buf.validate.field).float.lte = 10.0]; + * } + * ``` + * + * @generated from field: float lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.FloatRules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be greater than 5.0 [float.gt] - * float value = 1 [(buf.validate.field).float.gt = 5.0]; - * - * // value must be greater than 5 and less than 10.0 [float.gt_lt] - * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; - * - * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] - * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from field: float gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFloat { - * // value must be greater than or equal to 5.0 [float.gte] - * float value = 1 [(buf.validate.field).float.gte = 5.0]; - * - * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] - * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; - * - * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] - * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from field: float gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.FloatRules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than 5.0 [float.gt] + * float value = 1 [(buf.validate.field).float.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [float.gt_lt] + * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: float gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFloat { + * // value must be greater than or equal to 5.0 [float.gte] + * float value = 1 [(buf.validate.field).float.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: float gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message - * is generated. - * - * ```proto - * message MyFloat { - * // value must be in list [1.0, 2.0, 3.0] - * float value = 1 [(buf.validate.field).float = { in: [1.0, 2.0, 3.0] }]; - * } - * ``` - * - * @generated from field: repeated float in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFloat { + * // value must be in list [1.0, 2.0, 3.0] + * float value = 1 [(buf.validate.field).float = { in: [1.0, 2.0, 3.0] }]; + * } + * ``` + * + * @generated from field: repeated float in = 6; + */ + in: number[]; - /** - * `in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyFloat { - * // value must not be in list [1.0, 2.0, 3.0] - * float value = 1 [(buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }]; - * } - * ``` - * - * @generated from field: repeated float not_in = 7; - */ - notIn: number[]; + /** + * `in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFloat { + * // value must not be in list [1.0, 2.0, 3.0] + * float value = 1 [(buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }]; + * } + * ``` + * + * @generated from field: repeated float not_in = 7; + */ + notIn: number[]; - /** - * `finite` requires the field value to be finite. If the field value is - * infinite or NaN, an error message is generated. - * - * @generated from field: optional bool finite = 8; - */ - finite: boolean; + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from field: optional bool finite = 8; + */ + finite: boolean; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyFloat { - * float value = 1 [ - * (buf.validate.field).float.example = 1.0, - * (buf.validate.field).float.example = inf - * ]; - * } - * ``` - * - * @generated from field: repeated float example = 9; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFloat { + * float value = 1 [ + * (buf.validate.field).float.example = 1.0, + * (buf.validate.field).float.example = inf + * ]; + * } + * ``` + * + * @generated from field: repeated float example = 9; + */ + example: number[]; }; /** * Describes the message buf.validate.FloatRules. * Use `create(FloatRulesSchema)` to create a new message. */ -export const FloatRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 6); +export const FloatRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 6); /** * DoubleRules describes the rules applied to `double` values. These @@ -695,181 +745,188 @@ export const FloatRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.DoubleRules */ -export type DoubleRules = Message<"buf.validate.DoubleRules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyDouble { - * // value must equal 42.0 - * double value = 1 [(buf.validate.field).double.const = 42.0]; - * } - * ``` - * - * @generated from field: optional double const = 1; - */ - const: number; +export type DoubleRules = Message<'buf.validate.DoubleRules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must equal 42.0 + * double value = 1 [(buf.validate.field).double.const = 42.0]; + * } + * ``` + * + * @generated from field: optional double const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.DoubleRules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyDouble { - * // value must be less than 10.0 - * double value = 1 [(buf.validate.field).double.lt = 10.0]; - * } - * ``` - * - * @generated from field: double lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified value - * (field <= value). If the field value is greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyDouble { - * // value must be less than or equal to 10.0 - * double value = 1 [(buf.validate.field).double.lte = 10.0]; - * } - * ``` - * - * @generated from field: double lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.DoubleRules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than 10.0 + * double value = 1 [(buf.validate.field).double.lt = 10.0]; + * } + * ``` + * + * @generated from field: double lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified value + * (field <= value). If the field value is greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be less than or equal to 10.0 + * double value = 1 [(buf.validate.field).double.lte = 10.0]; + * } + * ``` + * + * @generated from field: double lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.DoubleRules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, - * the range is reversed, and the field value must be outside the specified - * range. If the field value doesn't meet the required conditions, an error - * message is generated. - * - * ```proto - * message MyDouble { - * // value must be greater than 5.0 [double.gt] - * double value = 1 [(buf.validate.field).double.gt = 5.0]; - * - * // value must be greater than 5 and less than 10.0 [double.gt_lt] - * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; - * - * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] - * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from field: double gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyDouble { - * // value must be greater than or equal to 5.0 [double.gte] - * double value = 1 [(buf.validate.field).double.gte = 5.0]; - * - * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] - * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; - * - * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] - * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; - * } - * ``` - * - * @generated from field: double gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.DoubleRules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + * the range is reversed, and the field value must be outside the specified + * range. If the field value doesn't meet the required conditions, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than 5.0 [double.gt] + * double value = 1 [(buf.validate.field).double.gt = 5.0]; + * + * // value must be greater than 5 and less than 10.0 [double.gt_lt] + * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + * + * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: double gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDouble { + * // value must be greater than or equal to 5.0 [double.gte] + * double value = 1 [(buf.validate.field).double.gte = 5.0]; + * + * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + * + * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + * } + * ``` + * + * @generated from field: double gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyDouble { - * // value must be in list [1.0, 2.0, 3.0] - * double value = 1 [(buf.validate.field).double = { in: [1.0, 2.0, 3.0] }]; - * } - * ``` - * - * @generated from field: repeated double in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyDouble { + * // value must be in list [1.0, 2.0, 3.0] + * double value = 1 [(buf.validate.field).double = { in: [1.0, 2.0, 3.0] }]; + * } + * ``` + * + * @generated from field: repeated double in = 6; + */ + in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyDouble { - * // value must not be in list [1.0, 2.0, 3.0] - * double value = 1 [(buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }]; - * } - * ``` - * - * @generated from field: repeated double not_in = 7; - */ - notIn: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyDouble { + * // value must not be in list [1.0, 2.0, 3.0] + * double value = 1 [(buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }]; + * } + * ``` + * + * @generated from field: repeated double not_in = 7; + */ + notIn: number[]; - /** - * `finite` requires the field value to be finite. If the field value is - * infinite or NaN, an error message is generated. - * - * @generated from field: optional bool finite = 8; - */ - finite: boolean; + /** + * `finite` requires the field value to be finite. If the field value is + * infinite or NaN, an error message is generated. + * + * @generated from field: optional bool finite = 8; + */ + finite: boolean; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyDouble { - * double value = 1 [ - * (buf.validate.field).double.example = 1.0, - * (buf.validate.field).double.example = inf - * ]; - * } - * ``` - * - * @generated from field: repeated double example = 9; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyDouble { + * double value = 1 [ + * (buf.validate.field).double.example = 1.0, + * (buf.validate.field).double.example = inf + * ]; + * } + * ``` + * + * @generated from field: repeated double example = 9; + */ + example: number[]; }; /** * Describes the message buf.validate.DoubleRules. * Use `create(DoubleRulesSchema)` to create a new message. */ -export const DoubleRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 7); +export const DoubleRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 7); /** * Int32Rules describes the rules applied to `int32` values. These @@ -877,173 +934,180 @@ export const DoubleRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.Int32Rules */ -export type Int32Rules = Message<"buf.validate.Int32Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must equal 42 - * int32 value = 1 [(buf.validate.field).int32.const = 42]; - * } - * ``` - * - * @generated from field: optional int32 const = 1; - */ - const: number; +export type Int32Rules = Message<'buf.validate.Int32Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must equal 42 + * int32 value = 1 [(buf.validate.field).int32.const = 42]; + * } + * ``` + * + * @generated from field: optional int32 const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.Int32Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field - * < value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be less than 10 - * int32 value = 1 [(buf.validate.field).int32.lt = 10]; - * } - * ``` - * - * @generated from field: int32 lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be less than or equal to 10 - * int32 value = 1 [(buf.validate.field).int32.lte = 10]; - * } - * ``` - * - * @generated from field: int32 lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Int32Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than 10 + * int32 value = 1 [(buf.validate.field).int32.lt = 10]; + * } + * ``` + * + * @generated from field: int32 lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be less than or equal to 10 + * int32 value = 1 [(buf.validate.field).int32.lte = 10]; + * } + * ``` + * + * @generated from field: int32 lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.Int32Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be greater than 5 [int32.gt] - * int32 value = 1 [(buf.validate.field).int32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [int32.gt_lt] - * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] - * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: int32 gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified value - * (exclusive). If the value of `gte` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt32 { - * // value must be greater than or equal to 5 [int32.gte] - * int32 value = 1 [(buf.validate.field).int32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] - * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] - * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: int32 gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Int32Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than 5 [int32.gt] + * int32 value = 1 [(buf.validate.field).int32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int32.gt_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int32 gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified value + * (exclusive). If the value of `gte` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt32 { + * // value must be greater than or equal to 5 [int32.gte] + * int32 value = 1 [(buf.validate.field).int32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] + * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int32 gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyInt32 { - * // value must be in list [1, 2, 3] - * int32 value = 1 [(buf.validate.field).int32 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated int32 in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt32 { + * // value must be in list [1, 2, 3] + * int32 value = 1 [(buf.validate.field).int32 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated int32 in = 6; + */ + in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error message - * is generated. - * - * ```proto - * message MyInt32 { - * // value must not be in list [1, 2, 3] - * int32 value = 1 [(buf.validate.field).int32 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated int32 not_in = 7; - */ - notIn: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error message + * is generated. + * + * ```proto + * message MyInt32 { + * // value must not be in list [1, 2, 3] + * int32 value = 1 [(buf.validate.field).int32 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated int32 not_in = 7; + */ + notIn: number[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyInt32 { - * int32 value = 1 [ - * (buf.validate.field).int32.example = 1, - * (buf.validate.field).int32.example = -10 - * ]; - * } - * ``` - * - * @generated from field: repeated int32 example = 8; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyInt32 { + * int32 value = 1 [ + * (buf.validate.field).int32.example = 1, + * (buf.validate.field).int32.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated int32 example = 8; + */ + example: number[]; }; /** * Describes the message buf.validate.Int32Rules. * Use `create(Int32RulesSchema)` to create a new message. */ -export const Int32RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 8); +export const Int32RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 8); /** * Int64Rules describes the rules applied to `int64` values. These @@ -1051,173 +1115,180 @@ export const Int32RulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.Int64Rules */ -export type Int64Rules = Message<"buf.validate.Int64Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must equal 42 - * int64 value = 1 [(buf.validate.field).int64.const = 42]; - * } - * ``` - * - * @generated from field: optional int64 const = 1; - */ - const: bigint; +export type Int64Rules = Message<'buf.validate.Int64Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must equal 42 + * int64 value = 1 [(buf.validate.field).int64.const = 42]; + * } + * ``` + * + * @generated from field: optional int64 const = 1; + */ + const: bigint; - /** - * @generated from oneof buf.validate.Int64Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be less than 10 - * int64 value = 1 [(buf.validate.field).int64.lt = 10]; - * } - * ``` - * - * @generated from field: int64 lt = 2; - */ - value: bigint; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be less than or equal to 10 - * int64 value = 1 [(buf.validate.field).int64.lte = 10]; - * } - * ``` - * - * @generated from field: int64 lte = 3; - */ - value: bigint; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Int64Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than 10 + * int64 value = 1 [(buf.validate.field).int64.lt = 10]; + * } + * ``` + * + * @generated from field: int64 lt = 2; + */ + value: bigint; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be less than or equal to 10 + * int64 value = 1 [(buf.validate.field).int64.lte = 10]; + * } + * ``` + * + * @generated from field: int64 lte = 3; + */ + value: bigint; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.Int64Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be greater than 5 [int64.gt] - * int64 value = 1 [(buf.validate.field).int64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [int64.gt_lt] - * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] - * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: int64 gt = 4; - */ - value: bigint; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyInt64 { - * // value must be greater than or equal to 5 [int64.gte] - * int64 value = 1 [(buf.validate.field).int64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] - * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] - * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: int64 gte = 5; - */ - value: bigint; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Int64Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than 5 [int64.gt] + * int64 value = 1 [(buf.validate.field).int64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [int64.gt_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int64 gt = 4; + */ + value: bigint; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyInt64 { + * // value must be greater than or equal to 5 [int64.gte] + * int64 value = 1 [(buf.validate.field).int64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] + * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: int64 gte = 5; + */ + value: bigint; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyInt64 { - * // value must be in list [1, 2, 3] - * int64 value = 1 [(buf.validate.field).int64 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated int64 in = 6; - */ - in: bigint[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyInt64 { + * // value must be in list [1, 2, 3] + * int64 value = 1 [(buf.validate.field).int64 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated int64 in = 6; + */ + in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyInt64 { - * // value must not be in list [1, 2, 3] - * int64 value = 1 [(buf.validate.field).int64 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated int64 not_in = 7; - */ - notIn: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyInt64 { + * // value must not be in list [1, 2, 3] + * int64 value = 1 [(buf.validate.field).int64 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated int64 not_in = 7; + */ + notIn: bigint[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyInt64 { - * int64 value = 1 [ - * (buf.validate.field).int64.example = 1, - * (buf.validate.field).int64.example = -10 - * ]; - * } - * ``` - * - * @generated from field: repeated int64 example = 9; - */ - example: bigint[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyInt64 { + * int64 value = 1 [ + * (buf.validate.field).int64.example = 1, + * (buf.validate.field).int64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated int64 example = 9; + */ + example: bigint[]; }; /** * Describes the message buf.validate.Int64Rules. * Use `create(Int64RulesSchema)` to create a new message. */ -export const Int64RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 9); +export const Int64RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 9); /** * UInt32Rules describes the rules applied to `uint32` values. These @@ -1225,173 +1296,180 @@ export const Int64RulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.UInt32Rules */ -export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must equal 42 - * uint32 value = 1 [(buf.validate.field).uint32.const = 42]; - * } - * ``` - * - * @generated from field: optional uint32 const = 1; - */ - const: number; +export type UInt32Rules = Message<'buf.validate.UInt32Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must equal 42 + * uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + * } + * ``` + * + * @generated from field: optional uint32 const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.UInt32Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be less than 10 - * uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; - * } - * ``` - * - * @generated from field: uint32 lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be less than or equal to 10 - * uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; - * } - * ``` - * - * @generated from field: uint32 lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.UInt32Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than 10 + * uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + * } + * ``` + * + * @generated from field: uint32 lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be less than or equal to 10 + * uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + * } + * ``` + * + * @generated from field: uint32 lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.UInt32Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be greater than 5 [uint32.gt] - * uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [uint32.gt_lt] - * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] - * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: uint32 gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt32 { - * // value must be greater than or equal to 5 [uint32.gte] - * uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] - * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] - * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: uint32 gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.UInt32Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than 5 [uint32.gt] + * uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint32.gt_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint32 gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt32 { + * // value must be greater than or equal to 5 [uint32.gte] + * uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint32 gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyUInt32 { - * // value must be in list [1, 2, 3] - * uint32 value = 1 [(buf.validate.field).uint32 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated uint32 in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt32 { + * // value must be in list [1, 2, 3] + * uint32 value = 1 [(buf.validate.field).uint32 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated uint32 in = 6; + */ + in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyUInt32 { - * // value must not be in list [1, 2, 3] - * uint32 value = 1 [(buf.validate.field).uint32 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated uint32 not_in = 7; - */ - notIn: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt32 { + * // value must not be in list [1, 2, 3] + * uint32 value = 1 [(buf.validate.field).uint32 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated uint32 not_in = 7; + */ + notIn: number[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyUInt32 { - * uint32 value = 1 [ - * (buf.validate.field).uint32.example = 1, - * (buf.validate.field).uint32.example = 10 - * ]; - * } - * ``` - * - * @generated from field: repeated uint32 example = 8; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyUInt32 { + * uint32 value = 1 [ + * (buf.validate.field).uint32.example = 1, + * (buf.validate.field).uint32.example = 10 + * ]; + * } + * ``` + * + * @generated from field: repeated uint32 example = 8; + */ + example: number[]; }; /** * Describes the message buf.validate.UInt32Rules. * Use `create(UInt32RulesSchema)` to create a new message. */ -export const UInt32RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 10); +export const UInt32RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 10); /** * UInt64Rules describes the rules applied to `uint64` values. These @@ -1399,1211 +1477,1260 @@ export const UInt32RulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.UInt64Rules */ -export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must equal 42 - * uint64 value = 1 [(buf.validate.field).uint64.const = 42]; - * } - * ``` - * - * @generated from field: optional uint64 const = 1; - */ - const: bigint; +export type UInt64Rules = Message<'buf.validate.UInt64Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must equal 42 + * uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + * } + * ``` + * + * @generated from field: optional uint64 const = 1; + */ + const: bigint; - /** - * @generated from oneof buf.validate.UInt64Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be less than 10 - * uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; - * } - * ``` - * - * @generated from field: uint64 lt = 2; - */ - value: bigint; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be less than or equal to 10 - * uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; - * } - * ``` - * - * @generated from field: uint64 lte = 3; - */ - value: bigint; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.UInt64Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than 10 + * uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + * } + * ``` + * + * @generated from field: uint64 lt = 2; + */ + value: bigint; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be less than or equal to 10 + * uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + * } + * ``` + * + * @generated from field: uint64 lte = 3; + */ + value: bigint; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.UInt64Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be greater than 5 [uint64.gt] - * uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [uint64.gt_lt] - * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] - * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: uint64 gt = 4; - */ - value: bigint; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyUInt64 { - * // value must be greater than or equal to 5 [uint64.gte] - * uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] - * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] - * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: uint64 gte = 5; - */ - value: bigint; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.UInt64Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than 5 [uint64.gt] + * uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [uint64.gt_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint64 gt = 4; + */ + value: bigint; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyUInt64 { + * // value must be greater than or equal to 5 [uint64.gte] + * uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: uint64 gte = 5; + */ + value: bigint; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyUInt64 { - * // value must be in list [1, 2, 3] - * uint64 value = 1 [(buf.validate.field).uint64 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated uint64 in = 6; - */ - in: bigint[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyUInt64 { + * // value must be in list [1, 2, 3] + * uint64 value = 1 [(buf.validate.field).uint64 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated uint64 in = 6; + */ + in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyUInt64 { - * // value must not be in list [1, 2, 3] - * uint64 value = 1 [(buf.validate.field).uint64 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated uint64 not_in = 7; - */ - notIn: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyUInt64 { + * // value must not be in list [1, 2, 3] + * uint64 value = 1 [(buf.validate.field).uint64 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated uint64 not_in = 7; + */ + notIn: bigint[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyUInt64 { - * uint64 value = 1 [ - * (buf.validate.field).uint64.example = 1, - * (buf.validate.field).uint64.example = -10 - * ]; - * } - * ``` - * - * @generated from field: repeated uint64 example = 8; - */ - example: bigint[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyUInt64 { + * uint64 value = 1 [ + * (buf.validate.field).uint64.example = 1, + * (buf.validate.field).uint64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated uint64 example = 8; + */ + example: bigint[]; }; /** * Describes the message buf.validate.UInt64Rules. * Use `create(UInt64RulesSchema)` to create a new message. */ -export const UInt64RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 11); +export const UInt64RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 11); /** * SInt32Rules describes the rules applied to `sint32` values. * * @generated from message buf.validate.SInt32Rules */ -export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must equal 42 - * sint32 value = 1 [(buf.validate.field).sint32.const = 42]; - * } - * ``` - * - * @generated from field: optional sint32 const = 1; - */ - const: number; +export type SInt32Rules = Message<'buf.validate.SInt32Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must equal 42 + * sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + * } + * ``` + * + * @generated from field: optional sint32 const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.SInt32Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field - * < value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be less than 10 - * sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; - * } - * ``` - * - * @generated from field: sint32 lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be less than or equal to 10 - * sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; - * } - * ``` - * - * @generated from field: sint32 lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SInt32Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than 10 + * sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + * } + * ``` + * + * @generated from field: sint32 lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be less than or equal to 10 + * sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + * } + * ``` + * + * @generated from field: sint32 lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.SInt32Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be greater than 5 [sint32.gt] - * sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sint32.gt_lt] - * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] - * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sint32 gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt32 { - * // value must be greater than or equal to 5 [sint32.gte] - * sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] - * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] - * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sint32 gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SInt32Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than 5 [sint32.gt] + * sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint32.gt_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint32 gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt32 { + * // value must be greater than or equal to 5 [sint32.gte] + * sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint32 gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MySInt32 { - * // value must be in list [1, 2, 3] - * sint32 value = 1 [(buf.validate.field).sint32 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sint32 in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySInt32 { + * // value must be in list [1, 2, 3] + * sint32 value = 1 [(buf.validate.field).sint32 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sint32 in = 6; + */ + in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySInt32 { - * // value must not be in list [1, 2, 3] - * sint32 value = 1 [(buf.validate.field).sint32 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sint32 not_in = 7; - */ - notIn: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt32 { + * // value must not be in list [1, 2, 3] + * sint32 value = 1 [(buf.validate.field).sint32 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sint32 not_in = 7; + */ + notIn: number[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MySInt32 { - * sint32 value = 1 [ - * (buf.validate.field).sint32.example = 1, - * (buf.validate.field).sint32.example = -10 - * ]; - * } - * ``` - * - * @generated from field: repeated sint32 example = 8; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySInt32 { + * sint32 value = 1 [ + * (buf.validate.field).sint32.example = 1, + * (buf.validate.field).sint32.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated sint32 example = 8; + */ + example: number[]; }; /** * Describes the message buf.validate.SInt32Rules. * Use `create(SInt32RulesSchema)` to create a new message. */ -export const SInt32RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 12); +export const SInt32RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 12); /** * SInt64Rules describes the rules applied to `sint64` values. * * @generated from message buf.validate.SInt64Rules */ -export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must equal 42 - * sint64 value = 1 [(buf.validate.field).sint64.const = 42]; - * } - * ``` - * - * @generated from field: optional sint64 const = 1; - */ - const: bigint; +export type SInt64Rules = Message<'buf.validate.SInt64Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must equal 42 + * sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + * } + * ``` + * + * @generated from field: optional sint64 const = 1; + */ + const: bigint; - /** - * @generated from oneof buf.validate.SInt64Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field - * < value). If the field value is equal to or greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be less than 10 - * sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; - * } - * ``` - * - * @generated from field: sint64 lt = 2; - */ - value: bigint; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be less than or equal to 10 - * sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; - * } - * ``` - * - * @generated from field: sint64 lte = 3; - */ - value: bigint; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SInt64Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field + * < value). If the field value is equal to or greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than 10 + * sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + * } + * ``` + * + * @generated from field: sint64 lt = 2; + */ + value: bigint; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be less than or equal to 10 + * sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + * } + * ``` + * + * @generated from field: sint64 lte = 3; + */ + value: bigint; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.SInt64Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be greater than 5 [sint64.gt] - * sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sint64.gt_lt] - * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] - * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sint64 gt = 4; - */ - value: bigint; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySInt64 { - * // value must be greater than or equal to 5 [sint64.gte] - * sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] - * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] - * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sint64 gte = 5; - */ - value: bigint; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SInt64Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than 5 [sint64.gt] + * sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sint64.gt_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint64 gt = 4; + */ + value: bigint; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySInt64 { + * // value must be greater than or equal to 5 [sint64.gte] + * sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sint64 gte = 5; + */ + value: bigint; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message - * is generated. - * - * ```proto - * message MySInt64 { - * // value must be in list [1, 2, 3] - * sint64 value = 1 [(buf.validate.field).sint64 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sint64 in = 6; - */ - in: bigint[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MySInt64 { + * // value must be in list [1, 2, 3] + * sint64 value = 1 [(buf.validate.field).sint64 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sint64 in = 6; + */ + in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySInt64 { - * // value must not be in list [1, 2, 3] - * sint64 value = 1 [(buf.validate.field).sint64 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sint64 not_in = 7; - */ - notIn: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySInt64 { + * // value must not be in list [1, 2, 3] + * sint64 value = 1 [(buf.validate.field).sint64 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sint64 not_in = 7; + */ + notIn: bigint[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MySInt64 { - * sint64 value = 1 [ - * (buf.validate.field).sint64.example = 1, - * (buf.validate.field).sint64.example = -10 - * ]; - * } - * ``` - * - * @generated from field: repeated sint64 example = 8; - */ - example: bigint[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySInt64 { + * sint64 value = 1 [ + * (buf.validate.field).sint64.example = 1, + * (buf.validate.field).sint64.example = -10 + * ]; + * } + * ``` + * + * @generated from field: repeated sint64 example = 8; + */ + example: bigint[]; }; /** * Describes the message buf.validate.SInt64Rules. * Use `create(SInt64RulesSchema)` to create a new message. */ -export const SInt64RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 13); +export const SInt64RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 13); /** * Fixed32Rules describes the rules applied to `fixed32` values. * * @generated from message buf.validate.Fixed32Rules */ -export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must equal 42 - * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; - * } - * ``` - * - * @generated from field: optional fixed32 const = 1; - */ - const: number; +export type Fixed32Rules = Message<'buf.validate.Fixed32Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must equal 42 + * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + * } + * ``` + * + * @generated from field: optional fixed32 const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.Fixed32Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be less than 10 - * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; - * } - * ``` - * - * @generated from field: fixed32 lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be less than or equal to 10 - * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; - * } - * ``` - * - * @generated from field: fixed32 lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Fixed32Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + * } + * ``` + * + * @generated from field: fixed32 lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be less than or equal to 10 + * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + * } + * ``` + * + * @generated from field: fixed32 lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.Fixed32Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be greater than 5 [fixed32.gt] - * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [fixed32.gt_lt] - * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] - * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: fixed32 gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed32 { - * // value must be greater than or equal to 5 [fixed32.gte] - * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] - * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] - * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: fixed32 gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Fixed32Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than 5 [fixed32.gt] + * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed32.gt_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed32 gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed32 { + * // value must be greater than or equal to 5 [fixed32.gte] + * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed32 gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message - * is generated. - * - * ```proto - * message MyFixed32 { - * // value must be in list [1, 2, 3] - * fixed32 value = 1 [(buf.validate.field).fixed32 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated fixed32 in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message + * is generated. + * + * ```proto + * message MyFixed32 { + * // value must be in list [1, 2, 3] + * fixed32 value = 1 [(buf.validate.field).fixed32 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated fixed32 in = 6; + */ + in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyFixed32 { - * // value must not be in list [1, 2, 3] - * fixed32 value = 1 [(buf.validate.field).fixed32 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated fixed32 not_in = 7; - */ - notIn: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed32 { + * // value must not be in list [1, 2, 3] + * fixed32 value = 1 [(buf.validate.field).fixed32 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated fixed32 not_in = 7; + */ + notIn: number[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyFixed32 { - * fixed32 value = 1 [ - * (buf.validate.field).fixed32.example = 1, - * (buf.validate.field).fixed32.example = 2 - * ]; - * } - * ``` - * - * @generated from field: repeated fixed32 example = 8; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFixed32 { + * fixed32 value = 1 [ + * (buf.validate.field).fixed32.example = 1, + * (buf.validate.field).fixed32.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated fixed32 example = 8; + */ + example: number[]; }; /** * Describes the message buf.validate.Fixed32Rules. * Use `create(Fixed32RulesSchema)` to create a new message. */ -export const Fixed32RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 14); +export const Fixed32RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 14); /** * Fixed64Rules describes the rules applied to `fixed64` values. * * @generated from message buf.validate.Fixed64Rules */ -export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must equal 42 - * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; - * } - * ``` - * - * @generated from field: optional fixed64 const = 1; - */ - const: bigint; +export type Fixed64Rules = Message<'buf.validate.Fixed64Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must equal 42 + * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + * } + * ``` + * + * @generated from field: optional fixed64 const = 1; + */ + const: bigint; - /** - * @generated from oneof buf.validate.Fixed64Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be less than 10 - * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; - * } - * ``` - * - * @generated from field: fixed64 lt = 2; - */ - value: bigint; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be less than or equal to 10 - * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; - * } - * ``` - * - * @generated from field: fixed64 lte = 3; - */ - value: bigint; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Fixed64Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + * } + * ``` + * + * @generated from field: fixed64 lt = 2; + */ + value: bigint; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be less than or equal to 10 + * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + * } + * ``` + * + * @generated from field: fixed64 lte = 3; + */ + value: bigint; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.Fixed64Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be greater than 5 [fixed64.gt] - * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [fixed64.gt_lt] - * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] - * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: fixed64 gt = 4; - */ - value: bigint; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyFixed64 { - * // value must be greater than or equal to 5 [fixed64.gte] - * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] - * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] - * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: fixed64 gte = 5; - */ - value: bigint; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.Fixed64Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than 5 [fixed64.gt] + * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [fixed64.gt_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed64 gt = 4; + */ + value: bigint; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyFixed64 { + * // value must be greater than or equal to 5 [fixed64.gte] + * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: fixed64 gte = 5; + */ + value: bigint; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MyFixed64 { - * // value must be in list [1, 2, 3] - * fixed64 value = 1 [(buf.validate.field).fixed64 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated fixed64 in = 6; - */ - in: bigint[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MyFixed64 { + * // value must be in list [1, 2, 3] + * fixed64 value = 1 [(buf.validate.field).fixed64 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated fixed64 in = 6; + */ + in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MyFixed64 { - * // value must not be in list [1, 2, 3] - * fixed64 value = 1 [(buf.validate.field).fixed64 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated fixed64 not_in = 7; - */ - notIn: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MyFixed64 { + * // value must not be in list [1, 2, 3] + * fixed64 value = 1 [(buf.validate.field).fixed64 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated fixed64 not_in = 7; + */ + notIn: bigint[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyFixed64 { - * fixed64 value = 1 [ - * (buf.validate.field).fixed64.example = 1, - * (buf.validate.field).fixed64.example = 2 - * ]; - * } - * ``` - * - * @generated from field: repeated fixed64 example = 8; - */ - example: bigint[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyFixed64 { + * fixed64 value = 1 [ + * (buf.validate.field).fixed64.example = 1, + * (buf.validate.field).fixed64.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated fixed64 example = 8; + */ + example: bigint[]; }; /** * Describes the message buf.validate.Fixed64Rules. * Use `create(Fixed64RulesSchema)` to create a new message. */ -export const Fixed64RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 15); +export const Fixed64RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 15); /** * SFixed32Rules describes the rules applied to `fixed32` values. * * @generated from message buf.validate.SFixed32Rules */ -export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must equal 42 - * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; - * } - * ``` - * - * @generated from field: optional sfixed32 const = 1; - */ - const: number; +export type SFixed32Rules = Message<'buf.validate.SFixed32Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must equal 42 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + * } + * ``` + * + * @generated from field: optional sfixed32 const = 1; + */ + const: number; - /** - * @generated from oneof buf.validate.SFixed32Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be less than 10 - * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; - * } - * ``` - * - * @generated from field: sfixed32 lt = 2; - */ - value: number; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be less than or equal to 10 - * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; - * } - * ``` - * - * @generated from field: sfixed32 lte = 3; - */ - value: number; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SFixed32Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + * } + * ``` + * + * @generated from field: sfixed32 lt = 2; + */ + value: number; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be less than or equal to 10 + * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + * } + * ``` + * + * @generated from field: sfixed32 lte = 3; + */ + value: number; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.SFixed32Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be greater than 5 [sfixed32.gt] - * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sfixed32.gt_lt] - * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] - * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sfixed32 gt = 4; - */ - value: number; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed32 { - * // value must be greater than or equal to 5 [sfixed32.gte] - * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] - * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] - * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sfixed32 gte = 5; - */ - value: number; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SFixed32Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than 5 [sfixed32.gt] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed32.gt_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed32 gt = 4; + */ + value: number; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed32 { + * // value must be greater than or equal to 5 [sfixed32.gte] + * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed32 gte = 5; + */ + value: number; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MySFixed32 { - * // value must be in list [1, 2, 3] - * sfixed32 value = 1 [(buf.validate.field).sfixed32 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sfixed32 in = 6; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed32 { + * // value must be in list [1, 2, 3] + * sfixed32 value = 1 [(buf.validate.field).sfixed32 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sfixed32 in = 6; + */ + in: number[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySFixed32 { - * // value must not be in list [1, 2, 3] - * sfixed32 value = 1 [(buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sfixed32 not_in = 7; - */ - notIn: number[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed32 { + * // value must not be in list [1, 2, 3] + * sfixed32 value = 1 [(buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sfixed32 not_in = 7; + */ + notIn: number[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MySFixed32 { - * sfixed32 value = 1 [ - * (buf.validate.field).sfixed32.example = 1, - * (buf.validate.field).sfixed32.example = 2 - * ]; - * } - * ``` - * - * @generated from field: repeated sfixed32 example = 8; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySFixed32 { + * sfixed32 value = 1 [ + * (buf.validate.field).sfixed32.example = 1, + * (buf.validate.field).sfixed32.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated sfixed32 example = 8; + */ + example: number[]; }; /** * Describes the message buf.validate.SFixed32Rules. * Use `create(SFixed32RulesSchema)` to create a new message. */ -export const SFixed32RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 16); +export const SFixed32RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 16); /** * SFixed64Rules describes the rules applied to `fixed64` values. * * @generated from message buf.validate.SFixed64Rules */ -export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must equal 42 - * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; - * } - * ``` - * - * @generated from field: optional sfixed64 const = 1; - */ - const: bigint; +export type SFixed64Rules = Message<'buf.validate.SFixed64Rules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must equal 42 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + * } + * ``` + * + * @generated from field: optional sfixed64 const = 1; + */ + const: bigint; - /** - * @generated from oneof buf.validate.SFixed64Rules.less_than - */ - lessThan: { - /** - * `lt` requires the field value to be less than the specified value (field < - * value). If the field value is equal to or greater than the specified value, - * an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be less than 10 - * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; - * } - * ``` - * - * @generated from field: sfixed64 lt = 2; - */ - value: bigint; - case: "lt"; - } | { - /** - * `lte` requires the field value to be less than or equal to the specified - * value (field <= value). If the field value is greater than the specified - * value, an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be less than or equal to 10 - * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; - * } - * ``` - * - * @generated from field: sfixed64 lte = 3; - */ - value: bigint; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SFixed64Rules.less_than + */ + lessThan: + | { + /** + * `lt` requires the field value to be less than the specified value (field < + * value). If the field value is equal to or greater than the specified value, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + * } + * ``` + * + * @generated from field: sfixed64 lt = 2; + */ + value: bigint; + case: 'lt'; + } + | { + /** + * `lte` requires the field value to be less than or equal to the specified + * value (field <= value). If the field value is greater than the specified + * value, an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be less than or equal to 10 + * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + * } + * ``` + * + * @generated from field: sfixed64 lte = 3; + */ + value: bigint; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.SFixed64Rules.greater_than - */ - greaterThan: { - /** - * `gt` requires the field value to be greater than the specified value - * (exclusive). If the value of `gt` is larger than a specified `lt` or - * `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be greater than 5 [sfixed64.gt] - * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; - * - * // value must be greater than 5 and less than 10 [sfixed64.gt_lt] - * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; - * - * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] - * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sfixed64 gt = 4; - */ - value: bigint; - case: "gt"; - } | { - /** - * `gte` requires the field value to be greater than or equal to the specified - * value (exclusive). If the value of `gte` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MySFixed64 { - * // value must be greater than or equal to 5 [sfixed64.gte] - * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; - * - * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] - * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; - * - * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] - * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; - * } - * ``` - * - * @generated from field: sfixed64 gte = 5; - */ - value: bigint; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.SFixed64Rules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the field value to be greater than the specified value + * (exclusive). If the value of `gt` is larger than a specified `lt` or + * `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than 5 [sfixed64.gt] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + * + * // value must be greater than 5 and less than 10 [sfixed64.gt_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + * + * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed64 gt = 4; + */ + value: bigint; + case: 'gt'; + } + | { + /** + * `gte` requires the field value to be greater than or equal to the specified + * value (exclusive). If the value of `gte` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MySFixed64 { + * // value must be greater than or equal to 5 [sfixed64.gte] + * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + * + * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + * + * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + * } + * ``` + * + * @generated from field: sfixed64 gte = 5; + */ + value: bigint; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` requires the field value to be equal to one of the specified values. - * If the field value isn't one of the specified values, an error message is - * generated. - * - * ```proto - * message MySFixed64 { - * // value must be in list [1, 2, 3] - * sfixed64 value = 1 [(buf.validate.field).sfixed64 = { in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sfixed64 in = 6; - */ - in: bigint[]; + /** + * `in` requires the field value to be equal to one of the specified values. + * If the field value isn't one of the specified values, an error message is + * generated. + * + * ```proto + * message MySFixed64 { + * // value must be in list [1, 2, 3] + * sfixed64 value = 1 [(buf.validate.field).sfixed64 = { in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sfixed64 in = 6; + */ + in: bigint[]; - /** - * `not_in` requires the field value to not be equal to any of the specified - * values. If the field value is one of the specified values, an error - * message is generated. - * - * ```proto - * message MySFixed64 { - * // value must not be in list [1, 2, 3] - * sfixed64 value = 1 [(buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }]; - * } - * ``` - * - * @generated from field: repeated sfixed64 not_in = 7; - */ - notIn: bigint[]; + /** + * `not_in` requires the field value to not be equal to any of the specified + * values. If the field value is one of the specified values, an error + * message is generated. + * + * ```proto + * message MySFixed64 { + * // value must not be in list [1, 2, 3] + * sfixed64 value = 1 [(buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }]; + * } + * ``` + * + * @generated from field: repeated sfixed64 not_in = 7; + */ + notIn: bigint[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MySFixed64 { - * sfixed64 value = 1 [ - * (buf.validate.field).sfixed64.example = 1, - * (buf.validate.field).sfixed64.example = 2 - * ]; - * } - * ``` - * - * @generated from field: repeated sfixed64 example = 8; - */ - example: bigint[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MySFixed64 { + * sfixed64 value = 1 [ + * (buf.validate.field).sfixed64.example = 1, + * (buf.validate.field).sfixed64.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated sfixed64 example = 8; + */ + example: bigint[]; }; /** * Describes the message buf.validate.SFixed64Rules. * Use `create(SFixed64RulesSchema)` to create a new message. */ -export const SFixed64RulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 17); +export const SFixed64RulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 17); /** * BoolRules describes the rules applied to `bool` values. These rules @@ -2611,47 +2738,48 @@ export const SFixed64RulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.BoolRules */ -export type BoolRules = Message<"buf.validate.BoolRules"> & { - /** - * `const` requires the field value to exactly match the specified boolean value. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyBool { - * // value must equal true - * bool value = 1 [(buf.validate.field).bool.const = true]; - * } - * ``` - * - * @generated from field: optional bool const = 1; - */ - const: boolean; +export type BoolRules = Message<'buf.validate.BoolRules'> & { + /** + * `const` requires the field value to exactly match the specified boolean value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBool { + * // value must equal true + * bool value = 1 [(buf.validate.field).bool.const = true]; + * } + * ``` + * + * @generated from field: optional bool const = 1; + */ + const: boolean; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyBool { - * bool value = 1 [ - * (buf.validate.field).bool.example = 1, - * (buf.validate.field).bool.example = 2 - * ]; - * } - * ``` - * - * @generated from field: repeated bool example = 2; - */ - example: boolean[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyBool { + * bool value = 1 [ + * (buf.validate.field).bool.example = 1, + * (buf.validate.field).bool.example = 2 + * ]; + * } + * ``` + * + * @generated from field: repeated bool example = 2; + */ + example: boolean[]; }; /** * Describes the message buf.validate.BoolRules. * Use `create(BoolRulesSchema)` to create a new message. */ -export const BoolRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 18); +export const BoolRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 18); /** * StringRules describes the rules applied to `string` values These @@ -2659,659 +2787,679 @@ export const BoolRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.StringRules */ -export type StringRules = Message<"buf.validate.StringRules"> & { - /** - * `const` requires the field value to exactly match the specified value. If - * the field value doesn't match, an error message is generated. - * - * ```proto - * message MyString { - * // value must equal `hello` - * string value = 1 [(buf.validate.field).string.const = "hello"]; - * } - * ``` - * - * @generated from field: optional string const = 1; - */ - const: string; +export type StringRules = Message<'buf.validate.StringRules'> & { + /** + * `const` requires the field value to exactly match the specified value. If + * the field value doesn't match, an error message is generated. + * + * ```proto + * message MyString { + * // value must equal `hello` + * string value = 1 [(buf.validate.field).string.const = "hello"]; + * } + * ``` + * + * @generated from field: optional string const = 1; + */ + const: string; - /** - * `len` dictates that the field value must have the specified - * number of characters (Unicode code points), which may differ from the number - * of bytes in the string. If the field value does not meet the specified - * length, an error message will be generated. - * - * ```proto - * message MyString { - * // value length must be 5 characters - * string value = 1 [(buf.validate.field).string.len = 5]; - * } - * ``` - * - * @generated from field: optional uint64 len = 19; - */ - len: bigint; + /** + * `len` dictates that the field value must have the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value does not meet the specified + * length, an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 5 characters + * string value = 1 [(buf.validate.field).string.len = 5]; + * } + * ``` + * + * @generated from field: optional uint64 len = 19; + */ + len: bigint; - /** - * `min_len` specifies that the field value must have at least the specified - * number of characters (Unicode code points), which may differ from the number - * of bytes in the string. If the field value contains fewer characters, an error - * message will be generated. - * - * ```proto - * message MyString { - * // value length must be at least 3 characters - * string value = 1 [(buf.validate.field).string.min_len = 3]; - * } - * ``` - * - * @generated from field: optional uint64 min_len = 2; - */ - minLen: bigint; + /** + * `min_len` specifies that the field value must have at least the specified + * number of characters (Unicode code points), which may differ from the number + * of bytes in the string. If the field value contains fewer characters, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 3 characters + * string value = 1 [(buf.validate.field).string.min_len = 3]; + * } + * ``` + * + * @generated from field: optional uint64 min_len = 2; + */ + minLen: bigint; - /** - * `max_len` specifies that the field value must have no more than the specified - * number of characters (Unicode code points), which may differ from the - * number of bytes in the string. If the field value contains more characters, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value length must be at most 10 characters - * string value = 1 [(buf.validate.field).string.max_len = 10]; - * } - * ``` - * - * @generated from field: optional uint64 max_len = 3; - */ - maxLen: bigint; + /** + * `max_len` specifies that the field value must have no more than the specified + * number of characters (Unicode code points), which may differ from the + * number of bytes in the string. If the field value contains more characters, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 10 characters + * string value = 1 [(buf.validate.field).string.max_len = 10]; + * } + * ``` + * + * @generated from field: optional uint64 max_len = 3; + */ + maxLen: bigint; - /** - * `len_bytes` dictates that the field value must have the specified number of - * bytes. If the field value does not match the specified length in bytes, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value length must be 6 bytes - * string value = 1 [(buf.validate.field).string.len_bytes = 6]; - * } - * ``` - * - * @generated from field: optional uint64 len_bytes = 20; - */ - lenBytes: bigint; + /** + * `len_bytes` dictates that the field value must have the specified number of + * bytes. If the field value does not match the specified length in bytes, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value length must be 6 bytes + * string value = 1 [(buf.validate.field).string.len_bytes = 6]; + * } + * ``` + * + * @generated from field: optional uint64 len_bytes = 20; + */ + lenBytes: bigint; - /** - * `min_bytes` specifies that the field value must have at least the specified - * number of bytes. If the field value contains fewer bytes, an error message - * will be generated. - * - * ```proto - * message MyString { - * // value length must be at least 4 bytes - * string value = 1 [(buf.validate.field).string.min_bytes = 4]; - * } - * - * ``` - * - * @generated from field: optional uint64 min_bytes = 4; - */ - minBytes: bigint; + /** + * `min_bytes` specifies that the field value must have at least the specified + * number of bytes. If the field value contains fewer bytes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value length must be at least 4 bytes + * string value = 1 [(buf.validate.field).string.min_bytes = 4]; + * } + * + * ``` + * + * @generated from field: optional uint64 min_bytes = 4; + */ + minBytes: bigint; - /** - * `max_bytes` specifies that the field value must have no more than the - * specified number of bytes. If the field value contains more bytes, an - * error message will be generated. - * - * ```proto - * message MyString { - * // value length must be at most 8 bytes - * string value = 1 [(buf.validate.field).string.max_bytes = 8]; - * } - * ``` - * - * @generated from field: optional uint64 max_bytes = 5; - */ - maxBytes: bigint; + /** + * `max_bytes` specifies that the field value must have no more than the + * specified number of bytes. If the field value contains more bytes, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value length must be at most 8 bytes + * string value = 1 [(buf.validate.field).string.max_bytes = 8]; + * } + * ``` + * + * @generated from field: optional uint64 max_bytes = 5; + */ + maxBytes: bigint; - /** - * `pattern` specifies that the field value must match the specified - * regular expression (RE2 syntax), with the expression provided without any - * delimiters. If the field value doesn't match the regular expression, an - * error message will be generated. - * - * ```proto - * message MyString { - * // value does not match regex pattern `^[a-zA-Z]//$` - * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; - * } - * ``` - * - * @generated from field: optional string pattern = 6; - */ - pattern: string; + /** + * `pattern` specifies that the field value must match the specified + * regular expression (RE2 syntax), with the expression provided without any + * delimiters. If the field value doesn't match the regular expression, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value does not match regex pattern `^[a-zA-Z]//$` + * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + * } + * ``` + * + * @generated from field: optional string pattern = 6; + */ + pattern: string; - /** - * `prefix` specifies that the field value must have the - * specified substring at the beginning of the string. If the field value - * doesn't start with the specified prefix, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value does not have prefix `pre` - * string value = 1 [(buf.validate.field).string.prefix = "pre"]; - * } - * ``` - * - * @generated from field: optional string prefix = 7; - */ - prefix: string; + /** + * `prefix` specifies that the field value must have the + * specified substring at the beginning of the string. If the field value + * doesn't start with the specified prefix, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value does not have prefix `pre` + * string value = 1 [(buf.validate.field).string.prefix = "pre"]; + * } + * ``` + * + * @generated from field: optional string prefix = 7; + */ + prefix: string; - /** - * `suffix` specifies that the field value must have the - * specified substring at the end of the string. If the field value doesn't - * end with the specified suffix, an error message will be generated. - * - * ```proto - * message MyString { - * // value does not have suffix `post` - * string value = 1 [(buf.validate.field).string.suffix = "post"]; - * } - * ``` - * - * @generated from field: optional string suffix = 8; - */ - suffix: string; + /** + * `suffix` specifies that the field value must have the + * specified substring at the end of the string. If the field value doesn't + * end with the specified suffix, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not have suffix `post` + * string value = 1 [(buf.validate.field).string.suffix = "post"]; + * } + * ``` + * + * @generated from field: optional string suffix = 8; + */ + suffix: string; - /** - * `contains` specifies that the field value must have the - * specified substring anywhere in the string. If the field value doesn't - * contain the specified substring, an error message will be generated. - * - * ```proto - * message MyString { - * // value does not contain substring `inside`. - * string value = 1 [(buf.validate.field).string.contains = "inside"]; - * } - * ``` - * - * @generated from field: optional string contains = 9; - */ - contains: string; + /** + * `contains` specifies that the field value must have the + * specified substring anywhere in the string. If the field value doesn't + * contain the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value does not contain substring `inside`. + * string value = 1 [(buf.validate.field).string.contains = "inside"]; + * } + * ``` + * + * @generated from field: optional string contains = 9; + */ + contains: string; - /** - * `not_contains` specifies that the field value must not have the - * specified substring anywhere in the string. If the field value contains - * the specified substring, an error message will be generated. - * - * ```proto - * message MyString { - * // value contains substring `inside`. - * string value = 1 [(buf.validate.field).string.not_contains = "inside"]; - * } - * ``` - * - * @generated from field: optional string not_contains = 23; - */ - notContains: string; + /** + * `not_contains` specifies that the field value must not have the + * specified substring anywhere in the string. If the field value contains + * the specified substring, an error message will be generated. + * + * ```proto + * message MyString { + * // value contains substring `inside`. + * string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + * } + * ``` + * + * @generated from field: optional string not_contains = 23; + */ + notContains: string; - /** - * `in` specifies that the field value must be equal to one of the specified - * values. If the field value isn't one of the specified values, an error - * message will be generated. - * - * ```proto - * message MyString { - * // value must be in list ["apple", "banana"] - * string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; - * } - * ``` - * - * @generated from field: repeated string in = 10; - */ - in: string[]; + /** + * `in` specifies that the field value must be equal to one of the specified + * values. If the field value isn't one of the specified values, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be in list ["apple", "banana"] + * string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + * } + * ``` + * + * @generated from field: repeated string in = 10; + */ + in: string[]; - /** - * `not_in` specifies that the field value cannot be equal to any - * of the specified values. If the field value is one of the specified values, - * an error message will be generated. - * ```proto - * message MyString { - * // value must not be in list ["orange", "grape"] - * string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; - * } - * ``` - * - * @generated from field: repeated string not_in = 11; - */ - notIn: string[]; + /** + * `not_in` specifies that the field value cannot be equal to any + * of the specified values. If the field value is one of the specified values, + * an error message will be generated. + * ```proto + * message MyString { + * // value must not be in list ["orange", "grape"] + * string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + * } + * ``` + * + * @generated from field: repeated string not_in = 11; + */ + notIn: string[]; - /** - * `WellKnown` rules provide advanced rules against common string - * patterns. - * - * @generated from oneof buf.validate.StringRules.well_known - */ - wellKnown: { - /** - * `email` specifies that the field value must be a valid email address, for - * example "foo@example.com". - * - * Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address). - * Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), - * which allows many unexpected forms of email addresses and will easily match - * a typographical error. - * - * If the field value isn't a valid email address, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid email address - * string value = 1 [(buf.validate.field).string.email = true]; - * } - * ``` - * - * @generated from field: bool email = 12; - */ - value: boolean; - case: "email"; - } | { - /** - * `hostname` specifies that the field value must be a valid hostname, for - * example "foo.example.com". - * - * A valid hostname follows the rules below: - * - The name consists of one or more labels, separated by a dot ("."). - * - Each label can be 1 to 63 alphanumeric characters. - * - A label can contain hyphens ("-"), but must not start or end with a hyphen. - * - The right-most label must not be digits only. - * - The name can have a trailing dot—for example, "foo.example.com.". - * - The name can be 253 characters at most, excluding the optional trailing dot. - * - * If the field value isn't a valid hostname, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid hostname - * string value = 1 [(buf.validate.field).string.hostname = true]; - * } - * ``` - * - * @generated from field: bool hostname = 13; - */ - value: boolean; - case: "hostname"; - } | { - /** - * `ip` specifies that the field value must be a valid IP (v4 or v6) address. - * - * IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". - * IPv6 addresses are expected in their text representation—for example, "::1", - * or "2001:0DB8:ABCD:0012::0". - * - * Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). - * Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported. - * - * If the field value isn't a valid IP address, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value must be a valid IP address - * string value = 1 [(buf.validate.field).string.ip = true]; - * } - * ``` - * - * @generated from field: bool ip = 14; - */ - value: boolean; - case: "ip"; - } | { - /** - * `ipv4` specifies that the field value must be a valid IPv4 address—for - * example "192.168.5.21". If the field value isn't a valid IPv4 address, an - * error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv4 address - * string value = 1 [(buf.validate.field).string.ipv4 = true]; - * } - * ``` - * - * @generated from field: bool ipv4 = 15; - */ - value: boolean; - case: "ipv4"; - } | { - /** - * `ipv6` specifies that the field value must be a valid IPv6 address—for - * example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field - * value is not a valid IPv6 address, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv6 address - * string value = 1 [(buf.validate.field).string.ipv6 = true]; - * } - * ``` - * - * @generated from field: bool ipv6 = 16; - */ - value: boolean; - case: "ipv6"; - } | { - /** - * `uri` specifies that the field value must be a valid URI, for example - * "https://example.com/foo/bar?baz=quux#frag". - * - * URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). - * Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). - * - * If the field value isn't a valid URI, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid URI - * string value = 1 [(buf.validate.field).string.uri = true]; - * } - * ``` - * - * @generated from field: bool uri = 17; - */ - value: boolean; - case: "uri"; - } | { - /** - * `uri_ref` specifies that the field value must be a valid URI Reference—either - * a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative - * Reference such as "./foo/bar?query". - * - * URI, URI Reference, and Relative Reference are defined in the internet - * standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone - * Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). - * - * If the field value isn't a valid URI Reference, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value must be a valid URI Reference - * string value = 1 [(buf.validate.field).string.uri_ref = true]; - * } - * ``` - * - * @generated from field: bool uri_ref = 18; - */ - value: boolean; - case: "uriRef"; - } | { - /** - * `address` specifies that the field value must be either a valid hostname - * (for example, "example.com"), or a valid IP (v4 or v6) address (for example, - * "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid hostname, or ip address - * string value = 1 [(buf.validate.field).string.address = true]; - * } - * ``` - * - * @generated from field: bool address = 21; - */ - value: boolean; - case: "address"; - } | { - /** - * `uuid` specifies that the field value must be a valid UUID as defined by - * [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the - * field value isn't a valid UUID, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid UUID - * string value = 1 [(buf.validate.field).string.uuid = true]; - * } - * ``` - * - * @generated from field: bool uuid = 22; - */ - value: boolean; - case: "uuid"; - } | { - /** - * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as - * defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes - * omitted. If the field value isn't a valid UUID without dashes, an error message - * will be generated. - * - * ```proto - * message MyString { - * // value must be a valid trimmed UUID - * string value = 1 [(buf.validate.field).string.tuuid = true]; - * } - * ``` - * - * @generated from field: bool tuuid = 33; - */ - value: boolean; - case: "tuuid"; - } | { - /** - * `ip_with_prefixlen` specifies that the field value must be a valid IP - * (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or - * "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with - * prefix length, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IP with prefix length - * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; - * } - * ``` - * - * @generated from field: bool ip_with_prefixlen = 26; - */ - value: boolean; - case: "ipWithPrefixlen"; - } | { - /** - * `ipv4_with_prefixlen` specifies that the field value must be a valid - * IPv4 address with prefix length—for example, "192.168.5.21/16". If the - * field value isn't a valid IPv4 address with prefix length, an error - * message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv4 address with prefix length - * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; - * } - * ``` - * - * @generated from field: bool ipv4_with_prefixlen = 27; - */ - value: boolean; - case: "ipv4WithPrefixlen"; - } | { - /** - * `ipv6_with_prefixlen` specifies that the field value must be a valid - * IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". - * If the field value is not a valid IPv6 address with prefix length, - * an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv6 address prefix length - * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; - * } - * ``` - * - * @generated from field: bool ipv6_with_prefixlen = 28; - */ - value: boolean; - case: "ipv6WithPrefixlen"; - } | { - /** - * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) - * prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". - * - * The prefix must have all zeros for the unmasked bits. For example, - * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the - * prefix, and the remaining 64 bits must be zero. - * - * If the field value isn't a valid IP prefix, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value must be a valid IP prefix - * string value = 1 [(buf.validate.field).string.ip_prefix = true]; - * } - * ``` - * - * @generated from field: bool ip_prefix = 29; - */ - value: boolean; - case: "ipPrefix"; - } | { - /** - * `ipv4_prefix` specifies that the field value must be a valid IPv4 - * prefix, for example "192.168.0.0/16". - * - * The prefix must have all zeros for the unmasked bits. For example, - * "192.168.0.0/16" designates the left-most 16 bits for the prefix, - * and the remaining 16 bits must be zero. - * - * If the field value isn't a valid IPv4 prefix, an error message - * will be generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv4 prefix - * string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; - * } - * ``` - * - * @generated from field: bool ipv4_prefix = 30; - */ - value: boolean; - case: "ipv4Prefix"; - } | { - /** - * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for - * example, "2001:0DB8:ABCD:0012::0/64". - * - * The prefix must have all zeros for the unmasked bits. For example, - * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the - * prefix, and the remaining 64 bits must be zero. - * - * If the field value is not a valid IPv6 prefix, an error message will be - * generated. - * - * ```proto - * message MyString { - * // value must be a valid IPv6 prefix - * string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; - * } - * ``` - * - * @generated from field: bool ipv6_prefix = 31; - */ - value: boolean; - case: "ipv6Prefix"; - } | { - /** - * `host_and_port` specifies that the field value must be valid host/port - * pair—for example, "example.com:8080". - * - * The host can be one of: - * - An IPv4 address in dotted decimal format—for example, "192.168.5.21". - * - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]". - * - A hostname—for example, "example.com". - * - * The port is separated by a colon. It must be non-empty, with a decimal number - * in the range of 0-65535, inclusive. - * - * @generated from field: bool host_and_port = 32; - */ - value: boolean; - case: "hostAndPort"; - } | { - /** - * `well_known_regex` specifies a common well-known pattern - * defined as a regex. If the field value doesn't match the well-known - * regex, an error message will be generated. - * - * ```proto - * message MyString { - * // value must be a valid HTTP header value - * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; - * } - * ``` - * - * #### KnownRegex - * - * `well_known_regex` contains some well-known patterns. - * - * | Name | Number | Description | - * |-------------------------------|--------|-------------------------------------------| - * | KNOWN_REGEX_UNSPECIFIED | 0 | | - * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) | - * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) | - * - * @generated from field: buf.validate.KnownRegex well_known_regex = 24; - */ - value: KnownRegex; - case: "wellKnownRegex"; - } | { case: undefined; value?: undefined }; + /** + * `WellKnown` rules provide advanced rules against common string + * patterns. + * + * @generated from oneof buf.validate.StringRules.well_known + */ + wellKnown: + | { + /** + * `email` specifies that the field value must be a valid email address, for + * example "foo@example.com". + * + * Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address). + * Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), + * which allows many unexpected forms of email addresses and will easily match + * a typographical error. + * + * If the field value isn't a valid email address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid email address + * string value = 1 [(buf.validate.field).string.email = true]; + * } + * ``` + * + * @generated from field: bool email = 12; + */ + value: boolean; + case: 'email'; + } + | { + /** + * `hostname` specifies that the field value must be a valid hostname, for + * example "foo.example.com". + * + * A valid hostname follows the rules below: + * - The name consists of one or more labels, separated by a dot ("."). + * - Each label can be 1 to 63 alphanumeric characters. + * - A label can contain hyphens ("-"), but must not start or end with a hyphen. + * - The right-most label must not be digits only. + * - The name can have a trailing dot—for example, "foo.example.com.". + * - The name can be 253 characters at most, excluding the optional trailing dot. + * + * If the field value isn't a valid hostname, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname + * string value = 1 [(buf.validate.field).string.hostname = true]; + * } + * ``` + * + * @generated from field: bool hostname = 13; + */ + value: boolean; + case: 'hostname'; + } + | { + /** + * `ip` specifies that the field value must be a valid IP (v4 or v6) address. + * + * IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". + * IPv6 addresses are expected in their text representation—for example, "::1", + * or "2001:0DB8:ABCD:0012::0". + * + * Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + * Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported. + * + * If the field value isn't a valid IP address, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid IP address + * string value = 1 [(buf.validate.field).string.ip = true]; + * } + * ``` + * + * @generated from field: bool ip = 14; + */ + value: boolean; + case: 'ip'; + } + | { + /** + * `ipv4` specifies that the field value must be a valid IPv4 address—for + * example "192.168.5.21". If the field value isn't a valid IPv4 address, an + * error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address + * string value = 1 [(buf.validate.field).string.ipv4 = true]; + * } + * ``` + * + * @generated from field: bool ipv4 = 15; + */ + value: boolean; + case: 'ipv4'; + } + | { + /** + * `ipv6` specifies that the field value must be a valid IPv6 address—for + * example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field + * value is not a valid IPv6 address, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address + * string value = 1 [(buf.validate.field).string.ipv6 = true]; + * } + * ``` + * + * @generated from field: bool ipv6 = 16; + */ + value: boolean; + case: 'ipv6'; + } + | { + /** + * `uri` specifies that the field value must be a valid URI, for example + * "https://example.com/foo/bar?baz=quux#frag". + * + * URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + * Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + * + * If the field value isn't a valid URI, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid URI + * string value = 1 [(buf.validate.field).string.uri = true]; + * } + * ``` + * + * @generated from field: bool uri = 17; + */ + value: boolean; + case: 'uri'; + } + | { + /** + * `uri_ref` specifies that the field value must be a valid URI Reference—either + * a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative + * Reference such as "./foo/bar?query". + * + * URI, URI Reference, and Relative Reference are defined in the internet + * standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone + * Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + * + * If the field value isn't a valid URI Reference, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid URI Reference + * string value = 1 [(buf.validate.field).string.uri_ref = true]; + * } + * ``` + * + * @generated from field: bool uri_ref = 18; + */ + value: boolean; + case: 'uriRef'; + } + | { + /** + * `address` specifies that the field value must be either a valid hostname + * (for example, "example.com"), or a valid IP (v4 or v6) address (for example, + * "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid hostname, or ip address + * string value = 1 [(buf.validate.field).string.address = true]; + * } + * ``` + * + * @generated from field: bool address = 21; + */ + value: boolean; + case: 'address'; + } + | { + /** + * `uuid` specifies that the field value must be a valid UUID as defined by + * [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the + * field value isn't a valid UUID, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid UUID + * string value = 1 [(buf.validate.field).string.uuid = true]; + * } + * ``` + * + * @generated from field: bool uuid = 22; + */ + value: boolean; + case: 'uuid'; + } + | { + /** + * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as + * defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes + * omitted. If the field value isn't a valid UUID without dashes, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid trimmed UUID + * string value = 1 [(buf.validate.field).string.tuuid = true]; + * } + * ``` + * + * @generated from field: bool tuuid = 33; + */ + value: boolean; + case: 'tuuid'; + } + | { + /** + * `ip_with_prefixlen` specifies that the field value must be a valid IP + * (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or + * "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with + * prefix length, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IP with prefix length + * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ip_with_prefixlen = 26; + */ + value: boolean; + case: 'ipWithPrefixlen'; + } + | { + /** + * `ipv4_with_prefixlen` specifies that the field value must be a valid + * IPv4 address with prefix length—for example, "192.168.5.21/16". If the + * field value isn't a valid IPv4 address with prefix length, an error + * message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 address with prefix length + * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ipv4_with_prefixlen = 27; + */ + value: boolean; + case: 'ipv4WithPrefixlen'; + } + | { + /** + * `ipv6_with_prefixlen` specifies that the field value must be a valid + * IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". + * If the field value is not a valid IPv6 address with prefix length, + * an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 address prefix length + * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + * } + * ``` + * + * @generated from field: bool ipv6_with_prefixlen = 28; + */ + value: boolean; + case: 'ipv6WithPrefixlen'; + } + | { + /** + * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) + * prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". + * + * The prefix must have all zeros for the unmasked bits. For example, + * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + * prefix, and the remaining 64 bits must be zero. + * + * If the field value isn't a valid IP prefix, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid IP prefix + * string value = 1 [(buf.validate.field).string.ip_prefix = true]; + * } + * ``` + * + * @generated from field: bool ip_prefix = 29; + */ + value: boolean; + case: 'ipPrefix'; + } + | { + /** + * `ipv4_prefix` specifies that the field value must be a valid IPv4 + * prefix, for example "192.168.0.0/16". + * + * The prefix must have all zeros for the unmasked bits. For example, + * "192.168.0.0/16" designates the left-most 16 bits for the prefix, + * and the remaining 16 bits must be zero. + * + * If the field value isn't a valid IPv4 prefix, an error message + * will be generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv4 prefix + * string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + * } + * ``` + * + * @generated from field: bool ipv4_prefix = 30; + */ + value: boolean; + case: 'ipv4Prefix'; + } + | { + /** + * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for + * example, "2001:0DB8:ABCD:0012::0/64". + * + * The prefix must have all zeros for the unmasked bits. For example, + * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + * prefix, and the remaining 64 bits must be zero. + * + * If the field value is not a valid IPv6 prefix, an error message will be + * generated. + * + * ```proto + * message MyString { + * // value must be a valid IPv6 prefix + * string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + * } + * ``` + * + * @generated from field: bool ipv6_prefix = 31; + */ + value: boolean; + case: 'ipv6Prefix'; + } + | { + /** + * `host_and_port` specifies that the field value must be valid host/port + * pair—for example, "example.com:8080". + * + * The host can be one of: + * - An IPv4 address in dotted decimal format—for example, "192.168.5.21". + * - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]". + * - A hostname—for example, "example.com". + * + * The port is separated by a colon. It must be non-empty, with a decimal number + * in the range of 0-65535, inclusive. + * + * @generated from field: bool host_and_port = 32; + */ + value: boolean; + case: 'hostAndPort'; + } + | { + /** + * `well_known_regex` specifies a common well-known pattern + * defined as a regex. If the field value doesn't match the well-known + * regex, an error message will be generated. + * + * ```proto + * message MyString { + * // value must be a valid HTTP header value + * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; + * } + * ``` + * + * #### KnownRegex + * + * `well_known_regex` contains some well-known patterns. + * + * | Name | Number | Description | + * |-------------------------------|--------|-------------------------------------------| + * | KNOWN_REGEX_UNSPECIFIED | 0 | | + * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) | + * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) | + * + * @generated from field: buf.validate.KnownRegex well_known_regex = 24; + */ + value: KnownRegex; + case: 'wellKnownRegex'; + } + | { case: undefined; value?: undefined }; - /** - * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to - * enable strict header validation. By default, this is true, and HTTP header - * validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser - * validations that only disallow `\r\n\0` characters, which can be used to - * bypass header matching rules. - * - * ```proto - * message MyString { - * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. - * string value = 1 [(buf.validate.field).string.strict = false]; - * } - * ``` - * - * @generated from field: optional bool strict = 25; - */ - strict: boolean; + /** + * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + * enable strict header validation. By default, this is true, and HTTP header + * validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser + * validations that only disallow `\r\n\0` characters, which can be used to + * bypass header matching rules. + * + * ```proto + * message MyString { + * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + * string value = 1 [(buf.validate.field).string.strict = false]; + * } + * ``` + * + * @generated from field: optional bool strict = 25; + */ + strict: boolean; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyString { - * string value = 1 [ - * (buf.validate.field).string.example = "hello", - * (buf.validate.field).string.example = "world" - * ]; - * } - * ``` - * - * @generated from field: repeated string example = 34; - */ - example: string[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyString { + * string value = 1 [ + * (buf.validate.field).string.example = "hello", + * (buf.validate.field).string.example = "world" + * ]; + * } + * ``` + * + * @generated from field: repeated string example = 34; + */ + example: string[]; }; /** * Describes the message buf.validate.StringRules. * Use `create(StringRulesSchema)` to create a new message. */ -export const StringRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 19); +export const StringRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 19); /** * BytesRules describe the rules applied to `bytes` values. These rules @@ -3319,948 +3467,973 @@ export const StringRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.BytesRules */ -export type BytesRules = Message<"buf.validate.BytesRules"> & { - /** - * `const` requires the field value to exactly match the specified bytes - * value. If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be "\x01\x02\x03\x04" - * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; - * } - * ``` - * - * @generated from field: optional bytes const = 1; - */ - const: Uint8Array; +export type BytesRules = Message<'buf.validate.BytesRules'> & { + /** + * `const` requires the field value to exactly match the specified bytes + * value. If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be "\x01\x02\x03\x04" + * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + * } + * ``` + * + * @generated from field: optional bytes const = 1; + */ + const: Uint8Array; - /** - * `len` requires the field value to have the specified length in bytes. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * message MyBytes { - * // value length must be 4 bytes. - * optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; - * } - * ``` - * - * @generated from field: optional uint64 len = 13; - */ - len: bigint; + /** + * `len` requires the field value to have the specified length in bytes. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be 4 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + * } + * ``` + * + * @generated from field: optional uint64 len = 13; + */ + len: bigint; - /** - * `min_len` requires the field value to have at least the specified minimum - * length in bytes. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value length must be at least 2 bytes. - * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; - * } - * ``` - * - * @generated from field: optional uint64 min_len = 2; - */ - minLen: bigint; + /** + * `min_len` requires the field value to have at least the specified minimum + * length in bytes. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value length must be at least 2 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_len = 2; + */ + minLen: bigint; - /** - * `max_len` requires the field value to have at most the specified maximum - * length in bytes. - * If the field value exceeds the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be at most 6 bytes. - * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; - * } - * ``` - * - * @generated from field: optional uint64 max_len = 3; - */ - maxLen: bigint; + /** + * `max_len` requires the field value to have at most the specified maximum + * length in bytes. + * If the field value exceeds the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be at most 6 bytes. + * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + * } + * ``` + * + * @generated from field: optional uint64 max_len = 3; + */ + maxLen: bigint; - /** - * `pattern` requires the field value to match the specified regular - * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). - * The value of the field must be valid UTF-8 or validation will fail with a - * runtime error. - * If the field value doesn't match the pattern, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must match regex pattern "^[a-zA-Z0-9]+$". - * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; - * } - * ``` - * - * @generated from field: optional string pattern = 4; - */ - pattern: string; + /** + * `pattern` requires the field value to match the specified regular + * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + * The value of the field must be valid UTF-8 or validation will fail with a + * runtime error. + * If the field value doesn't match the pattern, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must match regex pattern "^[a-zA-Z0-9]+$". + * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + * } + * ``` + * + * @generated from field: optional string pattern = 4; + */ + pattern: string; - /** - * `prefix` requires the field value to have the specified bytes at the - * beginning of the string. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value does not have prefix \x01\x02 - * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; - * } - * ``` - * - * @generated from field: optional bytes prefix = 5; - */ - prefix: Uint8Array; + /** + * `prefix` requires the field value to have the specified bytes at the + * beginning of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have prefix \x01\x02 + * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + * } + * ``` + * + * @generated from field: optional bytes prefix = 5; + */ + prefix: Uint8Array; - /** - * `suffix` requires the field value to have the specified bytes at the end - * of the string. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```proto - * message MyBytes { - * // value does not have suffix \x03\x04 - * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; - * } - * ``` - * - * @generated from field: optional bytes suffix = 6; - */ - suffix: Uint8Array; + /** + * `suffix` requires the field value to have the specified bytes at the end + * of the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```proto + * message MyBytes { + * // value does not have suffix \x03\x04 + * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + * } + * ``` + * + * @generated from field: optional bytes suffix = 6; + */ + suffix: Uint8Array; - /** - * `contains` requires the field value to have the specified bytes anywhere in - * the string. - * If the field value doesn't meet the requirement, an error message is generated. - * - * ```protobuf - * message MyBytes { - * // value does not contain \x02\x03 - * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; - * } - * ``` - * - * @generated from field: optional bytes contains = 7; - */ - contains: Uint8Array; + /** + * `contains` requires the field value to have the specified bytes anywhere in + * the string. + * If the field value doesn't meet the requirement, an error message is generated. + * + * ```protobuf + * message MyBytes { + * // value does not contain \x02\x03 + * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + * } + * ``` + * + * @generated from field: optional bytes contains = 7; + */ + contains: Uint8Array; - /** - * `in` requires the field value to be equal to one of the specified - * values. If the field value doesn't match any of the specified values, an - * error message is generated. - * - * ```protobuf - * message MyBytes { - * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] - * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; - * } - * ``` - * - * @generated from field: repeated bytes in = 8; - */ - in: Uint8Array[]; + /** + * `in` requires the field value to be equal to one of the specified + * values. If the field value doesn't match any of the specified values, an + * error message is generated. + * + * ```protobuf + * message MyBytes { + * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from field: repeated bytes in = 8; + */ + in: Uint8Array[]; - /** - * `not_in` requires the field value to be not equal to any of the specified - * values. - * If the field value matches any of the specified values, an error message is - * generated. - * - * ```proto - * message MyBytes { - * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] - * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; - * } - * ``` - * - * @generated from field: repeated bytes not_in = 9; - */ - notIn: Uint8Array[]; + /** + * `not_in` requires the field value to be not equal to any of the specified + * values. + * If the field value matches any of the specified values, an error message is + * generated. + * + * ```proto + * message MyBytes { + * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + * } + * ``` + * + * @generated from field: repeated bytes not_in = 9; + */ + notIn: Uint8Array[]; - /** - * WellKnown rules provide advanced rules against common byte - * patterns - * - * @generated from oneof buf.validate.BytesRules.well_known - */ - wellKnown: { - /** - * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. - * If the field value doesn't meet this rule, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be a valid IP address - * optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; - * } - * ``` - * - * @generated from field: bool ip = 10; - */ - value: boolean; - case: "ip"; - } | { - /** - * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. - * If the field value doesn't meet this rule, an error message is generated. - * - * ```proto - * message MyBytes { - * // value must be a valid IPv4 address - * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; - * } - * ``` - * - * @generated from field: bool ipv4 = 11; - */ - value: boolean; - case: "ipv4"; - } | { - /** - * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. - * If the field value doesn't meet this rule, an error message is generated. - * ```proto - * message MyBytes { - * // value must be a valid IPv6 address - * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; - * } - * ``` - * - * @generated from field: bool ipv6 = 12; - */ - value: boolean; - case: "ipv6"; - } | { case: undefined; value?: undefined }; + /** + * WellKnown rules provide advanced rules against common byte + * patterns + * + * @generated from oneof buf.validate.BytesRules.well_known + */ + wellKnown: + | { + /** + * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + * If the field value doesn't meet this rule, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IP address + * optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + * } + * ``` + * + * @generated from field: bool ip = 10; + */ + value: boolean; + case: 'ip'; + } + | { + /** + * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + * If the field value doesn't meet this rule, an error message is generated. + * + * ```proto + * message MyBytes { + * // value must be a valid IPv4 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + * } + * ``` + * + * @generated from field: bool ipv4 = 11; + */ + value: boolean; + case: 'ipv4'; + } + | { + /** + * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + * If the field value doesn't meet this rule, an error message is generated. + * ```proto + * message MyBytes { + * // value must be a valid IPv6 address + * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + * } + * ``` + * + * @generated from field: bool ipv6 = 12; + */ + value: boolean; + case: 'ipv6'; + } + | { case: undefined; value?: undefined }; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyBytes { - * bytes value = 1 [ - * (buf.validate.field).bytes.example = "\x01\x02", - * (buf.validate.field).bytes.example = "\x02\x03" - * ]; - * } - * ``` - * - * @generated from field: repeated bytes example = 14; - */ - example: Uint8Array[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyBytes { + * bytes value = 1 [ + * (buf.validate.field).bytes.example = "\x01\x02", + * (buf.validate.field).bytes.example = "\x02\x03" + * ]; + * } + * ``` + * + * @generated from field: repeated bytes example = 14; + */ + example: Uint8Array[]; }; /** * Describes the message buf.validate.BytesRules. * Use `create(BytesRulesSchema)` to create a new message. */ -export const BytesRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 20); +export const BytesRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 20); /** * EnumRules describe the rules applied to `enum` values. * * @generated from message buf.validate.EnumRules */ -export type EnumRules = Message<"buf.validate.EnumRules"> & { - /** - * `const` requires the field value to exactly match the specified enum value. - * If the field value doesn't match, an error message is generated. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must be exactly MY_ENUM_VALUE1. - * MyEnum value = 1 [(buf.validate.field).enum.const = 1]; - * } - * ``` - * - * @generated from field: optional int32 const = 1; - */ - const: number; +export type EnumRules = Message<'buf.validate.EnumRules'> & { + /** + * `const` requires the field value to exactly match the specified enum value. + * If the field value doesn't match, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be exactly MY_ENUM_VALUE1. + * MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + * } + * ``` + * + * @generated from field: optional int32 const = 1; + */ + const: number; - /** - * `defined_only` requires the field value to be one of the defined values for - * this enum, failing on any undefined value. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must be a defined value of MyEnum. - * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; - * } - * ``` - * - * @generated from field: optional bool defined_only = 2; - */ - definedOnly: boolean; + /** + * `defined_only` requires the field value to be one of the defined values for + * this enum, failing on any undefined value. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be a defined value of MyEnum. + * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + * } + * ``` + * + * @generated from field: optional bool defined_only = 2; + */ + definedOnly: boolean; - /** - * `in` requires the field value to be equal to one of the - * specified enum values. If the field value doesn't match any of the - * specified values, an error message is generated. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must be equal to one of the specified values. - * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; - * } - * ``` - * - * @generated from field: repeated int32 in = 3; - */ - in: number[]; + /** + * `in` requires the field value to be equal to one of the + * specified enum values. If the field value doesn't match any of the + * specified values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must be equal to one of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; + * } + * ``` + * + * @generated from field: repeated int32 in = 3; + */ + in: number[]; - /** - * `not_in` requires the field value to be not equal to any of the - * specified enum values. If the field value matches one of the specified - * values, an error message is generated. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * // The field `value` must not be equal to any of the specified values. - * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; - * } - * ``` - * - * @generated from field: repeated int32 not_in = 4; - */ - notIn: number[]; + /** + * `not_in` requires the field value to be not equal to any of the + * specified enum values. If the field value matches one of the specified + * values, an error message is generated. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * // The field `value` must not be equal to any of the specified values. + * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; + * } + * ``` + * + * @generated from field: repeated int32 not_in = 4; + */ + notIn: number[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * enum MyEnum { - * MY_ENUM_UNSPECIFIED = 0; - * MY_ENUM_VALUE1 = 1; - * MY_ENUM_VALUE2 = 2; - * } - * - * message MyMessage { - * (buf.validate.field).enum.example = 1, - * (buf.validate.field).enum.example = 2 - * } - * ``` - * - * @generated from field: repeated int32 example = 5; - */ - example: number[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * enum MyEnum { + * MY_ENUM_UNSPECIFIED = 0; + * MY_ENUM_VALUE1 = 1; + * MY_ENUM_VALUE2 = 2; + * } + * + * message MyMessage { + * (buf.validate.field).enum.example = 1, + * (buf.validate.field).enum.example = 2 + * } + * ``` + * + * @generated from field: repeated int32 example = 5; + */ + example: number[]; }; /** * Describes the message buf.validate.EnumRules. * Use `create(EnumRulesSchema)` to create a new message. */ -export const EnumRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 21); +export const EnumRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 21); /** * RepeatedRules describe the rules applied to `repeated` values. * * @generated from message buf.validate.RepeatedRules */ -export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & { - /** - * `min_items` requires that this field must contain at least the specified - * minimum number of items. - * - * Note that `min_items = 1` is equivalent to setting a field as `required`. - * - * ```proto - * message MyRepeated { - * // value must contain at least 2 items - * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; - * } - * ``` - * - * @generated from field: optional uint64 min_items = 1; - */ - minItems: bigint; +export type RepeatedRules = Message<'buf.validate.RepeatedRules'> & { + /** + * `min_items` requires that this field must contain at least the specified + * minimum number of items. + * + * Note that `min_items = 1` is equivalent to setting a field as `required`. + * + * ```proto + * message MyRepeated { + * // value must contain at least 2 items + * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_items = 1; + */ + minItems: bigint; - /** - * `max_items` denotes that this field must not exceed a - * certain number of items as the upper limit. If the field contains more - * items than specified, an error message will be generated, requiring the - * field to maintain no more than the specified number of items. - * - * ```proto - * message MyRepeated { - * // value must contain no more than 3 item(s) - * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; - * } - * ``` - * - * @generated from field: optional uint64 max_items = 2; - */ - maxItems: bigint; + /** + * `max_items` denotes that this field must not exceed a + * certain number of items as the upper limit. If the field contains more + * items than specified, an error message will be generated, requiring the + * field to maintain no more than the specified number of items. + * + * ```proto + * message MyRepeated { + * // value must contain no more than 3 item(s) + * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + * } + * ``` + * + * @generated from field: optional uint64 max_items = 2; + */ + maxItems: bigint; - /** - * `unique` indicates that all elements in this field must - * be unique. This rule is strictly applicable to scalar and enum - * types, with message types not being supported. - * - * ```proto - * message MyRepeated { - * // repeated value must contain unique items - * repeated string value = 1 [(buf.validate.field).repeated.unique = true]; - * } - * ``` - * - * @generated from field: optional bool unique = 3; - */ - unique: boolean; + /** + * `unique` indicates that all elements in this field must + * be unique. This rule is strictly applicable to scalar and enum + * types, with message types not being supported. + * + * ```proto + * message MyRepeated { + * // repeated value must contain unique items + * repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + * } + * ``` + * + * @generated from field: optional bool unique = 3; + */ + unique: boolean; - /** - * `items` details the rules to be applied to each item - * in the field. Even for repeated message fields, validation is executed - * against each item unless `ignore` is specified. - * - * ```proto - * message MyRepeated { - * // The items in the field `value` must follow the specified rules. - * repeated string value = 1 [(buf.validate.field).repeated.items = { - * string: { - * min_len: 3 - * max_len: 10 - * } - * }]; - * } - * ``` - * - * Note that the `required` rule does not apply. Repeated items - * cannot be unset. - * - * @generated from field: optional buf.validate.FieldRules items = 4; - */ - items?: FieldRules; + /** + * `items` details the rules to be applied to each item + * in the field. Even for repeated message fields, validation is executed + * against each item unless `ignore` is specified. + * + * ```proto + * message MyRepeated { + * // The items in the field `value` must follow the specified rules. + * repeated string value = 1 [(buf.validate.field).repeated.items = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * Note that the `required` rule does not apply. Repeated items + * cannot be unset. + * + * @generated from field: optional buf.validate.FieldRules items = 4; + */ + items?: FieldRules; }; /** * Describes the message buf.validate.RepeatedRules. * Use `create(RepeatedRulesSchema)` to create a new message. */ -export const RepeatedRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 22); +export const RepeatedRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 22); /** * MapRules describe the rules applied to `map` values. * * @generated from message buf.validate.MapRules */ -export type MapRules = Message<"buf.validate.MapRules"> & { - /** - * Specifies the minimum number of key-value pairs allowed. If the field has - * fewer key-value pairs than specified, an error message is generated. - * - * ```proto - * message MyMap { - * // The field `value` must have at least 2 key-value pairs. - * map value = 1 [(buf.validate.field).map.min_pairs = 2]; - * } - * ``` - * - * @generated from field: optional uint64 min_pairs = 1; - */ - minPairs: bigint; +export type MapRules = Message<'buf.validate.MapRules'> & { + /** + * Specifies the minimum number of key-value pairs allowed. If the field has + * fewer key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at least 2 key-value pairs. + * map value = 1 [(buf.validate.field).map.min_pairs = 2]; + * } + * ``` + * + * @generated from field: optional uint64 min_pairs = 1; + */ + minPairs: bigint; - /** - * Specifies the maximum number of key-value pairs allowed. If the field has - * more key-value pairs than specified, an error message is generated. - * - * ```proto - * message MyMap { - * // The field `value` must have at most 3 key-value pairs. - * map value = 1 [(buf.validate.field).map.max_pairs = 3]; - * } - * ``` - * - * @generated from field: optional uint64 max_pairs = 2; - */ - maxPairs: bigint; + /** + * Specifies the maximum number of key-value pairs allowed. If the field has + * more key-value pairs than specified, an error message is generated. + * + * ```proto + * message MyMap { + * // The field `value` must have at most 3 key-value pairs. + * map value = 1 [(buf.validate.field).map.max_pairs = 3]; + * } + * ``` + * + * @generated from field: optional uint64 max_pairs = 2; + */ + maxPairs: bigint; - /** - * Specifies the rules to be applied to each key in the field. - * - * ```proto - * message MyMap { - * // The keys in the field `value` must follow the specified rules. - * map value = 1 [(buf.validate.field).map.keys = { - * string: { - * min_len: 3 - * max_len: 10 - * } - * }]; - * } - * ``` - * - * Note that the `required` rule does not apply. Map keys cannot be unset. - * - * @generated from field: optional buf.validate.FieldRules keys = 4; - */ - keys?: FieldRules; + /** + * Specifies the rules to be applied to each key in the field. + * + * ```proto + * message MyMap { + * // The keys in the field `value` must follow the specified rules. + * map value = 1 [(buf.validate.field).map.keys = { + * string: { + * min_len: 3 + * max_len: 10 + * } + * }]; + * } + * ``` + * + * Note that the `required` rule does not apply. Map keys cannot be unset. + * + * @generated from field: optional buf.validate.FieldRules keys = 4; + */ + keys?: FieldRules; - /** - * Specifies the rules to be applied to the value of each key in the - * field. Message values will still have their validations evaluated unless - * `ignore` is specified. - * - * ```proto - * message MyMap { - * // The values in the field `value` must follow the specified rules. - * map value = 1 [(buf.validate.field).map.values = { - * string: { - * min_len: 5 - * max_len: 20 - * } - * }]; - * } - * ``` - * Note that the `required` rule does not apply. Map values cannot be unset. - * - * @generated from field: optional buf.validate.FieldRules values = 5; - */ - values?: FieldRules; + /** + * Specifies the rules to be applied to the value of each key in the + * field. Message values will still have their validations evaluated unless + * `ignore` is specified. + * + * ```proto + * message MyMap { + * // The values in the field `value` must follow the specified rules. + * map value = 1 [(buf.validate.field).map.values = { + * string: { + * min_len: 5 + * max_len: 20 + * } + * }]; + * } + * ``` + * Note that the `required` rule does not apply. Map values cannot be unset. + * + * @generated from field: optional buf.validate.FieldRules values = 5; + */ + values?: FieldRules; }; /** * Describes the message buf.validate.MapRules. * Use `create(MapRulesSchema)` to create a new message. */ -export const MapRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 23); +export const MapRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 23); /** * AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type. * * @generated from message buf.validate.AnyRules */ -export type AnyRules = Message<"buf.validate.AnyRules"> & { - /** - * `in` requires the field's `type_url` to be equal to one of the - * specified values. If it doesn't match any of the specified values, an error - * message is generated. - * - * ```proto - * message MyAny { - * // The `value` field must have a `type_url` equal to one of the specified values. - * google.protobuf.Any value = 1 [(buf.validate.field).any = { - * in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"] - * }]; - * } - * ``` - * - * @generated from field: repeated string in = 2; - */ - in: string[]; +export type AnyRules = Message<'buf.validate.AnyRules'> & { + /** + * `in` requires the field's `type_url` to be equal to one of the + * specified values. If it doesn't match any of the specified values, an error + * message is generated. + * + * ```proto + * message MyAny { + * // The `value` field must have a `type_url` equal to one of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any = { + * in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"] + * }]; + * } + * ``` + * + * @generated from field: repeated string in = 2; + */ + in: string[]; - /** - * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. - * - * ```proto - * message MyAny { - * // The `value` field must not have a `type_url` equal to any of the specified values. - * google.protobuf.Any value = 1 [(buf.validate.field).any = { - * not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"] - * }]; - * } - * ``` - * - * @generated from field: repeated string not_in = 3; - */ - notIn: string[]; + /** + * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + * + * ```proto + * message MyAny { + * // The `value` field must not have a `type_url` equal to any of the specified values. + * google.protobuf.Any value = 1 [(buf.validate.field).any = { + * not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"] + * }]; + * } + * ``` + * + * @generated from field: repeated string not_in = 3; + */ + notIn: string[]; }; /** * Describes the message buf.validate.AnyRules. * Use `create(AnyRulesSchema)` to create a new message. */ -export const AnyRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 24); +export const AnyRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 24); /** * DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type. * * @generated from message buf.validate.DurationRules */ -export type DurationRules = Message<"buf.validate.DurationRules"> & { - /** - * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. - * If the field's value deviates from the specified value, an error message - * will be generated. - * - * ```proto - * message MyDuration { - * // value must equal 5s - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; - * } - * ``` - * - * @generated from field: optional google.protobuf.Duration const = 2; - */ - const?: Duration; +export type DurationRules = Message<'buf.validate.DurationRules'> & { + /** + * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + * If the field's value deviates from the specified value, an error message + * will be generated. + * + * ```proto + * message MyDuration { + * // value must equal 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Duration const = 2; + */ + const?: Duration; - /** - * @generated from oneof buf.validate.DurationRules.less_than - */ - lessThan: { - /** - * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, - * exclusive. If the field's value is greater than or equal to the specified - * value, an error message will be generated. - * - * ```proto - * message MyDuration { - * // value must be less than 5s - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; - * } - * ``` - * - * @generated from field: google.protobuf.Duration lt = 3; - */ - value: Duration; - case: "lt"; - } | { - /** - * `lte` indicates that the field must be less than or equal to the specified - * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, - * an error message will be generated. - * - * ```proto - * message MyDuration { - * // value must be less than or equal to 10s - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; - * } - * ``` - * - * @generated from field: google.protobuf.Duration lte = 4; - */ - value: Duration; - case: "lte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.DurationRules.less_than + */ + lessThan: + | { + /** + * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + * exclusive. If the field's value is greater than or equal to the specified + * value, an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than 5s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration lt = 3; + */ + value: Duration; + case: 'lt'; + } + | { + /** + * `lte` indicates that the field must be less than or equal to the specified + * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be less than or equal to 10s + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration lte = 4; + */ + value: Duration; + case: 'lte'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.DurationRules.greater_than - */ - greaterThan: { - /** - * `gt` requires the duration field value to be greater than the specified - * value (exclusive). If the value of `gt` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyDuration { - * // duration must be greater than 5s [duration.gt] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; - * - * // duration must be greater than 5s and less than 10s [duration.gt_lt] - * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; - * - * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] - * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; - * } - * ``` - * - * @generated from field: google.protobuf.Duration gt = 5; - */ - value: Duration; - case: "gt"; - } | { - /** - * `gte` requires the duration field value to be greater than or equal to the - * specified value (exclusive). If the value of `gte` is larger than a - * specified `lt` or `lte`, the range is reversed, and the field value must - * be outside the specified range. If the field value doesn't meet the - * required conditions, an error message is generated. - * - * ```proto - * message MyDuration { - * // duration must be greater than or equal to 5s [duration.gte] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; - * - * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] - * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; - * - * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] - * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; - * } - * ``` - * - * @generated from field: google.protobuf.Duration gte = 6; - */ - value: Duration; - case: "gte"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.DurationRules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the duration field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than 5s [duration.gt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + * + * // duration must be greater than 5s and less than 10s [duration.gt_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration gt = 5; + */ + value: Duration; + case: 'gt'; + } + | { + /** + * `gte` requires the duration field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value must + * be outside the specified range. If the field value doesn't meet the + * required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be greater than or equal to 5s [duration.gte] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + * + * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + * + * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Duration gte = 6; + */ + value: Duration; + case: 'gte'; + } + | { case: undefined; value?: undefined }; - /** - * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. - * If the field's value doesn't correspond to any of the specified values, - * an error message will be generated. - * - * ```proto - * message MyDuration { - * // value must be in list [1s, 2s, 3s] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; - * } - * ``` - * - * @generated from field: repeated google.protobuf.Duration in = 7; - */ - in: Duration[]; + /** + * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + * If the field's value doesn't correspond to any of the specified values, + * an error message will be generated. + * + * ```proto + * message MyDuration { + * // value must be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration in = 7; + */ + in: Duration[]; - /** - * `not_in` denotes that the field must not be equal to - * any of the specified values of the `google.protobuf.Duration` type. - * If the field's value matches any of these values, an error message will be - * generated. - * - * ```proto - * message MyDuration { - * // value must not be in list [1s, 2s, 3s] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; - * } - * ``` - * - * @generated from field: repeated google.protobuf.Duration not_in = 8; - */ - notIn: Duration[]; + /** + * `not_in` denotes that the field must not be equal to + * any of the specified values of the `google.protobuf.Duration` type. + * If the field's value matches any of these values, an error message will be + * generated. + * + * ```proto + * message MyDuration { + * // value must not be in list [1s, 2s, 3s] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration not_in = 8; + */ + notIn: Duration[]; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyDuration { - * google.protobuf.Duration value = 1 [ - * (buf.validate.field).duration.example = { seconds: 1 }, - * (buf.validate.field).duration.example = { seconds: 2 }, - * ]; - * } - * ``` - * - * @generated from field: repeated google.protobuf.Duration example = 9; - */ - example: Duration[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyDuration { + * google.protobuf.Duration value = 1 [ + * (buf.validate.field).duration.example = { seconds: 1 }, + * (buf.validate.field).duration.example = { seconds: 2 }, + * ]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Duration example = 9; + */ + example: Duration[]; }; /** * Describes the message buf.validate.DurationRules. * Use `create(DurationRulesSchema)` to create a new message. */ -export const DurationRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 25); +export const DurationRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 25); /** * TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type. * * @generated from message buf.validate.TimestampRules */ -export type TimestampRules = Message<"buf.validate.TimestampRules"> & { - /** - * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. - * - * ```proto - * message MyTimestamp { - * // value must equal 2023-05-03T10:00:00Z - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; - * } - * ``` - * - * @generated from field: optional google.protobuf.Timestamp const = 2; - */ - const?: Timestamp; +export type TimestampRules = Message<'buf.validate.TimestampRules'> & { + /** + * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + * + * ```proto + * message MyTimestamp { + * // value must equal 2023-05-03T10:00:00Z + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Timestamp const = 2; + */ + const?: Timestamp; - /** - * @generated from oneof buf.validate.TimestampRules.less_than - */ - lessThan: { - /** - * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. - * - * ```proto - * message MyDuration { - * // duration must be less than 'P3D' [duration.lt] - * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; - * } - * ``` - * - * @generated from field: google.protobuf.Timestamp lt = 3; - */ - value: Timestamp; - case: "lt"; - } | { - /** - * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. - * - * ```proto - * message MyTimestamp { - * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] - * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; - * } - * ``` - * - * @generated from field: google.protobuf.Timestamp lte = 4; - */ - value: Timestamp; - case: "lte"; - } | { - /** - * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. - * - * ```proto - * message MyTimestamp { - * // value must be less than now - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; - * } - * ``` - * - * @generated from field: bool lt_now = 7; - */ - value: boolean; - case: "ltNow"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.TimestampRules.less_than + */ + lessThan: + | { + /** + * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyDuration { + * // duration must be less than 'P3D' [duration.lt] + * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp lt = 3; + */ + value: Timestamp; + case: 'lt'; + } + | { + /** + * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp lte = 4; + */ + value: Timestamp; + case: 'lte'; + } + | { + /** + * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be less than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + * } + * ``` + * + * @generated from field: bool lt_now = 7; + */ + value: boolean; + case: 'ltNow'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from oneof buf.validate.TimestampRules.greater_than - */ - greaterThan: { - /** - * `gt` requires the timestamp field value to be greater than the specified - * value (exclusive). If the value of `gt` is larger than a specified `lt` - * or `lte`, the range is reversed, and the field value must be outside the - * specified range. If the field value doesn't meet the required conditions, - * an error message is generated. - * - * ```proto - * message MyTimestamp { - * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] - * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; - * - * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] - * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; - * - * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] - * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; - * } - * ``` - * - * @generated from field: google.protobuf.Timestamp gt = 5; - */ - value: Timestamp; - case: "gt"; - } | { - /** - * `gte` requires the timestamp field value to be greater than or equal to the - * specified value (exclusive). If the value of `gte` is larger than a - * specified `lt` or `lte`, the range is reversed, and the field value - * must be outside the specified range. If the field value doesn't meet - * the required conditions, an error message is generated. - * - * ```proto - * message MyTimestamp { - * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] - * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; - * - * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] - * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; - * - * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] - * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; - * } - * ``` - * - * @generated from field: google.protobuf.Timestamp gte = 6; - */ - value: Timestamp; - case: "gte"; - } | { - /** - * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. - * - * ```proto - * message MyTimestamp { - * // value must be greater than now - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; - * } - * ``` - * - * @generated from field: bool gt_now = 8; - */ - value: boolean; - case: "gtNow"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof buf.validate.TimestampRules.greater_than + */ + greaterThan: + | { + /** + * `gt` requires the timestamp field value to be greater than the specified + * value (exclusive). If the value of `gt` is larger than a specified `lt` + * or `lte`, the range is reversed, and the field value must be outside the + * specified range. If the field value doesn't meet the required conditions, + * an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + * + * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp gt = 5; + */ + value: Timestamp; + case: 'gt'; + } + | { + /** + * `gte` requires the timestamp field value to be greater than or equal to the + * specified value (exclusive). If the value of `gte` is larger than a + * specified `lt` or `lte`, the range is reversed, and the field value + * must be outside the specified range. If the field value doesn't meet + * the required conditions, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + * + * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + * + * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + * } + * ``` + * + * @generated from field: google.protobuf.Timestamp gte = 6; + */ + value: Timestamp; + case: 'gte'; + } + | { + /** + * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + * + * ```proto + * message MyTimestamp { + * // value must be greater than now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + * } + * ``` + * + * @generated from field: bool gt_now = 8; + */ + value: boolean; + case: 'gtNow'; + } + | { case: undefined; value?: undefined }; - /** - * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. - * - * ```proto - * message MyTimestamp { - * // value must be within 1 hour of now - * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; - * } - * ``` - * - * @generated from field: optional google.protobuf.Duration within = 9; - */ - within?: Duration; + /** + * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + * + * ```proto + * message MyTimestamp { + * // value must be within 1 hour of now + * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + * } + * ``` + * + * @generated from field: optional google.protobuf.Duration within = 9; + */ + within?: Duration; - /** - * `example` specifies values that the field may have. These values SHOULD - * conform to other rules. `example` values will not impact validation - * but may be used as helpful guidance on how to populate the given field. - * - * ```proto - * message MyTimestamp { - * google.protobuf.Timestamp value = 1 [ - * (buf.validate.field).timestamp.example = { seconds: 1672444800 }, - * (buf.validate.field).timestamp.example = { seconds: 1672531200 }, - * ]; - * } - * ``` - * - * @generated from field: repeated google.protobuf.Timestamp example = 10; - */ - example: Timestamp[]; + /** + * `example` specifies values that the field may have. These values SHOULD + * conform to other rules. `example` values will not impact validation + * but may be used as helpful guidance on how to populate the given field. + * + * ```proto + * message MyTimestamp { + * google.protobuf.Timestamp value = 1 [ + * (buf.validate.field).timestamp.example = { seconds: 1672444800 }, + * (buf.validate.field).timestamp.example = { seconds: 1672531200 }, + * ]; + * } + * ``` + * + * @generated from field: repeated google.protobuf.Timestamp example = 10; + */ + example: Timestamp[]; }; /** * Describes the message buf.validate.TimestampRules. * Use `create(TimestampRulesSchema)` to create a new message. */ -export const TimestampRulesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 26); +export const TimestampRulesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 26); /** * `Violations` is a collection of `Violation` messages. This message type is returned by @@ -4269,21 +4442,22 @@ export const TimestampRulesSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.Violations */ -export type Violations = Message<"buf.validate.Violations"> & { - /** - * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. - * - * @generated from field: repeated buf.validate.Violation violations = 1; - */ - violations: Violation[]; +export type Violations = Message<'buf.validate.Violations'> & { + /** + * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + * + * @generated from field: repeated buf.validate.Violation violations = 1; + */ + violations: Violation[]; }; /** * Describes the message buf.validate.Violations. * Use `create(ViolationsSchema)` to create a new message. */ -export const ViolationsSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 27); +export const ViolationsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 27); /** * `Violation` represents a single instance where a validation rule, expressed @@ -4332,96 +4506,97 @@ export const ViolationsSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.Violation */ -export type Violation = Message<"buf.validate.Violation"> & { - /** - * `field` is a machine-readable path to the field that failed validation. - * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. - * - * For example, consider the following message: - * - * ```proto - * message Message { - * bool a = 1 [(buf.validate.field).required = true]; - * } - * ``` - * - * It could produce the following violation: - * - * ```textproto - * violation { - * field { element { field_number: 1, field_name: "a", field_type: 8 } } - * ... - * } - * ``` - * - * @generated from field: optional buf.validate.FieldPath field = 5; - */ - field?: FieldPath; +export type Violation = Message<'buf.validate.Violation'> & { + /** + * `field` is a machine-readable path to the field that failed validation. + * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + * + * For example, consider the following message: + * + * ```proto + * message Message { + * bool a = 1 [(buf.validate.field).required = true]; + * } + * ``` + * + * It could produce the following violation: + * + * ```textproto + * violation { + * field { element { field_number: 1, field_name: "a", field_type: 8 } } + * ... + * } + * ``` + * + * @generated from field: optional buf.validate.FieldPath field = 5; + */ + field?: FieldPath; - /** - * `rule` is a machine-readable path that points to the specific rule that failed validation. - * This will be a nested field starting from the FieldRules of the field that failed validation. - * For custom rules, this will provide the path of the rule, e.g. `cel[0]`. - * - * For example, consider the following message: - * - * ```proto - * message Message { - * bool a = 1 [(buf.validate.field).required = true]; - * bool b = 2 [(buf.validate.field).cel = { - * id: "custom_rule", - * expression: "!this ? 'b must be true': ''" - * }] - * } - * ``` - * - * It could produce the following violations: - * - * ```textproto - * violation { - * rule { element { field_number: 25, field_name: "required", field_type: 8 } } - * ... - * } - * violation { - * rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } - * ... - * } - * ``` - * - * @generated from field: optional buf.validate.FieldPath rule = 6; - */ - rule?: FieldPath; + /** + * `rule` is a machine-readable path that points to the specific rule that failed validation. + * This will be a nested field starting from the FieldRules of the field that failed validation. + * For custom rules, this will provide the path of the rule, e.g. `cel[0]`. + * + * For example, consider the following message: + * + * ```proto + * message Message { + * bool a = 1 [(buf.validate.field).required = true]; + * bool b = 2 [(buf.validate.field).cel = { + * id: "custom_rule", + * expression: "!this ? 'b must be true': ''" + * }] + * } + * ``` + * + * It could produce the following violations: + * + * ```textproto + * violation { + * rule { element { field_number: 25, field_name: "required", field_type: 8 } } + * ... + * } + * violation { + * rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } + * ... + * } + * ``` + * + * @generated from field: optional buf.validate.FieldPath rule = 6; + */ + rule?: FieldPath; - /** - * `rule_id` is the unique identifier of the `Rule` that was not fulfilled. - * This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated. - * - * @generated from field: optional string rule_id = 2; - */ - ruleId: string; + /** + * `rule_id` is the unique identifier of the `Rule` that was not fulfilled. + * This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated. + * + * @generated from field: optional string rule_id = 2; + */ + ruleId: string; - /** - * `message` is a human-readable error message that describes the nature of the violation. - * This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation. - * - * @generated from field: optional string message = 3; - */ - message: string; + /** + * `message` is a human-readable error message that describes the nature of the violation. + * This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation. + * + * @generated from field: optional string message = 3; + */ + message: string; - /** - * `for_key` indicates whether the violation was caused by a map key, rather than a value. - * - * @generated from field: optional bool for_key = 4; - */ - forKey: boolean; + /** + * `for_key` indicates whether the violation was caused by a map key, rather than a value. + * + * @generated from field: optional bool for_key = 4; + */ + forKey: boolean; }; /** * Describes the message buf.validate.Violation. * Use `create(ViolationSchema)` to create a new message. */ -export const ViolationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 28); +export const ViolationSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 28); /** * `FieldPath` provides a path to a nested protobuf field. @@ -4431,21 +4606,22 @@ export const ViolationSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.FieldPath */ -export type FieldPath = Message<"buf.validate.FieldPath"> & { - /** - * `elements` contains each element of the path, starting from the root and recursing downward. - * - * @generated from field: repeated buf.validate.FieldPathElement elements = 1; - */ - elements: FieldPathElement[]; +export type FieldPath = Message<'buf.validate.FieldPath'> & { + /** + * `elements` contains each element of the path, starting from the root and recursing downward. + * + * @generated from field: repeated buf.validate.FieldPathElement elements = 1; + */ + elements: FieldPathElement[]; }; /** * Describes the message buf.validate.FieldPath. * Use `create(FieldPathSchema)` to create a new message. */ -export const FieldPathSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 29); +export const FieldPathSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 29); /** * `FieldPathElement` provides enough information to nest through a single protobuf field. @@ -4456,109 +4632,116 @@ export const FieldPathSchema: GenMessage = /*@__PURE__*/ * * @generated from message buf.validate.FieldPathElement */ -export type FieldPathElement = Message<"buf.validate.FieldPathElement"> & { - /** - * `field_number` is the field number this path element refers to. - * - * @generated from field: optional int32 field_number = 1; - */ - fieldNumber: number; +export type FieldPathElement = Message<'buf.validate.FieldPathElement'> & { + /** + * `field_number` is the field number this path element refers to. + * + * @generated from field: optional int32 field_number = 1; + */ + fieldNumber: number; - /** - * `field_name` contains the field name this path element refers to. - * This can be used to display a human-readable path even if the field number is unknown. - * - * @generated from field: optional string field_name = 2; - */ - fieldName: string; + /** + * `field_name` contains the field name this path element refers to. + * This can be used to display a human-readable path even if the field number is unknown. + * + * @generated from field: optional string field_name = 2; + */ + fieldName: string; - /** - * `field_type` specifies the type of this field. When using reflection, this value is not needed. - * - * This value is provided to make it possible to traverse unknown fields through wire data. - * When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. - * - * [1]: https://protobuf.dev/programming-guides/encoding/#packed - * [2]: https://protobuf.dev/programming-guides/encoding/#groups - * - * N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and - * can be explicitly used in Protocol Buffers 2023 Edition. - * - * @generated from field: optional google.protobuf.FieldDescriptorProto.Type field_type = 3; - */ - fieldType: FieldDescriptorProto_Type; + /** + * `field_type` specifies the type of this field. When using reflection, this value is not needed. + * + * This value is provided to make it possible to traverse unknown fields through wire data. + * When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. + * + * [1]: https://protobuf.dev/programming-guides/encoding/#packed + * [2]: https://protobuf.dev/programming-guides/encoding/#groups + * + * N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and + * can be explicitly used in Protocol Buffers 2023 Edition. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type field_type = 3; + */ + fieldType: FieldDescriptorProto_Type; - /** - * `key_type` specifies the map key type of this field. This value is useful when traversing - * unknown fields through wire data: specifically, it allows handling the differences between - * different integer encodings. - * - * @generated from field: optional google.protobuf.FieldDescriptorProto.Type key_type = 4; - */ - keyType: FieldDescriptorProto_Type; + /** + * `key_type` specifies the map key type of this field. This value is useful when traversing + * unknown fields through wire data: specifically, it allows handling the differences between + * different integer encodings. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type key_type = 4; + */ + keyType: FieldDescriptorProto_Type; - /** - * `value_type` specifies map value type of this field. This is useful if you want to display a - * value inside unknown fields through wire data. - * - * @generated from field: optional google.protobuf.FieldDescriptorProto.Type value_type = 5; - */ - valueType: FieldDescriptorProto_Type; + /** + * `value_type` specifies map value type of this field. This is useful if you want to display a + * value inside unknown fields through wire data. + * + * @generated from field: optional google.protobuf.FieldDescriptorProto.Type value_type = 5; + */ + valueType: FieldDescriptorProto_Type; - /** - * `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. - * - * @generated from oneof buf.validate.FieldPathElement.subscript - */ - subscript: { - /** - * `index` specifies a 0-based index into a repeated field. - * - * @generated from field: uint64 index = 6; - */ - value: bigint; - case: "index"; - } | { - /** - * `bool_key` specifies a map key of type bool. - * - * @generated from field: bool bool_key = 7; - */ - value: boolean; - case: "boolKey"; - } | { - /** - * `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. - * - * @generated from field: int64 int_key = 8; - */ - value: bigint; - case: "intKey"; - } | { - /** - * `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. - * - * @generated from field: uint64 uint_key = 9; - */ - value: bigint; - case: "uintKey"; - } | { - /** - * `string_key` specifies a map key of type string. - * - * @generated from field: string string_key = 10; - */ - value: string; - case: "stringKey"; - } | { case: undefined; value?: undefined }; + /** + * `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. + * + * @generated from oneof buf.validate.FieldPathElement.subscript + */ + subscript: + | { + /** + * `index` specifies a 0-based index into a repeated field. + * + * @generated from field: uint64 index = 6; + */ + value: bigint; + case: 'index'; + } + | { + /** + * `bool_key` specifies a map key of type bool. + * + * @generated from field: bool bool_key = 7; + */ + value: boolean; + case: 'boolKey'; + } + | { + /** + * `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. + * + * @generated from field: int64 int_key = 8; + */ + value: bigint; + case: 'intKey'; + } + | { + /** + * `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. + * + * @generated from field: uint64 uint_key = 9; + */ + value: bigint; + case: 'uintKey'; + } + | { + /** + * `string_key` specifies a map key of type string. + * + * @generated from field: string string_key = 10; + */ + value: string; + case: 'stringKey'; + } + | { case: undefined; value?: undefined }; }; /** * Describes the message buf.validate.FieldPathElement. * Use `create(FieldPathElementSchema)` to create a new message. */ -export const FieldPathElementSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_buf_validate_validate, 30); +export const FieldPathElementSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_buf_validate_validate, 30); /** * Specifies how `FieldRules.ignore` behaves, depending on the field's value, and @@ -4567,108 +4750,107 @@ export const FieldPathElementSchema: GenMessage = /*@__PURE__* * @generated from enum buf.validate.Ignore */ export enum Ignore { - /** - * Ignore rules if the field tracks presence and is unset. This is the default - * behavior. - * - * In proto3, only message fields, members of a Protobuf `oneof`, and fields - * with the `optional` label track presence. Consequently, the following fields - * are always validated, whether a value is set or not: - * - * ```proto - * syntax="proto3"; - * - * message RulesApply { - * string email = 1 [ - * (buf.validate.field).string.email = true - * ]; - * int32 age = 2 [ - * (buf.validate.field).int32.gt = 0 - * ]; - * repeated string labels = 3 [ - * (buf.validate.field).repeated.min_items = 1 - * ]; - * } - * ``` - * - * In contrast, the following fields track presence, and are only validated if - * a value is set: - * - * ```proto - * syntax="proto3"; - * - * message RulesApplyIfSet { - * optional string email = 1 [ - * (buf.validate.field).string.email = true - * ]; - * oneof ref { - * string reference = 2 [ - * (buf.validate.field).string.uuid = true - * ]; - * string name = 3 [ - * (buf.validate.field).string.min_len = 4 - * ]; - * } - * SomeMessage msg = 4 [ - * (buf.validate.field).cel = {/* ... *\/} - * ]; - * } - * ``` - * - * To ensure that such a field is set, add the `required` rule. - * - * To learn which fields track presence, see the - * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). - * - * @generated from enum value: IGNORE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, + /** + * Ignore rules if the field tracks presence and is unset. This is the default + * behavior. + * + * In proto3, only message fields, members of a Protobuf `oneof`, and fields + * with the `optional` label track presence. Consequently, the following fields + * are always validated, whether a value is set or not: + * + * ```proto + * syntax="proto3"; + * + * message RulesApply { + * string email = 1 [ + * (buf.validate.field).string.email = true + * ]; + * int32 age = 2 [ + * (buf.validate.field).int32.gt = 0 + * ]; + * repeated string labels = 3 [ + * (buf.validate.field).repeated.min_items = 1 + * ]; + * } + * ``` + * + * In contrast, the following fields track presence, and are only validated if + * a value is set: + * + * ```proto + * syntax="proto3"; + * + * message RulesApplyIfSet { + * optional string email = 1 [ + * (buf.validate.field).string.email = true + * ]; + * oneof ref { + * string reference = 2 [ + * (buf.validate.field).string.uuid = true + * ]; + * string name = 3 [ + * (buf.validate.field).string.min_len = 4 + * ]; + * } + * SomeMessage msg = 4 [ + * (buf.validate.field).cel = {/* ... *\/} + * ]; + * } + * ``` + * + * To ensure that such a field is set, add the `required` rule. + * + * To learn which fields track presence, see the + * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). + * + * @generated from enum value: IGNORE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - /** - * Ignore rules if the field is unset, or set to the zero value. - * - * The zero value depends on the field type: - * - For strings, the zero value is the empty string. - * - For bytes, the zero value is empty bytes. - * - For bool, the zero value is false. - * - For numeric types, the zero value is zero. - * - For enums, the zero value is the first defined enum value. - * - For repeated fields, the zero is an empty list. - * - For map fields, the zero is an empty map. - * - For message fields, absence of the message (typically a null-value) is considered zero value. - * - * For fields that track presence (e.g. adding the `optional` label in proto3), - * this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`. - * - * @generated from enum value: IGNORE_IF_ZERO_VALUE = 1; - */ - IF_ZERO_VALUE = 1, + /** + * Ignore rules if the field is unset, or set to the zero value. + * + * The zero value depends on the field type: + * - For strings, the zero value is the empty string. + * - For bytes, the zero value is empty bytes. + * - For bool, the zero value is false. + * - For numeric types, the zero value is zero. + * - For enums, the zero value is the first defined enum value. + * - For repeated fields, the zero is an empty list. + * - For map fields, the zero is an empty map. + * - For message fields, absence of the message (typically a null-value) is considered zero value. + * + * For fields that track presence (e.g. adding the `optional` label in proto3), + * this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`. + * + * @generated from enum value: IGNORE_IF_ZERO_VALUE = 1; + */ + IF_ZERO_VALUE = 1, - /** - * Always ignore rules, including the `required` rule. - * - * This is useful for ignoring the rules of a referenced message, or to - * temporarily ignore rules during development. - * - * ```proto - * message MyMessage { - * // The field's rules will always be ignored, including any validations - * // on value's fields. - * MyOtherMessage value = 1 [ - * (buf.validate.field).ignore = IGNORE_ALWAYS]; - * } - * ``` - * - * @generated from enum value: IGNORE_ALWAYS = 3; - */ - ALWAYS = 3, + /** + * Always ignore rules, including the `required` rule. + * + * This is useful for ignoring the rules of a referenced message, or to + * temporarily ignore rules during development. + * + * ```proto + * message MyMessage { + * // The field's rules will always be ignored, including any validations + * // on value's fields. + * MyOtherMessage value = 1 [ + * (buf.validate.field).ignore = IGNORE_ALWAYS]; + * } + * ``` + * + * @generated from enum value: IGNORE_ALWAYS = 3; + */ + ALWAYS = 3 } /** * Describes the enum buf.validate.Ignore. */ -export const IgnoreSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_buf_validate_validate, 0); +export const IgnoreSchema: GenEnum = /*@__PURE__*/ enumDesc(file_buf_validate_validate, 0); /** * KnownRegex contains some well-known patterns. @@ -4676,31 +4858,32 @@ export const IgnoreSchema: GenEnum = /*@__PURE__*/ * @generated from enum buf.validate.KnownRegex */ export enum KnownRegex { - /** - * @generated from enum value: KNOWN_REGEX_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, + /** + * @generated from enum value: KNOWN_REGEX_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - /** - * HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2). - * - * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; - */ - HTTP_HEADER_NAME = 1, + /** + * HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2). + * + * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1; + */ + HTTP_HEADER_NAME = 1, - /** - * HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4). - * - * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; - */ - HTTP_HEADER_VALUE = 2, + /** + * HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4). + * + * @generated from enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2; + */ + HTTP_HEADER_VALUE = 2 } /** * Describes the enum buf.validate.KnownRegex. */ -export const KnownRegexSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_buf_validate_validate, 1); +export const KnownRegexSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_buf_validate_validate, 1); /** * Rules specify the validations to be performed on this message. By default, @@ -4708,8 +4891,9 @@ export const KnownRegexSchema: GenEnum = /*@__PURE__*/ * * @generated from extension: optional buf.validate.MessageRules message = 1159; */ -export const message: GenExtension = /*@__PURE__*/ - extDesc(file_buf_validate_validate, 0); +export const message: GenExtension = + /*@__PURE__*/ + extDesc(file_buf_validate_validate, 0); /** * Rules specify the validations to be performed on this oneof. By default, @@ -4717,8 +4901,9 @@ export const message: GenExtension = /*@__PURE__*/ * * @generated from extension: optional buf.validate.OneofRules oneof = 1159; */ -export const oneof: GenExtension = /*@__PURE__*/ - extDesc(file_buf_validate_validate, 1); +export const oneof: GenExtension = + /*@__PURE__*/ + extDesc(file_buf_validate_validate, 1); /** * Rules specify the validations to be performed on this field. By default, @@ -4726,8 +4911,9 @@ export const oneof: GenExtension = /*@__PURE__*/ * * @generated from extension: optional buf.validate.FieldRules field = 1159; */ -export const field: GenExtension = /*@__PURE__*/ - extDesc(file_buf_validate_validate, 2); +export const field: GenExtension = + /*@__PURE__*/ + extDesc(file_buf_validate_validate, 2); /** * Specifies predefined rules. When extending a standard rule message, @@ -4749,6 +4935,6 @@ export const field: GenExtension = /*@__PURE__*/ * * @generated from extension: optional buf.validate.PredefinedRules predefined = 1160; */ -export const predefined: GenExtension = /*@__PURE__*/ - extDesc(file_buf_validate_validate, 3); - +export const predefined: GenExtension = + /*@__PURE__*/ + extDesc(file_buf_validate_validate, 3); diff --git a/web/src/lib/gen/mantrae/v1/agent_pb.ts b/web/src/lib/gen/mantrae/v1/agent_pb.ts index e260701..451530b 100644 --- a/web/src/lib/gen/mantrae/v1/agent_pb.ts +++ b/web/src/lib/gen/mantrae/v1/agent_pb.ts @@ -2,415 +2,428 @@ // @generated from file mantrae/v1/agent.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/agent.proto. */ -export const file_mantrae_v1_agent: GenFile = /*@__PURE__*/ - fileDesc("ChZtYW50cmFlL3YxL2FnZW50LnByb3RvEgptYW50cmFlLnYxIo0CCgVBZ2VudBIKCgJpZBgBIAEoCRISCgpwcm9maWxlX2lkGAIgASgDEhAKCGhvc3RuYW1lGAMgASgJEhEKCXB1YmxpY19pcBgEIAEoCRISCgpwcml2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FlLnYxLlVwZGF0ZUFnZW50UmVzcG9uc2USTgoLRGVsZXRlQWdlbnQSHi5tYW50cmFlLnYxLkRlbGV0ZUFnZW50UmVxdWVzdBofLm1hbnRyYWUudjEuRGVsZXRlQWdlbnRSZXNwb25zZRJQCgpMaXN0QWdlbnRzEh0ubWFudHJhZS52MS5MaXN0QWdlbnRzUmVxdWVzdBoeLm1hbnRyYWUudjEuTGlzdEFnZW50c1Jlc3BvbnNlIgOQAgESTgoLSGVhbHRoQ2hlY2sSHi5tYW50cmFlLnYxLkhlYWx0aENoZWNrUmVxdWVzdBofLm1hbnRyYWUudjEuSGVhbHRoQ2hlY2tSZXNwb25zZUKkAQoOY29tLm1hbnRyYWUudjFCCkFnZW50UHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_agent: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChZtYW50cmFlL3YxL2FnZW50LnByb3RvEgptYW50cmFlLnYxIo0CCgVBZ2VudBIKCgJpZBgBIAEoCRISCgpwcm9maWxlX2lkGAIgASgDEhAKCGhvc3RuYW1lGAMgASgJEhEKCXB1YmxpY19pcBgEIAEoCRISCgpwcml2YXRlX2lwGAUgASgJEhEKCWFjdGl2ZV9pcBgGIAEoCRINCgV0b2tlbhgHIAEoCRIpCgpjb250YWluZXJzGAggAygLMhUubWFudHJhZS52MS5Db250YWluZXISLgoKY3JlYXRlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiuAI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QAgESTgoLSGVhbHRoQ2hlY2sSHi5tYW50cmFlLnYxLkhlYWx0aENoZWNrUmVxdWVzdBofLm1hbnRyYWUudjEuSGVhbHRoQ2hlY2tSZXNwb25zZUKkAQoOY29tLm1hbnRyYWUudjFCCkFnZW50UHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.Agent */ -export type Agent = Message<"mantrae.v1.Agent"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type Agent = Message<'mantrae.v1.Agent'> & { + /** + * @generated from field: string id = 1; + */ + id: string; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string hostname = 3; - */ - hostname: string; + /** + * @generated from field: string hostname = 3; + */ + hostname: string; - /** - * @generated from field: string public_ip = 4; - */ - publicIp: string; + /** + * @generated from field: string public_ip = 4; + */ + publicIp: string; - /** - * @generated from field: string private_ip = 5; - */ - privateIp: string; + /** + * @generated from field: string private_ip = 5; + */ + privateIp: string; - /** - * @generated from field: string active_ip = 6; - */ - activeIp: string; + /** + * @generated from field: string active_ip = 6; + */ + activeIp: string; - /** - * @generated from field: string token = 7; - */ - token: string; + /** + * @generated from field: string token = 7; + */ + token: string; - /** - * @generated from field: repeated mantrae.v1.Container containers = 8; - */ - containers: Container[]; + /** + * @generated from field: repeated mantrae.v1.Container containers = 8; + */ + containers: Container[]; - /** - * @generated from field: google.protobuf.Timestamp created_at = 9; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 9; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 10; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 10; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.Agent. * Use `create(AgentSchema)` to create a new message. */ -export const AgentSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 0); +export const AgentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_mantrae_v1_agent, 0); /** * @generated from message mantrae.v1.Container */ -export type Container = Message<"mantrae.v1.Container"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type Container = Message<'mantrae.v1.Container'> & { + /** + * @generated from field: string id = 1; + */ + id: string; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: map labels = 3; - */ - labels: { [key: string]: string }; + /** + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; - /** - * @generated from field: string image = 4; - */ - image: string; + /** + * @generated from field: string image = 4; + */ + image: string; - /** - * @generated from field: map portmap = 5; - */ - portmap: { [key: number]: number }; + /** + * @generated from field: map portmap = 5; + */ + portmap: { [key: number]: number }; - /** - * @generated from field: string status = 6; - */ - status: string; + /** + * @generated from field: string status = 6; + */ + status: string; - /** - * @generated from field: google.protobuf.Timestamp created = 7; - */ - created?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created = 7; + */ + created?: Timestamp; }; /** * Describes the message mantrae.v1.Container. * Use `create(ContainerSchema)` to create a new message. */ -export const ContainerSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 1); +export const ContainerSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 1); /** * @generated from message mantrae.v1.GetAgentRequest */ -export type GetAgentRequest = Message<"mantrae.v1.GetAgentRequest"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type GetAgentRequest = Message<'mantrae.v1.GetAgentRequest'> & { + /** + * @generated from field: string id = 1; + */ + id: string; }; /** * Describes the message mantrae.v1.GetAgentRequest. * Use `create(GetAgentRequestSchema)` to create a new message. */ -export const GetAgentRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 2); +export const GetAgentRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 2); /** * @generated from message mantrae.v1.GetAgentResponse */ -export type GetAgentResponse = Message<"mantrae.v1.GetAgentResponse"> & { - /** - * @generated from field: mantrae.v1.Agent agent = 1; - */ - agent?: Agent; +export type GetAgentResponse = Message<'mantrae.v1.GetAgentResponse'> & { + /** + * @generated from field: mantrae.v1.Agent agent = 1; + */ + agent?: Agent; }; /** * Describes the message mantrae.v1.GetAgentResponse. * Use `create(GetAgentResponseSchema)` to create a new message. */ -export const GetAgentResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 3); +export const GetAgentResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 3); /** * @generated from message mantrae.v1.CreateAgentRequest */ -export type CreateAgentRequest = Message<"mantrae.v1.CreateAgentRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type CreateAgentRequest = Message<'mantrae.v1.CreateAgentRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; }; /** * Describes the message mantrae.v1.CreateAgentRequest. * Use `create(CreateAgentRequestSchema)` to create a new message. */ -export const CreateAgentRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 4); +export const CreateAgentRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 4); /** * @generated from message mantrae.v1.CreateAgentResponse */ -export type CreateAgentResponse = Message<"mantrae.v1.CreateAgentResponse"> & { - /** - * @generated from field: mantrae.v1.Agent agent = 1; - */ - agent?: Agent; +export type CreateAgentResponse = Message<'mantrae.v1.CreateAgentResponse'> & { + /** + * @generated from field: mantrae.v1.Agent agent = 1; + */ + agent?: Agent; }; /** * Describes the message mantrae.v1.CreateAgentResponse. * Use `create(CreateAgentResponseSchema)` to create a new message. */ -export const CreateAgentResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 5); +export const CreateAgentResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 5); /** * @generated from message mantrae.v1.UpdateAgentRequest */ -export type UpdateAgentRequest = Message<"mantrae.v1.UpdateAgentRequest"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type UpdateAgentRequest = Message<'mantrae.v1.UpdateAgentRequest'> & { + /** + * @generated from field: string id = 1; + */ + id: string; - /** - * @generated from field: optional string ip = 2; - */ - ip?: string; + /** + * @generated from field: optional string ip = 2; + */ + ip?: string; - /** - * @generated from field: optional bool rotate_token = 3; - */ - rotateToken?: boolean; + /** + * @generated from field: optional bool rotate_token = 3; + */ + rotateToken?: boolean; }; /** * Describes the message mantrae.v1.UpdateAgentRequest. * Use `create(UpdateAgentRequestSchema)` to create a new message. */ -export const UpdateAgentRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 6); +export const UpdateAgentRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 6); /** * @generated from message mantrae.v1.UpdateAgentResponse */ -export type UpdateAgentResponse = Message<"mantrae.v1.UpdateAgentResponse"> & { - /** - * @generated from field: mantrae.v1.Agent agent = 1; - */ - agent?: Agent; +export type UpdateAgentResponse = Message<'mantrae.v1.UpdateAgentResponse'> & { + /** + * @generated from field: mantrae.v1.Agent agent = 1; + */ + agent?: Agent; }; /** * Describes the message mantrae.v1.UpdateAgentResponse. * Use `create(UpdateAgentResponseSchema)` to create a new message. */ -export const UpdateAgentResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 7); +export const UpdateAgentResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 7); /** * @generated from message mantrae.v1.DeleteAgentRequest */ -export type DeleteAgentRequest = Message<"mantrae.v1.DeleteAgentRequest"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type DeleteAgentRequest = Message<'mantrae.v1.DeleteAgentRequest'> & { + /** + * @generated from field: string id = 1; + */ + id: string; }; /** * Describes the message mantrae.v1.DeleteAgentRequest. * Use `create(DeleteAgentRequestSchema)` to create a new message. */ -export const DeleteAgentRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 8); +export const DeleteAgentRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 8); /** * @generated from message mantrae.v1.DeleteAgentResponse */ -export type DeleteAgentResponse = Message<"mantrae.v1.DeleteAgentResponse"> & { -}; +export type DeleteAgentResponse = Message<'mantrae.v1.DeleteAgentResponse'> & {}; /** * Describes the message mantrae.v1.DeleteAgentResponse. * Use `create(DeleteAgentResponseSchema)` to create a new message. */ -export const DeleteAgentResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 9); +export const DeleteAgentResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 9); /** * @generated from message mantrae.v1.ListAgentsRequest */ -export type ListAgentsRequest = Message<"mantrae.v1.ListAgentsRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListAgentsRequest = Message<'mantrae.v1.ListAgentsRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional int64 limit = 2; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 2; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 3; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 3; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListAgentsRequest. * Use `create(ListAgentsRequestSchema)` to create a new message. */ -export const ListAgentsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 10); +export const ListAgentsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 10); /** * @generated from message mantrae.v1.ListAgentsResponse */ -export type ListAgentsResponse = Message<"mantrae.v1.ListAgentsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Agent agents = 1; - */ - agents: Agent[]; +export type ListAgentsResponse = Message<'mantrae.v1.ListAgentsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Agent agents = 1; + */ + agents: Agent[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListAgentsResponse. * Use `create(ListAgentsResponseSchema)` to create a new message. */ -export const ListAgentsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 11); +export const ListAgentsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 11); /** * @generated from message mantrae.v1.HealthCheckRequest */ -export type HealthCheckRequest = Message<"mantrae.v1.HealthCheckRequest"> & { - /** - * @generated from field: string hostname = 3; - */ - hostname: string; +export type HealthCheckRequest = Message<'mantrae.v1.HealthCheckRequest'> & { + /** + * @generated from field: string hostname = 3; + */ + hostname: string; - /** - * @generated from field: string public_ip = 4; - */ - publicIp: string; + /** + * @generated from field: string public_ip = 4; + */ + publicIp: string; - /** - * @generated from field: string private_ip = 5; - */ - privateIp: string; + /** + * @generated from field: string private_ip = 5; + */ + privateIp: string; }; /** * Describes the message mantrae.v1.HealthCheckRequest. * Use `create(HealthCheckRequestSchema)` to create a new message. */ -export const HealthCheckRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 12); +export const HealthCheckRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 12); /** * @generated from message mantrae.v1.HealthCheckResponse */ -export type HealthCheckResponse = Message<"mantrae.v1.HealthCheckResponse"> & { - /** - * @generated from field: mantrae.v1.Agent agent = 1; - */ - agent?: Agent; +export type HealthCheckResponse = Message<'mantrae.v1.HealthCheckResponse'> & { + /** + * @generated from field: mantrae.v1.Agent agent = 1; + */ + agent?: Agent; }; /** * Describes the message mantrae.v1.HealthCheckResponse. * Use `create(HealthCheckResponseSchema)` to create a new message. */ -export const HealthCheckResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_agent, 13); +export const HealthCheckResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_agent, 13); /** * @generated from service mantrae.v1.AgentService */ export const AgentService: GenService<{ - /** - * @generated from rpc mantrae.v1.AgentService.GetAgent - */ - getAgent: { - methodKind: "unary"; - input: typeof GetAgentRequestSchema; - output: typeof GetAgentResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.AgentService.CreateAgent - */ - createAgent: { - methodKind: "unary"; - input: typeof CreateAgentRequestSchema; - output: typeof CreateAgentResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.AgentService.UpdateAgent - */ - updateAgent: { - methodKind: "unary"; - input: typeof UpdateAgentRequestSchema; - output: typeof UpdateAgentResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.AgentService.DeleteAgent - */ - deleteAgent: { - methodKind: "unary"; - input: typeof DeleteAgentRequestSchema; - output: typeof DeleteAgentResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.AgentService.ListAgents - */ - listAgents: { - methodKind: "unary"; - input: typeof ListAgentsRequestSchema; - output: typeof ListAgentsResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.AgentService.HealthCheck - */ - healthCheck: { - methodKind: "unary"; - input: typeof HealthCheckRequestSchema; - output: typeof HealthCheckResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_agent, 0); - + /** + * @generated from rpc mantrae.v1.AgentService.GetAgent + */ + getAgent: { + methodKind: 'unary'; + input: typeof GetAgentRequestSchema; + output: typeof GetAgentResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.AgentService.CreateAgent + */ + createAgent: { + methodKind: 'unary'; + input: typeof CreateAgentRequestSchema; + output: typeof CreateAgentResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.AgentService.UpdateAgent + */ + updateAgent: { + methodKind: 'unary'; + input: typeof UpdateAgentRequestSchema; + output: typeof UpdateAgentResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.AgentService.DeleteAgent + */ + deleteAgent: { + methodKind: 'unary'; + input: typeof DeleteAgentRequestSchema; + output: typeof DeleteAgentResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.AgentService.ListAgents + */ + listAgents: { + methodKind: 'unary'; + input: typeof ListAgentsRequestSchema; + output: typeof ListAgentsResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.AgentService.HealthCheck + */ + healthCheck: { + methodKind: 'unary'; + input: typeof HealthCheckRequestSchema; + output: typeof HealthCheckResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_agent, 0); diff --git a/web/src/lib/gen/mantrae/v1/auditlog_pb.ts b/web/src/lib/gen/mantrae/v1/auditlog_pb.ts index 56d13b3..d941304 100644 --- a/web/src/lib/gen/mantrae/v1/auditlog_pb.ts +++ b/web/src/lib/gen/mantrae/v1/auditlog_pb.ts @@ -2,137 +2,142 @@ // @generated from file mantrae/v1/auditlog.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/auditlog.proto. */ -export const file_mantrae_v1_auditlog: GenFile = /*@__PURE__*/ - fileDesc("ChltYW50cmFlL3YxL2F1ZGl0bG9nLnByb3RvEgptYW50cmFlLnYxItoBCghBdWRpdExvZxIKCgJpZBgBIAEoAxISCgpwcm9maWxlX2lkGAIgASgDEhQKDHByb2ZpbGVfbmFtZRgDIAEoCRIPCgd1c2VyX2lkGAQgASgJEhEKCXVzZXJfbmFtZRgFIAEoCRIQCghhZ2VudF9pZBgGIAEoCRISCgphZ2VudF9uYW1lGAcgASgJEg0KBWV2ZW50GAggASgJEg8KB2RldGFpbHMYCSABKAkSLgoKY3JlYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAitQEKFExpc3RBdWRpdExvZ3NSZXF1ZXN0EmoKBWxpbWl0GAEgASgDQla6SFO6AVAKC2xpbWl0LnZhbGlkEilsaW1pdCBtdXN0IGJlIGVpdGhlciAtMSBvciBncmVhdGVyIHRoYW4gMBoWdGhpcyA9PSAtMSB8fCB0aGlzID4gMEgAiAEBEhwKBm9mZnNldBgCIAEoA0IHukgEIgIoAEgBiAEBQggKBl9saW1pdEIJCgdfb2Zmc2V0IlYKFUxpc3RBdWRpdExvZ3NSZXNwb25zZRIoCgphdWRpdF9sb2dzGAEgAygLMhQubWFudHJhZS52MS5BdWRpdExvZxITCgt0b3RhbF9jb3VudBgCIAEoAzJsCg9BdWRpdExvZ1NlcnZpY2USWQoNTGlzdEF1ZGl0TG9ncxIgLm1hbnRyYWUudjEuTGlzdEF1ZGl0TG9nc1JlcXVlc3QaIS5tYW50cmFlLnYxLkxpc3RBdWRpdExvZ3NSZXNwb25zZSIDkAIBQqcBCg5jb20ubWFudHJhZS52MUINQXVkaXRsb2dQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_auditlog: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChltYW50cmFlL3YxL2F1ZGl0bG9nLnByb3RvEgptYW50cmFlLnYxItoBCghBdWRpdExvZxIKCgJpZBgBIAEoAxISCgpwcm9maWxlX2lkGAIgASgDEhQKDHByb2ZpbGVfbmFtZRgDIAEoCRIPCgd1c2VyX2lkGAQgASgJEhEKCXVzZXJfbmFtZRgFIAEoCRIQCghhZ2VudF9pZBgGIAEoCRISCgphZ2VudF9uYW1lGAcgASgJEg0KBWV2ZW50GAggASgJEg8KB2RldGFpbHMYCSABKAkSLgoKY3JlYXRlZF9hdBgKIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAitQEKFExpc3RBdWRpdExvZ3NSZXF1ZXN0EmoKBWxpbWl0GAEgASgDQla6SFO6AVAKC2xpbWl0LnZhbGlkEilsaW1pdCBtdXN0IGJlIGVpdGhlciAtMSBvciBncmVhdGVyIHRoYW4gMBoWdGhpcyA9PSAtMSB8fCB0aGlzID4gMEgAiAEBEhwKBm9mZnNldBgCIAEoA0IHukgEIgIoAEgBiAEBQggKBl9saW1pdEIJCgdfb2Zmc2V0IlYKFUxpc3RBdWRpdExvZ3NSZXNwb25zZRIoCgphdWRpdF9sb2dzGAEgAygLMhQubWFudHJhZS52MS5BdWRpdExvZxITCgt0b3RhbF9jb3VudBgCIAEoAzJsCg9BdWRpdExvZ1NlcnZpY2USWQoNTGlzdEF1ZGl0TG9ncxIgLm1hbnRyYWUudjEuTGlzdEF1ZGl0TG9nc1JlcXVlc3QaIS5tYW50cmFlLnYxLkxpc3RBdWRpdExvZ3NSZXNwb25zZSIDkAIBQqcBCg5jb20ubWFudHJhZS52MUINQXVkaXRsb2dQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.AuditLog */ -export type AuditLog = Message<"mantrae.v1.AuditLog"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type AuditLog = Message<'mantrae.v1.AuditLog'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string profile_name = 3; - */ - profileName: string; + /** + * @generated from field: string profile_name = 3; + */ + profileName: string; - /** - * @generated from field: string user_id = 4; - */ - userId: string; + /** + * @generated from field: string user_id = 4; + */ + userId: string; - /** - * @generated from field: string user_name = 5; - */ - userName: string; + /** + * @generated from field: string user_name = 5; + */ + userName: string; - /** - * @generated from field: string agent_id = 6; - */ - agentId: string; + /** + * @generated from field: string agent_id = 6; + */ + agentId: string; - /** - * @generated from field: string agent_name = 7; - */ - agentName: string; + /** + * @generated from field: string agent_name = 7; + */ + agentName: string; - /** - * @generated from field: string event = 8; - */ - event: string; + /** + * @generated from field: string event = 8; + */ + event: string; - /** - * @generated from field: string details = 9; - */ - details: string; + /** + * @generated from field: string details = 9; + */ + details: string; - /** - * @generated from field: google.protobuf.Timestamp created_at = 10; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 10; + */ + createdAt?: Timestamp; }; /** * Describes the message mantrae.v1.AuditLog. * Use `create(AuditLogSchema)` to create a new message. */ -export const AuditLogSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_auditlog, 0); +export const AuditLogSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_auditlog, 0); /** * @generated from message mantrae.v1.ListAuditLogsRequest */ -export type ListAuditLogsRequest = Message<"mantrae.v1.ListAuditLogsRequest"> & { - /** - * @generated from field: optional int64 limit = 1; - */ - limit?: bigint; +export type ListAuditLogsRequest = Message<'mantrae.v1.ListAuditLogsRequest'> & { + /** + * @generated from field: optional int64 limit = 1; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 2; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 2; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListAuditLogsRequest. * Use `create(ListAuditLogsRequestSchema)` to create a new message. */ -export const ListAuditLogsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_auditlog, 1); +export const ListAuditLogsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_auditlog, 1); /** * @generated from message mantrae.v1.ListAuditLogsResponse */ -export type ListAuditLogsResponse = Message<"mantrae.v1.ListAuditLogsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.AuditLog audit_logs = 1; - */ - auditLogs: AuditLog[]; +export type ListAuditLogsResponse = Message<'mantrae.v1.ListAuditLogsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.AuditLog audit_logs = 1; + */ + auditLogs: AuditLog[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListAuditLogsResponse. * Use `create(ListAuditLogsResponseSchema)` to create a new message. */ -export const ListAuditLogsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_auditlog, 2); +export const ListAuditLogsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_auditlog, 2); /** * @generated from service mantrae.v1.AuditLogService */ export const AuditLogService: GenService<{ - /** - * @generated from rpc mantrae.v1.AuditLogService.ListAuditLogs - */ - listAuditLogs: { - methodKind: "unary"; - input: typeof ListAuditLogsRequestSchema; - output: typeof ListAuditLogsResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_auditlog, 0); - + /** + * @generated from rpc mantrae.v1.AuditLogService.ListAuditLogs + */ + listAuditLogs: { + methodKind: 'unary'; + input: typeof ListAuditLogsRequestSchema; + output: typeof ListAuditLogsResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_auditlog, 0); diff --git a/web/src/lib/gen/mantrae/v1/backup_pb.ts b/web/src/lib/gen/mantrae/v1/backup_pb.ts index 13374e3..41e011e 100644 --- a/web/src/lib/gen/mantrae/v1/backup_pb.ts +++ b/web/src/lib/gen/mantrae/v1/backup_pb.ts @@ -2,243 +2,251 @@ // @generated from file mantrae/v1/backup.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/backup.proto. */ -export const file_mantrae_v1_backup: GenFile = /*@__PURE__*/ - fileDesc("ChdtYW50cmFlL3YxL2JhY2t1cC5wcm90bxIKbWFudHJhZS52MSJUCgZCYWNrdXASDAoEbmFtZRgB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dubG9hZEJhY2t1cFJlcXVlc3QaIi5tYW50cmFlLnYxLkRvd25sb2FkQmFja3VwUmVzcG9uc2UwAUKlAQoOY29tLm1hbnRyYWUudjFCC0JhY2t1cFByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_backup: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChdtYW50cmFlL3YxL2JhY2t1cC5wcm90bxIKbWFudHJhZS52MSJUCgZCYWNrdXASDAoEbmFtZRgBIAEoCRIMCgRzaXplGAIgASgDEi4KCmNyZWF0ZWRfYXQYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIhUKE0NyZWF0ZUJhY2t1cFJlcXVlc3QiFgoUQ3JlYXRlQmFja3VwUmVzcG9uc2UiLQoUUmVzdG9yZUJhY2t1cFJlcXVlc3QSFQoEbmFtZRgBIAEoCUIHukgEcgIQASIXChVSZXN0b3JlQmFja3VwUmVzcG9uc2UiFAoSTGlzdEJhY2t1cHNSZXF1ZXN0IjoKE0xpc3RCYWNrdXBzUmVzcG9uc2USIwoHYmFja3VwcxgBIAMoCzISLm1hbnRyYWUudjEuQmFja3VwIiwKE0RlbGV0ZUJhY2t1cFJlcXVlc3QSFQoEbmFtZRgBIAEoCUIHukgEcgIQASIWChREZWxldGVCYWNrdXBSZXNwb25zZSIlChVEb3dubG9hZEJhY2t1cFJlcXVlc3QSDAoEbmFtZRgBIAEoCSImChZEb3dubG9hZEJhY2t1cFJlc3BvbnNlEgwKBGRhdGEYASABKAwyuwMKDUJhY2t1cFNlcnZpY2USUQoMQ3JlYXRlQmFja3VwEh8ubWFudHJhZS52MS5DcmVhdGVCYWNrdXBSZXF1ZXN0GiAubWFudHJhZS52MS5DcmVhdGVCYWNrdXBSZXNwb25zZRJUCg1SZXN0b3JlQmFja3VwEiAubWFudHJhZS52MS5SZXN0b3JlQmFja3VwUmVxdWVzdBohLm1hbnRyYWUudjEuUmVzdG9yZUJhY2t1cFJlc3BvbnNlElMKC0xpc3RCYWNrdXBzEh4ubWFudHJhZS52MS5MaXN0QmFja3Vwc1JlcXVlc3QaHy5tYW50cmFlLnYxLkxpc3RCYWNrdXBzUmVzcG9uc2UiA5ACARJRCgxEZWxldGVCYWNrdXASHy5tYW50cmFlLnYxLkRlbGV0ZUJhY2t1cFJlcXVlc3QaIC5tYW50cmFlLnYxLkRlbGV0ZUJhY2t1cFJlc3BvbnNlElkKDkRvd25sb2FkQmFja3VwEiEubWFudHJhZS52MS5Eb3dubG9hZEJhY2t1cFJlcXVlc3QaIi5tYW50cmFlLnYxLkRvd25sb2FkQmFja3VwUmVzcG9uc2UwAUKlAQoOY29tLm1hbnRyYWUudjFCC0JhY2t1cFByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.Backup */ -export type Backup = Message<"mantrae.v1.Backup"> & { - /** - * @generated from field: string name = 1; - */ - name: string; +export type Backup = Message<'mantrae.v1.Backup'> & { + /** + * @generated from field: string name = 1; + */ + name: string; - /** - * @generated from field: int64 size = 2; - */ - size: bigint; + /** + * @generated from field: int64 size = 2; + */ + size: bigint; - /** - * @generated from field: google.protobuf.Timestamp created_at = 3; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 3; + */ + createdAt?: Timestamp; }; /** * Describes the message mantrae.v1.Backup. * Use `create(BackupSchema)` to create a new message. */ -export const BackupSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 0); +export const BackupSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 0); /** * @generated from message mantrae.v1.CreateBackupRequest */ -export type CreateBackupRequest = Message<"mantrae.v1.CreateBackupRequest"> & { -}; +export type CreateBackupRequest = Message<'mantrae.v1.CreateBackupRequest'> & {}; /** * Describes the message mantrae.v1.CreateBackupRequest. * Use `create(CreateBackupRequestSchema)` to create a new message. */ -export const CreateBackupRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 1); +export const CreateBackupRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 1); /** * @generated from message mantrae.v1.CreateBackupResponse */ -export type CreateBackupResponse = Message<"mantrae.v1.CreateBackupResponse"> & { -}; +export type CreateBackupResponse = Message<'mantrae.v1.CreateBackupResponse'> & {}; /** * Describes the message mantrae.v1.CreateBackupResponse. * Use `create(CreateBackupResponseSchema)` to create a new message. */ -export const CreateBackupResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 2); +export const CreateBackupResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 2); /** * @generated from message mantrae.v1.RestoreBackupRequest */ -export type RestoreBackupRequest = Message<"mantrae.v1.RestoreBackupRequest"> & { - /** - * @generated from field: string name = 1; - */ - name: string; +export type RestoreBackupRequest = Message<'mantrae.v1.RestoreBackupRequest'> & { + /** + * @generated from field: string name = 1; + */ + name: string; }; /** * Describes the message mantrae.v1.RestoreBackupRequest. * Use `create(RestoreBackupRequestSchema)` to create a new message. */ -export const RestoreBackupRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 3); +export const RestoreBackupRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 3); /** * @generated from message mantrae.v1.RestoreBackupResponse */ -export type RestoreBackupResponse = Message<"mantrae.v1.RestoreBackupResponse"> & { -}; +export type RestoreBackupResponse = Message<'mantrae.v1.RestoreBackupResponse'> & {}; /** * Describes the message mantrae.v1.RestoreBackupResponse. * Use `create(RestoreBackupResponseSchema)` to create a new message. */ -export const RestoreBackupResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 4); +export const RestoreBackupResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 4); /** * @generated from message mantrae.v1.ListBackupsRequest */ -export type ListBackupsRequest = Message<"mantrae.v1.ListBackupsRequest"> & { -}; +export type ListBackupsRequest = Message<'mantrae.v1.ListBackupsRequest'> & {}; /** * Describes the message mantrae.v1.ListBackupsRequest. * Use `create(ListBackupsRequestSchema)` to create a new message. */ -export const ListBackupsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 5); +export const ListBackupsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 5); /** * @generated from message mantrae.v1.ListBackupsResponse */ -export type ListBackupsResponse = Message<"mantrae.v1.ListBackupsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Backup backups = 1; - */ - backups: Backup[]; +export type ListBackupsResponse = Message<'mantrae.v1.ListBackupsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Backup backups = 1; + */ + backups: Backup[]; }; /** * Describes the message mantrae.v1.ListBackupsResponse. * Use `create(ListBackupsResponseSchema)` to create a new message. */ -export const ListBackupsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 6); +export const ListBackupsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 6); /** * @generated from message mantrae.v1.DeleteBackupRequest */ -export type DeleteBackupRequest = Message<"mantrae.v1.DeleteBackupRequest"> & { - /** - * @generated from field: string name = 1; - */ - name: string; +export type DeleteBackupRequest = Message<'mantrae.v1.DeleteBackupRequest'> & { + /** + * @generated from field: string name = 1; + */ + name: string; }; /** * Describes the message mantrae.v1.DeleteBackupRequest. * Use `create(DeleteBackupRequestSchema)` to create a new message. */ -export const DeleteBackupRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 7); +export const DeleteBackupRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 7); /** * @generated from message mantrae.v1.DeleteBackupResponse */ -export type DeleteBackupResponse = Message<"mantrae.v1.DeleteBackupResponse"> & { -}; +export type DeleteBackupResponse = Message<'mantrae.v1.DeleteBackupResponse'> & {}; /** * Describes the message mantrae.v1.DeleteBackupResponse. * Use `create(DeleteBackupResponseSchema)` to create a new message. */ -export const DeleteBackupResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 8); +export const DeleteBackupResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 8); /** * @generated from message mantrae.v1.DownloadBackupRequest */ -export type DownloadBackupRequest = Message<"mantrae.v1.DownloadBackupRequest"> & { - /** - * @generated from field: string name = 1; - */ - name: string; +export type DownloadBackupRequest = Message<'mantrae.v1.DownloadBackupRequest'> & { + /** + * @generated from field: string name = 1; + */ + name: string; }; /** * Describes the message mantrae.v1.DownloadBackupRequest. * Use `create(DownloadBackupRequestSchema)` to create a new message. */ -export const DownloadBackupRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 9); +export const DownloadBackupRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 9); /** * @generated from message mantrae.v1.DownloadBackupResponse */ -export type DownloadBackupResponse = Message<"mantrae.v1.DownloadBackupResponse"> & { - /** - * @generated from field: bytes data = 1; - */ - data: Uint8Array; +export type DownloadBackupResponse = Message<'mantrae.v1.DownloadBackupResponse'> & { + /** + * @generated from field: bytes data = 1; + */ + data: Uint8Array; }; /** * Describes the message mantrae.v1.DownloadBackupResponse. * Use `create(DownloadBackupResponseSchema)` to create a new message. */ -export const DownloadBackupResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_backup, 10); +export const DownloadBackupResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_backup, 10); /** * @generated from service mantrae.v1.BackupService */ export const BackupService: GenService<{ - /** - * @generated from rpc mantrae.v1.BackupService.CreateBackup - */ - createBackup: { - methodKind: "unary"; - input: typeof CreateBackupRequestSchema; - output: typeof CreateBackupResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.BackupService.RestoreBackup - */ - restoreBackup: { - methodKind: "unary"; - input: typeof RestoreBackupRequestSchema; - output: typeof RestoreBackupResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.BackupService.ListBackups - */ - listBackups: { - methodKind: "unary"; - input: typeof ListBackupsRequestSchema; - output: typeof ListBackupsResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.BackupService.DeleteBackup - */ - deleteBackup: { - methodKind: "unary"; - input: typeof DeleteBackupRequestSchema; - output: typeof DeleteBackupResponseSchema; - }, - /** - * See: https://github.com/connectrpc/connect-es/issues/669 - * rpc UploadBackup(stream UploadBackupRequest) returns (UploadBackupResponse); // stream doesn't work with connect-es - * - * @generated from rpc mantrae.v1.BackupService.DownloadBackup - */ - downloadBackup: { - methodKind: "server_streaming"; - input: typeof DownloadBackupRequestSchema; - output: typeof DownloadBackupResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_backup, 0); - + /** + * @generated from rpc mantrae.v1.BackupService.CreateBackup + */ + createBackup: { + methodKind: 'unary'; + input: typeof CreateBackupRequestSchema; + output: typeof CreateBackupResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.BackupService.RestoreBackup + */ + restoreBackup: { + methodKind: 'unary'; + input: typeof RestoreBackupRequestSchema; + output: typeof RestoreBackupResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.BackupService.ListBackups + */ + listBackups: { + methodKind: 'unary'; + input: typeof ListBackupsRequestSchema; + output: typeof ListBackupsResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.BackupService.DeleteBackup + */ + deleteBackup: { + methodKind: 'unary'; + input: typeof DeleteBackupRequestSchema; + output: typeof DeleteBackupResponseSchema; + }; + /** + * See: https://github.com/connectrpc/connect-es/issues/669 + * rpc UploadBackup(stream UploadBackupRequest) returns (UploadBackupResponse); // stream doesn't work with connect-es + * + * @generated from rpc mantrae.v1.BackupService.DownloadBackup + */ + downloadBackup: { + methodKind: 'server_streaming'; + input: typeof DownloadBackupRequestSchema; + output: typeof DownloadBackupResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_backup, 0); diff --git a/web/src/lib/gen/mantrae/v1/dns_provider_pb.ts b/web/src/lib/gen/mantrae/v1/dns_provider_pb.ts index c87eda9..e7e12c9 100644 --- a/web/src/lib/gen/mantrae/v1/dns_provider_pb.ts +++ b/web/src/lib/gen/mantrae/v1/dns_provider_pb.ts @@ -2,394 +2,408 @@ // @generated from file mantrae/v1/dns_provider.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/dns_provider.proto. */ -export const file_mantrae_v1_dns_provider: GenFile = /*@__PURE__*/ - fileDesc("Ch1tYW50cmFlL3YxL2Ruc19wcm92aWRlci5wcm90bxIKbWFudHJhZS52MSL1AQoLRG5zUHJvdmlkZXISCgoCaWQYASABKAMSDAoEbmFtZRgCIAEoCRIpCgR0eXBlGAMgASgOMhsubWFudHJhZS52MS5EbnNQcm92aWRlclR5cGUSLQoGY29uZmlnGAQgASgLMh0ubWFudHJhZS52MS5EbnNQcm92aWRlckNvbmZpZxISCgppc19kZWZhdWx0GAUgASgIEi4KCmNyZWF0ZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wInoKEURuc1Byb3ZpZGVyQ29uZmlnEg8KB2FwaV9rZXkYASABKAkSDwoHYXBpX3VybBgCIAEoCRIKCgJpcBgDIAEoCRIPCgdwcm94aWVkGAQgASgIEhMKC2F1dG9fdXBkYXRlGAUgASgIEhEKCXpvbmVfdHlwZRgGIAEoCSIvChVHZXREbnNQcm92aWRlclJlcXVlc3QSFgoCaWQYASABKANCCrpIB8gBASICIAAiRwoWR2V0RG5zUHJvdmlkZXJSZXNwb25zZRItCgxkbnNfcHJvdmlkZXIYASABKAsyFy5tYW50cmFlLnYxLkRuc1Byb3ZpZGVyIq8BChhDcmVhdGVEbnNQcm92aWRlclJlcXVlc3QSGAoEbmFtZRgBIAEoCUIKukgHyAEBcgIQARI2CgR0eXBlGAIgASgOMhsubWFudHJhZS52MS5EbnNQcm92aWRlclR5cGVCC7pICMgBAYIBAhABEi0KBmNvbmZpZxgDIAEoCzIdLm1hbnRyYWUudjEuRG5zUHJvdmlkZXJDb25maWcSEgoKaXNfZGVmYXVsdBgEIAEoCCJKChlDcmVhdGVEbnNQcm92aWRlclJlc3BvbnNlEi0KDGRuc19wcm92aWRlchgBIAEoCzIXLm1hbnRyY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b3ZpZGVyU2VydmljZRJcCg5HZXREbnNQcm92aWRlchIhLm1hbnRyYWUudjEuR2V0RG5zUHJvdmlkZXJSZXF1ZXN0GiIubWFudHJhZS52MS5HZXREbnNQcm92aWRlclJlc3BvbnNlIgOQAgESYAoRQ3JlYXRlRG5zUHJvdmlkZXISJC5tYW50cmFlLnYxLkNyZWF0ZURuc1Byb3ZpZGVyUmVxdWVzdBolLm1hbnRyYWUudjEuQ3JlYXRlRG5zUHJvdmlkZXJSZXNwb25zZRJgChFVcGRhdGVEbnNQcm92aWRlchIkLm1hbnRyYWUudjEuVXBkYXRlRG5zUHJvdmlkZXJSZXF1ZXN0GiUubWFudHJhZS52MS5VcGRhdGVEbnNQcm92aWRlclJlc3BvbnNlEmAKEURlbGV0ZURuc1Byb3ZpZGVyEiQubWFudHJhZS52MS5EZWxldGVEbnNQcm92aWRlclJlcXVlc3QaJS5tYW50cmFlLnYxLkRlbGV0ZURuc1Byb3ZpZGVyUmVzcG9uc2USYgoQTGlzdERuc1Byb3ZpZGVycxIjLm1hbnRyYWUudjEuTGlzdERuc1Byb3ZpZGVyc1JlcXVlc3QaJC5tYW50cmFlLnYxLkxpc3REbnNQcm92aWRlcnNSZXNwb25zZSIDkAIBQqoBCg5jb20ubWFudHJhZS52MUIQRG5zUHJvdmlkZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_dns_provider: GenFile = + /*@__PURE__*/ + fileDesc( + 'Ch1tYW50cmFlL3YxL2Ruc19wcm92aWRlci5wcm90bxIKbWFudHJhZS52MSL1AQoLRG5zUHJvdmlkZXISCgoCaWQYASABKAMSDAoE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ZXISJC5tYW50cmFlLnYxLkNyZWF0ZURuc1Byb3ZpZGVyUmVxdWVzdBolLm1hbnRyYWUudjEuQ3JlYXRlRG5zUHJvdmlkZXJSZXNwb25zZRJgChFVcGRhdGVEbnNQcm92aWRlchIkLm1hbnRyYWUudjEuVXBkYXRlRG5zUHJvdmlkZXJSZXF1ZXN0GiUubWFudHJhZS52MS5VcGRhdGVEbnNQcm92aWRlclJlc3BvbnNlEmAKEURlbGV0ZURuc1Byb3ZpZGVyEiQubWFudHJhZS52MS5EZWxldGVEbnNQcm92aWRlclJlcXVlc3QaJS5tYW50cmFlLnYxLkRlbGV0ZURuc1Byb3ZpZGVyUmVzcG9uc2USYgoQTGlzdERuc1Byb3ZpZGVycxIjLm1hbnRyYWUudjEuTGlzdERuc1Byb3ZpZGVyc1JlcXVlc3QaJC5tYW50cmFlLnYxLkxpc3REbnNQcm92aWRlcnNSZXNwb25zZSIDkAIBQqoBCg5jb20ubWFudHJhZS52MUIQRG5zUHJvdmlkZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.DnsProvider */ -export type DnsProvider = Message<"mantrae.v1.DnsProvider"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DnsProvider = Message<'mantrae.v1.DnsProvider'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: mantrae.v1.DnsProviderType type = 3; - */ - type: DnsProviderType; + /** + * @generated from field: mantrae.v1.DnsProviderType type = 3; + */ + type: DnsProviderType; - /** - * @generated from field: mantrae.v1.DnsProviderConfig config = 4; - */ - config?: DnsProviderConfig; + /** + * @generated from field: mantrae.v1.DnsProviderConfig config = 4; + */ + config?: DnsProviderConfig; - /** - * @generated from field: bool is_default = 5; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 5; + */ + isDefault: boolean; - /** - * @generated from field: google.protobuf.Timestamp created_at = 6; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 6; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 7; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 7; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.DnsProvider. * Use `create(DnsProviderSchema)` to create a new message. */ -export const DnsProviderSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 0); +export const DnsProviderSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 0); /** * @generated from message mantrae.v1.DnsProviderConfig */ -export type DnsProviderConfig = Message<"mantrae.v1.DnsProviderConfig"> & { - /** - * @generated from field: string api_key = 1; - */ - apiKey: string; +export type DnsProviderConfig = Message<'mantrae.v1.DnsProviderConfig'> & { + /** + * @generated from field: string api_key = 1; + */ + apiKey: string; - /** - * @generated from field: string api_url = 2; - */ - apiUrl: string; + /** + * @generated from field: string api_url = 2; + */ + apiUrl: string; - /** - * @generated from field: string ip = 3; - */ - ip: string; + /** + * @generated from field: string ip = 3; + */ + ip: string; - /** - * @generated from field: bool proxied = 4; - */ - proxied: boolean; + /** + * @generated from field: bool proxied = 4; + */ + proxied: boolean; - /** - * @generated from field: bool auto_update = 5; - */ - autoUpdate: boolean; + /** + * @generated from field: bool auto_update = 5; + */ + autoUpdate: boolean; - /** - * @generated from field: string zone_type = 6; - */ - zoneType: string; + /** + * @generated from field: string zone_type = 6; + */ + zoneType: string; }; /** * Describes the message mantrae.v1.DnsProviderConfig. * Use `create(DnsProviderConfigSchema)` to create a new message. */ -export const DnsProviderConfigSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 1); +export const DnsProviderConfigSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 1); /** * @generated from message mantrae.v1.GetDnsProviderRequest */ -export type GetDnsProviderRequest = Message<"mantrae.v1.GetDnsProviderRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetDnsProviderRequest = Message<'mantrae.v1.GetDnsProviderRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.GetDnsProviderRequest. * Use `create(GetDnsProviderRequestSchema)` to create a new message. */ -export const GetDnsProviderRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 2); +export const GetDnsProviderRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 2); /** * @generated from message mantrae.v1.GetDnsProviderResponse */ -export type GetDnsProviderResponse = Message<"mantrae.v1.GetDnsProviderResponse"> & { - /** - * @generated from field: mantrae.v1.DnsProvider dns_provider = 1; - */ - dnsProvider?: DnsProvider; +export type GetDnsProviderResponse = Message<'mantrae.v1.GetDnsProviderResponse'> & { + /** + * @generated from field: mantrae.v1.DnsProvider dns_provider = 1; + */ + dnsProvider?: DnsProvider; }; /** * Describes the message mantrae.v1.GetDnsProviderResponse. * Use `create(GetDnsProviderResponseSchema)` to create a new message. */ -export const GetDnsProviderResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 3); +export const GetDnsProviderResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 3); /** * @generated from message mantrae.v1.CreateDnsProviderRequest */ -export type CreateDnsProviderRequest = Message<"mantrae.v1.CreateDnsProviderRequest"> & { - /** - * @generated from field: string name = 1; - */ - name: string; +export type CreateDnsProviderRequest = Message<'mantrae.v1.CreateDnsProviderRequest'> & { + /** + * @generated from field: string name = 1; + */ + name: string; - /** - * @generated from field: mantrae.v1.DnsProviderType type = 2; - */ - type: DnsProviderType; + /** + * @generated from field: mantrae.v1.DnsProviderType type = 2; + */ + type: DnsProviderType; - /** - * @generated from field: mantrae.v1.DnsProviderConfig config = 3; - */ - config?: DnsProviderConfig; + /** + * @generated from field: mantrae.v1.DnsProviderConfig config = 3; + */ + config?: DnsProviderConfig; - /** - * @generated from field: bool is_default = 4; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 4; + */ + isDefault: boolean; }; /** * Describes the message mantrae.v1.CreateDnsProviderRequest. * Use `create(CreateDnsProviderRequestSchema)` to create a new message. */ -export const CreateDnsProviderRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 4); +export const CreateDnsProviderRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 4); /** * @generated from message mantrae.v1.CreateDnsProviderResponse */ -export type CreateDnsProviderResponse = Message<"mantrae.v1.CreateDnsProviderResponse"> & { - /** - * @generated from field: mantrae.v1.DnsProvider dns_provider = 1; - */ - dnsProvider?: DnsProvider; +export type CreateDnsProviderResponse = Message<'mantrae.v1.CreateDnsProviderResponse'> & { + /** + * @generated from field: mantrae.v1.DnsProvider dns_provider = 1; + */ + dnsProvider?: DnsProvider; }; /** * Describes the message mantrae.v1.CreateDnsProviderResponse. * Use `create(CreateDnsProviderResponseSchema)` to create a new message. */ -export const CreateDnsProviderResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 5); +export const CreateDnsProviderResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 5); /** * @generated from message mantrae.v1.UpdateDnsProviderRequest */ -export type UpdateDnsProviderRequest = Message<"mantrae.v1.UpdateDnsProviderRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateDnsProviderRequest = Message<'mantrae.v1.UpdateDnsProviderRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: mantrae.v1.DnsProviderType type = 3; - */ - type: DnsProviderType; + /** + * @generated from field: mantrae.v1.DnsProviderType type = 3; + */ + type: DnsProviderType; - /** - * @generated from field: mantrae.v1.DnsProviderConfig config = 4; - */ - config?: DnsProviderConfig; + /** + * @generated from field: mantrae.v1.DnsProviderConfig config = 4; + */ + config?: DnsProviderConfig; - /** - * @generated from field: bool is_default = 5; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 5; + */ + isDefault: boolean; }; /** * Describes the message mantrae.v1.UpdateDnsProviderRequest. * Use `create(UpdateDnsProviderRequestSchema)` to create a new message. */ -export const UpdateDnsProviderRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 6); +export const UpdateDnsProviderRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 6); /** * @generated from message mantrae.v1.UpdateDnsProviderResponse */ -export type UpdateDnsProviderResponse = Message<"mantrae.v1.UpdateDnsProviderResponse"> & { - /** - * @generated from field: mantrae.v1.DnsProvider dns_provider = 1; - */ - dnsProvider?: DnsProvider; +export type UpdateDnsProviderResponse = Message<'mantrae.v1.UpdateDnsProviderResponse'> & { + /** + * @generated from field: mantrae.v1.DnsProvider dns_provider = 1; + */ + dnsProvider?: DnsProvider; }; /** * Describes the message mantrae.v1.UpdateDnsProviderResponse. * Use `create(UpdateDnsProviderResponseSchema)` to create a new message. */ -export const UpdateDnsProviderResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 7); +export const UpdateDnsProviderResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 7); /** * @generated from message mantrae.v1.DeleteDnsProviderRequest */ -export type DeleteDnsProviderRequest = Message<"mantrae.v1.DeleteDnsProviderRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteDnsProviderRequest = Message<'mantrae.v1.DeleteDnsProviderRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.DeleteDnsProviderRequest. * Use `create(DeleteDnsProviderRequestSchema)` to create a new message. */ -export const DeleteDnsProviderRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 8); +export const DeleteDnsProviderRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 8); /** * @generated from message mantrae.v1.DeleteDnsProviderResponse */ -export type DeleteDnsProviderResponse = Message<"mantrae.v1.DeleteDnsProviderResponse"> & { -}; +export type DeleteDnsProviderResponse = Message<'mantrae.v1.DeleteDnsProviderResponse'> & {}; /** * Describes the message mantrae.v1.DeleteDnsProviderResponse. * Use `create(DeleteDnsProviderResponseSchema)` to create a new message. */ -export const DeleteDnsProviderResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 9); +export const DeleteDnsProviderResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 9); /** * @generated from message mantrae.v1.ListDnsProvidersRequest */ -export type ListDnsProvidersRequest = Message<"mantrae.v1.ListDnsProvidersRequest"> & { - /** - * @generated from field: optional int64 limit = 1; - */ - limit?: bigint; +export type ListDnsProvidersRequest = Message<'mantrae.v1.ListDnsProvidersRequest'> & { + /** + * @generated from field: optional int64 limit = 1; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 2; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 2; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListDnsProvidersRequest. * Use `create(ListDnsProvidersRequestSchema)` to create a new message. */ -export const ListDnsProvidersRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 10); +export const ListDnsProvidersRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 10); /** * @generated from message mantrae.v1.ListDnsProvidersResponse */ -export type ListDnsProvidersResponse = Message<"mantrae.v1.ListDnsProvidersResponse"> & { - /** - * @generated from field: repeated mantrae.v1.DnsProvider dns_providers = 1; - */ - dnsProviders: DnsProvider[]; +export type ListDnsProvidersResponse = Message<'mantrae.v1.ListDnsProvidersResponse'> & { + /** + * @generated from field: repeated mantrae.v1.DnsProvider dns_providers = 1; + */ + dnsProviders: DnsProvider[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListDnsProvidersResponse. * Use `create(ListDnsProvidersResponseSchema)` to create a new message. */ -export const ListDnsProvidersResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_dns_provider, 11); +export const ListDnsProvidersResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_dns_provider, 11); /** * @generated from enum mantrae.v1.DnsProviderType */ export enum DnsProviderType { - /** - * @generated from enum value: DNS_PROVIDER_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, + /** + * @generated from enum value: DNS_PROVIDER_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - /** - * @generated from enum value: DNS_PROVIDER_TYPE_CLOUDFLARE = 1; - */ - CLOUDFLARE = 1, + /** + * @generated from enum value: DNS_PROVIDER_TYPE_CLOUDFLARE = 1; + */ + CLOUDFLARE = 1, - /** - * @generated from enum value: DNS_PROVIDER_TYPE_POWERDNS = 2; - */ - POWERDNS = 2, + /** + * @generated from enum value: DNS_PROVIDER_TYPE_POWERDNS = 2; + */ + POWERDNS = 2, - /** - * @generated from enum value: DNS_PROVIDER_TYPE_TECHNITIUM = 3; - */ - TECHNITIUM = 3, + /** + * @generated from enum value: DNS_PROVIDER_TYPE_TECHNITIUM = 3; + */ + TECHNITIUM = 3 } /** * Describes the enum mantrae.v1.DnsProviderType. */ -export const DnsProviderTypeSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_mantrae_v1_dns_provider, 0); +export const DnsProviderTypeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_mantrae_v1_dns_provider, 0); /** * @generated from service mantrae.v1.DnsProviderService */ export const DnsProviderService: GenService<{ - /** - * @generated from rpc mantrae.v1.DnsProviderService.GetDnsProvider - */ - getDnsProvider: { - methodKind: "unary"; - input: typeof GetDnsProviderRequestSchema; - output: typeof GetDnsProviderResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.DnsProviderService.CreateDnsProvider - */ - createDnsProvider: { - methodKind: "unary"; - input: typeof CreateDnsProviderRequestSchema; - output: typeof CreateDnsProviderResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.DnsProviderService.UpdateDnsProvider - */ - updateDnsProvider: { - methodKind: "unary"; - input: typeof UpdateDnsProviderRequestSchema; - output: typeof UpdateDnsProviderResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.DnsProviderService.DeleteDnsProvider - */ - deleteDnsProvider: { - methodKind: "unary"; - input: typeof DeleteDnsProviderRequestSchema; - output: typeof DeleteDnsProviderResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.DnsProviderService.ListDnsProviders - */ - listDnsProviders: { - methodKind: "unary"; - input: typeof ListDnsProvidersRequestSchema; - output: typeof ListDnsProvidersResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_dns_provider, 0); - + /** + * @generated from rpc mantrae.v1.DnsProviderService.GetDnsProvider + */ + getDnsProvider: { + methodKind: 'unary'; + input: typeof GetDnsProviderRequestSchema; + output: typeof GetDnsProviderResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.DnsProviderService.CreateDnsProvider + */ + createDnsProvider: { + methodKind: 'unary'; + input: typeof CreateDnsProviderRequestSchema; + output: typeof CreateDnsProviderResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.DnsProviderService.UpdateDnsProvider + */ + updateDnsProvider: { + methodKind: 'unary'; + input: typeof UpdateDnsProviderRequestSchema; + output: typeof UpdateDnsProviderResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.DnsProviderService.DeleteDnsProvider + */ + deleteDnsProvider: { + methodKind: 'unary'; + input: typeof DeleteDnsProviderRequestSchema; + output: typeof DeleteDnsProviderResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.DnsProviderService.ListDnsProviders + */ + listDnsProviders: { + methodKind: 'unary'; + input: typeof ListDnsProvidersRequestSchema; + output: typeof ListDnsProvidersResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_dns_provider, 0); diff --git a/web/src/lib/gen/mantrae/v1/entry_point_pb.ts b/web/src/lib/gen/mantrae/v1/entry_point_pb.ts index bdee280..aab8c17 100644 --- a/web/src/lib/gen/mantrae/v1/entry_point_pb.ts +++ b/web/src/lib/gen/mantrae/v1/entry_point_pb.ts @@ -2,321 +2,333 @@ // @generated from file mantrae/v1/entry_point.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/entry_point.proto. */ -export const file_mantrae_v1_entry_point: GenFile = /*@__PURE__*/ - fileDesc("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zUmVzcG9uc2UiA5ACAUKpAQoOY29tLm1hbnRyYWUudjFCD0VudHJ5UG9pbnRQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_entry_point: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChxtYW50cmFlL3YxL2VudHJ5X3BvaW50LnByb3RvEgptYW50cmFlLnYxIr8BCgpFbnRyeVBvaW50EgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSDAoEbmFtZRgDIAEoCRIPCgdhZGRyZXNzGAQgASgJEhIKCmlzX2RlZmF1bHQYBSABKAgSLgoKY3JlYXRlZF9hdBgGIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgHIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiKwoUR2V0RW50cnlQb2ludFJlcXVlc3QSEwoCaWQYASABKANCB7pIBCICIAAiRAoVR2V0RW50cnlQb2ludFJlc3BvbnNlEisKC2VudHJ5X3BvaW50GAEgASgLMhYubWFudHJhZS52MS5FbnRyeVBvaW50IoMBChdDcmVhdGVFbnRyeVBvaW50UmVxdWVzdBIbCgpwcm9maWxlX2lkGAEgASgDQge6SAQiAiAAEhUKBG5hbWUYAiABKAlCB7pIBHICEAESEgoKaXNfZGVmYXVsdBgDIAEoCBIUCgdhZGRyZXNzGAQgASgJSACIAQFCCgoIX2FkZHJlc3MiRwoYQ3JlYXRlRW50cnlQb2ludFJlc3BvbnNlEisKC2VudHJ5X3BvaW50GAEgASgLMhYubWFudHJhZS52MS5FbnRyeVBvaW50InsKF1VwZG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Lm1hbnRyYWUudjEuVXBkYXRlRW50cnlQb2ludFJlcXVlc3QaJC5tYW50cmFlLnYxLlVwZGF0ZUVudHJ5UG9pbnRSZXNwb25zZRJdChBEZWxldGVFbnRyeVBvaW50EiMubWFudHJhZS52MS5EZWxldGVFbnRyeVBvaW50UmVxdWVzdBokLm1hbnRyYWUudjEuRGVsZXRlRW50cnlQb2ludFJlc3BvbnNlEl8KD0xpc3RFbnRyeVBvaW50cxIiLm1hbnRyYWUudjEuTGlzdEVudHJ5UG9pbnRzUmVxdWVzdBojLm1hbnRyYWUudjEuTGlzdEVudHJ5UG9pbnRzUmVzcG9uc2UiA5ACAUKpAQoOY29tLm1hbnRyYWUudjFCD0VudHJ5UG9pbnRQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.EntryPoint */ -export type EntryPoint = Message<"mantrae.v1.EntryPoint"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type EntryPoint = Message<'mantrae.v1.EntryPoint'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string name = 3; - */ - name: string; + /** + * @generated from field: string name = 3; + */ + name: string; - /** - * @generated from field: string address = 4; - */ - address: string; + /** + * @generated from field: string address = 4; + */ + address: string; - /** - * @generated from field: bool is_default = 5; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 5; + */ + isDefault: boolean; - /** - * @generated from field: google.protobuf.Timestamp created_at = 6; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 6; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 7; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 7; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.EntryPoint. * Use `create(EntryPointSchema)` to create a new message. */ -export const EntryPointSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 0); +export const EntryPointSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 0); /** * @generated from message mantrae.v1.GetEntryPointRequest */ -export type GetEntryPointRequest = Message<"mantrae.v1.GetEntryPointRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetEntryPointRequest = Message<'mantrae.v1.GetEntryPointRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.GetEntryPointRequest. * Use `create(GetEntryPointRequestSchema)` to create a new message. */ -export const GetEntryPointRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 1); +export const GetEntryPointRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 1); /** * @generated from message mantrae.v1.GetEntryPointResponse */ -export type GetEntryPointResponse = Message<"mantrae.v1.GetEntryPointResponse"> & { - /** - * @generated from field: mantrae.v1.EntryPoint entry_point = 1; - */ - entryPoint?: EntryPoint; +export type GetEntryPointResponse = Message<'mantrae.v1.GetEntryPointResponse'> & { + /** + * @generated from field: mantrae.v1.EntryPoint entry_point = 1; + */ + entryPoint?: EntryPoint; }; /** * Describes the message mantrae.v1.GetEntryPointResponse. * Use `create(GetEntryPointResponseSchema)` to create a new message. */ -export const GetEntryPointResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 2); +export const GetEntryPointResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 2); /** * @generated from message mantrae.v1.CreateEntryPointRequest */ -export type CreateEntryPointRequest = Message<"mantrae.v1.CreateEntryPointRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type CreateEntryPointRequest = Message<'mantrae.v1.CreateEntryPointRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: bool is_default = 3; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 3; + */ + isDefault: boolean; - /** - * @generated from field: optional string address = 4; - */ - address?: string; + /** + * @generated from field: optional string address = 4; + */ + address?: string; }; /** * Describes the message mantrae.v1.CreateEntryPointRequest. * Use `create(CreateEntryPointRequestSchema)` to create a new message. */ -export const CreateEntryPointRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 3); +export const CreateEntryPointRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 3); /** * @generated from message mantrae.v1.CreateEntryPointResponse */ -export type CreateEntryPointResponse = Message<"mantrae.v1.CreateEntryPointResponse"> & { - /** - * @generated from field: mantrae.v1.EntryPoint entry_point = 1; - */ - entryPoint?: EntryPoint; +export type CreateEntryPointResponse = Message<'mantrae.v1.CreateEntryPointResponse'> & { + /** + * @generated from field: mantrae.v1.EntryPoint entry_point = 1; + */ + entryPoint?: EntryPoint; }; /** * Describes the message mantrae.v1.CreateEntryPointResponse. * Use `create(CreateEntryPointResponseSchema)` to create a new message. */ -export const CreateEntryPointResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 4); +export const CreateEntryPointResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 4); /** * @generated from message mantrae.v1.UpdateEntryPointRequest */ -export type UpdateEntryPointRequest = Message<"mantrae.v1.UpdateEntryPointRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateEntryPointRequest = Message<'mantrae.v1.UpdateEntryPointRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: bool is_default = 3; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 3; + */ + isDefault: boolean; - /** - * @generated from field: optional string address = 4; - */ - address?: string; + /** + * @generated from field: optional string address = 4; + */ + address?: string; }; /** * Describes the message mantrae.v1.UpdateEntryPointRequest. * Use `create(UpdateEntryPointRequestSchema)` to create a new message. */ -export const UpdateEntryPointRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 5); +export const UpdateEntryPointRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 5); /** * @generated from message mantrae.v1.UpdateEntryPointResponse */ -export type UpdateEntryPointResponse = Message<"mantrae.v1.UpdateEntryPointResponse"> & { - /** - * @generated from field: mantrae.v1.EntryPoint entry_point = 1; - */ - entryPoint?: EntryPoint; +export type UpdateEntryPointResponse = Message<'mantrae.v1.UpdateEntryPointResponse'> & { + /** + * @generated from field: mantrae.v1.EntryPoint entry_point = 1; + */ + entryPoint?: EntryPoint; }; /** * Describes the message mantrae.v1.UpdateEntryPointResponse. * Use `create(UpdateEntryPointResponseSchema)` to create a new message. */ -export const UpdateEntryPointResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 6); +export const UpdateEntryPointResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 6); /** * @generated from message mantrae.v1.DeleteEntryPointRequest */ -export type DeleteEntryPointRequest = Message<"mantrae.v1.DeleteEntryPointRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteEntryPointRequest = Message<'mantrae.v1.DeleteEntryPointRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.DeleteEntryPointRequest. * Use `create(DeleteEntryPointRequestSchema)` to create a new message. */ -export const DeleteEntryPointRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 7); +export const DeleteEntryPointRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 7); /** * @generated from message mantrae.v1.DeleteEntryPointResponse */ -export type DeleteEntryPointResponse = Message<"mantrae.v1.DeleteEntryPointResponse"> & { -}; +export type DeleteEntryPointResponse = Message<'mantrae.v1.DeleteEntryPointResponse'> & {}; /** * Describes the message mantrae.v1.DeleteEntryPointResponse. * Use `create(DeleteEntryPointResponseSchema)` to create a new message. */ -export const DeleteEntryPointResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 8); +export const DeleteEntryPointResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 8); /** * @generated from message mantrae.v1.ListEntryPointsRequest */ -export type ListEntryPointsRequest = Message<"mantrae.v1.ListEntryPointsRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListEntryPointsRequest = Message<'mantrae.v1.ListEntryPointsRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional int64 limit = 2; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 2; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 3; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 3; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListEntryPointsRequest. * Use `create(ListEntryPointsRequestSchema)` to create a new message. */ -export const ListEntryPointsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 9); +export const ListEntryPointsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 9); /** * @generated from message mantrae.v1.ListEntryPointsResponse */ -export type ListEntryPointsResponse = Message<"mantrae.v1.ListEntryPointsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.EntryPoint entry_points = 1; - */ - entryPoints: EntryPoint[]; +export type ListEntryPointsResponse = Message<'mantrae.v1.ListEntryPointsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.EntryPoint entry_points = 1; + */ + entryPoints: EntryPoint[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListEntryPointsResponse. * Use `create(ListEntryPointsResponseSchema)` to create a new message. */ -export const ListEntryPointsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_entry_point, 10); +export const ListEntryPointsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_entry_point, 10); /** * @generated from service mantrae.v1.EntryPointService */ export const EntryPointService: GenService<{ - /** - * @generated from rpc mantrae.v1.EntryPointService.GetEntryPoint - */ - getEntryPoint: { - methodKind: "unary"; - input: typeof GetEntryPointRequestSchema; - output: typeof GetEntryPointResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.EntryPointService.CreateEntryPoint - */ - createEntryPoint: { - methodKind: "unary"; - input: typeof CreateEntryPointRequestSchema; - output: typeof CreateEntryPointResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.EntryPointService.UpdateEntryPoint - */ - updateEntryPoint: { - methodKind: "unary"; - input: typeof UpdateEntryPointRequestSchema; - output: typeof UpdateEntryPointResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.EntryPointService.DeleteEntryPoint - */ - deleteEntryPoint: { - methodKind: "unary"; - input: typeof DeleteEntryPointRequestSchema; - output: typeof DeleteEntryPointResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.EntryPointService.ListEntryPoints - */ - listEntryPoints: { - methodKind: "unary"; - input: typeof ListEntryPointsRequestSchema; - output: typeof ListEntryPointsResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_entry_point, 0); - + /** + * @generated from rpc mantrae.v1.EntryPointService.GetEntryPoint + */ + getEntryPoint: { + methodKind: 'unary'; + input: typeof GetEntryPointRequestSchema; + output: typeof GetEntryPointResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.EntryPointService.CreateEntryPoint + */ + createEntryPoint: { + methodKind: 'unary'; + input: typeof CreateEntryPointRequestSchema; + output: typeof CreateEntryPointResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.EntryPointService.UpdateEntryPoint + */ + updateEntryPoint: { + methodKind: 'unary'; + input: typeof UpdateEntryPointRequestSchema; + output: typeof UpdateEntryPointResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.EntryPointService.DeleteEntryPoint + */ + deleteEntryPoint: { + methodKind: 'unary'; + input: typeof DeleteEntryPointRequestSchema; + output: typeof DeleteEntryPointResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.EntryPointService.ListEntryPoints + */ + listEntryPoints: { + methodKind: 'unary'; + input: typeof ListEntryPointsRequestSchema; + output: typeof ListEntryPointsResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_entry_point, 0); diff --git a/web/src/lib/gen/mantrae/v1/middleware_pb.ts b/web/src/lib/gen/mantrae/v1/middleware_pb.ts index 621176b..5304e48 100644 --- a/web/src/lib/gen/mantrae/v1/middleware_pb.ts +++ b/web/src/lib/gen/mantrae/v1/middleware_pb.ts @@ -2,530 +2,553 @@ // @generated from file mantrae/v1/middleware.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { ProtocolType } from "./protocol_pb"; -import { file_mantrae_v1_protocol } from "./protocol_pb"; -import type { JsonObject, Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { + file_google_protobuf_struct, + file_google_protobuf_timestamp +} from '@bufbuild/protobuf/wkt'; +import type { ProtocolType } from './protocol_pb'; +import { file_mantrae_v1_protocol } from './protocol_pb'; +import type { JsonObject, Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/middleware.proto. */ -export const file_mantrae_v1_middleware: GenFile = /*@__PURE__*/ - fileDesc("ChttYW50cmFlL3YxL21pZGRsZXdhcmUucHJvdG8SCm1hbnRyYWUudjEiogIKCk1pZGRsZXdhcmUSCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEicKBmNvbmZpZxgFIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSDwoHZW5hYmxlZBgGIAEoCBISCgppc19kZWZhdWx0GAcgASgIEiYKBHR5cGUYCCABKA4yGC5tYW50cmFlLnYxLlByb3RvY29sVHlwZRIuCgpjcmVhdGVkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAogASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCKmAgoGUGx1Z2luEgoKAmlkGAEgASgJEgwKBG5hbWUYAiABKAkSFAoMZGlzcGxheV9uYW1lGAMgASgJEg4KBmF1dGhvchgEIAEoCRIMCgR0eXBlGAUgASgJEg4KBmltcG9ydBgGIAEoCRIPCgdzdW1tYXJ5GAcgASgJEhAKCGljb25fdXJsGAggASgJEhIKCmJhbm5lcl91cmwYCSABKAkSDgoGcmVhZG1lGAogASgJEhYKDmxh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52MS5HZXRNaWRkbGV3YXJlUmVzcG9uc2UiA5ACARJdChBDcmVhdGVNaWRkbGV3YXJlEiMubWFudHJhZS52MS5DcmVhdGVNaWRkbGV3YXJlUmVxdWVzdBokLm1hbnRyYWUudjEuQ3JlYXRlTWlkZGxld2FyZVJlc3BvbnNlEl0KEFVwZGF0ZU1pZGRsZXdhcmUSIy5tYW50cmFlLnYxLlVwZGF0ZU1pZGRsZXdhcmVSZXF1ZXN0GiQubWFudHJhZS52MS5VcGRhdGVNaWRkbGV3YXJlUmVzcG9uc2USXQoQRGVsZXRlTWlkZGxld2FyZRIjLm1hbnRyYWUudjEuRGVsZXRlTWlkZGxld2FyZVJlcXVlc3QaJC5tYW50cmFlLnYxLkRlbGV0ZU1pZGRsZXdhcmVSZXNwb25zZRJfCg9MaXN0TWlkZGxld2FyZXMSIi5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1JlcXVlc3QaIy5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1Jlc3BvbnNlIgOQAgESbgoUR2V0TWlkZGxld2FyZVBsdWdpbnMSJy5tYW50cmFlLnYxLkdldE1pZGRsZXdhcmVQbHVnaW5zUmVxdWVzdBooLm1hbnRyYWUudjEuR2V0TWlkZGxld2FyZVBsdWdpbnNSZXNwb25zZSIDkAIBQqkBCg5jb20ubWFudHJhZS52MUIPTWlkZGxld2FyZVByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp, file_mantrae_v1_protocol]); +export const file_mantrae_v1_middleware: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChttYW50cmFlL3YxL21pZGRsZXdhcmUucH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zZRJfCg9MaXN0TWlkZGxld2FyZXMSIi5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1JlcXVlc3QaIy5tYW50cmFlLnYxLkxpc3RNaWRkbGV3YXJlc1Jlc3BvbnNlIgOQAgESbgoUR2V0TWlkZGxld2FyZVBsdWdpbnMSJy5tYW50cmFlLnYxLkdldE1pZGRsZXdhcmVQbHVnaW5zUmVxdWVzdBooLm1hbnRyYWUudjEuR2V0TWlkZGxld2FyZVBsdWdpbnNSZXNwb25zZSIDkAIBQqkBCg5jb20ubWFudHJhZS52MUIPTWlkZGxld2FyZVByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z', + [ + file_buf_validate_validate, + file_google_protobuf_struct, + file_google_protobuf_timestamp, + file_mantrae_v1_protocol + ] + ); /** * @generated from message mantrae.v1.Middleware */ -export type Middleware = Message<"mantrae.v1.Middleware"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type Middleware = Message<'mantrae.v1.Middleware'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string agent_id = 3; - */ - agentId: string; + /** + * @generated from field: string agent_id = 3; + */ + agentId: string; - /** - * @generated from field: string name = 4; - */ - name: string; + /** + * @generated from field: string name = 4; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 5; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 5; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 6; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 6; + */ + enabled: boolean; - /** - * @generated from field: bool is_default = 7; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 7; + */ + isDefault: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 8; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 8; + */ + type: ProtocolType; - /** - * @generated from field: google.protobuf.Timestamp created_at = 9; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 9; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 10; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 10; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.Middleware. * Use `create(MiddlewareSchema)` to create a new message. */ -export const MiddlewareSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 0); +export const MiddlewareSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 0); /** * @generated from message mantrae.v1.Plugin */ -export type Plugin = Message<"mantrae.v1.Plugin"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type Plugin = Message<'mantrae.v1.Plugin'> & { + /** + * @generated from field: string id = 1; + */ + id: string; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: string display_name = 3; - */ - displayName: string; + /** + * @generated from field: string display_name = 3; + */ + displayName: string; - /** - * @generated from field: string author = 4; - */ - author: string; + /** + * @generated from field: string author = 4; + */ + author: string; - /** - * @generated from field: string type = 5; - */ - type: string; + /** + * @generated from field: string type = 5; + */ + type: string; - /** - * @generated from field: string import = 6; - */ - import: string; + /** + * @generated from field: string import = 6; + */ + import: string; - /** - * @generated from field: string summary = 7; - */ - summary: string; + /** + * @generated from field: string summary = 7; + */ + summary: string; - /** - * @generated from field: string icon_url = 8; - */ - iconUrl: string; + /** + * @generated from field: string icon_url = 8; + */ + iconUrl: string; - /** - * @generated from field: string banner_url = 9; - */ - bannerUrl: string; + /** + * @generated from field: string banner_url = 9; + */ + bannerUrl: string; - /** - * @generated from field: string readme = 10; - */ - readme: string; + /** + * @generated from field: string readme = 10; + */ + readme: string; - /** - * @generated from field: string latest_version = 11; - */ - latestVersion: string; + /** + * @generated from field: string latest_version = 11; + */ + latestVersion: string; - /** - * @generated from field: repeated string versions = 12; - */ - versions: string[]; + /** + * @generated from field: repeated string versions = 12; + */ + versions: string[]; - /** - * @generated from field: int64 stars = 13; - */ - stars: bigint; + /** + * @generated from field: int64 stars = 13; + */ + stars: bigint; - /** - * @generated from field: mantrae.v1.PluginSnippet snippet = 14; - */ - snippet?: PluginSnippet; + /** + * @generated from field: mantrae.v1.PluginSnippet snippet = 14; + */ + snippet?: PluginSnippet; - /** - * @generated from field: string created_at = 15; - */ - createdAt: string; + /** + * @generated from field: string created_at = 15; + */ + createdAt: string; }; /** * Describes the message mantrae.v1.Plugin. * Use `create(PluginSchema)` to create a new message. */ -export const PluginSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 1); +export const PluginSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 1); /** * @generated from message mantrae.v1.PluginSnippet */ -export type PluginSnippet = Message<"mantrae.v1.PluginSnippet"> & { - /** - * @generated from field: string k8s = 1; - */ - k8s: string; +export type PluginSnippet = Message<'mantrae.v1.PluginSnippet'> & { + /** + * @generated from field: string k8s = 1; + */ + k8s: string; - /** - * @generated from field: string yaml = 2; - */ - yaml: string; + /** + * @generated from field: string yaml = 2; + */ + yaml: string; - /** - * @generated from field: string toml = 3; - */ - toml: string; + /** + * @generated from field: string toml = 3; + */ + toml: string; }; /** * Describes the message mantrae.v1.PluginSnippet. * Use `create(PluginSnippetSchema)` to create a new message. */ -export const PluginSnippetSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 2); +export const PluginSnippetSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 2); /** * @generated from message mantrae.v1.GetMiddlewareRequest */ -export type GetMiddlewareRequest = Message<"mantrae.v1.GetMiddlewareRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetMiddlewareRequest = Message<'mantrae.v1.GetMiddlewareRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.GetMiddlewareRequest. * Use `create(GetMiddlewareRequestSchema)` to create a new message. */ -export const GetMiddlewareRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 3); +export const GetMiddlewareRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 3); /** * @generated from message mantrae.v1.GetMiddlewareResponse */ -export type GetMiddlewareResponse = Message<"mantrae.v1.GetMiddlewareResponse"> & { - /** - * @generated from field: mantrae.v1.Middleware middleware = 1; - */ - middleware?: Middleware; +export type GetMiddlewareResponse = Message<'mantrae.v1.GetMiddlewareResponse'> & { + /** + * @generated from field: mantrae.v1.Middleware middleware = 1; + */ + middleware?: Middleware; }; /** * Describes the message mantrae.v1.GetMiddlewareResponse. * Use `create(GetMiddlewareResponseSchema)` to create a new message. */ -export const GetMiddlewareResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 4); +export const GetMiddlewareResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 4); /** * @generated from message mantrae.v1.CreateMiddlewareRequest */ -export type CreateMiddlewareRequest = Message<"mantrae.v1.CreateMiddlewareRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type CreateMiddlewareRequest = Message<'mantrae.v1.CreateMiddlewareRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: string name = 3; - */ - name: string; + /** + * @generated from field: string name = 3; + */ + name: string; - /** - * @generated from field: mantrae.v1.ProtocolType type = 4; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 4; + */ + type: ProtocolType; - /** - * @generated from field: bool is_default = 5; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 5; + */ + isDefault: boolean; - /** - * @generated from field: google.protobuf.Struct config = 6; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 6; + */ + config?: JsonObject; }; /** * Describes the message mantrae.v1.CreateMiddlewareRequest. * Use `create(CreateMiddlewareRequestSchema)` to create a new message. */ -export const CreateMiddlewareRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 5); +export const CreateMiddlewareRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 5); /** * @generated from message mantrae.v1.CreateMiddlewareResponse */ -export type CreateMiddlewareResponse = Message<"mantrae.v1.CreateMiddlewareResponse"> & { - /** - * @generated from field: mantrae.v1.Middleware middleware = 1; - */ - middleware?: Middleware; +export type CreateMiddlewareResponse = Message<'mantrae.v1.CreateMiddlewareResponse'> & { + /** + * @generated from field: mantrae.v1.Middleware middleware = 1; + */ + middleware?: Middleware; }; /** * Describes the message mantrae.v1.CreateMiddlewareResponse. * Use `create(CreateMiddlewareResponseSchema)` to create a new message. */ -export const CreateMiddlewareResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 6); +export const CreateMiddlewareResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 6); /** * @generated from message mantrae.v1.UpdateMiddlewareRequest */ -export type UpdateMiddlewareRequest = Message<"mantrae.v1.UpdateMiddlewareRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateMiddlewareRequest = Message<'mantrae.v1.UpdateMiddlewareRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: mantrae.v1.ProtocolType type = 3; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 3; + */ + type: ProtocolType; - /** - * @generated from field: google.protobuf.Struct config = 4; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 4; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 5; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 5; + */ + enabled: boolean; - /** - * @generated from field: bool is_default = 6; - */ - isDefault: boolean; + /** + * @generated from field: bool is_default = 6; + */ + isDefault: boolean; }; /** * Describes the message mantrae.v1.UpdateMiddlewareRequest. * Use `create(UpdateMiddlewareRequestSchema)` to create a new message. */ -export const UpdateMiddlewareRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 7); +export const UpdateMiddlewareRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 7); /** * @generated from message mantrae.v1.UpdateMiddlewareResponse */ -export type UpdateMiddlewareResponse = Message<"mantrae.v1.UpdateMiddlewareResponse"> & { - /** - * @generated from field: mantrae.v1.Middleware middleware = 1; - */ - middleware?: Middleware; +export type UpdateMiddlewareResponse = Message<'mantrae.v1.UpdateMiddlewareResponse'> & { + /** + * @generated from field: mantrae.v1.Middleware middleware = 1; + */ + middleware?: Middleware; }; /** * Describes the message mantrae.v1.UpdateMiddlewareResponse. * Use `create(UpdateMiddlewareResponseSchema)` to create a new message. */ -export const UpdateMiddlewareResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 8); +export const UpdateMiddlewareResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 8); /** * @generated from message mantrae.v1.DeleteMiddlewareRequest */ -export type DeleteMiddlewareRequest = Message<"mantrae.v1.DeleteMiddlewareRequest"> & { - /** - * @generated from field: int64 id = 2; - */ - id: bigint; +export type DeleteMiddlewareRequest = Message<'mantrae.v1.DeleteMiddlewareRequest'> & { + /** + * @generated from field: int64 id = 2; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 3; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 3; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.DeleteMiddlewareRequest. * Use `create(DeleteMiddlewareRequestSchema)` to create a new message. */ -export const DeleteMiddlewareRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 9); +export const DeleteMiddlewareRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 9); /** * @generated from message mantrae.v1.DeleteMiddlewareResponse */ -export type DeleteMiddlewareResponse = Message<"mantrae.v1.DeleteMiddlewareResponse"> & { -}; +export type DeleteMiddlewareResponse = Message<'mantrae.v1.DeleteMiddlewareResponse'> & {}; /** * Describes the message mantrae.v1.DeleteMiddlewareResponse. * Use `create(DeleteMiddlewareResponseSchema)` to create a new message. */ -export const DeleteMiddlewareResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 10); +export const DeleteMiddlewareResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 10); /** * @generated from message mantrae.v1.ListMiddlewaresRequest */ -export type ListMiddlewaresRequest = Message<"mantrae.v1.ListMiddlewaresRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListMiddlewaresRequest = Message<'mantrae.v1.ListMiddlewaresRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: optional mantrae.v1.ProtocolType type = 3; - */ - type?: ProtocolType; + /** + * @generated from field: optional mantrae.v1.ProtocolType type = 3; + */ + type?: ProtocolType; - /** - * @generated from field: optional int64 limit = 4; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 4; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 5; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 5; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListMiddlewaresRequest. * Use `create(ListMiddlewaresRequestSchema)` to create a new message. */ -export const ListMiddlewaresRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 11); +export const ListMiddlewaresRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 11); /** * @generated from message mantrae.v1.ListMiddlewaresResponse */ -export type ListMiddlewaresResponse = Message<"mantrae.v1.ListMiddlewaresResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Middleware middlewares = 1; - */ - middlewares: Middleware[]; +export type ListMiddlewaresResponse = Message<'mantrae.v1.ListMiddlewaresResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Middleware middlewares = 1; + */ + middlewares: Middleware[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListMiddlewaresResponse. * Use `create(ListMiddlewaresResponseSchema)` to create a new message. */ -export const ListMiddlewaresResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 12); +export const ListMiddlewaresResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 12); /** * @generated from message mantrae.v1.GetMiddlewarePluginsRequest */ -export type GetMiddlewarePluginsRequest = Message<"mantrae.v1.GetMiddlewarePluginsRequest"> & { -}; +export type GetMiddlewarePluginsRequest = Message<'mantrae.v1.GetMiddlewarePluginsRequest'> & {}; /** * Describes the message mantrae.v1.GetMiddlewarePluginsRequest. * Use `create(GetMiddlewarePluginsRequestSchema)` to create a new message. */ -export const GetMiddlewarePluginsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 13); +export const GetMiddlewarePluginsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 13); /** * @generated from message mantrae.v1.GetMiddlewarePluginsResponse */ -export type GetMiddlewarePluginsResponse = Message<"mantrae.v1.GetMiddlewarePluginsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Plugin plugins = 1; - */ - plugins: Plugin[]; +export type GetMiddlewarePluginsResponse = Message<'mantrae.v1.GetMiddlewarePluginsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Plugin plugins = 1; + */ + plugins: Plugin[]; }; /** * Describes the message mantrae.v1.GetMiddlewarePluginsResponse. * Use `create(GetMiddlewarePluginsResponseSchema)` to create a new message. */ -export const GetMiddlewarePluginsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_middleware, 14); +export const GetMiddlewarePluginsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_middleware, 14); /** * @generated from service mantrae.v1.MiddlewareService */ export const MiddlewareService: GenService<{ - /** - * @generated from rpc mantrae.v1.MiddlewareService.GetMiddleware - */ - getMiddleware: { - methodKind: "unary"; - input: typeof GetMiddlewareRequestSchema; - output: typeof GetMiddlewareResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.MiddlewareService.CreateMiddleware - */ - createMiddleware: { - methodKind: "unary"; - input: typeof CreateMiddlewareRequestSchema; - output: typeof CreateMiddlewareResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.MiddlewareService.UpdateMiddleware - */ - updateMiddleware: { - methodKind: "unary"; - input: typeof UpdateMiddlewareRequestSchema; - output: typeof UpdateMiddlewareResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.MiddlewareService.DeleteMiddleware - */ - deleteMiddleware: { - methodKind: "unary"; - input: typeof DeleteMiddlewareRequestSchema; - output: typeof DeleteMiddlewareResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.MiddlewareService.ListMiddlewares - */ - listMiddlewares: { - methodKind: "unary"; - input: typeof ListMiddlewaresRequestSchema; - output: typeof ListMiddlewaresResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.MiddlewareService.GetMiddlewarePlugins - */ - getMiddlewarePlugins: { - methodKind: "unary"; - input: typeof GetMiddlewarePluginsRequestSchema; - output: typeof GetMiddlewarePluginsResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_middleware, 0); - + /** + * @generated from rpc mantrae.v1.MiddlewareService.GetMiddleware + */ + getMiddleware: { + methodKind: 'unary'; + input: typeof GetMiddlewareRequestSchema; + output: typeof GetMiddlewareResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.MiddlewareService.CreateMiddleware + */ + createMiddleware: { + methodKind: 'unary'; + input: typeof CreateMiddlewareRequestSchema; + output: typeof CreateMiddlewareResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.MiddlewareService.UpdateMiddleware + */ + updateMiddleware: { + methodKind: 'unary'; + input: typeof UpdateMiddlewareRequestSchema; + output: typeof UpdateMiddlewareResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.MiddlewareService.DeleteMiddleware + */ + deleteMiddleware: { + methodKind: 'unary'; + input: typeof DeleteMiddlewareRequestSchema; + output: typeof DeleteMiddlewareResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.MiddlewareService.ListMiddlewares + */ + listMiddlewares: { + methodKind: 'unary'; + input: typeof ListMiddlewaresRequestSchema; + output: typeof ListMiddlewaresResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.MiddlewareService.GetMiddlewarePlugins + */ + getMiddlewarePlugins: { + methodKind: 'unary'; + input: typeof GetMiddlewarePluginsRequestSchema; + output: typeof GetMiddlewarePluginsResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_middleware, 0); diff --git a/web/src/lib/gen/mantrae/v1/profile_pb.ts b/web/src/lib/gen/mantrae/v1/profile_pb.ts index d894d6a..a82390f 100644 --- a/web/src/lib/gen/mantrae/v1/profile_pb.ts +++ b/web/src/lib/gen/mantrae/v1/profile_pb.ts @@ -2,301 +2,313 @@ // @generated from file mantrae/v1/profile.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/profile.proto. */ -export const file_mantrae_v1_profile: GenFile = /*@__PURE__*/ - fileDesc("ChhtYW50cmFlL3YxL3Byb2ZpbGUucHJvdG8SCm1hbnRyYWUudjEipwEKB1Byb2ZpbGUSCgoCaWQYASABKAMSDAoEbmFtZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRINCgV0b2tlbhgEIAEoCRIuCgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCIoChFHZXRQcm9maWxlUmVxdWVzdBITCgJpZBgBIAEoA0IHukgEIgIgACI6ChJHZXRQcm9maWxlUmVzcG9uc2USJAoHcHJvZmlsZRgBIAEoCzITLm1hbnRyYWUudjEuUHJvZmlsZSJXChRDcmVhdGVQcm9maWxlU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WFudHJhZS52MS5DcmVhdGVQcm9maWxlUmVxdWVzdBohLm1hbnRyYWUudjEuQ3JlYXRlUHJvZmlsZVJlc3BvbnNlElQKDVVwZGF0ZVByb2ZpbGUSIC5tYW50cmFlLnYxLlVwZGF0ZVByb2ZpbGVSZXF1ZXN0GiEubWFudHJhZS52MS5VcGRhdGVQcm9maWxlUmVzcG9uc2USVAoNRGVsZXRlUHJvZmlsZRIgLm1hbnRyYWUudjEuRGVsZXRlUHJvZmlsZVJlcXVlc3QaIS5tYW50cmFlLnYxLkRlbGV0ZVByb2ZpbGVSZXNwb25zZRJWCgxMaXN0UHJvZmlsZXMSHy5tYW50cmFlLnYxLkxpc3RQcm9maWxlc1JlcXVlc3QaIC5tYW50cmFlLnYxLkxpc3RQcm9maWxlc1Jlc3BvbnNlIgOQAgFCpgEKDmNvbS5tYW50cmFlLnYxQgxQcm9maWxlUHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_profile: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChhtYW50cmFlL3YxL3Byb2ZpbGUucHJvdG8SCm1hbnRyYWUudjEipwEKB1Byb2ZpbGUSCgoCaWQYASABKAMSDAoEbmFtZRgCIAEoCRITCgtkZXNjcmlwdGlvbhgDIAEoCRINCgV0b2tlbhgEIAEoCRIuCgpjcmVhdGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCIoChFHZXRQcm9maWxlUmVxdWVzdBITCgJpZBgBIAEoA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tYW50cmFlLnYxLkdldFByb2ZpbGVSZXF1ZXN0Gh4ubWFudHJhZS52MS5HZXRQcm9maWxlUmVzcG9uc2UiA5ACARJUCg1DcmVhdGVQcm9maWxlEiAubWFudHJhZS52MS5DcmVhdGVQcm9maWxlUmVxdWVzdBohLm1hbnRyYWUudjEuQ3JlYXRlUHJvZmlsZVJlc3BvbnNlElQKDVVwZGF0ZVByb2ZpbGUSIC5tYW50cmFlLnYxLlVwZGF0ZVByb2ZpbGVSZXF1ZXN0GiEubWFudHJhZS52MS5VcGRhdGVQcm9maWxlUmVzcG9uc2USVAoNRGVsZXRlUHJvZmlsZRIgLm1hbnRyYWUudjEuRGVsZXRlUHJvZmlsZVJlcXVlc3QaIS5tYW50cmFlLnYxLkRlbGV0ZVByb2ZpbGVSZXNwb25zZRJWCgxMaXN0UHJvZmlsZXMSHy5tYW50cmFlLnYxLkxpc3RQcm9maWxlc1JlcXVlc3QaIC5tYW50cmFlLnYxLkxpc3RQcm9maWxlc1Jlc3BvbnNlIgOQAgFCpgEKDmNvbS5tYW50cmFlLnYxQgxQcm9maWxlUHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.Profile */ -export type Profile = Message<"mantrae.v1.Profile"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type Profile = Message<'mantrae.v1.Profile'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: string description = 3; - */ - description: string; + /** + * @generated from field: string description = 3; + */ + description: string; - /** - * @generated from field: string token = 4; - */ - token: string; + /** + * @generated from field: string token = 4; + */ + token: string; - /** - * @generated from field: google.protobuf.Timestamp created_at = 5; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 5; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 6; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 6; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.Profile. * Use `create(ProfileSchema)` to create a new message. */ -export const ProfileSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 0); +export const ProfileSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 0); /** * @generated from message mantrae.v1.GetProfileRequest */ -export type GetProfileRequest = Message<"mantrae.v1.GetProfileRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetProfileRequest = Message<'mantrae.v1.GetProfileRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.GetProfileRequest. * Use `create(GetProfileRequestSchema)` to create a new message. */ -export const GetProfileRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 1); +export const GetProfileRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 1); /** * @generated from message mantrae.v1.GetProfileResponse */ -export type GetProfileResponse = Message<"mantrae.v1.GetProfileResponse"> & { - /** - * @generated from field: mantrae.v1.Profile profile = 1; - */ - profile?: Profile; +export type GetProfileResponse = Message<'mantrae.v1.GetProfileResponse'> & { + /** + * @generated from field: mantrae.v1.Profile profile = 1; + */ + profile?: Profile; }; /** * Describes the message mantrae.v1.GetProfileResponse. * Use `create(GetProfileResponseSchema)` to create a new message. */ -export const GetProfileResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 2); +export const GetProfileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 2); /** * @generated from message mantrae.v1.CreateProfileRequest */ -export type CreateProfileRequest = Message<"mantrae.v1.CreateProfileRequest"> & { - /** - * @generated from field: string name = 1; - */ - name: string; +export type CreateProfileRequest = Message<'mantrae.v1.CreateProfileRequest'> & { + /** + * @generated from field: string name = 1; + */ + name: string; - /** - * @generated from field: optional string description = 2; - */ - description?: string; + /** + * @generated from field: optional string description = 2; + */ + description?: string; }; /** * Describes the message mantrae.v1.CreateProfileRequest. * Use `create(CreateProfileRequestSchema)` to create a new message. */ -export const CreateProfileRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 3); +export const CreateProfileRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 3); /** * @generated from message mantrae.v1.CreateProfileResponse */ -export type CreateProfileResponse = Message<"mantrae.v1.CreateProfileResponse"> & { - /** - * @generated from field: mantrae.v1.Profile profile = 1; - */ - profile?: Profile; +export type CreateProfileResponse = Message<'mantrae.v1.CreateProfileResponse'> & { + /** + * @generated from field: mantrae.v1.Profile profile = 1; + */ + profile?: Profile; }; /** * Describes the message mantrae.v1.CreateProfileResponse. * Use `create(CreateProfileResponseSchema)` to create a new message. */ -export const CreateProfileResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 4); +export const CreateProfileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 4); /** * @generated from message mantrae.v1.UpdateProfileRequest */ -export type UpdateProfileRequest = Message<"mantrae.v1.UpdateProfileRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateProfileRequest = Message<'mantrae.v1.UpdateProfileRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: optional string description = 3; - */ - description?: string; + /** + * @generated from field: optional string description = 3; + */ + description?: string; - /** - * @generated from field: optional bool regenerate_token = 4; - */ - regenerateToken?: boolean; + /** + * @generated from field: optional bool regenerate_token = 4; + */ + regenerateToken?: boolean; }; /** * Describes the message mantrae.v1.UpdateProfileRequest. * Use `create(UpdateProfileRequestSchema)` to create a new message. */ -export const UpdateProfileRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 5); +export const UpdateProfileRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 5); /** * @generated from message mantrae.v1.UpdateProfileResponse */ -export type UpdateProfileResponse = Message<"mantrae.v1.UpdateProfileResponse"> & { - /** - * @generated from field: mantrae.v1.Profile profile = 1; - */ - profile?: Profile; +export type UpdateProfileResponse = Message<'mantrae.v1.UpdateProfileResponse'> & { + /** + * @generated from field: mantrae.v1.Profile profile = 1; + */ + profile?: Profile; }; /** * Describes the message mantrae.v1.UpdateProfileResponse. * Use `create(UpdateProfileResponseSchema)` to create a new message. */ -export const UpdateProfileResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 6); +export const UpdateProfileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 6); /** * @generated from message mantrae.v1.DeleteProfileRequest */ -export type DeleteProfileRequest = Message<"mantrae.v1.DeleteProfileRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteProfileRequest = Message<'mantrae.v1.DeleteProfileRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.DeleteProfileRequest. * Use `create(DeleteProfileRequestSchema)` to create a new message. */ -export const DeleteProfileRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 7); +export const DeleteProfileRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 7); /** * @generated from message mantrae.v1.DeleteProfileResponse */ -export type DeleteProfileResponse = Message<"mantrae.v1.DeleteProfileResponse"> & { -}; +export type DeleteProfileResponse = Message<'mantrae.v1.DeleteProfileResponse'> & {}; /** * Describes the message mantrae.v1.DeleteProfileResponse. * Use `create(DeleteProfileResponseSchema)` to create a new message. */ -export const DeleteProfileResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 8); +export const DeleteProfileResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 8); /** * @generated from message mantrae.v1.ListProfilesRequest */ -export type ListProfilesRequest = Message<"mantrae.v1.ListProfilesRequest"> & { - /** - * @generated from field: optional int64 limit = 1; - */ - limit?: bigint; +export type ListProfilesRequest = Message<'mantrae.v1.ListProfilesRequest'> & { + /** + * @generated from field: optional int64 limit = 1; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 2; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 2; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListProfilesRequest. * Use `create(ListProfilesRequestSchema)` to create a new message. */ -export const ListProfilesRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 9); +export const ListProfilesRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 9); /** * @generated from message mantrae.v1.ListProfilesResponse */ -export type ListProfilesResponse = Message<"mantrae.v1.ListProfilesResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Profile profiles = 1; - */ - profiles: Profile[]; +export type ListProfilesResponse = Message<'mantrae.v1.ListProfilesResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Profile profiles = 1; + */ + profiles: Profile[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListProfilesResponse. * Use `create(ListProfilesResponseSchema)` to create a new message. */ -export const ListProfilesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_profile, 10); +export const ListProfilesResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_profile, 10); /** * @generated from service mantrae.v1.ProfileService */ export const ProfileService: GenService<{ - /** - * @generated from rpc mantrae.v1.ProfileService.GetProfile - */ - getProfile: { - methodKind: "unary"; - input: typeof GetProfileRequestSchema; - output: typeof GetProfileResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ProfileService.CreateProfile - */ - createProfile: { - methodKind: "unary"; - input: typeof CreateProfileRequestSchema; - output: typeof CreateProfileResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ProfileService.UpdateProfile - */ - updateProfile: { - methodKind: "unary"; - input: typeof UpdateProfileRequestSchema; - output: typeof UpdateProfileResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ProfileService.DeleteProfile - */ - deleteProfile: { - methodKind: "unary"; - input: typeof DeleteProfileRequestSchema; - output: typeof DeleteProfileResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ProfileService.ListProfiles - */ - listProfiles: { - methodKind: "unary"; - input: typeof ListProfilesRequestSchema; - output: typeof ListProfilesResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_profile, 0); - + /** + * @generated from rpc mantrae.v1.ProfileService.GetProfile + */ + getProfile: { + methodKind: 'unary'; + input: typeof GetProfileRequestSchema; + output: typeof GetProfileResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ProfileService.CreateProfile + */ + createProfile: { + methodKind: 'unary'; + input: typeof CreateProfileRequestSchema; + output: typeof CreateProfileResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ProfileService.UpdateProfile + */ + updateProfile: { + methodKind: 'unary'; + input: typeof UpdateProfileRequestSchema; + output: typeof UpdateProfileResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ProfileService.DeleteProfile + */ + deleteProfile: { + methodKind: 'unary'; + input: typeof DeleteProfileRequestSchema; + output: typeof DeleteProfileResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ProfileService.ListProfiles + */ + listProfiles: { + methodKind: 'unary'; + input: typeof ListProfilesRequestSchema; + output: typeof ListProfilesResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_profile, 0); diff --git a/web/src/lib/gen/mantrae/v1/protocol_pb.ts b/web/src/lib/gen/mantrae/v1/protocol_pb.ts index 826aba2..14e24f5 100644 --- a/web/src/lib/gen/mantrae/v1/protocol_pb.ts +++ b/web/src/lib/gen/mantrae/v1/protocol_pb.ts @@ -2,43 +2,46 @@ // @generated from file mantrae/v1/protocol.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenEnum, GenFile } from "@bufbuild/protobuf/codegenv2"; -import { enumDesc, fileDesc } from "@bufbuild/protobuf/codegenv2"; +import type { GenEnum, GenFile } from '@bufbuild/protobuf/codegenv2'; +import { enumDesc, fileDesc } from '@bufbuild/protobuf/codegenv2'; /** * Describes the file mantrae/v1/protocol.proto. */ -export const file_mantrae_v1_protocol: GenFile = /*@__PURE__*/ - fileDesc("ChltYW50cmFlL3YxL3Byb3RvY29sLnByb3RvEgptYW50cmFlLnYxKnMKDFByb3RvY29sVHlwZRIdChlQUk9UT0NPTF9UWVBFX1VOU1BFQ0lGSUVEEAASFgoSUFJPVE9DT0xfVFlQRV9IVFRQEAESFQoRUFJPVE9DT0xfVFlQRV9UQ1AQAhIVChFQUk9UT0NPTF9UWVBFX1VEUBADQqcBCg5jb20ubWFudHJhZS52MUINUHJvdG9jb2xQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw"); +export const file_mantrae_v1_protocol: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChltYW50cmFlL3YxL3Byb3RvY29sLnByb3RvEgptYW50cmFlLnYxKnMKDFByb3RvY29sVHlwZRIdChlQUk9UT0NPTF9UWVBFX1VOU1BFQ0lGSUVEEAASFgoSUFJPVE9DT0xfVFlQRV9IVFRQEAESFQoRUFJPVE9DT0xfVFlQRV9UQ1AQAhIVChFQUk9UT0NPTF9UWVBFX1VEUBADQqcBCg5jb20ubWFudHJhZS52MUINUHJvdG9jb2xQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw' + ); /** * @generated from enum mantrae.v1.ProtocolType */ export enum ProtocolType { - /** - * @generated from enum value: PROTOCOL_TYPE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, + /** + * @generated from enum value: PROTOCOL_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, - /** - * @generated from enum value: PROTOCOL_TYPE_HTTP = 1; - */ - HTTP = 1, + /** + * @generated from enum value: PROTOCOL_TYPE_HTTP = 1; + */ + HTTP = 1, - /** - * @generated from enum value: PROTOCOL_TYPE_TCP = 2; - */ - TCP = 2, + /** + * @generated from enum value: PROTOCOL_TYPE_TCP = 2; + */ + TCP = 2, - /** - * @generated from enum value: PROTOCOL_TYPE_UDP = 3; - */ - UDP = 3, + /** + * @generated from enum value: PROTOCOL_TYPE_UDP = 3; + */ + UDP = 3 } /** * Describes the enum mantrae.v1.ProtocolType. */ -export const ProtocolTypeSchema: GenEnum = /*@__PURE__*/ - enumDesc(file_mantrae_v1_protocol, 0); - +export const ProtocolTypeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_mantrae_v1_protocol, 0); diff --git a/web/src/lib/gen/mantrae/v1/router_pb.ts b/web/src/lib/gen/mantrae/v1/router_pb.ts index 034ef33..a047444 100644 --- a/web/src/lib/gen/mantrae/v1/router_pb.ts +++ b/web/src/lib/gen/mantrae/v1/router_pb.ts @@ -2,380 +2,401 @@ // @generated from file mantrae/v1/router.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { DnsProvider } from "./dns_provider_pb"; -import { file_mantrae_v1_dns_provider } from "./dns_provider_pb"; -import type { ProtocolType } from "./protocol_pb"; -import { file_mantrae_v1_protocol } from "./protocol_pb"; -import type { JsonObject, Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { + file_google_protobuf_struct, + file_google_protobuf_timestamp +} from '@bufbuild/protobuf/wkt'; +import type { DnsProvider } from './dns_provider_pb'; +import { file_mantrae_v1_dns_provider } from './dns_provider_pb'; +import type { ProtocolType } from './protocol_pb'; +import { file_mantrae_v1_protocol } from './protocol_pb'; +import type { JsonObject, Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/router.proto. */ -export const file_mantrae_v1_router: GenFile = /*@__PURE__*/ - fileDesc("ChdtYW50cmFlL3YxL3JvdXRlci5wcm90bxIKbWFudHJhZS52MSK6AgoGUm91dGVyEgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSEAoIYWdlbnRfaWQYAyABKAkSDAoEbmFtZRgEIAEoCRInCgZjb25maWcYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBiABKAgSJgoEdHlwZRgHIAEoDjIYLm1hbnRyYWUud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lUm91dGVyUmVzcG9uc2USUQoMRGVsZXRlUm91dGVyEh8ubWFudHJhZS52MS5EZWxldGVSb3V0ZXJSZXF1ZXN0GiAubWFudHJhZS52MS5EZWxldGVSb3V0ZXJSZXNwb25zZRJTCgtMaXN0Um91dGVycxIeLm1hbnRyYWUudjEuTGlzdFJvdXRlcnNSZXF1ZXN0Gh8ubWFudHJhZS52MS5MaXN0Um91dGVyc1Jlc3BvbnNlIgOQAgFCpQEKDmNvbS5tYW50cmFlLnYxQgtSb3V0ZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp, file_mantrae_v1_dns_provider, file_mantrae_v1_protocol]); +export const file_mantrae_v1_router: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChdtYW50cmFlL3YxL3JvdXRlci5wcm90bxIKbWFudHJhZS52MSK6AgoGUm91dGVyEgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSEAoIYWdlbnRfaWQYAyABKAkSDAoEbmFtZRgEIAEoCRInCgZjb25maWcYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBiABKAgSJgoEdHlwZRgHIAEoDjIYLm1hbnRyYWUudjEuUHJvdG9jb2xUeXBlEi4KDWRuc19wcm92aWRlcnMYCCADKAsyFy5tYW50cmFlLnYxLkRuc1Byb3ZpZGVyEi4KCmNyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIlkKEEdldFJvdXRlcl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jlc3BvbnNlIgOQAgFCpQEKDmNvbS5tYW50cmFlLnYxQgtSb3V0ZXJQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw', + [ + file_buf_validate_validate, + file_google_protobuf_struct, + file_google_protobuf_timestamp, + file_mantrae_v1_dns_provider, + file_mantrae_v1_protocol + ] + ); /** * @generated from message mantrae.v1.Router */ -export type Router = Message<"mantrae.v1.Router"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type Router = Message<'mantrae.v1.Router'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string agent_id = 3; - */ - agentId: string; + /** + * @generated from field: string agent_id = 3; + */ + agentId: string; - /** - * @generated from field: string name = 4; - */ - name: string; + /** + * @generated from field: string name = 4; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 5; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 5; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 6; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 6; + */ + enabled: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 7; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 7; + */ + type: ProtocolType; - /** - * @generated from field: repeated mantrae.v1.DnsProvider dns_providers = 8; - */ - dnsProviders: DnsProvider[]; + /** + * @generated from field: repeated mantrae.v1.DnsProvider dns_providers = 8; + */ + dnsProviders: DnsProvider[]; - /** - * @generated from field: google.protobuf.Timestamp created_at = 9; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 9; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 10; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 10; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.Router. * Use `create(RouterSchema)` to create a new message. */ -export const RouterSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 0); +export const RouterSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 0); /** * @generated from message mantrae.v1.GetRouterRequest */ -export type GetRouterRequest = Message<"mantrae.v1.GetRouterRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetRouterRequest = Message<'mantrae.v1.GetRouterRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.GetRouterRequest. * Use `create(GetRouterRequestSchema)` to create a new message. */ -export const GetRouterRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 1); +export const GetRouterRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 1); /** * @generated from message mantrae.v1.GetRouterResponse */ -export type GetRouterResponse = Message<"mantrae.v1.GetRouterResponse"> & { - /** - * @generated from field: mantrae.v1.Router router = 1; - */ - router?: Router; +export type GetRouterResponse = Message<'mantrae.v1.GetRouterResponse'> & { + /** + * @generated from field: mantrae.v1.Router router = 1; + */ + router?: Router; }; /** * Describes the message mantrae.v1.GetRouterResponse. * Use `create(GetRouterResponseSchema)` to create a new message. */ -export const GetRouterResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 2); +export const GetRouterResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 2); /** * @generated from message mantrae.v1.CreateRouterRequest */ -export type CreateRouterRequest = Message<"mantrae.v1.CreateRouterRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type CreateRouterRequest = Message<'mantrae.v1.CreateRouterRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: string name = 3; - */ - name: string; + /** + * @generated from field: string name = 3; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 4; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 4; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 5; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 5; + */ + enabled: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 6; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 6; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.CreateRouterRequest. * Use `create(CreateRouterRequestSchema)` to create a new message. */ -export const CreateRouterRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 3); +export const CreateRouterRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 3); /** * @generated from message mantrae.v1.CreateRouterResponse */ -export type CreateRouterResponse = Message<"mantrae.v1.CreateRouterResponse"> & { - /** - * @generated from field: mantrae.v1.Router router = 1; - */ - router?: Router; +export type CreateRouterResponse = Message<'mantrae.v1.CreateRouterResponse'> & { + /** + * @generated from field: mantrae.v1.Router router = 1; + */ + router?: Router; }; /** * Describes the message mantrae.v1.CreateRouterResponse. * Use `create(CreateRouterResponseSchema)` to create a new message. */ -export const CreateRouterResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 4); +export const CreateRouterResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 4); /** * @generated from message mantrae.v1.UpdateRouterRequest */ -export type UpdateRouterRequest = Message<"mantrae.v1.UpdateRouterRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateRouterRequest = Message<'mantrae.v1.UpdateRouterRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: mantrae.v1.ProtocolType type = 3; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 3; + */ + type: ProtocolType; - /** - * @generated from field: google.protobuf.Struct config = 4; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 4; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 5; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 5; + */ + enabled: boolean; - /** - * @generated from field: repeated mantrae.v1.DnsProvider dns_providers = 6; - */ - dnsProviders: DnsProvider[]; + /** + * @generated from field: repeated mantrae.v1.DnsProvider dns_providers = 6; + */ + dnsProviders: DnsProvider[]; }; /** * Describes the message mantrae.v1.UpdateRouterRequest. * Use `create(UpdateRouterRequestSchema)` to create a new message. */ -export const UpdateRouterRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 5); +export const UpdateRouterRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 5); /** * @generated from message mantrae.v1.UpdateRouterResponse */ -export type UpdateRouterResponse = Message<"mantrae.v1.UpdateRouterResponse"> & { - /** - * @generated from field: mantrae.v1.Router router = 1; - */ - router?: Router; +export type UpdateRouterResponse = Message<'mantrae.v1.UpdateRouterResponse'> & { + /** + * @generated from field: mantrae.v1.Router router = 1; + */ + router?: Router; }; /** * Describes the message mantrae.v1.UpdateRouterResponse. * Use `create(UpdateRouterResponseSchema)` to create a new message. */ -export const UpdateRouterResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 6); +export const UpdateRouterResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 6); /** * @generated from message mantrae.v1.DeleteRouterRequest */ -export type DeleteRouterRequest = Message<"mantrae.v1.DeleteRouterRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteRouterRequest = Message<'mantrae.v1.DeleteRouterRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.DeleteRouterRequest. * Use `create(DeleteRouterRequestSchema)` to create a new message. */ -export const DeleteRouterRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 7); +export const DeleteRouterRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 7); /** * @generated from message mantrae.v1.DeleteRouterResponse */ -export type DeleteRouterResponse = Message<"mantrae.v1.DeleteRouterResponse"> & { -}; +export type DeleteRouterResponse = Message<'mantrae.v1.DeleteRouterResponse'> & {}; /** * Describes the message mantrae.v1.DeleteRouterResponse. * Use `create(DeleteRouterResponseSchema)` to create a new message. */ -export const DeleteRouterResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 8); +export const DeleteRouterResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 8); /** * @generated from message mantrae.v1.ListRoutersRequest */ -export type ListRoutersRequest = Message<"mantrae.v1.ListRoutersRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListRoutersRequest = Message<'mantrae.v1.ListRoutersRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: optional mantrae.v1.ProtocolType type = 3; - */ - type?: ProtocolType; + /** + * @generated from field: optional mantrae.v1.ProtocolType type = 3; + */ + type?: ProtocolType; - /** - * @generated from field: optional int64 limit = 4; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 4; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 5; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 5; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListRoutersRequest. * Use `create(ListRoutersRequestSchema)` to create a new message. */ -export const ListRoutersRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 9); +export const ListRoutersRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 9); /** * @generated from message mantrae.v1.ListRoutersResponse */ -export type ListRoutersResponse = Message<"mantrae.v1.ListRoutersResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Router routers = 1; - */ - routers: Router[]; +export type ListRoutersResponse = Message<'mantrae.v1.ListRoutersResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Router routers = 1; + */ + routers: Router[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListRoutersResponse. * Use `create(ListRoutersResponseSchema)` to create a new message. */ -export const ListRoutersResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_router, 10); +export const ListRoutersResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_router, 10); /** * @generated from service mantrae.v1.RouterService */ export const RouterService: GenService<{ - /** - * @generated from rpc mantrae.v1.RouterService.GetRouter - */ - getRouter: { - methodKind: "unary"; - input: typeof GetRouterRequestSchema; - output: typeof GetRouterResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.RouterService.CreateRouter - */ - createRouter: { - methodKind: "unary"; - input: typeof CreateRouterRequestSchema; - output: typeof CreateRouterResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.RouterService.UpdateRouter - */ - updateRouter: { - methodKind: "unary"; - input: typeof UpdateRouterRequestSchema; - output: typeof UpdateRouterResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.RouterService.DeleteRouter - */ - deleteRouter: { - methodKind: "unary"; - input: typeof DeleteRouterRequestSchema; - output: typeof DeleteRouterResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.RouterService.ListRouters - */ - listRouters: { - methodKind: "unary"; - input: typeof ListRoutersRequestSchema; - output: typeof ListRoutersResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_router, 0); - + /** + * @generated from rpc mantrae.v1.RouterService.GetRouter + */ + getRouter: { + methodKind: 'unary'; + input: typeof GetRouterRequestSchema; + output: typeof GetRouterResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.RouterService.CreateRouter + */ + createRouter: { + methodKind: 'unary'; + input: typeof CreateRouterRequestSchema; + output: typeof CreateRouterResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.RouterService.UpdateRouter + */ + updateRouter: { + methodKind: 'unary'; + input: typeof UpdateRouterRequestSchema; + output: typeof UpdateRouterResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.RouterService.DeleteRouter + */ + deleteRouter: { + methodKind: 'unary'; + input: typeof DeleteRouterRequestSchema; + output: typeof DeleteRouterResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.RouterService.ListRouters + */ + listRouters: { + methodKind: 'unary'; + input: typeof ListRoutersRequestSchema; + output: typeof ListRoutersResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_router, 0); diff --git a/web/src/lib/gen/mantrae/v1/servers_transport_pb.ts b/web/src/lib/gen/mantrae/v1/servers_transport_pb.ts index 9e0882e..fb62334 100644 --- a/web/src/lib/gen/mantrae/v1/servers_transport_pb.ts +++ b/web/src/lib/gen/mantrae/v1/servers_transport_pb.ts @@ -2,368 +2,391 @@ // @generated from file mantrae/v1/servers_transport.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { ProtocolType } from "./protocol_pb"; -import { file_mantrae_v1_protocol } from "./protocol_pb"; -import type { JsonObject, Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { + file_google_protobuf_struct, + file_google_protobuf_timestamp +} from '@bufbuild/protobuf/wkt'; +import type { ProtocolType } from './protocol_pb'; +import { file_mantrae_v1_protocol } from './protocol_pb'; +import type { JsonObject, Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/servers_transport.proto. */ -export const file_mantrae_v1_servers_transport: GenFile = /*@__PURE__*/ - fileDesc("CiJtYW50cmFlL3YxL3NlcnZlcnNfdHJhbnNwb3J0LnByb3RvEgptYW50cmFlLnYxIpQCChBTZXJ2ZXJzVHJhbnNwb3J0EgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSEAoIYWdlbnRfaWQYAyABKAkSDAoEbmFtZRgEIAEoCRInCgZjb25maWcYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBiABKAgSJgoEdHlwZRgHIAEoDjIYLm1hbnRyYWUudjEuUHJvdG9jb2xUeXBlEi4KCmNyZWF0ZWRfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wImMKGkd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USbwoWVXBkYXRlU2VydmVyc1RyYW5zcG9ydBIpLm1hbnRyYWUudjEuVXBkYXRlU2VydmVyc1RyYW5zcG9ydFJlcXVlc3QaKi5tYW50cmFlLnYxLlVwZGF0ZVNlcnZlcnNUcmFuc3BvcnRSZXNwb25zZRJvChZEZWxldGVTZXJ2ZXJzVHJhbnNwb3J0EikubWFudHJhZS52MS5EZWxldGVTZXJ2ZXJzVHJhbnNwb3J0UmVxdWVzdBoqLm1hbnRyYWUudjEuRGVsZXRlU2VydmVyc1RyYW5zcG9ydFJlc3BvbnNlEnEKFUxpc3RTZXJ2ZXJzVHJhbnNwb3J0cxIoLm1hbnRyYWUudjEuTGlzdFNlcnZlcnNUcmFuc3BvcnRzUmVxdWVzdBopLm1hbnRyYWUudjEuTGlzdFNlcnZlcnNUcmFuc3BvcnRzUmVzcG9uc2UiA5ACAUKvAQoOY29tLm1hbnRyYWUudjFCFVNlcnZlcnNUcmFuc3BvcnRQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp, file_mantrae_v1_protocol]); +export const file_mantrae_v1_servers_transport: GenFile = + /*@__PURE__*/ + fileDesc( + 'CiJtYW50cmFlL3YxL3NlcnZlcnNfdHJhbnNwb3J0LnByb3RvEgptYW50cmFlLnYxIpQCChBTZXJ2ZXJzVHJhbnNwb3J0EgoKAmlkGAEgASgDEhIKCnByb2ZpbGVfaWQYAiABKAMSEAoIYWdlbnRfaWQYAyABKAkSDAoEbmFtZRgEIAEoCRInCgZjb25maWcYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Eg8KB2VuYWJsZWQYBiABKAgSJgoEdH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BvcnRSZXNwb25zZSIDkAIBEm8KFkNyZWF0ZVNlcnZlcnNUcmFuc3BvcnQSKS5tYW50cmFlLnYxLkNyZWF0ZVNlcnZlcnNUcmFuc3BvcnRSZXF1ZXN0GioubWFudHJhZS52MS5DcmVhdGVTZXJ2ZXJzVHJhbnNwb3J0UmVzcG9uc2USbwoWVXBkYXRlU2VydmVyc1RyYW5zcG9ydBIpLm1hbnRyYWUudjEuVXBkYXRlU2VydmVyc1RyYW5zcG9ydFJlcXVlc3QaKi5tYW50cmFlLnYxLlVwZGF0ZVNlcnZlcnNUcmFuc3BvcnRSZXNwb25zZRJvChZEZWxldGVTZXJ2ZXJzVHJhbnNwb3J0EikubWFudHJhZS52MS5EZWxldGVTZXJ2ZXJzVHJhbnNwb3J0UmVxdWVzdBoqLm1hbnRyYWUudjEuRGVsZXRlU2VydmVyc1RyYW5zcG9ydFJlc3BvbnNlEnEKFUxpc3RTZXJ2ZXJzVHJhbnNwb3J0cxIoLm1hbnRyYWUudjEuTGlzdFNlcnZlcnNUcmFuc3BvcnRzUmVxdWVzdBopLm1hbnRyYWUudjEuTGlzdFNlcnZlcnNUcmFuc3BvcnRzUmVzcG9uc2UiA5ACAUKvAQoOY29tLm1hbnRyYWUudjFCFVNlcnZlcnNUcmFuc3BvcnRQcm90b1ABWj1naXRodWIuY29tL21penVjaGlsYWJzL21hbnRyYWUvcHJvdG8vZ2VuL21hbnRyYWUvdjE7bWFudHJhZXYxogIDTVhYqgIKTWFudHJhZS5WMcoCCk1hbnRyYWVcVjHiAhZNYW50cmFlXFYxXEdQQk1ldGFkYXRh6gILTWFudHJhZTo6VjFiBnByb3RvMw', + [ + file_buf_validate_validate, + file_google_protobuf_struct, + file_google_protobuf_timestamp, + file_mantrae_v1_protocol + ] + ); /** * @generated from message mantrae.v1.ServersTransport */ -export type ServersTransport = Message<"mantrae.v1.ServersTransport"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type ServersTransport = Message<'mantrae.v1.ServersTransport'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string agent_id = 3; - */ - agentId: string; + /** + * @generated from field: string agent_id = 3; + */ + agentId: string; - /** - * @generated from field: string name = 4; - */ - name: string; + /** + * @generated from field: string name = 4; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 5; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 5; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 6; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 6; + */ + enabled: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 7; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 7; + */ + type: ProtocolType; - /** - * @generated from field: google.protobuf.Timestamp created_at = 8; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 8; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 9; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 9; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.ServersTransport. * Use `create(ServersTransportSchema)` to create a new message. */ -export const ServersTransportSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 0); +export const ServersTransportSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 0); /** * @generated from message mantrae.v1.GetServersTransportRequest */ -export type GetServersTransportRequest = Message<"mantrae.v1.GetServersTransportRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetServersTransportRequest = Message<'mantrae.v1.GetServersTransportRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.GetServersTransportRequest. * Use `create(GetServersTransportRequestSchema)` to create a new message. */ -export const GetServersTransportRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 1); +export const GetServersTransportRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 1); /** * @generated from message mantrae.v1.GetServersTransportResponse */ -export type GetServersTransportResponse = Message<"mantrae.v1.GetServersTransportResponse"> & { - /** - * @generated from field: mantrae.v1.ServersTransport servers_transport = 1; - */ - serversTransport?: ServersTransport; +export type GetServersTransportResponse = Message<'mantrae.v1.GetServersTransportResponse'> & { + /** + * @generated from field: mantrae.v1.ServersTransport servers_transport = 1; + */ + serversTransport?: ServersTransport; }; /** * Describes the message mantrae.v1.GetServersTransportResponse. * Use `create(GetServersTransportResponseSchema)` to create a new message. */ -export const GetServersTransportResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 2); +export const GetServersTransportResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 2); /** * @generated from message mantrae.v1.CreateServersTransportRequest */ -export type CreateServersTransportRequest = Message<"mantrae.v1.CreateServersTransportRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type CreateServersTransportRequest = Message<'mantrae.v1.CreateServersTransportRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: string name = 3; - */ - name: string; + /** + * @generated from field: string name = 3; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 4; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 4; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 5; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 5; + */ + enabled: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 6; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 6; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.CreateServersTransportRequest. * Use `create(CreateServersTransportRequestSchema)` to create a new message. */ -export const CreateServersTransportRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 3); +export const CreateServersTransportRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 3); /** * @generated from message mantrae.v1.CreateServersTransportResponse */ -export type CreateServersTransportResponse = Message<"mantrae.v1.CreateServersTransportResponse"> & { - /** - * @generated from field: mantrae.v1.ServersTransport servers_transport = 1; - */ - serversTransport?: ServersTransport; -}; +export type CreateServersTransportResponse = + Message<'mantrae.v1.CreateServersTransportResponse'> & { + /** + * @generated from field: mantrae.v1.ServersTransport servers_transport = 1; + */ + serversTransport?: ServersTransport; + }; /** * Describes the message mantrae.v1.CreateServersTransportResponse. * Use `create(CreateServersTransportResponseSchema)` to create a new message. */ -export const CreateServersTransportResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 4); +export const CreateServersTransportResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 4); /** * @generated from message mantrae.v1.UpdateServersTransportRequest */ -export type UpdateServersTransportRequest = Message<"mantrae.v1.UpdateServersTransportRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateServersTransportRequest = Message<'mantrae.v1.UpdateServersTransportRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 3; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 3; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 4; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 4; + */ + enabled: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 5; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 5; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.UpdateServersTransportRequest. * Use `create(UpdateServersTransportRequestSchema)` to create a new message. */ -export const UpdateServersTransportRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 5); +export const UpdateServersTransportRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 5); /** * @generated from message mantrae.v1.UpdateServersTransportResponse */ -export type UpdateServersTransportResponse = Message<"mantrae.v1.UpdateServersTransportResponse"> & { - /** - * @generated from field: mantrae.v1.ServersTransport servers_transport = 1; - */ - serversTransport?: ServersTransport; -}; +export type UpdateServersTransportResponse = + Message<'mantrae.v1.UpdateServersTransportResponse'> & { + /** + * @generated from field: mantrae.v1.ServersTransport servers_transport = 1; + */ + serversTransport?: ServersTransport; + }; /** * Describes the message mantrae.v1.UpdateServersTransportResponse. * Use `create(UpdateServersTransportResponseSchema)` to create a new message. */ -export const UpdateServersTransportResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 6); +export const UpdateServersTransportResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 6); /** * @generated from message mantrae.v1.DeleteServersTransportRequest */ -export type DeleteServersTransportRequest = Message<"mantrae.v1.DeleteServersTransportRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteServersTransportRequest = Message<'mantrae.v1.DeleteServersTransportRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.DeleteServersTransportRequest. * Use `create(DeleteServersTransportRequestSchema)` to create a new message. */ -export const DeleteServersTransportRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 7); +export const DeleteServersTransportRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 7); /** * @generated from message mantrae.v1.DeleteServersTransportResponse */ -export type DeleteServersTransportResponse = Message<"mantrae.v1.DeleteServersTransportResponse"> & { -}; +export type DeleteServersTransportResponse = + Message<'mantrae.v1.DeleteServersTransportResponse'> & {}; /** * Describes the message mantrae.v1.DeleteServersTransportResponse. * Use `create(DeleteServersTransportResponseSchema)` to create a new message. */ -export const DeleteServersTransportResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 8); +export const DeleteServersTransportResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 8); /** * @generated from message mantrae.v1.ListServersTransportsRequest */ -export type ListServersTransportsRequest = Message<"mantrae.v1.ListServersTransportsRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListServersTransportsRequest = Message<'mantrae.v1.ListServersTransportsRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: optional mantrae.v1.ProtocolType type = 3; - */ - type?: ProtocolType; + /** + * @generated from field: optional mantrae.v1.ProtocolType type = 3; + */ + type?: ProtocolType; - /** - * @generated from field: optional int64 limit = 4; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 4; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 5; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 5; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListServersTransportsRequest. * Use `create(ListServersTransportsRequestSchema)` to create a new message. */ -export const ListServersTransportsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 9); +export const ListServersTransportsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 9); /** * @generated from message mantrae.v1.ListServersTransportsResponse */ -export type ListServersTransportsResponse = Message<"mantrae.v1.ListServersTransportsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.ServersTransport servers_transports = 1; - */ - serversTransports: ServersTransport[]; +export type ListServersTransportsResponse = Message<'mantrae.v1.ListServersTransportsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.ServersTransport servers_transports = 1; + */ + serversTransports: ServersTransport[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListServersTransportsResponse. * Use `create(ListServersTransportsResponseSchema)` to create a new message. */ -export const ListServersTransportsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_servers_transport, 10); +export const ListServersTransportsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_servers_transport, 10); /** * @generated from service mantrae.v1.ServersTransportService */ export const ServersTransportService: GenService<{ - /** - * @generated from rpc mantrae.v1.ServersTransportService.GetServersTransport - */ - getServersTransport: { - methodKind: "unary"; - input: typeof GetServersTransportRequestSchema; - output: typeof GetServersTransportResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServersTransportService.CreateServersTransport - */ - createServersTransport: { - methodKind: "unary"; - input: typeof CreateServersTransportRequestSchema; - output: typeof CreateServersTransportResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServersTransportService.UpdateServersTransport - */ - updateServersTransport: { - methodKind: "unary"; - input: typeof UpdateServersTransportRequestSchema; - output: typeof UpdateServersTransportResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServersTransportService.DeleteServersTransport - */ - deleteServersTransport: { - methodKind: "unary"; - input: typeof DeleteServersTransportRequestSchema; - output: typeof DeleteServersTransportResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServersTransportService.ListServersTransports - */ - listServersTransports: { - methodKind: "unary"; - input: typeof ListServersTransportsRequestSchema; - output: typeof ListServersTransportsResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_servers_transport, 0); - + /** + * @generated from rpc mantrae.v1.ServersTransportService.GetServersTransport + */ + getServersTransport: { + methodKind: 'unary'; + input: typeof GetServersTransportRequestSchema; + output: typeof GetServersTransportResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServersTransportService.CreateServersTransport + */ + createServersTransport: { + methodKind: 'unary'; + input: typeof CreateServersTransportRequestSchema; + output: typeof CreateServersTransportResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServersTransportService.UpdateServersTransport + */ + updateServersTransport: { + methodKind: 'unary'; + input: typeof UpdateServersTransportRequestSchema; + output: typeof UpdateServersTransportResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServersTransportService.DeleteServersTransport + */ + deleteServersTransport: { + methodKind: 'unary'; + input: typeof DeleteServersTransportRequestSchema; + output: typeof DeleteServersTransportResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServersTransportService.ListServersTransports + */ + listServersTransports: { + methodKind: 'unary'; + input: typeof ListServersTransportsRequestSchema; + output: typeof ListServersTransportsResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_servers_transport, 0); diff --git a/web/src/lib/gen/mantrae/v1/service_pb.ts b/web/src/lib/gen/mantrae/v1/service_pb.ts index 8d150cc..c8c892a 100644 --- a/web/src/lib/gen/mantrae/v1/service_pb.ts +++ b/web/src/lib/gen/mantrae/v1/service_pb.ts @@ -2,385 +2,408 @@ // @generated from file mantrae/v1/service.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { ProtocolType } from "./protocol_pb"; -import { file_mantrae_v1_protocol } from "./protocol_pb"; -import type { JsonObject, Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { + file_google_protobuf_struct, + file_google_protobuf_timestamp +} from '@bufbuild/protobuf/wkt'; +import type { ProtocolType } from './protocol_pb'; +import { file_mantrae_v1_protocol } from './protocol_pb'; +import type { JsonObject, Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/service.proto. */ -export const file_mantrae_v1_service: GenFile = /*@__PURE__*/ - fileDesc("ChhtYW50cmFlL3YxL3NlcnZpY2UucHJvdG8SCm1hbnRyYWUudjEiiwIKB1NlcnZpY2USCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEg8KB2VuYWJsZWQYBSABKAgSJwoGY29uZmlnGAYgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBImCgR0eXBlGAcgASgOMhgubWFudHJhZS52MS5Qcm90b2NvbFR5cGUSLgoKY3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAipwEKEUdldFNlcnZpY2VSZXF1ZXN0EhsKCnByb2ZpbGVfaWQYASABKANCB7pIBCICIAASMAoEdHlwZRgCIAEoDjIYLm1hbnRyYWUudjEuUHJvdG9jb2xUeXBlQgi6SAWCAQIQARIVCgJpZBgDIAEoA0IHukgEIgI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UHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp, file_mantrae_v1_protocol]); +export const file_mantrae_v1_service: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChhtYW50cmFlL3YxL3NlcnZpY2UucHJvdG8SCm1hbnRyYWUudjEiiwIKB1NlcnZpY2USCgoCaWQYASABKAMSEgoKcHJvZmlsZV9pZBgCIAEoAxIQCghhZ2VudF9pZBgDIAEoCRIMCgRuYW1lGAQgASgJEg8KB2VuYWJsZWQYBSABKAgSJwoGY29uZmlnGAYgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBImCgR0eXBlGAcgASgOMhgubWFudHJhZS52MS5Qcm90b2NvbFR5cGUSLgoKY3JlYXRlZF9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgJIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAipwEKEUdldFNlcnZpY2VSZXF1ZXN0EhsKCnByb2ZpbGVfaWQYASABKANCB7pIBCICIAASMAoEdHlwZRgCIAEoDjIYLm1hbnRyYWUudjEuUHJvdG9jb2xUeXBlQgi6SAWCAQIQARIVCgJpZBgDIAEoA0IHukgEIgIgAEgAEhcKBG5hbWUYBCABKAlCB7pIBHICEAFIAEITCgppZGVudGlmaWVyEgW6SAIIASI6ChJHZXRTZXJ2aWNlUmVzcG9uc2USJAoHc2VydmljZRgBIAEoCzITLm1hbnRyYWUudjEuU2VydmljZSLaAQoUQ3JlYXRlU2VydmljZVJlcXVlc3QSGwoKcHJvZmlsZV9pZBgBIAEoA0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file_buf_validate_validate, + file_google_protobuf_struct, + file_google_protobuf_timestamp, + file_mantrae_v1_protocol + ] + ); /** * @generated from message mantrae.v1.Service */ -export type Service = Message<"mantrae.v1.Service"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type Service = Message<'mantrae.v1.Service'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: int64 profile_id = 2; - */ - profileId: bigint; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string agent_id = 3; - */ - agentId: string; + /** + * @generated from field: string agent_id = 3; + */ + agentId: string; - /** - * @generated from field: string name = 4; - */ - name: string; + /** + * @generated from field: string name = 4; + */ + name: string; - /** - * @generated from field: bool enabled = 5; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 5; + */ + enabled: boolean; - /** - * @generated from field: google.protobuf.Struct config = 6; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 6; + */ + config?: JsonObject; - /** - * @generated from field: mantrae.v1.ProtocolType type = 7; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 7; + */ + type: ProtocolType; - /** - * @generated from field: google.protobuf.Timestamp created_at = 8; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 8; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 9; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 9; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.Service. * Use `create(ServiceSchema)` to create a new message. */ -export const ServiceSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 0); +export const ServiceSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 0); /** * @generated from message mantrae.v1.GetServiceRequest */ -export type GetServiceRequest = Message<"mantrae.v1.GetServiceRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type GetServiceRequest = Message<'mantrae.v1.GetServiceRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; - /** - * @generated from oneof mantrae.v1.GetServiceRequest.identifier - */ - identifier: { - /** - * @generated from field: int64 id = 3; - */ - value: bigint; - case: "id"; - } | { - /** - * @generated from field: string name = 4; - */ - value: string; - case: "name"; - } | { case: undefined; value?: undefined }; + /** + * @generated from oneof mantrae.v1.GetServiceRequest.identifier + */ + identifier: + | { + /** + * @generated from field: int64 id = 3; + */ + value: bigint; + case: 'id'; + } + | { + /** + * @generated from field: string name = 4; + */ + value: string; + case: 'name'; + } + | { case: undefined; value?: undefined }; }; /** * Describes the message mantrae.v1.GetServiceRequest. * Use `create(GetServiceRequestSchema)` to create a new message. */ -export const GetServiceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 1); +export const GetServiceRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 1); /** * @generated from message mantrae.v1.GetServiceResponse */ -export type GetServiceResponse = Message<"mantrae.v1.GetServiceResponse"> & { - /** - * @generated from field: mantrae.v1.Service service = 1; - */ - service?: Service; +export type GetServiceResponse = Message<'mantrae.v1.GetServiceResponse'> & { + /** + * @generated from field: mantrae.v1.Service service = 1; + */ + service?: Service; }; /** * Describes the message mantrae.v1.GetServiceResponse. * Use `create(GetServiceResponseSchema)` to create a new message. */ -export const GetServiceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 2); +export const GetServiceResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 2); /** * @generated from message mantrae.v1.CreateServiceRequest */ -export type CreateServiceRequest = Message<"mantrae.v1.CreateServiceRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type CreateServiceRequest = Message<'mantrae.v1.CreateServiceRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: string name = 3; - */ - name: string; + /** + * @generated from field: string name = 3; + */ + name: string; - /** - * @generated from field: google.protobuf.Struct config = 4; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 4; + */ + config?: JsonObject; - /** - * @generated from field: bool enabled = 5; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 5; + */ + enabled: boolean; - /** - * @generated from field: mantrae.v1.ProtocolType type = 6; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 6; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.CreateServiceRequest. * Use `create(CreateServiceRequestSchema)` to create a new message. */ -export const CreateServiceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 3); +export const CreateServiceRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 3); /** * @generated from message mantrae.v1.CreateServiceResponse */ -export type CreateServiceResponse = Message<"mantrae.v1.CreateServiceResponse"> & { - /** - * @generated from field: mantrae.v1.Service service = 1; - */ - service?: Service; +export type CreateServiceResponse = Message<'mantrae.v1.CreateServiceResponse'> & { + /** + * @generated from field: mantrae.v1.Service service = 1; + */ + service?: Service; }; /** * Describes the message mantrae.v1.CreateServiceResponse. * Use `create(CreateServiceResponseSchema)` to create a new message. */ -export const CreateServiceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 4); +export const CreateServiceResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 4); /** * @generated from message mantrae.v1.UpdateServiceRequest */ -export type UpdateServiceRequest = Message<"mantrae.v1.UpdateServiceRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type UpdateServiceRequest = Message<'mantrae.v1.UpdateServiceRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: string name = 2; + */ + name: string; - /** - * @generated from field: bool enabled = 3; - */ - enabled: boolean; + /** + * @generated from field: bool enabled = 3; + */ + enabled: boolean; - /** - * @generated from field: google.protobuf.Struct config = 4; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 4; + */ + config?: JsonObject; - /** - * @generated from field: mantrae.v1.ProtocolType type = 5; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 5; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.UpdateServiceRequest. * Use `create(UpdateServiceRequestSchema)` to create a new message. */ -export const UpdateServiceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 5); +export const UpdateServiceRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 5); /** * @generated from message mantrae.v1.UpdateServiceResponse */ -export type UpdateServiceResponse = Message<"mantrae.v1.UpdateServiceResponse"> & { - /** - * @generated from field: mantrae.v1.Service service = 1; - */ - service?: Service; +export type UpdateServiceResponse = Message<'mantrae.v1.UpdateServiceResponse'> & { + /** + * @generated from field: mantrae.v1.Service service = 1; + */ + service?: Service; }; /** * Describes the message mantrae.v1.UpdateServiceResponse. * Use `create(UpdateServiceResponseSchema)` to create a new message. */ -export const UpdateServiceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 6); +export const UpdateServiceResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 6); /** * @generated from message mantrae.v1.DeleteServiceRequest */ -export type DeleteServiceRequest = Message<"mantrae.v1.DeleteServiceRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteServiceRequest = Message<'mantrae.v1.DeleteServiceRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: mantrae.v1.ProtocolType type = 2; - */ - type: ProtocolType; + /** + * @generated from field: mantrae.v1.ProtocolType type = 2; + */ + type: ProtocolType; }; /** * Describes the message mantrae.v1.DeleteServiceRequest. * Use `create(DeleteServiceRequestSchema)` to create a new message. */ -export const DeleteServiceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 7); +export const DeleteServiceRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 7); /** * @generated from message mantrae.v1.DeleteServiceResponse */ -export type DeleteServiceResponse = Message<"mantrae.v1.DeleteServiceResponse"> & { -}; +export type DeleteServiceResponse = Message<'mantrae.v1.DeleteServiceResponse'> & {}; /** * Describes the message mantrae.v1.DeleteServiceResponse. * Use `create(DeleteServiceResponseSchema)` to create a new message. */ -export const DeleteServiceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 8); +export const DeleteServiceResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 8); /** * @generated from message mantrae.v1.ListServicesRequest */ -export type ListServicesRequest = Message<"mantrae.v1.ListServicesRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListServicesRequest = Message<'mantrae.v1.ListServicesRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional string agent_id = 2; - */ - agentId?: string; + /** + * @generated from field: optional string agent_id = 2; + */ + agentId?: string; - /** - * @generated from field: optional mantrae.v1.ProtocolType type = 3; - */ - type?: ProtocolType; + /** + * @generated from field: optional mantrae.v1.ProtocolType type = 3; + */ + type?: ProtocolType; - /** - * @generated from field: optional int64 limit = 4; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 4; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 5; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 5; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListServicesRequest. * Use `create(ListServicesRequestSchema)` to create a new message. */ -export const ListServicesRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 9); +export const ListServicesRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 9); /** * @generated from message mantrae.v1.ListServicesResponse */ -export type ListServicesResponse = Message<"mantrae.v1.ListServicesResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Service services = 1; - */ - services: Service[]; +export type ListServicesResponse = Message<'mantrae.v1.ListServicesResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Service services = 1; + */ + services: Service[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListServicesResponse. * Use `create(ListServicesResponseSchema)` to create a new message. */ -export const ListServicesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_service, 10); +export const ListServicesResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_service, 10); /** * @generated from service mantrae.v1.ServiceService */ export const ServiceService: GenService<{ - /** - * @generated from rpc mantrae.v1.ServiceService.GetService - */ - getService: { - methodKind: "unary"; - input: typeof GetServiceRequestSchema; - output: typeof GetServiceResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServiceService.CreateService - */ - createService: { - methodKind: "unary"; - input: typeof CreateServiceRequestSchema; - output: typeof CreateServiceResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServiceService.UpdateService - */ - updateService: { - methodKind: "unary"; - input: typeof UpdateServiceRequestSchema; - output: typeof UpdateServiceResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServiceService.DeleteService - */ - deleteService: { - methodKind: "unary"; - input: typeof DeleteServiceRequestSchema; - output: typeof DeleteServiceResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.ServiceService.ListServices - */ - listServices: { - methodKind: "unary"; - input: typeof ListServicesRequestSchema; - output: typeof ListServicesResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_service, 0); - + /** + * @generated from rpc mantrae.v1.ServiceService.GetService + */ + getService: { + methodKind: 'unary'; + input: typeof GetServiceRequestSchema; + output: typeof GetServiceResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServiceService.CreateService + */ + createService: { + methodKind: 'unary'; + input: typeof CreateServiceRequestSchema; + output: typeof CreateServiceResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServiceService.UpdateService + */ + updateService: { + methodKind: 'unary'; + input: typeof UpdateServiceRequestSchema; + output: typeof UpdateServiceResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServiceService.DeleteService + */ + deleteService: { + methodKind: 'unary'; + input: typeof DeleteServiceRequestSchema; + output: typeof DeleteServiceResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.ServiceService.ListServices + */ + listServices: { + methodKind: 'unary'; + input: typeof ListServicesRequestSchema; + output: typeof ListServicesResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_service, 0); diff --git a/web/src/lib/gen/mantrae/v1/setting_pb.ts b/web/src/lib/gen/mantrae/v1/setting_pb.ts index c125266..836f7f9 100644 --- a/web/src/lib/gen/mantrae/v1/setting_pb.ts +++ b/web/src/lib/gen/mantrae/v1/setting_pb.ts @@ -2,177 +2,185 @@ // @generated from file mantrae/v1/setting.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/setting.proto. */ -export const file_mantrae_v1_setting: GenFile = /*@__PURE__*/ - fileDesc("ChhtYW50cmFlL3YxL3NldHRpbmcucHJvdG8SCm1hbnRyYWUudjEiVQoHU2V0dGluZxILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAkSLgoKdXBkYXRlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiKQoRR2V0U2V0dGluZ1JlcXVlc3QSFAoDa2V5GAEgASgJQge6SARyAhABIiMKEkdldFNldHRpbmdSZXNwb25zZRINCgV2YWx1ZRgBIAEoCSI7ChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIUCgNrZXkYASABKAlCB7pIBHICEAESDQoFdmFsdWUYAiABKAkiPQoVVXBkYXRlU2V0dGluZ1Jlc3BvbnNlEiQKB3NldHRpbmcYASABKAsyEy5tYW50cmFlLnYxLlNldHRpbmciFQoTTGlzdFNldHRpbmdzUmVxdWVzdCI9ChRMaXN0U2V0dGluZ3NSZXNwb25zZRIlCghzZXR0aW5ncxgBIAMoCzITLm1hbnRyYWUudjEuU2V0dGluZzKQAgoOU2V0dGluZ1NlcnZpY2USUAoKR2V0U2V0dGluZxIdLm1hbnRyYWUudjEuR2V0U2V0dGluZ1JlcXVlc3QaHi5tYW50cmFlLnYxLkdldFNldHRpbmdSZXNwb25zZSIDkAIBElQKDVVwZGF0ZVNldHRpbmcSIC5tYW50cmFlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GiEubWFudHJhZS52MS5VcGRhdGVTZXR0aW5nUmVzcG9uc2USVgoMTGlzdFNldHRpbmdzEh8ubWFudHJhZS52MS5MaXN0U2V0dGluZ3NSZXF1ZXN0GiAubWFudHJhZS52MS5MaXN0U2V0dGluZ3NSZXNwb25zZSIDkAIBQqYBCg5jb20ubWFudHJhZS52MUIMU2V0dGluZ1Byb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_setting: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChhtYW50cmFlL3YxL3NldHRpbmcucHJvdG8SCm1hbnRyYWUudjEiVQoHU2V0dGluZxILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAkSLgoKdXBkYXRlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiKQoRR2V0U2V0dGluZ1JlcXVlc3QSFAoDa2V5GAEgASgJQge6SARyAhABIiMKEkdldFNldHRpbmdSZXNwb25zZRINCgV2YWx1ZRgBIAEoCSI7ChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIUCgNrZXkYASABKAlCB7pIBHICEAESDQoFdmFsdWUYAiABKAkiPQoVVXBkYXRlU2V0dGluZ1Jlc3BvbnNlEiQKB3NldHRpbmcYASABKAsyEy5tYW50cmFlLnYxLlNldHRpbmciFQoTTGlzdFNldHRpbmdzUmVxdWVzdCI9ChRMaXN0U2V0dGluZ3NSZXNwb25zZRIlCghzZXR0aW5ncxgBIAMoCzITLm1hbnRyYWUudjEuU2V0dGluZzKQAgoOU2V0dGluZ1NlcnZpY2USUAoKR2V0U2V0dGluZxIdLm1hbnRyYWUudjEuR2V0U2V0dGluZ1JlcXVlc3QaHi5tYW50cmFlLnYxLkdldFNldHRpbmdSZXNwb25zZSIDkAIBElQKDVVwZGF0ZVNldHRpbmcSIC5tYW50cmFlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GiEubWFudHJhZS52MS5VcGRhdGVTZXR0aW5nUmVzcG9uc2USVgoMTGlzdFNldHRpbmdzEh8ubWFudHJhZS52MS5MaXN0U2V0dGluZ3NSZXF1ZXN0GiAubWFudHJhZS52MS5MaXN0U2V0dGluZ3NSZXNwb25zZSIDkAIBQqYBCg5jb20ubWFudHJhZS52MUIMU2V0dGluZ1Byb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.Setting */ -export type Setting = Message<"mantrae.v1.Setting"> & { - /** - * @generated from field: string key = 1; - */ - key: string; +export type Setting = Message<'mantrae.v1.Setting'> & { + /** + * @generated from field: string key = 1; + */ + key: string; - /** - * @generated from field: string value = 2; - */ - value: string; + /** + * @generated from field: string value = 2; + */ + value: string; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 3; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 3; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.Setting. * Use `create(SettingSchema)` to create a new message. */ -export const SettingSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 0); +export const SettingSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 0); /** * @generated from message mantrae.v1.GetSettingRequest */ -export type GetSettingRequest = Message<"mantrae.v1.GetSettingRequest"> & { - /** - * @generated from field: string key = 1; - */ - key: string; +export type GetSettingRequest = Message<'mantrae.v1.GetSettingRequest'> & { + /** + * @generated from field: string key = 1; + */ + key: string; }; /** * Describes the message mantrae.v1.GetSettingRequest. * Use `create(GetSettingRequestSchema)` to create a new message. */ -export const GetSettingRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 1); +export const GetSettingRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 1); /** * @generated from message mantrae.v1.GetSettingResponse */ -export type GetSettingResponse = Message<"mantrae.v1.GetSettingResponse"> & { - /** - * @generated from field: string value = 1; - */ - value: string; +export type GetSettingResponse = Message<'mantrae.v1.GetSettingResponse'> & { + /** + * @generated from field: string value = 1; + */ + value: string; }; /** * Describes the message mantrae.v1.GetSettingResponse. * Use `create(GetSettingResponseSchema)` to create a new message. */ -export const GetSettingResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 2); +export const GetSettingResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 2); /** * @generated from message mantrae.v1.UpdateSettingRequest */ -export type UpdateSettingRequest = Message<"mantrae.v1.UpdateSettingRequest"> & { - /** - * @generated from field: string key = 1; - */ - key: string; +export type UpdateSettingRequest = Message<'mantrae.v1.UpdateSettingRequest'> & { + /** + * @generated from field: string key = 1; + */ + key: string; - /** - * @generated from field: string value = 2; - */ - value: string; + /** + * @generated from field: string value = 2; + */ + value: string; }; /** * Describes the message mantrae.v1.UpdateSettingRequest. * Use `create(UpdateSettingRequestSchema)` to create a new message. */ -export const UpdateSettingRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 3); +export const UpdateSettingRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 3); /** * @generated from message mantrae.v1.UpdateSettingResponse */ -export type UpdateSettingResponse = Message<"mantrae.v1.UpdateSettingResponse"> & { - /** - * @generated from field: mantrae.v1.Setting setting = 1; - */ - setting?: Setting; +export type UpdateSettingResponse = Message<'mantrae.v1.UpdateSettingResponse'> & { + /** + * @generated from field: mantrae.v1.Setting setting = 1; + */ + setting?: Setting; }; /** * Describes the message mantrae.v1.UpdateSettingResponse. * Use `create(UpdateSettingResponseSchema)` to create a new message. */ -export const UpdateSettingResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 4); +export const UpdateSettingResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 4); /** * @generated from message mantrae.v1.ListSettingsRequest */ -export type ListSettingsRequest = Message<"mantrae.v1.ListSettingsRequest"> & { -}; +export type ListSettingsRequest = Message<'mantrae.v1.ListSettingsRequest'> & {}; /** * Describes the message mantrae.v1.ListSettingsRequest. * Use `create(ListSettingsRequestSchema)` to create a new message. */ -export const ListSettingsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 5); +export const ListSettingsRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 5); /** * @generated from message mantrae.v1.ListSettingsResponse */ -export type ListSettingsResponse = Message<"mantrae.v1.ListSettingsResponse"> & { - /** - * @generated from field: repeated mantrae.v1.Setting settings = 1; - */ - settings: Setting[]; +export type ListSettingsResponse = Message<'mantrae.v1.ListSettingsResponse'> & { + /** + * @generated from field: repeated mantrae.v1.Setting settings = 1; + */ + settings: Setting[]; }; /** * Describes the message mantrae.v1.ListSettingsResponse. * Use `create(ListSettingsResponseSchema)` to create a new message. */ -export const ListSettingsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_setting, 6); +export const ListSettingsResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_setting, 6); /** * @generated from service mantrae.v1.SettingService */ export const SettingService: GenService<{ - /** - * @generated from rpc mantrae.v1.SettingService.GetSetting - */ - getSetting: { - methodKind: "unary"; - input: typeof GetSettingRequestSchema; - output: typeof GetSettingResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.SettingService.UpdateSetting - */ - updateSetting: { - methodKind: "unary"; - input: typeof UpdateSettingRequestSchema; - output: typeof UpdateSettingResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.SettingService.ListSettings - */ - listSettings: { - methodKind: "unary"; - input: typeof ListSettingsRequestSchema; - output: typeof ListSettingsResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_setting, 0); - + /** + * @generated from rpc mantrae.v1.SettingService.GetSetting + */ + getSetting: { + methodKind: 'unary'; + input: typeof GetSettingRequestSchema; + output: typeof GetSettingResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.SettingService.UpdateSetting + */ + updateSetting: { + methodKind: 'unary'; + input: typeof UpdateSettingRequestSchema; + output: typeof UpdateSettingResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.SettingService.ListSettings + */ + listSettings: { + methodKind: 'unary'; + input: typeof ListSettingsRequestSchema; + output: typeof ListSettingsResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_setting, 0); diff --git a/web/src/lib/gen/mantrae/v1/traefik_instance_pb.ts b/web/src/lib/gen/mantrae/v1/traefik_instance_pb.ts index 7707c97..965f94c 100644 --- a/web/src/lib/gen/mantrae/v1/traefik_instance_pb.ts +++ b/web/src/lib/gen/mantrae/v1/traefik_instance_pb.ts @@ -2,232 +2,249 @@ // @generated from file mantrae/v1/traefik_instance.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_struct, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { JsonObject, Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { + file_google_protobuf_struct, + file_google_protobuf_timestamp +} from '@bufbuild/protobuf/wkt'; +import type { JsonObject, Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/traefik_instance.proto. */ -export const file_mantrae_v1_traefik_instance: GenFile = /*@__PURE__*/ - fileDesc("CiFtYW50cmFlL3YxL3RyYWVmaWtfaW5zdGFuY2UucHJvdG8SCm1hbnRyYWUudjEi9gIKD1RyYWVmaWtJbnN0YW5jZRIKCgJpZBgBIAEoAxIMCgRuYW1lGAIgASgJEgsKA3VybBgDIAEoCRIQCgh1c2VybmFtZRgEIAEoCRIQCghwYXNzd29yZBgFIAEoCRILCgN0bHMYBiABKAgSLQoMZW50cnlfcG9pbnRzGAcgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIpCghvdmVydmlldxgIIAEoCzIXLmdvb2dsZS5wcm90b2J1Zi5TdHJ1Y3QSJwoGY29uZmlnGAkgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIoCgd2ZXJzaW9uGAogASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBIuCgpjcmVhdGVkX2F0GAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GAwgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCIwChlHZXRUcmFlZmlrSW5zdGFuY2VSZXF1ZXN0EhMKAmlkGAEgASgDQge6SAQiAiAAIlMKGkdldFRyYWVmaWtJbnN0YW5jZVJlc3BvbnNlEjUKEHRyYWVmaWtfaW5zdGFuY2UYASABKAsyGy5tYW50cmFlLnYxLlRyYWVmaWtJbnN0YW5jZSIzChxEZWxldGVUcmFlZmlrSW5zdGFuY2VSZXF1ZXN0EhMKAmlkGAEgASgDQge6SAQiAiAAIh8KHURlbGV0ZVRyYWVmaWtJbnN0YW5jZVJlc3BvbnNlItkBChtMaXN0VHJhZWZpa0luc3RhbmNlc1JlcXVlc3QSGwoK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0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp]); +export const file_mantrae_v1_traefik_instance: GenFile = + /*@__PURE__*/ + fileDesc( + 'CiFtYW50cmFlL3YxL3RyYWVmaWtfaW5zdGFuY2UucHJvdG8SCm1hbnRyYWUudjEiigMKD1RyYWVmaWtJbnN0YW5jZRIKCgJpZBgBIAEoAxISCgpwcm9maWxlX2lkGAIgASgDEgwKBG5hbWUYAyABKAkSCwoDdXJsGAQgASgJEhAKCHVzZXJuYW1lGAUgASgJEhAKCHBhc3N3b3JkGAYgASgJEgsKA3RscxgHIAEoCBItCgxlbnRyeV9wb2ludHMYCCABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0EikKCG92ZXJ2aWV3GAkgASgLMhcuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdBInCgZjb25maWcYCiABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0EigKB3ZlcnNpb24YCyABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0Ei4KCmNyZWF0ZWRfYXQYDCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYDSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wIjAKGUdldFRyYWVmaWtJbnN0YW5jZVJlcXVlc3QSEwoCaWQYASABKANCB7pIBCICIAAiUwoaR2V0VHJhZWZpa0luc3RhbmNlUmVzcG9uc2USNQoQdHJhZWZpa19pbnN0YW5jZRgBIAEoCzIbLm1hbnRyYWUudjEuVHJhZWZpa0luc3RhbmNlIjMKHERlbGV0ZVRyYWVmaWtJbnN0YW5jZVJlcXVlc3QSEwoCaWQYASABKANCB7pIBCICIAAiHwodRGVsZXRlVHJhZWZpa0luc3RhbmNlUmVzcG9uc2Ui2QEKG0xpc3RUcmFlZmlrSW5zdGFuY2VzUmVxdWVzdBIbCgpwcm9maWxlX2lkGAEgASgDQge6SAQiAi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f_validate_validate, file_google_protobuf_struct, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.TraefikInstance */ -export type TraefikInstance = Message<"mantrae.v1.TraefikInstance"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type TraefikInstance = Message<'mantrae.v1.TraefikInstance'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; - /** - * @generated from field: string name = 2; - */ - name: string; + /** + * @generated from field: int64 profile_id = 2; + */ + profileId: bigint; - /** - * @generated from field: string url = 3; - */ - url: string; + /** + * @generated from field: string name = 3; + */ + name: string; - /** - * @generated from field: string username = 4; - */ - username: string; + /** + * @generated from field: string url = 4; + */ + url: string; - /** - * @generated from field: string password = 5; - */ - password: string; + /** + * @generated from field: string username = 5; + */ + username: string; - /** - * @generated from field: bool tls = 6; - */ - tls: boolean; + /** + * @generated from field: string password = 6; + */ + password: string; - /** - * @generated from field: google.protobuf.Struct entry_points = 7; - */ - entryPoints?: JsonObject; + /** + * @generated from field: bool tls = 7; + */ + tls: boolean; - /** - * @generated from field: google.protobuf.Struct overview = 8; - */ - overview?: JsonObject; + /** + * @generated from field: google.protobuf.Struct entry_points = 8; + */ + entryPoints?: JsonObject; - /** - * @generated from field: google.protobuf.Struct config = 9; - */ - config?: JsonObject; + /** + * @generated from field: google.protobuf.Struct overview = 9; + */ + overview?: JsonObject; - /** - * @generated from field: google.protobuf.Struct version = 10; - */ - version?: JsonObject; + /** + * @generated from field: google.protobuf.Struct config = 10; + */ + config?: JsonObject; - /** - * @generated from field: google.protobuf.Timestamp created_at = 11; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Struct version = 11; + */ + version?: JsonObject; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 12; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 12; + */ + createdAt?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp updated_at = 13; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.TraefikInstance. * Use `create(TraefikInstanceSchema)` to create a new message. */ -export const TraefikInstanceSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 0); +export const TraefikInstanceSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 0); /** * @generated from message mantrae.v1.GetTraefikInstanceRequest */ -export type GetTraefikInstanceRequest = Message<"mantrae.v1.GetTraefikInstanceRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type GetTraefikInstanceRequest = Message<'mantrae.v1.GetTraefikInstanceRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.GetTraefikInstanceRequest. * Use `create(GetTraefikInstanceRequestSchema)` to create a new message. */ -export const GetTraefikInstanceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 1); +export const GetTraefikInstanceRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 1); /** * @generated from message mantrae.v1.GetTraefikInstanceResponse */ -export type GetTraefikInstanceResponse = Message<"mantrae.v1.GetTraefikInstanceResponse"> & { - /** - * @generated from field: mantrae.v1.TraefikInstance traefik_instance = 1; - */ - traefikInstance?: TraefikInstance; +export type GetTraefikInstanceResponse = Message<'mantrae.v1.GetTraefikInstanceResponse'> & { + /** + * @generated from field: mantrae.v1.TraefikInstance traefik_instance = 1; + */ + traefikInstance?: TraefikInstance; }; /** * Describes the message mantrae.v1.GetTraefikInstanceResponse. * Use `create(GetTraefikInstanceResponseSchema)` to create a new message. */ -export const GetTraefikInstanceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 2); +export const GetTraefikInstanceResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 2); /** * @generated from message mantrae.v1.DeleteTraefikInstanceRequest */ -export type DeleteTraefikInstanceRequest = Message<"mantrae.v1.DeleteTraefikInstanceRequest"> & { - /** - * @generated from field: int64 id = 1; - */ - id: bigint; +export type DeleteTraefikInstanceRequest = Message<'mantrae.v1.DeleteTraefikInstanceRequest'> & { + /** + * @generated from field: int64 id = 1; + */ + id: bigint; }; /** * Describes the message mantrae.v1.DeleteTraefikInstanceRequest. * Use `create(DeleteTraefikInstanceRequestSchema)` to create a new message. */ -export const DeleteTraefikInstanceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 3); +export const DeleteTraefikInstanceRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 3); /** * @generated from message mantrae.v1.DeleteTraefikInstanceResponse */ -export type DeleteTraefikInstanceResponse = Message<"mantrae.v1.DeleteTraefikInstanceResponse"> & { -}; +export type DeleteTraefikInstanceResponse = + Message<'mantrae.v1.DeleteTraefikInstanceResponse'> & {}; /** * Describes the message mantrae.v1.DeleteTraefikInstanceResponse. * Use `create(DeleteTraefikInstanceResponseSchema)` to create a new message. */ -export const DeleteTraefikInstanceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 4); +export const DeleteTraefikInstanceResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 4); /** * @generated from message mantrae.v1.ListTraefikInstancesRequest */ -export type ListTraefikInstancesRequest = Message<"mantrae.v1.ListTraefikInstancesRequest"> & { - /** - * @generated from field: int64 profile_id = 1; - */ - profileId: bigint; +export type ListTraefikInstancesRequest = Message<'mantrae.v1.ListTraefikInstancesRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; - /** - * @generated from field: optional int64 limit = 2; - */ - limit?: bigint; + /** + * @generated from field: optional int64 limit = 2; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 3; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 3; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListTraefikInstancesRequest. * Use `create(ListTraefikInstancesRequestSchema)` to create a new message. */ -export const ListTraefikInstancesRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 5); +export const ListTraefikInstancesRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 5); /** * @generated from message mantrae.v1.ListTraefikInstancesResponse */ -export type ListTraefikInstancesResponse = Message<"mantrae.v1.ListTraefikInstancesResponse"> & { - /** - * @generated from field: repeated mantrae.v1.TraefikInstance traefik_instances = 1; - */ - traefikInstances: TraefikInstance[]; +export type ListTraefikInstancesResponse = Message<'mantrae.v1.ListTraefikInstancesResponse'> & { + /** + * @generated from field: repeated mantrae.v1.TraefikInstance traefik_instances = 1; + */ + traefikInstances: TraefikInstance[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListTraefikInstancesResponse. * Use `create(ListTraefikInstancesResponseSchema)` to create a new message. */ -export const ListTraefikInstancesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_traefik_instance, 6); +export const ListTraefikInstancesResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_traefik_instance, 6); /** * @generated from service mantrae.v1.TraefikInstanceService */ export const TraefikInstanceService: GenService<{ - /** - * @generated from rpc mantrae.v1.TraefikInstanceService.GetTraefikInstance - */ - getTraefikInstance: { - methodKind: "unary"; - input: typeof GetTraefikInstanceRequestSchema; - output: typeof GetTraefikInstanceResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.TraefikInstanceService.DeleteTraefikInstance - */ - deleteTraefikInstance: { - methodKind: "unary"; - input: typeof DeleteTraefikInstanceRequestSchema; - output: typeof DeleteTraefikInstanceResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.TraefikInstanceService.ListTraefikInstances - */ - listTraefikInstances: { - methodKind: "unary"; - input: typeof ListTraefikInstancesRequestSchema; - output: typeof ListTraefikInstancesResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_traefik_instance, 0); - + /** + * @generated from rpc mantrae.v1.TraefikInstanceService.GetTraefikInstance + */ + getTraefikInstance: { + methodKind: 'unary'; + input: typeof GetTraefikInstanceRequestSchema; + output: typeof GetTraefikInstanceResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.TraefikInstanceService.DeleteTraefikInstance + */ + deleteTraefikInstance: { + methodKind: 'unary'; + input: typeof DeleteTraefikInstanceRequestSchema; + output: typeof DeleteTraefikInstanceResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.TraefikInstanceService.ListTraefikInstances + */ + listTraefikInstances: { + methodKind: 'unary'; + input: typeof ListTraefikInstancesRequestSchema; + output: typeof ListTraefikInstancesResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_traefik_instance, 0); diff --git a/web/src/lib/gen/mantrae/v1/user_pb.ts b/web/src/lib/gen/mantrae/v1/user_pb.ts index 09d41a6..3bd91d2 100644 --- a/web/src/lib/gen/mantrae/v1/user_pb.ts +++ b/web/src/lib/gen/mantrae/v1/user_pb.ts @@ -2,589 +2,618 @@ // @generated from file mantrae/v1/user.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_buf_validate_validate } from "../../buf/validate/validate_pb"; -import type { Timestamp } from "@bufbuild/protobuf/wkt"; -import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Timestamp } from '@bufbuild/protobuf/wkt'; +import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/user.proto. */ -export const file_mantrae_v1_user: GenFile = /*@__PURE__*/ - fileDesc("ChVtYW50cmFlL3YxL3VzZXIucHJvdG8SCm1hbnRyYWUudjEikgIKBFVzZXISCgoCaWQYASABKAkSEAoIdXNlcm5hbWUYAiABKAkSEAoIcGFzc3dvcmQYAyABKAkSDQoFZW1haWwYBCABKAkSCwoDb3RwGAYgASgJEi4KCm90cF9leHBpcnkYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmxhc3RfbG9naW4YCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmNyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wInwKEExvZ2luVXNlclJlcXVlc3QSGwoIdXNlcm5hbWUYASABKAlCB7pIBHICEANIABIYCgVlbWFpbBgCIAEoCUIHukgEcgJgAUgAEhwKCHBhc3N3b3JkGAMgASgJQgq6SAfIAQFyAhAIQhMKCmlkZW50aWZpZXISBbpIAggBIjMKEUxvZ2luVXNlclJlc3BvbnNlEh4KBHVzZXIYASABKAsyEC5tYW50cmFlLnYxLlVzZXIiEwoRTG9nb3V0VXNlclJlcXVlc3QiFAoSTG9nb3V0VXNlclJlc3BvbnNlInUKEFZlcmlmeU9UUFJlcXVlc3QSGwoIdXNlcm5hbWUYASABKAlCB7pIBHICEANIABIYCgVlbWFpbBgCIAEoCUIHukgEcgJgAUgAEhUKA290cBgDIAEoCUIIukgFcgOYAQZCEwoKaWRlbnRpZmllchIFukgCCAEiMwoRVmVyaWZ5T1RQUmVzcG9uc2USHgoEdXNlchgBIAEoCzIQLm1hbnRyYWUudjEuVXNlciJcCg5TZW5kT1RQUmVxdWVzdBIbCgh1c2VybmFtZRgBIAEoCUIHukgEcgI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1hbnRyYWUudjEuRGVsZXRlVXNlclJlc3BvbnNlEk0KCUxpc3RVc2VycxIcLm1hbnRyYWUudjEuTGlzdFVzZXJzUmVxdWVzdBodLm1hbnRyYWUudjEuTGlzdFVzZXJzUmVzcG9uc2UiA5ACARJUCg1HZXRPSURDU3RhdHVzEiAubWFudHJhZS52MS5HZXRPSURDU3RhdHVzUmVxdWVzdBohLm1hbnRyYWUudjEuR2V0T0lEQ1N0YXR1c1Jlc3BvbnNlQqMBCg5jb20ubWFudHJhZS52MUIJVXNlclByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_protobuf_timestamp]); +export const file_mantrae_v1_user: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChVtYW50cmFlL3YxL3VzZXIucHJvdG8SCm1hbnRyYWUudjEikgIKBFVzZXISCgoCaWQYASABKAkSEAoIdXNlcm5hbWUYAiABKAkSEAoIcGFzc3dvcmQYAyABKAkSDQoFZW1haWwYBCABKAkSCwoDb3RwGAYgASgJEi4KCm90cF9leHBpcnkYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmxhc3RfbG9naW4YCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmNyZWF0ZWRfYXQYCSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYCiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wInwKEExvZ2luVXNlclJlcXVlc3QSGwoIdXNlcm5hbWUYASABKAlCB7pIBHICEANIABIYCgVlbWFpbBgCIAEoCUIHukgEcgJgAUgAEhwKCHBhc3N3b3JkGAMgAS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KB1NlbmRPVFASGi5tYW50cmFlLnYxLlNlbmRPVFBSZXF1ZXN0GhsubWFudHJhZS52MS5TZW5kT1RQUmVzcG9uc2USRwoHR2V0VXNlchIaLm1hbnRyYWUudjEuR2V0VXNlclJlcXVlc3QaGy5tYW50cmFlLnYxLkdldFVzZXJSZXNwb25zZSIDkAIBEksKCkNyZWF0ZVVzZXISHS5tYW50cmFlLnYxLkNyZWF0ZVVzZXJSZXF1ZXN0Gh4ubWFudHJhZS52MS5DcmVhdGVVc2VyUmVzcG9uc2USSwoKVXBkYXRlVXNlchIdLm1hbnRyYWUudjEuVXBkYXRlVXNlclJlcXVlc3QaHi5tYW50cmFlLnYxLlVwZGF0ZVVzZXJSZXNwb25zZRJLCgpEZWxldGVVc2VyEh0ubWFudHJhZS52MS5EZWxldGVVc2VyUmVxdWVzdBoeLm1hbnRyYWUudjEuRGVsZXRlVXNlclJlc3BvbnNlEk0KCUxpc3RVc2VycxIcLm1hbnRyYWUudjEuTGlzdFVzZXJzUmVxdWVzdBodLm1hbnRyYWUudjEuTGlzdFVzZXJzUmVzcG9uc2UiA5ACARJUCg1HZXRPSURDU3RhdHVzEiAubWFudHJhZS52MS5HZXRPSURDU3RhdHVzUmVxdWVzdBohLm1hbnRyYWUudjEuR2V0T0lEQ1N0YXR1c1Jlc3BvbnNlQqMBCg5jb20ubWFudHJhZS52MUIJVXNlclByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z', + [file_buf_validate_validate, file_google_protobuf_timestamp] + ); /** * @generated from message mantrae.v1.User */ -export type User = Message<"mantrae.v1.User"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type User = Message<'mantrae.v1.User'> & { + /** + * @generated from field: string id = 1; + */ + id: string; - /** - * @generated from field: string username = 2; - */ - username: string; + /** + * @generated from field: string username = 2; + */ + username: string; - /** - * @generated from field: string password = 3; - */ - password: string; + /** + * @generated from field: string password = 3; + */ + password: string; - /** - * @generated from field: string email = 4; - */ - email: string; + /** + * @generated from field: string email = 4; + */ + email: string; - /** - * @generated from field: string otp = 6; - */ - otp: string; + /** + * @generated from field: string otp = 6; + */ + otp: string; - /** - * @generated from field: google.protobuf.Timestamp otp_expiry = 7; - */ - otpExpiry?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp otp_expiry = 7; + */ + otpExpiry?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp last_login = 8; - */ - lastLogin?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp last_login = 8; + */ + lastLogin?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp created_at = 9; - */ - createdAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp created_at = 9; + */ + createdAt?: Timestamp; - /** - * @generated from field: google.protobuf.Timestamp updated_at = 10; - */ - updatedAt?: Timestamp; + /** + * @generated from field: google.protobuf.Timestamp updated_at = 10; + */ + updatedAt?: Timestamp; }; /** * Describes the message mantrae.v1.User. * Use `create(UserSchema)` to create a new message. */ -export const UserSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 0); +export const UserSchema: GenMessage = /*@__PURE__*/ messageDesc(file_mantrae_v1_user, 0); /** * @generated from message mantrae.v1.LoginUserRequest */ -export type LoginUserRequest = Message<"mantrae.v1.LoginUserRequest"> & { - /** - * @generated from oneof mantrae.v1.LoginUserRequest.identifier - */ - identifier: { - /** - * @generated from field: string username = 1; - */ - value: string; - case: "username"; - } | { - /** - * @generated from field: string email = 2; - */ - value: string; - case: "email"; - } | { case: undefined; value?: undefined }; +export type LoginUserRequest = Message<'mantrae.v1.LoginUserRequest'> & { + /** + * @generated from oneof mantrae.v1.LoginUserRequest.identifier + */ + identifier: + | { + /** + * @generated from field: string username = 1; + */ + value: string; + case: 'username'; + } + | { + /** + * @generated from field: string email = 2; + */ + value: string; + case: 'email'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from field: string password = 3; - */ - password: string; + /** + * @generated from field: string password = 3; + */ + password: string; }; /** * Describes the message mantrae.v1.LoginUserRequest. * Use `create(LoginUserRequestSchema)` to create a new message. */ -export const LoginUserRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 1); +export const LoginUserRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 1); /** * @generated from message mantrae.v1.LoginUserResponse */ -export type LoginUserResponse = Message<"mantrae.v1.LoginUserResponse"> & { - /** - * @generated from field: mantrae.v1.User user = 1; - */ - user?: User; +export type LoginUserResponse = Message<'mantrae.v1.LoginUserResponse'> & { + /** + * @generated from field: mantrae.v1.User user = 1; + */ + user?: User; }; /** * Describes the message mantrae.v1.LoginUserResponse. * Use `create(LoginUserResponseSchema)` to create a new message. */ -export const LoginUserResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 2); +export const LoginUserResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 2); /** * @generated from message mantrae.v1.LogoutUserRequest */ -export type LogoutUserRequest = Message<"mantrae.v1.LogoutUserRequest"> & { -}; +export type LogoutUserRequest = Message<'mantrae.v1.LogoutUserRequest'> & {}; /** * Describes the message mantrae.v1.LogoutUserRequest. * Use `create(LogoutUserRequestSchema)` to create a new message. */ -export const LogoutUserRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 3); +export const LogoutUserRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 3); /** * @generated from message mantrae.v1.LogoutUserResponse */ -export type LogoutUserResponse = Message<"mantrae.v1.LogoutUserResponse"> & { -}; +export type LogoutUserResponse = Message<'mantrae.v1.LogoutUserResponse'> & {}; /** * Describes the message mantrae.v1.LogoutUserResponse. * Use `create(LogoutUserResponseSchema)` to create a new message. */ -export const LogoutUserResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 4); +export const LogoutUserResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 4); /** * @generated from message mantrae.v1.VerifyOTPRequest */ -export type VerifyOTPRequest = Message<"mantrae.v1.VerifyOTPRequest"> & { - /** - * @generated from oneof mantrae.v1.VerifyOTPRequest.identifier - */ - identifier: { - /** - * @generated from field: string username = 1; - */ - value: string; - case: "username"; - } | { - /** - * @generated from field: string email = 2; - */ - value: string; - case: "email"; - } | { case: undefined; value?: undefined }; +export type VerifyOTPRequest = Message<'mantrae.v1.VerifyOTPRequest'> & { + /** + * @generated from oneof mantrae.v1.VerifyOTPRequest.identifier + */ + identifier: + | { + /** + * @generated from field: string username = 1; + */ + value: string; + case: 'username'; + } + | { + /** + * @generated from field: string email = 2; + */ + value: string; + case: 'email'; + } + | { case: undefined; value?: undefined }; - /** - * @generated from field: string otp = 3; - */ - otp: string; + /** + * @generated from field: string otp = 3; + */ + otp: string; }; /** * Describes the message mantrae.v1.VerifyOTPRequest. * Use `create(VerifyOTPRequestSchema)` to create a new message. */ -export const VerifyOTPRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 5); +export const VerifyOTPRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 5); /** * @generated from message mantrae.v1.VerifyOTPResponse */ -export type VerifyOTPResponse = Message<"mantrae.v1.VerifyOTPResponse"> & { - /** - * @generated from field: mantrae.v1.User user = 1; - */ - user?: User; +export type VerifyOTPResponse = Message<'mantrae.v1.VerifyOTPResponse'> & { + /** + * @generated from field: mantrae.v1.User user = 1; + */ + user?: User; }; /** * Describes the message mantrae.v1.VerifyOTPResponse. * Use `create(VerifyOTPResponseSchema)` to create a new message. */ -export const VerifyOTPResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 6); +export const VerifyOTPResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 6); /** * @generated from message mantrae.v1.SendOTPRequest */ -export type SendOTPRequest = Message<"mantrae.v1.SendOTPRequest"> & { - /** - * @generated from oneof mantrae.v1.SendOTPRequest.identifier - */ - identifier: { - /** - * @generated from field: string username = 1; - */ - value: string; - case: "username"; - } | { - /** - * @generated from field: string email = 2; - */ - value: string; - case: "email"; - } | { case: undefined; value?: undefined }; +export type SendOTPRequest = Message<'mantrae.v1.SendOTPRequest'> & { + /** + * @generated from oneof mantrae.v1.SendOTPRequest.identifier + */ + identifier: + | { + /** + * @generated from field: string username = 1; + */ + value: string; + case: 'username'; + } + | { + /** + * @generated from field: string email = 2; + */ + value: string; + case: 'email'; + } + | { case: undefined; value?: undefined }; }; /** * Describes the message mantrae.v1.SendOTPRequest. * Use `create(SendOTPRequestSchema)` to create a new message. */ -export const SendOTPRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 7); +export const SendOTPRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 7); /** * @generated from message mantrae.v1.SendOTPResponse */ -export type SendOTPResponse = Message<"mantrae.v1.SendOTPResponse"> & { -}; +export type SendOTPResponse = Message<'mantrae.v1.SendOTPResponse'> & {}; /** * Describes the message mantrae.v1.SendOTPResponse. * Use `create(SendOTPResponseSchema)` to create a new message. */ -export const SendOTPResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 8); +export const SendOTPResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 8); /** * @generated from message mantrae.v1.GetUserRequest */ -export type GetUserRequest = Message<"mantrae.v1.GetUserRequest"> & { - /** - * @generated from oneof mantrae.v1.GetUserRequest.identifier - */ - identifier: { - /** - * @generated from field: string id = 1; - */ - value: string; - case: "id"; - } | { - /** - * @generated from field: string username = 2; - */ - value: string; - case: "username"; - } | { - /** - * @generated from field: string email = 3; - */ - value: string; - case: "email"; - } | { case: undefined; value?: undefined }; +export type GetUserRequest = Message<'mantrae.v1.GetUserRequest'> & { + /** + * @generated from oneof mantrae.v1.GetUserRequest.identifier + */ + identifier: + | { + /** + * @generated from field: string id = 1; + */ + value: string; + case: 'id'; + } + | { + /** + * @generated from field: string username = 2; + */ + value: string; + case: 'username'; + } + | { + /** + * @generated from field: string email = 3; + */ + value: string; + case: 'email'; + } + | { case: undefined; value?: undefined }; }; /** * Describes the message mantrae.v1.GetUserRequest. * Use `create(GetUserRequestSchema)` to create a new message. */ -export const GetUserRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 9); +export const GetUserRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 9); /** * @generated from message mantrae.v1.GetUserResponse */ -export type GetUserResponse = Message<"mantrae.v1.GetUserResponse"> & { - /** - * @generated from field: mantrae.v1.User user = 1; - */ - user?: User; +export type GetUserResponse = Message<'mantrae.v1.GetUserResponse'> & { + /** + * @generated from field: mantrae.v1.User user = 1; + */ + user?: User; }; /** * Describes the message mantrae.v1.GetUserResponse. * Use `create(GetUserResponseSchema)` to create a new message. */ -export const GetUserResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 10); +export const GetUserResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 10); /** * @generated from message mantrae.v1.CreateUserRequest */ -export type CreateUserRequest = Message<"mantrae.v1.CreateUserRequest"> & { - /** - * @generated from field: string username = 1; - */ - username: string; +export type CreateUserRequest = Message<'mantrae.v1.CreateUserRequest'> & { + /** + * @generated from field: string username = 1; + */ + username: string; - /** - * @generated from field: string password = 2; - */ - password: string; + /** + * @generated from field: string password = 2; + */ + password: string; - /** - * @generated from field: optional string email = 3; - */ - email?: string; + /** + * @generated from field: optional string email = 3; + */ + email?: string; }; /** * Describes the message mantrae.v1.CreateUserRequest. * Use `create(CreateUserRequestSchema)` to create a new message. */ -export const CreateUserRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 11); +export const CreateUserRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 11); /** * @generated from message mantrae.v1.CreateUserResponse */ -export type CreateUserResponse = Message<"mantrae.v1.CreateUserResponse"> & { - /** - * @generated from field: mantrae.v1.User user = 1; - */ - user?: User; +export type CreateUserResponse = Message<'mantrae.v1.CreateUserResponse'> & { + /** + * @generated from field: mantrae.v1.User user = 1; + */ + user?: User; }; /** * Describes the message mantrae.v1.CreateUserResponse. * Use `create(CreateUserResponseSchema)` to create a new message. */ -export const CreateUserResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 12); +export const CreateUserResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 12); /** * @generated from message mantrae.v1.UpdateUserRequest */ -export type UpdateUserRequest = Message<"mantrae.v1.UpdateUserRequest"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type UpdateUserRequest = Message<'mantrae.v1.UpdateUserRequest'> & { + /** + * @generated from field: string id = 1; + */ + id: string; - /** - * @generated from field: string username = 2; - */ - username: string; + /** + * @generated from field: string username = 2; + */ + username: string; - /** - * @generated from field: optional string email = 3; - */ - email?: string; + /** + * @generated from field: optional string email = 3; + */ + email?: string; - /** - * @generated from field: optional string password = 4; - */ - password?: string; + /** + * @generated from field: optional string password = 4; + */ + password?: string; }; /** * Describes the message mantrae.v1.UpdateUserRequest. * Use `create(UpdateUserRequestSchema)` to create a new message. */ -export const UpdateUserRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 13); +export const UpdateUserRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 13); /** * @generated from message mantrae.v1.UpdateUserResponse */ -export type UpdateUserResponse = Message<"mantrae.v1.UpdateUserResponse"> & { - /** - * @generated from field: mantrae.v1.User user = 1; - */ - user?: User; +export type UpdateUserResponse = Message<'mantrae.v1.UpdateUserResponse'> & { + /** + * @generated from field: mantrae.v1.User user = 1; + */ + user?: User; }; /** * Describes the message mantrae.v1.UpdateUserResponse. * Use `create(UpdateUserResponseSchema)` to create a new message. */ -export const UpdateUserResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 14); +export const UpdateUserResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 14); /** * @generated from message mantrae.v1.DeleteUserRequest */ -export type DeleteUserRequest = Message<"mantrae.v1.DeleteUserRequest"> & { - /** - * @generated from field: string id = 1; - */ - id: string; +export type DeleteUserRequest = Message<'mantrae.v1.DeleteUserRequest'> & { + /** + * @generated from field: string id = 1; + */ + id: string; }; /** * Describes the message mantrae.v1.DeleteUserRequest. * Use `create(DeleteUserRequestSchema)` to create a new message. */ -export const DeleteUserRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 15); +export const DeleteUserRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 15); /** * @generated from message mantrae.v1.DeleteUserResponse */ -export type DeleteUserResponse = Message<"mantrae.v1.DeleteUserResponse"> & { -}; +export type DeleteUserResponse = Message<'mantrae.v1.DeleteUserResponse'> & {}; /** * Describes the message mantrae.v1.DeleteUserResponse. * Use `create(DeleteUserResponseSchema)` to create a new message. */ -export const DeleteUserResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 16); +export const DeleteUserResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 16); /** * @generated from message mantrae.v1.ListUsersRequest */ -export type ListUsersRequest = Message<"mantrae.v1.ListUsersRequest"> & { - /** - * @generated from field: optional int64 limit = 1; - */ - limit?: bigint; +export type ListUsersRequest = Message<'mantrae.v1.ListUsersRequest'> & { + /** + * @generated from field: optional int64 limit = 1; + */ + limit?: bigint; - /** - * @generated from field: optional int64 offset = 2; - */ - offset?: bigint; + /** + * @generated from field: optional int64 offset = 2; + */ + offset?: bigint; }; /** * Describes the message mantrae.v1.ListUsersRequest. * Use `create(ListUsersRequestSchema)` to create a new message. */ -export const ListUsersRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 17); +export const ListUsersRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 17); /** * @generated from message mantrae.v1.ListUsersResponse */ -export type ListUsersResponse = Message<"mantrae.v1.ListUsersResponse"> & { - /** - * @generated from field: repeated mantrae.v1.User users = 1; - */ - users: User[]; +export type ListUsersResponse = Message<'mantrae.v1.ListUsersResponse'> & { + /** + * @generated from field: repeated mantrae.v1.User users = 1; + */ + users: User[]; - /** - * @generated from field: int64 total_count = 2; - */ - totalCount: bigint; + /** + * @generated from field: int64 total_count = 2; + */ + totalCount: bigint; }; /** * Describes the message mantrae.v1.ListUsersResponse. * Use `create(ListUsersResponseSchema)` to create a new message. */ -export const ListUsersResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 18); +export const ListUsersResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 18); /** * @generated from message mantrae.v1.GetOIDCStatusRequest */ -export type GetOIDCStatusRequest = Message<"mantrae.v1.GetOIDCStatusRequest"> & { -}; +export type GetOIDCStatusRequest = Message<'mantrae.v1.GetOIDCStatusRequest'> & {}; /** * Describes the message mantrae.v1.GetOIDCStatusRequest. * Use `create(GetOIDCStatusRequestSchema)` to create a new message. */ -export const GetOIDCStatusRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 19); +export const GetOIDCStatusRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 19); /** * @generated from message mantrae.v1.GetOIDCStatusResponse */ -export type GetOIDCStatusResponse = Message<"mantrae.v1.GetOIDCStatusResponse"> & { - /** - * @generated from field: bool oidc_enabled = 1; - */ - oidcEnabled: boolean; +export type GetOIDCStatusResponse = Message<'mantrae.v1.GetOIDCStatusResponse'> & { + /** + * @generated from field: bool oidc_enabled = 1; + */ + oidcEnabled: boolean; - /** - * @generated from field: bool login_enabled = 2; - */ - loginEnabled: boolean; + /** + * @generated from field: bool login_enabled = 2; + */ + loginEnabled: boolean; - /** - * @generated from field: string provider = 3; - */ - provider: string; + /** + * @generated from field: string provider = 3; + */ + provider: string; }; /** * Describes the message mantrae.v1.GetOIDCStatusResponse. * Use `create(GetOIDCStatusResponseSchema)` to create a new message. */ -export const GetOIDCStatusResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_user, 20); +export const GetOIDCStatusResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_user, 20); /** * @generated from service mantrae.v1.UserService */ export const UserService: GenService<{ - /** - * @generated from rpc mantrae.v1.UserService.LoginUser - */ - loginUser: { - methodKind: "unary"; - input: typeof LoginUserRequestSchema; - output: typeof LoginUserResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.LogoutUser - */ - logoutUser: { - methodKind: "unary"; - input: typeof LogoutUserRequestSchema; - output: typeof LogoutUserResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.VerifyOTP - */ - verifyOTP: { - methodKind: "unary"; - input: typeof VerifyOTPRequestSchema; - output: typeof VerifyOTPResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.SendOTP - */ - sendOTP: { - methodKind: "unary"; - input: typeof SendOTPRequestSchema; - output: typeof SendOTPResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.GetUser - */ - getUser: { - methodKind: "unary"; - input: typeof GetUserRequestSchema; - output: typeof GetUserResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.CreateUser - */ - createUser: { - methodKind: "unary"; - input: typeof CreateUserRequestSchema; - output: typeof CreateUserResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.UpdateUser - */ - updateUser: { - methodKind: "unary"; - input: typeof UpdateUserRequestSchema; - output: typeof UpdateUserResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.DeleteUser - */ - deleteUser: { - methodKind: "unary"; - input: typeof DeleteUserRequestSchema; - output: typeof DeleteUserResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.ListUsers - */ - listUsers: { - methodKind: "unary"; - input: typeof ListUsersRequestSchema; - output: typeof ListUsersResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UserService.GetOIDCStatus - */ - getOIDCStatus: { - methodKind: "unary"; - input: typeof GetOIDCStatusRequestSchema; - output: typeof GetOIDCStatusResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_user, 0); - + /** + * @generated from rpc mantrae.v1.UserService.LoginUser + */ + loginUser: { + methodKind: 'unary'; + input: typeof LoginUserRequestSchema; + output: typeof LoginUserResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.LogoutUser + */ + logoutUser: { + methodKind: 'unary'; + input: typeof LogoutUserRequestSchema; + output: typeof LogoutUserResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.VerifyOTP + */ + verifyOTP: { + methodKind: 'unary'; + input: typeof VerifyOTPRequestSchema; + output: typeof VerifyOTPResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.SendOTP + */ + sendOTP: { + methodKind: 'unary'; + input: typeof SendOTPRequestSchema; + output: typeof SendOTPResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.GetUser + */ + getUser: { + methodKind: 'unary'; + input: typeof GetUserRequestSchema; + output: typeof GetUserResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.CreateUser + */ + createUser: { + methodKind: 'unary'; + input: typeof CreateUserRequestSchema; + output: typeof CreateUserResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.UpdateUser + */ + updateUser: { + methodKind: 'unary'; + input: typeof UpdateUserRequestSchema; + output: typeof UpdateUserResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.DeleteUser + */ + deleteUser: { + methodKind: 'unary'; + input: typeof DeleteUserRequestSchema; + output: typeof DeleteUserResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.ListUsers + */ + listUsers: { + methodKind: 'unary'; + input: typeof ListUsersRequestSchema; + output: typeof ListUsersResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UserService.GetOIDCStatus + */ + getOIDCStatus: { + methodKind: 'unary'; + input: typeof GetOIDCStatusRequestSchema; + output: typeof GetOIDCStatusResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_user, 0); diff --git a/web/src/lib/gen/mantrae/v1/util_pb.ts b/web/src/lib/gen/mantrae/v1/util_pb.ts index e0ad56a..399e34b 100644 --- a/web/src/lib/gen/mantrae/v1/util_pb.ts +++ b/web/src/lib/gen/mantrae/v1/util_pb.ts @@ -2,101 +2,290 @@ // @generated from file mantrae/v1/util.proto (package mantrae.v1, syntax proto3) /* eslint-disable */ -import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; -import type { Message } from "@bufbuild/protobuf"; +import type { GenEnum, GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2'; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2'; +import { file_buf_validate_validate } from '../../buf/validate/validate_pb'; +import type { Agent } from './agent_pb'; +import { file_mantrae_v1_agent } from './agent_pb'; +import type { DnsProvider } from './dns_provider_pb'; +import { file_mantrae_v1_dns_provider } from './dns_provider_pb'; +import type { EntryPoint } from './entry_point_pb'; +import { file_mantrae_v1_entry_point } from './entry_point_pb'; +import type { Middleware } from './middleware_pb'; +import { file_mantrae_v1_middleware } from './middleware_pb'; +import type { Profile } from './profile_pb'; +import { file_mantrae_v1_profile } from './profile_pb'; +import type { Router } from './router_pb'; +import { file_mantrae_v1_router } from './router_pb'; +import type { ServersTransport } from './servers_transport_pb'; +import { file_mantrae_v1_servers_transport } from './servers_transport_pb'; +import type { Service } from './service_pb'; +import { file_mantrae_v1_service } from './service_pb'; +import type { TraefikInstance } from './traefik_instance_pb'; +import { file_mantrae_v1_traefik_instance } from './traefik_instance_pb'; +import type { User } from './user_pb'; +import { file_mantrae_v1_user } from './user_pb'; +import type { Message } from '@bufbuild/protobuf'; /** * Describes the file mantrae/v1/util.proto. */ -export const file_mantrae_v1_util: GenFile = /*@__PURE__*/ - fileDesc("ChVtYW50cmFlL3YxL3V0aWwucHJvdG8SCm1hbnRyYWUudjEiEwoRR2V0VmVyc2lvblJlcXVlc3QiJQoSR2V0VmVyc2lvblJlc3BvbnNlEg8KB3ZlcnNpb24YASABKAkiFAoSR2V0UHVibGljSVBSZXF1ZXN0IjEKE0dldFB1YmxpY0lQUmVzcG9uc2USDAoEaXB2NBgBIAEoCRIMCgRpcHY2GAIgASgJMqoBCgtVdGlsU2VydmljZRJLCgpHZXRWZXJzaW9uEh0ubWFudHJhZS52MS5HZXRWZXJzaW9uUmVxdWVzdBoeLm1hbnRyYWUudjEuR2V0VmVyc2lvblJlc3BvbnNlEk4KC0dldFB1YmxpY0lQEh4ubWFudHJhZS52MS5HZXRQdWJsaWNJUFJlcXVlc3QaHy5tYW50cmFlLnYxLkdldFB1YmxpY0lQUmVzcG9uc2VCowEKDmNvbS5tYW50cmFlLnYxQglVdGlsUHJvdG9QAVo9Z2l0aHViLmNvbS9taXp1Y2hpbGFicy9tYW50cmFlL3Byb3RvL2dlbi9tYW50cmFlL3YxO21hbnRyYWV2MaICA01YWKoCCk1hbnRyYWUuVjHKAgpNYW50cmFlXFYx4gIWTWFudHJhZVxWMVxHUEJNZXRhZGF0YeoCC01hbnRyYWU6OlYxYgZwcm90bzM"); +export const file_mantrae_v1_util: GenFile = + /*@__PURE__*/ + fileDesc( + 'ChVtYW50cmFlL3YxL3V0aWwucHJvdG8SCm1hbnRyYWUudjEiEwoRR2V0VmVyc2lvblJlcXVlc3QiJQoSR2V0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ljZRJLCgpHZXRWZXJzaW9uEh0ubWFudHJhZS52MS5HZXRWZXJzaW9uUmVxdWVzdBoeLm1hbnRyYWUudjEuR2V0VmVyc2lvblJlc3BvbnNlEk4KC0dldFB1YmxpY0lQEh4ubWFudHJhZS52MS5HZXRQdWJsaWNJUFJlcXVlc3QaHy5tYW50cmFlLnYxLkdldFB1YmxpY0lQUmVzcG9uc2USUAoLRXZlbnRTdHJlYW0SHi5tYW50cmFlLnYxLkV2ZW50U3RyZWFtUmVxdWVzdBofLm1hbnRyYWUudjEuRXZlbnRTdHJlYW1SZXNwb25zZTABQqMBCg5jb20ubWFudHJhZS52MUIJVXRpbFByb3RvUAFaPWdpdGh1Yi5jb20vbWl6dWNoaWxhYnMvbWFudHJhZS9wcm90by9nZW4vbWFudHJhZS92MTttYW50cmFldjGiAgNNWFiqAgpNYW50cmFlLlYxygIKTWFudHJhZVxWMeICFk1hbnRyYWVcVjFcR1BCTWV0YWRhdGHqAgtNYW50cmFlOjpWMWIGcHJvdG8z', + [ + file_buf_validate_validate, + file_mantrae_v1_agent, + file_mantrae_v1_dns_provider, + file_mantrae_v1_entry_point, + file_mantrae_v1_middleware, + file_mantrae_v1_profile, + file_mantrae_v1_router, + file_mantrae_v1_servers_transport, + file_mantrae_v1_service, + file_mantrae_v1_traefik_instance, + file_mantrae_v1_user + ] + ); /** * @generated from message mantrae.v1.GetVersionRequest */ -export type GetVersionRequest = Message<"mantrae.v1.GetVersionRequest"> & { -}; +export type GetVersionRequest = Message<'mantrae.v1.GetVersionRequest'> & {}; /** * Describes the message mantrae.v1.GetVersionRequest. * Use `create(GetVersionRequestSchema)` to create a new message. */ -export const GetVersionRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_util, 0); +export const GetVersionRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_util, 0); /** * @generated from message mantrae.v1.GetVersionResponse */ -export type GetVersionResponse = Message<"mantrae.v1.GetVersionResponse"> & { - /** - * @generated from field: string version = 1; - */ - version: string; +export type GetVersionResponse = Message<'mantrae.v1.GetVersionResponse'> & { + /** + * @generated from field: string version = 1; + */ + version: string; }; /** * Describes the message mantrae.v1.GetVersionResponse. * Use `create(GetVersionResponseSchema)` to create a new message. */ -export const GetVersionResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_util, 1); +export const GetVersionResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_util, 1); /** * @generated from message mantrae.v1.GetPublicIPRequest */ -export type GetPublicIPRequest = Message<"mantrae.v1.GetPublicIPRequest"> & { -}; +export type GetPublicIPRequest = Message<'mantrae.v1.GetPublicIPRequest'> & {}; /** * Describes the message mantrae.v1.GetPublicIPRequest. * Use `create(GetPublicIPRequestSchema)` to create a new message. */ -export const GetPublicIPRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_util, 2); +export const GetPublicIPRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_util, 2); /** * @generated from message mantrae.v1.GetPublicIPResponse */ -export type GetPublicIPResponse = Message<"mantrae.v1.GetPublicIPResponse"> & { - /** - * @generated from field: string ipv4 = 1; - */ - ipv4: string; +export type GetPublicIPResponse = Message<'mantrae.v1.GetPublicIPResponse'> & { + /** + * @generated from field: string ipv4 = 1; + */ + ipv4: string; - /** - * @generated from field: string ipv6 = 2; - */ - ipv6: string; + /** + * @generated from field: string ipv6 = 2; + */ + ipv6: string; }; /** * Describes the message mantrae.v1.GetPublicIPResponse. * Use `create(GetPublicIPResponseSchema)` to create a new message. */ -export const GetPublicIPResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_mantrae_v1_util, 3); +export const GetPublicIPResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_util, 3); + +/** + * @generated from message mantrae.v1.EventStreamRequest + */ +export type EventStreamRequest = Message<'mantrae.v1.EventStreamRequest'> & { + /** + * @generated from field: int64 profile_id = 1; + */ + profileId: bigint; +}; + +/** + * Describes the message mantrae.v1.EventStreamRequest. + * Use `create(EventStreamRequestSchema)` to create a new message. + */ +export const EventStreamRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_util, 4); + +/** + * @generated from message mantrae.v1.EventStreamResponse + */ +export type EventStreamResponse = Message<'mantrae.v1.EventStreamResponse'> & { + /** + * @generated from field: mantrae.v1.EventAction action = 1; + */ + action: EventAction; + + /** + * @generated from oneof mantrae.v1.EventStreamResponse.data + */ + data: + | { + /** + * @generated from field: mantrae.v1.Profile profile = 2; + */ + value: Profile; + case: 'profile'; + } + | { + /** + * @generated from field: mantrae.v1.User user = 3; + */ + value: User; + case: 'user'; + } + | { + /** + * @generated from field: mantrae.v1.Agent agent = 4; + */ + value: Agent; + case: 'agent'; + } + | { + /** + * @generated from field: mantrae.v1.DnsProvider dns_provider = 5; + */ + value: DnsProvider; + case: 'dnsProvider'; + } + | { + /** + * @generated from field: mantrae.v1.TraefikInstance traefik_instance = 6; + */ + value: TraefikInstance; + case: 'traefikInstance'; + } + | { + /** + * @generated from field: mantrae.v1.Router router = 7; + */ + value: Router; + case: 'router'; + } + | { + /** + * @generated from field: mantrae.v1.Service service = 8; + */ + value: Service; + case: 'service'; + } + | { + /** + * @generated from field: mantrae.v1.Middleware middleware = 9; + */ + value: Middleware; + case: 'middleware'; + } + | { + /** + * @generated from field: mantrae.v1.ServersTransport servers_transport = 10; + */ + value: ServersTransport; + case: 'serversTransport'; + } + | { + /** + * @generated from field: mantrae.v1.EntryPoint entry_point = 11; + */ + value: EntryPoint; + case: 'entryPoint'; + } + | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message mantrae.v1.EventStreamResponse. + * Use `create(EventStreamResponseSchema)` to create a new message. + */ +export const EventStreamResponseSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_mantrae_v1_util, 5); + +/** + * @generated from enum mantrae.v1.EventAction + */ +export enum EventAction { + /** + * @generated from enum value: EVENT_ACTION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: EVENT_ACTION_CREATED = 1; + */ + CREATED = 1, + + /** + * @generated from enum value: EVENT_ACTION_UPDATED = 2; + */ + UPDATED = 2, + + /** + * @generated from enum value: EVENT_ACTION_DELETED = 3; + */ + DELETED = 3 +} + +/** + * Describes the enum mantrae.v1.EventAction. + */ +export const EventActionSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_mantrae_v1_util, 0); /** * @generated from service mantrae.v1.UtilService */ export const UtilService: GenService<{ - /** - * @generated from rpc mantrae.v1.UtilService.GetVersion - */ - getVersion: { - methodKind: "unary"; - input: typeof GetVersionRequestSchema; - output: typeof GetVersionResponseSchema; - }, - /** - * @generated from rpc mantrae.v1.UtilService.GetPublicIP - */ - getPublicIP: { - methodKind: "unary"; - input: typeof GetPublicIPRequestSchema; - output: typeof GetPublicIPResponseSchema; - }, -}> = /*@__PURE__*/ - serviceDesc(file_mantrae_v1_util, 0); - + /** + * @generated from rpc mantrae.v1.UtilService.GetVersion + */ + getVersion: { + methodKind: 'unary'; + input: typeof GetVersionRequestSchema; + output: typeof GetVersionResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UtilService.GetPublicIP + */ + getPublicIP: { + methodKind: 'unary'; + input: typeof GetPublicIPRequestSchema; + output: typeof GetPublicIPResponseSchema; + }; + /** + * @generated from rpc mantrae.v1.UtilService.EventStream + */ + eventStream: { + methodKind: 'server_streaming'; + input: typeof EventStreamRequestSchema; + output: typeof EventStreamResponseSchema; + }; +}> = /*@__PURE__*/ serviceDesc(file_mantrae_v1_util, 0); diff --git a/web/src/lib/gen/zen/traefik-schemas.ts b/web/src/lib/gen/zen/traefik-schemas.ts index 856e0b5..587be76 100644 --- a/web/src/lib/gen/zen/traefik-schemas.ts +++ b/web/src/lib/gen/zen/traefik-schemas.ts @@ -4,709 +4,712 @@ import { z } from 'zod'; export const DomainSchema = z.object({ - main: z.string().optional(), - sans: z.string().array().optional(), -}) -export type Domain = z.infer + main: z.string().optional(), + sans: z.string().array().optional() +}); +export type Domain = z.infer; export const RouterTLSConfigSchema = z.object({ - options: z.string().optional(), - certResolver: z.string().optional(), - domains: DomainSchema.array().optional(), -}) -export type RouterTLSConfig = z.infer + options: z.string().optional(), + certResolver: z.string().optional(), + domains: DomainSchema.array().optional() +}); +export type RouterTLSConfig = z.infer; export const RouterObservabilityConfigSchema = z.object({ - accessLogs: z.boolean().optional(), - tracing: z.boolean().optional(), - metrics: z.boolean().optional(), -}) -export type RouterObservabilityConfig = z.infer + accessLogs: z.boolean().optional(), + tracing: z.boolean().optional(), + metrics: z.boolean().optional() +}); +export type RouterObservabilityConfig = z.infer; export const RouterSchema = z.object({ - entryPoints: z.string().array().optional(), - middlewares: z.string().array().optional(), - service: z.string().optional(), - rule: z.string().optional(), - ruleSyntax: z.string().optional(), - priority: z.number().optional(), - tls: RouterTLSConfigSchema.optional(), - observability: RouterObservabilityConfigSchema.optional(), -}) -export type Router = z.infer + entryPoints: z.string().array().optional(), + middlewares: z.string().array().optional(), + service: z.string().optional(), + rule: z.string().optional(), + ruleSyntax: z.string().optional(), + priority: z.number().optional(), + tls: RouterTLSConfigSchema.optional(), + observability: RouterObservabilityConfigSchema.optional() +}); +export type Router = z.infer; export const CookieSchema = z.object({ - name: z.string().optional(), - secure: z.boolean().optional(), - httpOnly: z.boolean().optional(), - sameSite: z.string().optional(), - maxAge: z.number().optional(), - path: z.string().optional(), - domain: z.string().optional(), -}) -export type Cookie = z.infer + name: z.string().optional(), + secure: z.boolean().optional(), + httpOnly: z.boolean().optional(), + sameSite: z.string().optional(), + maxAge: z.number().optional(), + path: z.string().optional(), + domain: z.string().optional() +}); +export type Cookie = z.infer; export const StickySchema = z.object({ - cookie: CookieSchema.optional(), -}) -export type Sticky = z.infer + cookie: CookieSchema.optional() +}); +export type Sticky = z.infer; export const ServerSchema = z.object({ - url: z.string().optional(), - weight: z.number().optional(), - preservePath: z.boolean().optional(), - fenced: z.boolean().optional(), -}) -export type Server = z.infer + url: z.string().optional(), + weight: z.number().optional(), + preservePath: z.boolean().optional(), + fenced: z.boolean().optional() +}); +export type Server = z.infer; export const ServerHealthCheckSchema = z.object({ - scheme: z.string().optional(), - mode: z.string().optional(), - path: z.string().optional(), - method: z.string().optional(), - status: z.number().optional(), - port: z.number().optional(), - interval: z.number().optional(), - timeout: z.number().optional(), - hostname: z.string().optional(), - followRedirects: z.boolean().optional(), - headers: z.record(z.string(), z.string()).optional(), -}) -export type ServerHealthCheck = z.infer + scheme: z.string().optional(), + mode: z.string().optional(), + path: z.string().optional(), + method: z.string().optional(), + status: z.number().optional(), + port: z.number().optional(), + interval: z.number().optional(), + timeout: z.number().optional(), + hostname: z.string().optional(), + followRedirects: z.boolean().optional(), + headers: z.record(z.string(), z.string()).optional() +}); +export type ServerHealthCheck = z.infer; export const ResponseForwardingSchema = z.object({ - flushInterval: z.number().optional(), -}) -export type ResponseForwarding = z.infer + flushInterval: z.number().optional() +}); +export type ResponseForwarding = z.infer; export const ServersLoadBalancerSchema = z.object({ - sticky: StickySchema.optional(), - servers: ServerSchema.array().optional(), - strategy: z.string().optional(), - healthCheck: ServerHealthCheckSchema.optional(), - passHostHeader: z.boolean().nullable(), - responseForwarding: ResponseForwardingSchema.optional(), - serversTransport: z.string().optional(), -}) -export type ServersLoadBalancer = z.infer + sticky: StickySchema.optional(), + servers: ServerSchema.array().optional(), + strategy: z.string().optional(), + healthCheck: ServerHealthCheckSchema.optional(), + passHostHeader: z.boolean().nullable(), + responseForwarding: ResponseForwardingSchema.optional(), + serversTransport: z.string().optional() +}); +export type ServersLoadBalancer = z.infer; export const WRRServiceSchema = z.object({ - name: z.string().optional(), - weight: z.number().optional(), -}) -export type WRRService = z.infer + name: z.string().optional(), + weight: z.number().optional() +}); +export type WRRService = z.infer; -export const HealthCheckSchema = z.object({ -}) -export type HealthCheck = z.infer +export const HealthCheckSchema = z.object({}); +export type HealthCheck = z.infer; export const WeightedRoundRobinSchema = z.object({ - services: WRRServiceSchema.array().optional(), - sticky: StickySchema.optional(), - healthCheck: HealthCheckSchema.optional(), -}) -export type WeightedRoundRobin = z.infer + services: WRRServiceSchema.array().optional(), + sticky: StickySchema.optional(), + healthCheck: HealthCheckSchema.optional() +}); +export type WeightedRoundRobin = z.infer; export const MirrorServiceSchema = z.object({ - name: z.string().optional(), - percent: z.number().optional(), -}) -export type MirrorService = z.infer + name: z.string().optional(), + percent: z.number().optional() +}); +export type MirrorService = z.infer; export const MirroringSchema = z.object({ - service: z.string().optional(), - mirrorBody: z.boolean().optional(), - maxBodySize: z.number().optional(), - mirrors: MirrorServiceSchema.array().optional(), - healthCheck: HealthCheckSchema.optional(), -}) -export type Mirroring = z.infer + service: z.string().optional(), + mirrorBody: z.boolean().optional(), + maxBodySize: z.number().optional(), + mirrors: MirrorServiceSchema.array().optional(), + healthCheck: HealthCheckSchema.optional() +}); +export type Mirroring = z.infer; export const FailoverSchema = z.object({ - service: z.string().optional(), - fallback: z.string().optional(), - healthCheck: HealthCheckSchema.optional(), -}) -export type Failover = z.infer + service: z.string().optional(), + fallback: z.string().optional(), + healthCheck: HealthCheckSchema.optional() +}); +export type Failover = z.infer; export const ServiceSchema = z.object({ - loadBalancer: ServersLoadBalancerSchema.optional(), - weighted: WeightedRoundRobinSchema.optional(), - mirroring: MirroringSchema.optional(), - failover: FailoverSchema.optional(), -}) -export type Service = z.infer + loadBalancer: ServersLoadBalancerSchema.optional(), + weighted: WeightedRoundRobinSchema.optional(), + mirroring: MirroringSchema.optional(), + failover: FailoverSchema.optional() +}); +export type Service = z.infer; export const AddPrefixSchema = z.object({ - prefix: z.string().optional(), -}) -export type AddPrefix = z.infer + prefix: z.string().optional() +}); +export type AddPrefix = z.infer; export const StripPrefixSchema = z.object({ - prefixes: z.string().array().optional(), - forceSlash: z.boolean().optional(), -}) -export type StripPrefix = z.infer + prefixes: z.string().array().optional(), + forceSlash: z.boolean().optional() +}); +export type StripPrefix = z.infer; export const StripPrefixRegexSchema = z.object({ - regex: z.string().array().optional(), -}) -export type StripPrefixRegex = z.infer + regex: z.string().array().optional() +}); +export type StripPrefixRegex = z.infer; export const ReplacePathSchema = z.object({ - path: z.string().optional(), -}) -export type ReplacePath = z.infer + path: z.string().optional() +}); +export type ReplacePath = z.infer; export const ReplacePathRegexSchema = z.object({ - regex: z.string().optional(), - replacement: z.string().optional(), -}) -export type ReplacePathRegex = z.infer + regex: z.string().optional(), + replacement: z.string().optional() +}); +export type ReplacePathRegex = z.infer; export const ChainSchema = z.object({ - middlewares: z.string().array().optional(), -}) -export type Chain = z.infer + middlewares: z.string().array().optional() +}); +export type Chain = z.infer; export const IPStrategySchema = z.object({ - depth: z.number().optional(), - excludedIPs: z.string().array().optional(), - ipv6Subnet: z.number().optional(), -}) -export type IPStrategy = z.infer + depth: z.number().optional(), + excludedIPs: z.string().array().optional(), + ipv6Subnet: z.number().optional() +}); +export type IPStrategy = z.infer; export const IPWhiteListSchema = z.object({ - sourceRange: z.string().array().optional(), - ipStrategy: IPStrategySchema.optional(), -}) -export type IPWhiteList = z.infer + sourceRange: z.string().array().optional(), + ipStrategy: IPStrategySchema.optional() +}); +export type IPWhiteList = z.infer; export const IPAllowListSchema = z.object({ - sourceRange: z.string().array().optional(), - ipStrategy: IPStrategySchema.optional(), - rejectStatusCode: z.number().optional(), -}) -export type IPAllowList = z.infer + sourceRange: z.string().array().optional(), + ipStrategy: IPStrategySchema.optional(), + rejectStatusCode: z.number().optional() +}); +export type IPAllowList = z.infer; export const HeadersSchema = z.object({ - customRequestHeaders: z.record(z.string(), z.string()).optional(), - customResponseHeaders: z.record(z.string(), z.string()).optional(), - accessControlAllowCredentials: z.boolean().optional(), - accessControlAllowHeaders: z.string().array().optional(), - accessControlAllowMethods: z.string().array().optional(), - accessControlAllowOriginList: z.string().array().optional(), - accessControlAllowOriginListRegex: z.string().array().optional(), - accessControlExposeHeaders: z.string().array().optional(), - accessControlMaxAge: z.number().optional(), - addVaryHeader: z.boolean().optional(), - allowedHosts: z.string().array().optional(), - hostsProxyHeaders: z.string().array().optional(), - sslProxyHeaders: z.record(z.string(), z.string()).optional(), - stsSeconds: z.number().optional(), - stsIncludeSubdomains: z.boolean().optional(), - stsPreload: z.boolean().optional(), - forceSTSHeader: z.boolean().optional(), - frameDeny: z.boolean().optional(), - customFrameOptionsValue: z.string().optional(), - contentTypeNosniff: z.boolean().optional(), - browserXssFilter: z.boolean().optional(), - customBrowserXSSValue: z.string().optional(), - contentSecurityPolicy: z.string().optional(), - contentSecurityPolicyReportOnly: z.string().optional(), - publicKey: z.string().optional(), - referrerPolicy: z.string().optional(), - permissionsPolicy: z.string().optional(), - isDevelopment: z.boolean().optional(), - featurePolicy: z.string().optional(), - sslRedirect: z.boolean().optional(), - sslTemporaryRedirect: z.boolean().optional(), - sslHost: z.string().optional(), - sslForceHost: z.boolean().optional(), -}) -export type Headers = z.infer + customRequestHeaders: z.record(z.string(), z.string()).optional(), + customResponseHeaders: z.record(z.string(), z.string()).optional(), + accessControlAllowCredentials: z.boolean().optional(), + accessControlAllowHeaders: z.string().array().optional(), + accessControlAllowMethods: z.string().array().optional(), + accessControlAllowOriginList: z.string().array().optional(), + accessControlAllowOriginListRegex: z.string().array().optional(), + accessControlExposeHeaders: z.string().array().optional(), + accessControlMaxAge: z.number().optional(), + addVaryHeader: z.boolean().optional(), + allowedHosts: z.string().array().optional(), + hostsProxyHeaders: z.string().array().optional(), + sslProxyHeaders: z.record(z.string(), z.string()).optional(), + stsSeconds: z.number().optional(), + stsIncludeSubdomains: z.boolean().optional(), + stsPreload: z.boolean().optional(), + forceSTSHeader: z.boolean().optional(), + frameDeny: z.boolean().optional(), + customFrameOptionsValue: z.string().optional(), + contentTypeNosniff: z.boolean().optional(), + browserXssFilter: z.boolean().optional(), + customBrowserXSSValue: z.string().optional(), + contentSecurityPolicy: z.string().optional(), + contentSecurityPolicyReportOnly: z.string().optional(), + publicKey: z.string().optional(), + referrerPolicy: z.string().optional(), + permissionsPolicy: z.string().optional(), + isDevelopment: z.boolean().optional(), + featurePolicy: z.string().optional(), + sslRedirect: z.boolean().optional(), + sslTemporaryRedirect: z.boolean().optional(), + sslHost: z.string().optional(), + sslForceHost: z.boolean().optional() +}); +export type Headers = z.infer; export const ErrorPageSchema = z.object({ - status: z.string().array().optional(), - statusRewrites: z.record(z.string(), z.number()).optional(), - service: z.string().optional(), - query: z.string().optional(), -}) -export type ErrorPage = z.infer + status: z.string().array().optional(), + statusRewrites: z.record(z.string(), z.number()).optional(), + service: z.string().optional(), + query: z.string().optional() +}); +export type ErrorPage = z.infer; export const SourceCriterionSchema = z.object({ - ipStrategy: IPStrategySchema.optional(), - requestHeaderName: z.string().optional(), - requestHost: z.boolean().optional(), -}) -export type SourceCriterion = z.infer + ipStrategy: IPStrategySchema.optional(), + requestHeaderName: z.string().optional(), + requestHost: z.boolean().optional() +}); +export type SourceCriterion = z.infer; export const ClientTLSSchema = z.object({ - ca: z.string().optional(), - cert: z.string().optional(), - key: z.string().optional(), - insecureSkipVerify: z.boolean().optional(), -}) -export type ClientTLS = z.infer + ca: z.string().optional(), + cert: z.string().optional(), + key: z.string().optional(), + insecureSkipVerify: z.boolean().optional() +}); +export type ClientTLS = z.infer; export const RedisSchema = z.object({ - endpoints: z.string().array().optional(), - tls: ClientTLSSchema.optional(), - username: z.string().optional(), - password: z.string().optional(), - db: z.number().optional(), - poolSize: z.number().optional(), - minIdleConns: z.number().optional(), - maxActiveConns: z.number().optional(), - readTimeout: z.number().optional(), - writeTimeout: z.number().optional(), - dialTimeout: z.number().optional(), -}) -export type Redis = z.infer + endpoints: z.string().array().optional(), + tls: ClientTLSSchema.optional(), + username: z.string().optional(), + password: z.string().optional(), + db: z.number().optional(), + poolSize: z.number().optional(), + minIdleConns: z.number().optional(), + maxActiveConns: z.number().optional(), + readTimeout: z.number().optional(), + writeTimeout: z.number().optional(), + dialTimeout: z.number().optional() +}); +export type Redis = z.infer; export const RateLimitSchema = z.object({ - average: z.number().optional(), - period: z.number().optional(), - burst: z.number().optional(), - sourceCriterion: SourceCriterionSchema.optional(), - redis: RedisSchema.optional(), -}) -export type RateLimit = z.infer + average: z.number().optional(), + period: z.number().optional(), + burst: z.number().optional(), + sourceCriterion: SourceCriterionSchema.optional(), + redis: RedisSchema.optional() +}); +export type RateLimit = z.infer; export const RedirectRegexSchema = z.object({ - regex: z.string().optional(), - replacement: z.string().optional(), - permanent: z.boolean().optional(), -}) -export type RedirectRegex = z.infer + regex: z.string().optional(), + replacement: z.string().optional(), + permanent: z.boolean().optional() +}); +export type RedirectRegex = z.infer; export const RedirectSchemeSchema = z.object({ - scheme: z.string().optional(), - port: z.string().optional(), - permanent: z.boolean().optional(), -}) -export type RedirectScheme = z.infer + scheme: z.string().optional(), + port: z.string().optional(), + permanent: z.boolean().optional() +}); +export type RedirectScheme = z.infer; export const BasicAuthSchema = z.object({ - users: z.string().array().optional(), - usersFile: z.string().optional(), - realm: z.string().optional(), - removeHeader: z.boolean().optional(), - headerField: z.string().optional(), -}) -export type BasicAuth = z.infer + users: z.string().array().optional(), + usersFile: z.string().optional(), + realm: z.string().optional(), + removeHeader: z.boolean().optional(), + headerField: z.string().optional() +}); +export type BasicAuth = z.infer; export const DigestAuthSchema = z.object({ - users: z.string().array().optional(), - usersFile: z.string().optional(), - removeHeader: z.boolean().optional(), - realm: z.string().optional(), - headerField: z.string().optional(), -}) -export type DigestAuth = z.infer + users: z.string().array().optional(), + usersFile: z.string().optional(), + removeHeader: z.boolean().optional(), + realm: z.string().optional(), + headerField: z.string().optional() +}); +export type DigestAuth = z.infer; export const ForwardAuthSchema = z.object({ - address: z.string().optional(), - tls: ClientTLSSchema.optional(), - trustForwardHeader: z.boolean().optional(), - authResponseHeaders: z.string().array().optional(), - authResponseHeadersRegex: z.string().optional(), - authRequestHeaders: z.string().array().optional(), - addAuthCookiesToResponse: z.string().array().optional(), - headerField: z.string().optional(), - forwardBody: z.boolean().optional(), - maxBodySize: z.number().optional(), - preserveLocationHeader: z.boolean().optional(), - preserveRequestMethod: z.boolean().optional(), -}) -export type ForwardAuth = z.infer + address: z.string().optional(), + tls: ClientTLSSchema.optional(), + trustForwardHeader: z.boolean().optional(), + authResponseHeaders: z.string().array().optional(), + authResponseHeadersRegex: z.string().optional(), + authRequestHeaders: z.string().array().optional(), + addAuthCookiesToResponse: z.string().array().optional(), + headerField: z.string().optional(), + forwardBody: z.boolean().optional(), + maxBodySize: z.number().optional(), + preserveLocationHeader: z.boolean().optional(), + preserveRequestMethod: z.boolean().optional() +}); +export type ForwardAuth = z.infer; export const InFlightReqSchema = z.object({ - amount: z.number().optional(), - sourceCriterion: SourceCriterionSchema.optional(), -}) -export type InFlightReq = z.infer + amount: z.number().optional(), + sourceCriterion: SourceCriterionSchema.optional() +}); +export type InFlightReq = z.infer; export const BufferingSchema = z.object({ - maxRequestBodyBytes: z.number().optional(), - memRequestBodyBytes: z.number().optional(), - maxResponseBodyBytes: z.number().optional(), - memResponseBodyBytes: z.number().optional(), - retryExpression: z.string().optional(), -}) -export type Buffering = z.infer + maxRequestBodyBytes: z.number().optional(), + memRequestBodyBytes: z.number().optional(), + maxResponseBodyBytes: z.number().optional(), + memResponseBodyBytes: z.number().optional(), + retryExpression: z.string().optional() +}); +export type Buffering = z.infer; export const CircuitBreakerSchema = z.object({ - expression: z.string().optional(), - checkPeriod: z.number().optional(), - fallbackDuration: z.number().optional(), - recoveryDuration: z.number().optional(), - responseCode: z.number().optional(), -}) -export type CircuitBreaker = z.infer + expression: z.string().optional(), + checkPeriod: z.number().optional(), + fallbackDuration: z.number().optional(), + recoveryDuration: z.number().optional(), + responseCode: z.number().optional() +}); +export type CircuitBreaker = z.infer; export const CompressSchema = z.object({ - excludedContentTypes: z.string().array().optional(), - includedContentTypes: z.string().array().optional(), - minResponseBodyBytes: z.number().optional(), - encodings: z.string().array().optional(), - defaultEncoding: z.string().optional(), -}) -export type Compress = z.infer + excludedContentTypes: z.string().array().optional(), + includedContentTypes: z.string().array().optional(), + minResponseBodyBytes: z.number().optional(), + encodings: z.string().array().optional(), + defaultEncoding: z.string().optional() +}); +export type Compress = z.infer; export const TLSClientCertificateSubjectDNInfoSchema = z.object({ - country: z.boolean().optional(), - province: z.boolean().optional(), - locality: z.boolean().optional(), - organization: z.boolean().optional(), - organizationalUnit: z.boolean().optional(), - commonName: z.boolean().optional(), - serialNumber: z.boolean().optional(), - domainComponent: z.boolean().optional(), -}) -export type TLSClientCertificateSubjectDNInfo = z.infer + country: z.boolean().optional(), + province: z.boolean().optional(), + locality: z.boolean().optional(), + organization: z.boolean().optional(), + organizationalUnit: z.boolean().optional(), + commonName: z.boolean().optional(), + serialNumber: z.boolean().optional(), + domainComponent: z.boolean().optional() +}); +export type TLSClientCertificateSubjectDNInfo = z.infer< + typeof TLSClientCertificateSubjectDNInfoSchema +>; export const TLSClientCertificateIssuerDNInfoSchema = z.object({ - country: z.boolean().optional(), - province: z.boolean().optional(), - locality: z.boolean().optional(), - organization: z.boolean().optional(), - commonName: z.boolean().optional(), - serialNumber: z.boolean().optional(), - domainComponent: z.boolean().optional(), -}) -export type TLSClientCertificateIssuerDNInfo = z.infer + country: z.boolean().optional(), + province: z.boolean().optional(), + locality: z.boolean().optional(), + organization: z.boolean().optional(), + commonName: z.boolean().optional(), + serialNumber: z.boolean().optional(), + domainComponent: z.boolean().optional() +}); +export type TLSClientCertificateIssuerDNInfo = z.infer< + typeof TLSClientCertificateIssuerDNInfoSchema +>; export const TLSClientCertificateInfoSchema = z.object({ - notAfter: z.boolean().optional(), - notBefore: z.boolean().optional(), - sans: z.boolean().optional(), - serialNumber: z.boolean().optional(), - subject: TLSClientCertificateSubjectDNInfoSchema.optional(), - issuer: TLSClientCertificateIssuerDNInfoSchema.optional(), -}) -export type TLSClientCertificateInfo = z.infer + notAfter: z.boolean().optional(), + notBefore: z.boolean().optional(), + sans: z.boolean().optional(), + serialNumber: z.boolean().optional(), + subject: TLSClientCertificateSubjectDNInfoSchema.optional(), + issuer: TLSClientCertificateIssuerDNInfoSchema.optional() +}); +export type TLSClientCertificateInfo = z.infer; export const PassTLSClientCertSchema = z.object({ - pem: z.boolean().optional(), - info: TLSClientCertificateInfoSchema.optional(), -}) -export type PassTLSClientCert = z.infer + pem: z.boolean().optional(), + info: TLSClientCertificateInfoSchema.optional() +}); +export type PassTLSClientCert = z.infer; export const RetrySchema = z.object({ - attempts: z.number().optional(), - initialInterval: z.number().optional(), -}) -export type Retry = z.infer + attempts: z.number().optional(), + initialInterval: z.number().optional() +}); +export type Retry = z.infer; export const ContentTypeSchema = z.object({ - autoDetect: z.boolean().optional(), -}) -export type ContentType = z.infer + autoDetect: z.boolean().optional() +}); +export type ContentType = z.infer; export const GrpcWebSchema = z.object({ - allowOrigins: z.string().array().optional(), -}) -export type GrpcWeb = z.infer + allowOrigins: z.string().array().optional() +}); +export type GrpcWeb = z.infer; export const HeaderModifierSchema = z.object({ - set: z.record(z.string(), z.string()).optional(), - add: z.record(z.string(), z.string()).optional(), - remove: z.string().array().optional(), -}) -export type HeaderModifier = z.infer + set: z.record(z.string(), z.string()).optional(), + add: z.record(z.string(), z.string()).optional(), + remove: z.string().array().optional() +}); +export type HeaderModifier = z.infer; export const RequestRedirectSchema = z.object({ - scheme: z.string().optional(), - hostname: z.string().optional(), - port: z.string().optional(), - path: z.string().optional(), - pathPrefix: z.string().optional(), - statusCode: z.number().optional(), -}) -export type RequestRedirect = z.infer + scheme: z.string().optional(), + hostname: z.string().optional(), + port: z.string().optional(), + path: z.string().optional(), + pathPrefix: z.string().optional(), + statusCode: z.number().optional() +}); +export type RequestRedirect = z.infer; export const URLRewriteSchema = z.object({ - hostname: z.string().optional(), - path: z.string().optional(), - pathPrefix: z.string().optional(), -}) -export type URLRewrite = z.infer + hostname: z.string().optional(), + path: z.string().optional(), + pathPrefix: z.string().optional() +}); +export type URLRewrite = z.infer; export const MiddlewareSchema = z.object({ - addPrefix: AddPrefixSchema.optional(), - stripPrefix: StripPrefixSchema.optional(), - stripPrefixRegex: StripPrefixRegexSchema.optional(), - replacePath: ReplacePathSchema.optional(), - replacePathRegex: ReplacePathRegexSchema.optional(), - chain: ChainSchema.optional(), - ipWhiteList: IPWhiteListSchema.optional(), - ipAllowList: IPAllowListSchema.optional(), - headers: HeadersSchema.optional(), - errors: ErrorPageSchema.optional(), - rateLimit: RateLimitSchema.optional(), - redirectRegex: RedirectRegexSchema.optional(), - redirectScheme: RedirectSchemeSchema.optional(), - basicAuth: BasicAuthSchema.optional(), - digestAuth: DigestAuthSchema.optional(), - forwardAuth: ForwardAuthSchema.optional(), - inFlightReq: InFlightReqSchema.optional(), - buffering: BufferingSchema.optional(), - circuitBreaker: CircuitBreakerSchema.optional(), - compress: CompressSchema.optional(), - passTLSClientCert: PassTLSClientCertSchema.optional(), - retry: RetrySchema.optional(), - contentType: ContentTypeSchema.optional(), - grpcWeb: GrpcWebSchema.optional(), - plugin: z.record(z.string(), z.record(z.string(), z.any())).optional(), - requestHeaderModifier: HeaderModifierSchema.optional(), - responseHeaderModifier: HeaderModifierSchema.optional(), - requestRedirect: RequestRedirectSchema.optional(), - URLRewrite: URLRewriteSchema.optional(), -}) -export type Middleware = z.infer + addPrefix: AddPrefixSchema.optional(), + stripPrefix: StripPrefixSchema.optional(), + stripPrefixRegex: StripPrefixRegexSchema.optional(), + replacePath: ReplacePathSchema.optional(), + replacePathRegex: ReplacePathRegexSchema.optional(), + chain: ChainSchema.optional(), + ipWhiteList: IPWhiteListSchema.optional(), + ipAllowList: IPAllowListSchema.optional(), + headers: HeadersSchema.optional(), + errors: ErrorPageSchema.optional(), + rateLimit: RateLimitSchema.optional(), + redirectRegex: RedirectRegexSchema.optional(), + redirectScheme: RedirectSchemeSchema.optional(), + basicAuth: BasicAuthSchema.optional(), + digestAuth: DigestAuthSchema.optional(), + forwardAuth: ForwardAuthSchema.optional(), + inFlightReq: InFlightReqSchema.optional(), + buffering: BufferingSchema.optional(), + circuitBreaker: CircuitBreakerSchema.optional(), + compress: CompressSchema.optional(), + passTLSClientCert: PassTLSClientCertSchema.optional(), + retry: RetrySchema.optional(), + contentType: ContentTypeSchema.optional(), + grpcWeb: GrpcWebSchema.optional(), + plugin: z.record(z.string(), z.record(z.string(), z.any())).optional(), + requestHeaderModifier: HeaderModifierSchema.optional(), + responseHeaderModifier: HeaderModifierSchema.optional(), + requestRedirect: RequestRedirectSchema.optional(), + URLRewrite: URLRewriteSchema.optional() +}); +export type Middleware = z.infer; export const ModelSchema = z.object({ - middlewares: z.string().array().optional(), - tls: RouterTLSConfigSchema.optional(), - observability: RouterObservabilityConfigSchema, -}) -export type Model = z.infer + middlewares: z.string().array().optional(), + tls: RouterTLSConfigSchema.optional(), + observability: RouterObservabilityConfigSchema +}); +export type Model = z.infer; export const CertificateSchema = z.object({ - certFile: z.string().optional(), - keyFile: z.string().optional(), -}) -export type Certificate = z.infer + certFile: z.string().optional(), + keyFile: z.string().optional() +}); +export type Certificate = z.infer; export const ForwardingTimeoutsSchema = z.object({ - dialTimeout: z.number().optional(), - responseHeaderTimeout: z.number().optional(), - idleConnTimeout: z.number().optional(), - readIdleTimeout: z.number().optional(), - pingTimeout: z.number().optional(), -}) -export type ForwardingTimeouts = z.infer + dialTimeout: z.number().optional(), + responseHeaderTimeout: z.number().optional(), + idleConnTimeout: z.number().optional(), + readIdleTimeout: z.number().optional(), + pingTimeout: z.number().optional() +}); +export type ForwardingTimeouts = z.infer; export const SpiffeSchema = z.object({ - ids: z.string().array().optional(), - trustDomain: z.string().optional(), -}) -export type Spiffe = z.infer + ids: z.string().array().optional(), + trustDomain: z.string().optional() +}); +export type Spiffe = z.infer; export const ServersTransportSchema = z.object({ - serverName: z.string().optional(), - insecureSkipVerify: z.boolean().optional(), - rootCAs: z.string().array().optional(), - certificates: CertificateSchema.array().optional(), - maxIdleConnsPerHost: z.number().optional(), - forwardingTimeouts: ForwardingTimeoutsSchema.optional(), - disableHTTP2: z.boolean().optional(), - peerCertURI: z.string().optional(), - spiffe: SpiffeSchema.optional(), -}) -export type ServersTransport = z.infer + serverName: z.string().optional(), + insecureSkipVerify: z.boolean().optional(), + rootCAs: z.string().array().optional(), + certificates: CertificateSchema.array().optional(), + maxIdleConnsPerHost: z.number().optional(), + forwardingTimeouts: ForwardingTimeoutsSchema.optional(), + disableHTTP2: z.boolean().optional(), + peerCertURI: z.string().optional(), + spiffe: SpiffeSchema.optional() +}); +export type ServersTransport = z.infer; export const HTTPConfigurationSchema = z.object({ - routers: z.record(z.string(), RouterSchema).optional(), - services: z.record(z.string(), ServiceSchema).optional(), - middlewares: z.record(z.string(), MiddlewareSchema).optional(), - models: z.record(z.string(), ModelSchema).optional(), - serversTransports: z.record(z.string(), ServersTransportSchema).optional(), -}) -export type HTTPConfiguration = z.infer + routers: z.record(z.string(), RouterSchema).optional(), + services: z.record(z.string(), ServiceSchema).optional(), + middlewares: z.record(z.string(), MiddlewareSchema).optional(), + models: z.record(z.string(), ModelSchema).optional(), + serversTransports: z.record(z.string(), ServersTransportSchema).optional() +}); +export type HTTPConfiguration = z.infer; export const RouterTCPTLSConfigSchema = z.object({ - passthrough: z.boolean(), - options: z.string().optional(), - certResolver: z.string().optional(), - domains: DomainSchema.array().optional(), -}) -export type RouterTCPTLSConfig = z.infer + passthrough: z.boolean(), + options: z.string().optional(), + certResolver: z.string().optional(), + domains: DomainSchema.array().optional() +}); +export type RouterTCPTLSConfig = z.infer; export const TCPRouterSchema = z.object({ - entryPoints: z.string().array().optional(), - middlewares: z.string().array().optional(), - service: z.string().optional(), - rule: z.string().optional(), - ruleSyntax: z.string().optional(), - priority: z.number().optional(), - tls: RouterTCPTLSConfigSchema.optional(), -}) -export type TCPRouter = z.infer + entryPoints: z.string().array().optional(), + middlewares: z.string().array().optional(), + service: z.string().optional(), + rule: z.string().optional(), + ruleSyntax: z.string().optional(), + priority: z.number().optional(), + tls: RouterTCPTLSConfigSchema.optional() +}); +export type TCPRouter = z.infer; export const ProxyProtocolSchema = z.object({ - version: z.number().optional(), -}) -export type ProxyProtocol = z.infer + version: z.number().optional() +}); +export type ProxyProtocol = z.infer; export const TCPServerSchema = z.object({ - address: z.string().optional(), - tls: z.boolean().optional(), -}) -export type TCPServer = z.infer + address: z.string().optional(), + tls: z.boolean().optional() +}); +export type TCPServer = z.infer; export const TCPServersLoadBalancerSchema = z.object({ - proxyProtocol: ProxyProtocolSchema.optional(), - servers: TCPServerSchema.array().optional(), - serversTransport: z.string().optional(), - terminationDelay: z.number().optional(), -}) -export type TCPServersLoadBalancer = z.infer + proxyProtocol: ProxyProtocolSchema.optional(), + servers: TCPServerSchema.array().optional(), + serversTransport: z.string().optional(), + terminationDelay: z.number().optional() +}); +export type TCPServersLoadBalancer = z.infer; export const TCPWRRServiceSchema = z.object({ - name: z.string().optional(), - weight: z.number().optional(), -}) -export type TCPWRRService = z.infer + name: z.string().optional(), + weight: z.number().optional() +}); +export type TCPWRRService = z.infer; export const TCPWeightedRoundRobinSchema = z.object({ - services: TCPWRRServiceSchema.array().optional(), -}) -export type TCPWeightedRoundRobin = z.infer + services: TCPWRRServiceSchema.array().optional() +}); +export type TCPWeightedRoundRobin = z.infer; export const TCPServiceSchema = z.object({ - loadBalancer: TCPServersLoadBalancerSchema.optional(), - weighted: TCPWeightedRoundRobinSchema.optional(), -}) -export type TCPService = z.infer + loadBalancer: TCPServersLoadBalancerSchema.optional(), + weighted: TCPWeightedRoundRobinSchema.optional() +}); +export type TCPService = z.infer; export const TCPInFlightConnSchema = z.object({ - amount: z.number().optional(), -}) -export type TCPInFlightConn = z.infer + amount: z.number().optional() +}); +export type TCPInFlightConn = z.infer; export const TCPIPWhiteListSchema = z.object({ - sourceRange: z.string().array().optional(), -}) -export type TCPIPWhiteList = z.infer + sourceRange: z.string().array().optional() +}); +export type TCPIPWhiteList = z.infer; export const TCPIPAllowListSchema = z.object({ - sourceRange: z.string().array().optional(), -}) -export type TCPIPAllowList = z.infer + sourceRange: z.string().array().optional() +}); +export type TCPIPAllowList = z.infer; export const TCPMiddlewareSchema = z.object({ - inFlightConn: TCPInFlightConnSchema.optional(), - ipWhiteList: TCPIPWhiteListSchema.optional(), - ipAllowList: TCPIPAllowListSchema.optional(), -}) -export type TCPMiddleware = z.infer + inFlightConn: TCPInFlightConnSchema.optional(), + ipWhiteList: TCPIPWhiteListSchema.optional(), + ipAllowList: TCPIPAllowListSchema.optional() +}); +export type TCPMiddleware = z.infer; export const TLSClientConfigSchema = z.object({ - serverName: z.string().optional(), - insecureSkipVerify: z.boolean().optional(), - rootCAs: z.string().array().optional(), - certificates: CertificateSchema.array().optional(), - peerCertURI: z.string().optional(), - spiffe: SpiffeSchema.optional(), -}) -export type TLSClientConfig = z.infer + serverName: z.string().optional(), + insecureSkipVerify: z.boolean().optional(), + rootCAs: z.string().array().optional(), + certificates: CertificateSchema.array().optional(), + peerCertURI: z.string().optional(), + spiffe: SpiffeSchema.optional() +}); +export type TLSClientConfig = z.infer; export const TCPServersTransportSchema = z.object({ - dialKeepAlive: z.number().optional(), - dialTimeout: z.number().optional(), - terminationDelay: z.number().optional(), - tls: TLSClientConfigSchema.optional(), -}) -export type TCPServersTransport = z.infer + dialKeepAlive: z.number().optional(), + dialTimeout: z.number().optional(), + terminationDelay: z.number().optional(), + tls: TLSClientConfigSchema.optional() +}); +export type TCPServersTransport = z.infer; export const TCPConfigurationSchema = z.object({ - routers: z.record(z.string(), TCPRouterSchema).optional(), - services: z.record(z.string(), TCPServiceSchema).optional(), - middlewares: z.record(z.string(), TCPMiddlewareSchema).optional(), - serversTransports: z.record(z.string(), TCPServersTransportSchema).optional(), -}) -export type TCPConfiguration = z.infer + routers: z.record(z.string(), TCPRouterSchema).optional(), + services: z.record(z.string(), TCPServiceSchema).optional(), + middlewares: z.record(z.string(), TCPMiddlewareSchema).optional(), + serversTransports: z.record(z.string(), TCPServersTransportSchema).optional() +}); +export type TCPConfiguration = z.infer; export const UDPRouterSchema = z.object({ - entryPoints: z.string().array().optional(), - service: z.string().optional(), -}) -export type UDPRouter = z.infer + entryPoints: z.string().array().optional(), + service: z.string().optional() +}); +export type UDPRouter = z.infer; export const UDPServerSchema = z.object({ - address: z.string().optional(), -}) -export type UDPServer = z.infer + address: z.string().optional() +}); +export type UDPServer = z.infer; export const UDPServersLoadBalancerSchema = z.object({ - servers: UDPServerSchema.array().optional(), -}) -export type UDPServersLoadBalancer = z.infer + servers: UDPServerSchema.array().optional() +}); +export type UDPServersLoadBalancer = z.infer; export const UDPWRRServiceSchema = z.object({ - name: z.string().optional(), - weight: z.number().optional(), -}) -export type UDPWRRService = z.infer + name: z.string().optional(), + weight: z.number().optional() +}); +export type UDPWRRService = z.infer; export const UDPWeightedRoundRobinSchema = z.object({ - services: UDPWRRServiceSchema.array().optional(), -}) -export type UDPWeightedRoundRobin = z.infer + services: UDPWRRServiceSchema.array().optional() +}); +export type UDPWeightedRoundRobin = z.infer; export const UDPServiceSchema = z.object({ - loadBalancer: UDPServersLoadBalancerSchema.optional(), - weighted: UDPWeightedRoundRobinSchema.optional(), -}) -export type UDPService = z.infer + loadBalancer: UDPServersLoadBalancerSchema.optional(), + weighted: UDPWeightedRoundRobinSchema.optional() +}); +export type UDPService = z.infer; export const UDPConfigurationSchema = z.object({ - routers: z.record(z.string(), UDPRouterSchema).optional(), - services: z.record(z.string(), UDPServiceSchema).optional(), -}) -export type UDPConfiguration = z.infer + routers: z.record(z.string(), UDPRouterSchema).optional(), + services: z.record(z.string(), UDPServiceSchema).optional() +}); +export type UDPConfiguration = z.infer; -export const CertAndStoresSchema = z.object({ - stores: z.string().array().optional(), -}).merge(CertificateSchema) -export type CertAndStores = z.infer +export const CertAndStoresSchema = z + .object({ + stores: z.string().array().optional() + }) + .merge(CertificateSchema); +export type CertAndStores = z.infer; export const ClientAuthSchema = z.object({ - caFiles: z.string().array().optional(), - clientAuthType: z.string().optional(), -}) -export type ClientAuth = z.infer + caFiles: z.string().array().optional(), + clientAuthType: z.string().optional() +}); +export type ClientAuth = z.infer; export const OptionsSchema = z.object({ - minVersion: z.string().optional(), - maxVersion: z.string().optional(), - cipherSuites: z.string().array().optional(), - curvePreferences: z.string().array().optional(), - clientAuth: ClientAuthSchema, - sniStrict: z.boolean().optional(), - alpnProtocols: z.string().array().optional(), - disableSessionTickets: z.boolean().optional(), - preferServerCipherSuites: z.boolean().optional(), -}) -export type Options = z.infer + minVersion: z.string().optional(), + maxVersion: z.string().optional(), + cipherSuites: z.string().array().optional(), + curvePreferences: z.string().array().optional(), + clientAuth: ClientAuthSchema, + sniStrict: z.boolean().optional(), + alpnProtocols: z.string().array().optional(), + disableSessionTickets: z.boolean().optional(), + preferServerCipherSuites: z.boolean().optional() +}); +export type Options = z.infer; export const GeneratedCertSchema = z.object({ - resolver: z.string().optional(), - domain: DomainSchema.optional(), -}) -export type GeneratedCert = z.infer + resolver: z.string().optional(), + domain: DomainSchema.optional() +}); +export type GeneratedCert = z.infer; export const StoreSchema = z.object({ - defaultCertificate: CertificateSchema.optional(), - defaultGeneratedCert: GeneratedCertSchema.optional(), -}) -export type Store = z.infer + defaultCertificate: CertificateSchema.optional(), + defaultGeneratedCert: GeneratedCertSchema.optional() +}); +export type Store = z.infer; export const TLSConfigurationSchema = z.object({ - certificates: CertAndStoresSchema.array().optional(), - options: z.record(z.string(), OptionsSchema).optional(), - stores: z.record(z.string(), StoreSchema).optional(), -}) -export type TLSConfiguration = z.infer + certificates: CertAndStoresSchema.array().optional(), + options: z.record(z.string(), OptionsSchema).optional(), + stores: z.record(z.string(), StoreSchema).optional() +}); +export type TLSConfiguration = z.infer; export const ConfigurationSchema = z.object({ - http: HTTPConfigurationSchema.optional(), - tcp: TCPConfigurationSchema.optional(), - udp: UDPConfigurationSchema.optional(), - tls: TLSConfigurationSchema.optional(), -}) -export type Configuration = z.infer - - + http: HTTPConfigurationSchema.optional(), + tcp: TCPConfigurationSchema.optional(), + udp: UDPConfigurationSchema.optional(), + tls: TLSConfigurationSchema.optional() +}); +export type Configuration = z.infer; diff --git a/web/src/lib/stores/realtime.ts b/web/src/lib/stores/realtime.ts new file mode 100644 index 0000000..28bd1a3 --- /dev/null +++ b/web/src/lib/stores/realtime.ts @@ -0,0 +1,262 @@ +import { EventAction, type EventStreamResponse } from '$lib/gen/mantrae/v1/util_pb'; +import { utilClient, entryPointClient, middlewareClient, dnsClient } from '$lib/api'; +import { profile } from './profile'; +import { writable } from 'svelte/store'; +import type { ConnectError } from '@connectrpc/connect'; +import type { Profile } from '$lib/gen/mantrae/v1/profile_pb'; +import type { User } from '$lib/gen/mantrae/v1/user_pb'; +import type { Agent } from '$lib/gen/mantrae/v1/agent_pb'; +import type { EntryPoint } from '$lib/gen/mantrae/v1/entry_point_pb'; +import type { Router } from '$lib/gen/mantrae/v1/router_pb'; +import type { Service } from '$lib/gen/mantrae/v1/service_pb'; +import type { Middleware } from '$lib/gen/mantrae/v1/middleware_pb'; +import type { ServersTransport } from '$lib/gen/mantrae/v1/servers_transport_pb'; +import type { DnsProvider } from '$lib/gen/mantrae/v1/dns_provider_pb'; +import type { TraefikInstance } from '$lib/gen/mantrae/v1/traefik_instance_pb'; + +export const profiles = writable([]); +export const users = writable([]); +export const agents = writable([]); +export const entryPoints = writable([]); +export const routers = writable([]); +export const services = writable([]); +export const middlewares = writable([]); +export const serversTransports = writable([]); +export const dnsProviders = writable([]); +export const traefikInstances = writable([]); + +let currentStream: AbortController | null = null; + +export async function subscribe() { + if (!profile.isValid()) return; + + // Cleanup previous connection + if (currentStream) { + currentStream.abort(); + } + + currentStream = new AbortController(); + try { + const stream = utilClient.eventStream( + { profileId: profile.id }, + { signal: currentStream.signal } + ); + + for await (const event of stream) { + handleEvent(event); + } + } catch (error) { + const err = error as ConnectError; + if (err.name !== 'canceled') { + console.error('Event stream error:', err.message); + // Retry connection after delay + setTimeout(subscribe, 5000); + } + } +} + +export function unsubscribe() { + if (currentStream) { + currentStream.abort(); + currentStream = null; + } +} + +function handleEvent(event: EventStreamResponse) { + const action = event.action; + switch (action) { + case EventAction.CREATED: + switch (event.data.case) { + case 'profile': { + const data = event.data.value; + if (!data) return; + profiles.update((p) => p.concat(data)); + break; + } + case 'user': { + const data = event.data.value; + if (!data) return; + users.update((u) => u.concat(data)); + break; + } + case 'agent': { + const data = event.data.value; + if (!data) return; + agents.update((a) => a.concat(data)); + break; + } + case 'entryPoint': { + const data = event.data.value; + if (!data) return; + entryPoints.update((e) => e.concat(data)); + break; + } + case 'router': { + const data = event.data.value; + if (!data) return; + routers.update((r) => r.concat(data)); + break; + } + case 'service': { + const data = event.data.value; + if (!data) return; + services.update((s) => s.concat(data)); + break; + } + case 'middleware': { + const data = event.data.value; + if (!data) return; + middlewares.update((m) => m.concat(data)); + break; + } + case 'serversTransport': { + const data = event.data.value; + if (!data) return; + serversTransports.update((s) => s.concat(data)); + break; + } + case 'dnsProvider': { + const data = event.data.value; + if (!data) return; + dnsProviders.update((d) => d.concat(data)); + break; + } + case 'traefikInstance': { + const data = event.data.value; + if (!data) return; + traefikInstances.update((t) => t.concat(data)); + break; + } + } + break; + case EventAction.UPDATED: + switch (event.data.case) { + case 'profile': { + const data = event.data.value; + if (!data) return; + profiles.update((p) => p.map((p) => (p.id === data.id ? data : p))); + break; + } + case 'user': { + const data = event.data.value; + if (!data) return; + users.update((u) => u.map((u) => (u.id === data.id ? data : u))); + break; + } + case 'agent': { + const data = event.data.value; + if (!data) return; + agents.update((a) => a.map((a) => (a.id === data.id ? data : a))); + break; + } + case 'entryPoint': { + // Refetch since we might update multiple entry points + entryPointClient.listEntryPoints({ profileId: profile.id }).then((response) => { + entryPoints.set(response.entryPoints); + }); + break; + } + case 'router': { + const data = event.data.value; + if (!data) return; + routers.update((r) => r.map((r) => (r.id === data.id ? data : r))); + break; + } + case 'service': { + const data = event.data.value; + if (!data) return; + services.update((s) => s.map((s) => (s.id === data.id ? data : s))); + break; + } + case 'middleware': { + middlewareClient.listMiddlewares({ profileId: profile.id }).then((response) => { + middlewares.set(response.middlewares); + }); + break; + } + case 'serversTransport': { + const data = event.data.value; + if (!data) return; + serversTransports.update((s) => s.map((s) => (s.id === data.id ? data : s))); + break; + } + case 'dnsProvider': { + dnsClient.listDnsProviders({ profileId: profile.id }).then((response) => { + dnsProviders.set(response.dnsProviders); + }); + break; + } + case 'traefikInstance': { + const data = event.data.value; + if (!data) return; + traefikInstances.update((t) => t.map((t) => (t.id === data.id ? data : t))); + break; + } + } + break; + case EventAction.DELETED: + switch (event.data.case) { + case 'profile': { + const data = event.data.value; + if (!data) return; + profiles.update((p) => p.filter((p) => p.id !== data.id)); + break; + } + case 'user': { + const data = event.data.value; + if (!data) return; + users.update((u) => u.filter((u) => u.id !== data.id)); + break; + } + case 'agent': { + const data = event.data.value; + if (!data) return; + agents.update((a) => a.filter((a) => a.id !== data.id)); + break; + } + case 'entryPoint': { + const data = event.data.value; + if (!data) return; + entryPoints.update((e) => e.filter((e) => e.id !== data.id)); + break; + } + case 'router': { + const data = event.data.value; + if (!data) return; + routers.update((r) => r.filter((r) => r.id !== data.id)); + break; + } + case 'service': { + const data = event.data.value; + if (!data) return; + services.update((s) => s.filter((s) => s.id !== data.id)); + break; + } + case 'middleware': { + const data = event.data.value; + if (!data) return; + middlewares.update((m) => m.filter((m) => m.id !== data.id)); + break; + } + case 'serversTransport': { + const data = event.data.value; + if (!data) return; + serversTransports.update((s) => s.filter((s) => s.id !== data.id)); + break; + } + case 'dnsProvider': { + const data = event.data.value; + if (!data) return; + dnsProviders.update((d) => d.filter((d) => d.id !== data.id)); + break; + } + case 'traefikInstance': { + const data = event.data.value; + if (!data) return; + traefikInstances.update((t) => t.filter((t) => t.id !== data.id)); + break; + } + } + break; + } +} diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index a049216..9d6e746 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -9,11 +9,22 @@ import { user } from '$lib/stores/user'; import { page } from '$app/state'; import '../app.css'; + import { onDestroy, onMount } from 'svelte'; + import { subscribe, unsubscribe } from '$lib/stores/realtime'; interface Props { children?: import('svelte').Snippet; } let { children }: Props = $props(); + + onMount(async () => { + if (user.isLoggedIn()) { + await subscribe(); + } + }); + onDestroy(() => { + unsubscribe(); + }); diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index a343d83..14c68b9 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -2,7 +2,6 @@ import * as Card from '$lib/components/ui/card/index.js'; import { Badge } from '$lib/components/ui/badge/index.js'; import { Button } from '$lib/components/ui/button/index.js'; - import { Progress } from '$lib/components/ui/progress/index.js'; import { Separator } from '$lib/components/ui/separator/index.js'; import { Globe, @@ -44,17 +43,25 @@ import AuditLogModal from '$lib/components/modals/AuditLogModal.svelte'; import TraefikConnection from '$lib/components/utils/TraefikConnection.svelte'; import { ProtocolType } from '$lib/gen/mantrae/v1/protocol_pb'; + import { + agents, + dnsProviders, + middlewares, + profiles, + routers, + services, + traefikInstances, + users + } from '$lib/stores/realtime'; + import { onMount } from 'svelte'; - let onlineAgents = $derived.by(async () => { - const response = await agentClient.listAgents({ profileId: profile.id }); - const now = Date.now(); - - let activeAgents = response.agents.reduce((count, agent) => { + let onlineAgents = $derived.by(() => { + let activeAgents = $agents.reduce((count, agent) => { if (!agent.updatedAt) return 0; const lastSeen = new Date(timestampDate(agent.updatedAt)); - const diffSeconds = (now - lastSeen.getTime()) / 1000; + const diffSeconds = (Date.now() - lastSeen.getTime()) / 1000; - return diffSeconds <= 30 ? count + 1 : count; + return diffSeconds <= 20 ? count + 1 : count; }, 0); return BigInt(activeAgents); }); @@ -85,6 +92,34 @@ let modalProfileOpen = $state(false); let modalConfigOpen = $state(false); let modalAuditLogOpen = $state(false); + + onMount(async () => { + const p = await profileClient.listProfiles({}); + profiles.set(p.profiles); + + const u = await userClient.listUsers({}); + users.set(u.users); + + const d = await dnsClient.listDnsProviders({}); + dnsProviders.set(d.dnsProviders); + + if (profile.isValid()) { + const a = await agentClient.listAgents({ profileId: profile.id }); + agents.set(a.agents); + + const r = await routerClient.listRouters({ profileId: profile.id }); + routers.set(r.routers); + + const s = await serviceClient.listServices({ profileId: profile.id }); + services.set(s.services); + + const m = await middlewareClient.listMiddlewares({ profileId: profile.id }); + middlewares.set(m.middlewares); + + const i = await traefikClient.listTraefikInstances({ profileId: profile.id }); + traefikInstances.set(i.traefikInstances); + } + }); @@ -115,13 +150,11 @@ - {#await profileClient.listProfiles({}) then result} -
{result.totalCount}
-
- - Active configurations -
- {/await} +
{$profiles?.length}
+
+ + Active configurations +
- {#await onlineAgents} -
0
- {:then result} -
{result}
-
- - Online now -
- {/await} +
{onlineAgents}
+
+ + Online now +
- {#await dnsClient.listDnsProviders({}) then result} -
- {result.totalCount} -
-
- {#if result.dnsProviders.find((p) => p.isDefault)} - - {:else} - - {/if} - - {result.dnsProviders.find((p) => p.isDefault)?.name || 'None'} - set as default - -
- {/await} +
+ {$dnsProviders?.length} +
+
+ {#if $dnsProviders.find((p) => p.isDefault)} + + {:else} + + {/if} + + {$dnsProviders.find((p) => p.isDefault)?.name || 'None'} + set as default + +
- {#await userClient.listUsers({}) then result} -
{result.totalCount}
-
- - Access managed -
- {/await} +
{$users?.length}
+
+ + Access managed +
- {#await routerClient.listRouters({ profileId: profile.id }) then result} -
-
-
-
- HTTP Routers -
- - {result.routers.filter((r) => r.type === ProtocolType.HTTP).length} - -
-
-
-
- TCP Routers -
- - {result.routers.filter((r) => r.type === ProtocolType.TCP).length} - -
-
-
-
- UDP Routers -
- - {result.routers.filter((r) => r.type === ProtocolType.UDP).length} - +
+
+
+
+ HTTP Routers
+ + {$routers.filter((r) => r.type === ProtocolType.HTTP).length} +
- {/await} +
+
+
+ TCP Routers +
+ + {$routers.filter((r) => r.type === ProtocolType.TCP).length} + +
+
+
+
+ UDP Routers +
+ + {$routers.filter((r) => r.type === ProtocolType.UDP).length} + +
+
@@ -255,57 +278,53 @@ - {#await middlewareClient.listMiddlewares({ profileId: profile.id }) then result} -
-
-
-
- HTTP Middlewares -
- - {result.middlewares.filter((m) => m.type === ProtocolType.HTTP).length} - -
-
-
-
- TCP Middlewares -
- - {result.middlewares.filter((m) => m.type === ProtocolType.TCP).length} - +
+
+
+
+ HTTP Middlewares
+ + {$middlewares.filter((m) => m.type === ProtocolType.HTTP).length} +
- {/await} +
+
+
+ TCP Middlewares +
+ + {$middlewares.filter((m) => m.type === ProtocolType.TCP).length} + +
+
- {#await traefikClient.listTraefikInstances({ profileId: profile.id }) then result} - - - - Traefik Instances - - {result.totalCount} - - -
- {#each result.traefikInstances || [] as instance (instance.id)} -
-
-
- {instance.name} -
- - {instance.url} - + + + + Traefik Instances + + {$traefikInstances?.length} + + +
+ {#each $traefikInstances || [] as instance (instance.id)} +
+
+
+ {instance.name}
- {/each} -
- - {/await} + + {instance.url} + +
+ {/each} +
+
@@ -327,138 +346,91 @@
- {#await profileClient.listProfiles({}) then result} - {#each result.profiles || [] as profile (profile.id)} -
-
-
-
- -
-
-

{profile.name}

-

{profile.description}

-

- {#if profile.createdAt} - Created {DateFormat.format(timestampDate(profile.createdAt))} - {/if} -

-
+ {#each $profiles || [] as profile (profile.id)} +
+
+
+
+ +
+
+

{profile.name}

+

{profile.description}

+

+ {#if profile.createdAt} + Created {DateFormat.format(timestampDate(profile.createdAt))} + {/if} +

+
- + -
- {#await agentClient.listAgents({ profileId: profile.id }) then agentResult} -
-
{agentResult.totalCount}
-
Agents
-
- {/await} - - {#await routerClient.listRouters({ profileId: profile.id }) then routerResult} -
-
- {routerResult.totalCount} -
-
Routers
-
- {/await} - - {#await serviceClient.listServices( { profileId: profile.id } ) then serviceResult} -
-
- {serviceResult.totalCount} -
-
Services
-
- {/await} - - {#await middlewareClient.listMiddlewares( { profileId: profile.id } ) then middlewareResult} -
-
- {middlewareResult.totalCount} -
-
Middlewares
-
- {/await} +
+
+
{$agents?.length}
+
Agents
-
- - - +
+
+ {$routers?.length} +
+
Routers
+
+ +
+
+ {$services?.length} +
+
Services
+
+ +
+
+ {$middlewares?.length} +
+
Middlewares
- {/each} - {/await} + +
+ + + +
+
+ {/each}
-
{#if profile.value} {/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/web/src/routes/agents/+page.svelte b/web/src/routes/agents/+page.svelte index 4ff3a75..dbe8ea8 100644 --- a/web/src/routes/agents/+page.svelte +++ b/web/src/routes/agents/+page.svelte @@ -7,22 +7,19 @@ import type { BulkAction } from '$lib/components/tables/types'; import { renderComponent } from '$lib/components/ui/data-table'; import type { Agent } from '$lib/gen/mantrae/v1/agent_pb'; - import { DateFormat, pageIndex, pageSize } from '$lib/stores/common'; + import { DateFormat } from '$lib/stores/common'; import { profile } from '$lib/stores/profile'; + import { agents } from '$lib/stores/realtime'; import { timestampDate } from '@bufbuild/protobuf/wkt'; import { ConnectError } from '@connectrpc/connect'; import { Bot, KeyRound, Pencil, Trash } from '@lucide/svelte'; - import type { ColumnDef, PaginationState } from '@tanstack/table-core'; - import { onMount } from 'svelte'; + import type { ColumnDef } from '@tanstack/table-core'; import { toast } from 'svelte-sonner'; + import { readable } from 'svelte/store'; let item = $state({} as Agent); let open = $state(false); - // Data state - let data = $state([]); - let rowCount = $state(0); - const columns: ColumnDef[] = [ { header: 'Hostname', @@ -97,11 +94,17 @@ } ]; + const now = readable(new Date(), (set) => { + const interval = setInterval(() => { + set(new Date()); + }, 1000); + return () => clearInterval(interval); + }); function getAgentStatus(agent: Agent) { if (!agent.updatedAt) return false; const lastSeen = new Date(timestampDate(agent.updatedAt)); - const lastSeenInSeconds = (new Date().getTime() - lastSeen.getTime()) / 1000; - return lastSeenInSeconds <= 60 ? true : false; + const lastSeenInSeconds = ($now.getTime() - lastSeen.getTime()) / 1000; + return lastSeenInSeconds <= 20 ? true : false; } const bulkActions: BulkAction[] = [ @@ -114,14 +117,9 @@ } ]; - async function onPaginationChange(p: PaginationState) { - await refreshData(p.pageSize, p.pageIndex); - } - const deleteItem = async (item: Agent) => { try { await agentClient.deleteAgent({ id: item.id }); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Agent ${item.hostname ?? item.id} deleted`); } catch (err) { const e = ConnectError.from(err); @@ -137,32 +135,19 @@ for (const row of rows) { await agentClient.deleteAgent({ id: row.id }); } - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Successfully deleted ${rows.length} agents`); } catch (err) { const e = ConnectError.from(err); toast.error('Failed to delete agents', { description: e.message }); } } - - async function refreshData(pageSize: number, pageIndex: number) { - const response = await agentClient.listAgents({ - profileId: profile.id, - limit: BigInt(pageSize), - offset: BigInt(pageIndex * pageSize) - }); - data = response.agents; - rowCount = Number(response.totalCount); - } - async function createAgent() { try { const response = await agentClient.createAgent({ profileId: profile.id }); if (!response.agent) return; + item = response.agent; toast.success('Agent created'); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); - item = response.agent; open = true; } catch (err) { const e = ConnectError.from(err); @@ -170,8 +155,12 @@ } } - onMount(async () => { - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); + $effect(() => { + if (profile.isValid()) { + agentClient.listAgents({ profileId: profile.id }).then((response) => { + agents.set(response.agents); + }); + } }); @@ -193,10 +182,8 @@
!getAgentStatus(r) @@ -208,4 +195,4 @@ />
- + diff --git a/web/src/routes/dns/+page.svelte b/web/src/routes/dns/+page.svelte index 6ed2912..a5b9340 100644 --- a/web/src/routes/dns/+page.svelte +++ b/web/src/routes/dns/+page.svelte @@ -8,20 +8,16 @@ import type { BulkAction } from '$lib/components/tables/types'; import { renderComponent } from '$lib/components/ui/data-table'; import { DnsProviderType, type DnsProvider } from '$lib/gen/mantrae/v1/dns_provider_pb'; - import { pageIndex, pageSize } from '$lib/stores/common'; + import { dnsProviders } from '$lib/stores/realtime'; import { ConnectError } from '@connectrpc/connect'; import { CircleCheck, CircleSlash, Globe, Pencil, Trash } from '@lucide/svelte'; - import type { ColumnDef, PaginationState } from '@tanstack/table-core'; + import type { ColumnDef } from '@tanstack/table-core'; import { onMount } from 'svelte'; import { toast } from 'svelte-sonner'; let item = $state({} as DnsProvider); let open = $state(false); - // Data state - let data = $state([]); - let rowCount = $state(0); - const columns: ColumnDef[] = [ { header: 'Name', @@ -156,14 +152,9 @@ } ]; - async function onPaginationChange(p: PaginationState) { - await refreshData(p.pageSize, p.pageIndex); - } - const deleteItem = async (item: DnsProvider) => { try { await dnsClient.deleteDnsProvider({ id: item.id }); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`DNS Provider ${item.name} deleted`); } catch (err) { const e = ConnectError.from(err); @@ -180,7 +171,6 @@ config: item.config, isDefault: isDefault }); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success( `DNS Provider ${item.name} ${isDefault ? 'set as default' : 'removed as default'}` ); @@ -198,7 +188,6 @@ for (const row of rows) { await dnsClient.deleteDnsProvider({ id: row.id }); } - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Successfully deleted ${rows.length} DNS Providers`); } catch (err) { const e = ConnectError.from(err); @@ -206,17 +195,9 @@ } } - async function refreshData(pageSize: number, pageIndex: number) { - const response = await dnsClient.listDnsProviders({ - limit: BigInt(pageSize), - offset: BigInt(pageIndex * pageSize) - }); - data = response.dnsProviders; - rowCount = Number(response.totalCount); - } - onMount(async () => { - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); + const response = await dnsClient.listDnsProviders({}); + dnsProviders.set(response.dnsProviders); }); @@ -238,10 +219,8 @@
- + diff --git a/web/src/routes/entrypoints/+page.svelte b/web/src/routes/entrypoints/+page.svelte index 2183843..3e8be80 100644 --- a/web/src/routes/entrypoints/+page.svelte +++ b/web/src/routes/entrypoints/+page.svelte @@ -7,20 +7,16 @@ import type { BulkAction } from '$lib/components/tables/types'; import { renderComponent } from '$lib/components/ui/data-table'; import type { EntryPoint } from '$lib/gen/mantrae/v1/entry_point_pb'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { profile } from '$lib/stores/profile'; + import { entryPoints } from '$lib/stores/realtime'; import { ConnectError } from '@connectrpc/connect'; import { CircleCheck, CircleSlash, EthernetPort, Pencil, Trash } from '@lucide/svelte'; - import type { ColumnDef, PaginationState } from '@tanstack/table-core'; + import type { ColumnDef } from '@tanstack/table-core'; import { toast } from 'svelte-sonner'; let item = $state({} as EntryPoint); let open = $state(false); - // Data state - let data = $state([]); - let rowCount = $state(0); - const columns: ColumnDef[] = [ { header: 'Name', @@ -106,14 +102,9 @@ } ]; - async function onPaginationChange(p: PaginationState) { - await refreshData(p.pageSize, p.pageIndex); - } - async function deleteItem(id: bigint) { try { await entryPointClient.deleteEntryPoint({ id: id }); - await refreshData(pageSize.value ?? 10, 0); toast.success('EntryPoint deleted'); } catch (err) { const e = ConnectError.from(err); @@ -129,7 +120,6 @@ address: item.address, isDefault: isDefault }); - await refreshData(pageSize.value ?? 10, 0); toast.success( `Entry point ${item.name} ${isDefault ? 'set as default' : 'removed as default'}` ); @@ -147,7 +137,6 @@ for (const e of rows) { await entryPointClient.deleteEntryPoint({ id: e.id }); } - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Successfully deleted ${rows.length} entrypoints`); } catch (err) { const e = ConnectError.from(err); @@ -155,18 +144,12 @@ } } - async function refreshData(pageSize: number, pageIndex: number) { - const response = await entryPointClient.listEntryPoints({ - profileId: profile.id, - limit: BigInt(pageSize), - offset: BigInt(pageIndex * pageSize) - }); - data = response.entryPoints; - rowCount = Number(response.totalCount); - } - $effect(() => { - if (profile) refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); + if (profile.isValid()) { + entryPointClient.listEntryPoints({ profileId: profile.id }).then((response) => { + entryPoints.set(response.entryPoints); + }); + } }); @@ -188,10 +171,8 @@
- + diff --git a/web/src/routes/middlewares/+page.svelte b/web/src/routes/middlewares/+page.svelte index 85d119b..342117f 100644 --- a/web/src/routes/middlewares/+page.svelte +++ b/web/src/routes/middlewares/+page.svelte @@ -3,7 +3,7 @@ import DataTable from '$lib/components/tables/DataTable.svelte'; import MiddlewareModal from '$lib/components/modals/MiddlewareModal.svelte'; import TableActions from '$lib/components/tables/TableActions.svelte'; - import type { ColumnDef, PaginationState } from '@tanstack/table-core'; + import type { ColumnDef } from '@tanstack/table-core'; import { Bot, CircleCheck, @@ -21,19 +21,15 @@ import { profile } from '$lib/stores/profile'; import type { BulkAction } from '$lib/components/tables/types'; import { type Middleware } from '$lib/gen/mantrae/v1/middleware_pb'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { middlewareClient } from '$lib/api'; import { ConnectError } from '@connectrpc/connect'; import ColumnText from '$lib/components/tables/ColumnText.svelte'; import { ProtocolType } from '$lib/gen/mantrae/v1/protocol_pb'; + import { middlewares } from '$lib/stores/realtime'; let item = $state({} as Middleware); let open = $state(false); - // Data state - let data = $state([]); - let rowCount = $state(0); - const columns: ColumnDef[] = [ { header: 'Name', @@ -194,14 +190,9 @@ } ]; - async function onPaginationChange(p: PaginationState) { - await refreshData(p.pageSize, p.pageIndex); - } - const deleteItem = async (id: bigint, type: ProtocolType) => { try { await middlewareClient.deleteMiddleware({ id: id, type: type }); - await refreshData(pageSize.value ?? 10, 0); toast.success('Middleware deleted'); } catch (err) { const e = ConnectError.from(err); @@ -219,7 +210,6 @@ enabled: item.enabled, isDefault: item.isDefault }); - await refreshData(pageSize.value ?? 10, 0); toast.success(`Middleware ${item.name} updated`); } catch (err) { const e = ConnectError.from(err); @@ -238,25 +228,19 @@ for (const row of rows) { await middlewareClient.deleteMiddleware({ id: row.id, type: row.type }); } - await refreshData(pageSize.value ?? 10, 0); toast.success(`Successfully deleted ${selectedRows.length} middlewares`); } catch (err) { const e = ConnectError.from(err); toast.error('Failed to delete middlewares', { description: e.message }); } } - async function refreshData(pageSize: number, pageIndex: number) { - const response = await middlewareClient.listMiddlewares({ - profileId: profile.id, - limit: BigInt(pageSize), - offset: BigInt(pageIndex * pageSize) - }); - data = response.middlewares; - rowCount = Number(response.totalCount); - } $effect(() => { - if (profile) refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); + if (profile.isValid()) { + middlewareClient.listMiddlewares({ profileId: profile.id }).then((response) => { + middlewares.set(response.middlewares); + }); + } }); @@ -278,10 +262,8 @@
- + diff --git a/web/src/routes/router/+page.svelte b/web/src/routes/router/+page.svelte index f65a814..f330d9e 100644 --- a/web/src/routes/router/+page.svelte +++ b/web/src/routes/router/+page.svelte @@ -11,7 +11,6 @@ import { renderComponent } from '$lib/components/ui/data-table'; import { type Router } from '$lib/gen/mantrae/v1/router_pb'; import type { RouterTCPTLSConfig, RouterTLSConfig } from '$lib/gen/zen/traefik-schemas'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { profile } from '$lib/stores/profile'; import { ConnectError } from '@connectrpc/connect'; import { @@ -28,18 +27,15 @@ TriangleAlert, Waves } from '@lucide/svelte'; - import type { ColumnDef, PaginationState } from '@tanstack/table-core'; + import type { ColumnDef } from '@tanstack/table-core'; import { toast } from 'svelte-sonner'; import { type IconComponent } from '$lib/types'; import { ProtocolType } from '$lib/gen/mantrae/v1/protocol_pb'; + import { routers } from '$lib/stores/realtime'; let item = $state({} as Router); let open = $state(false); - // Data state - let data = $state([]); - let rowCount = $state(0); - const columns: ColumnDef[] = [ { header: 'Name', @@ -230,14 +226,9 @@ } ]; - async function onPaginationChange(p: PaginationState) { - await refreshData(p.pageSize, p.pageIndex); - } - const deleteItem = async (item: Router) => { try { await routerClient.deleteRouter({ id: item.id, type: item.type }); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Router ${item.name} deleted`); } catch (err) { const e = ConnectError.from(err); @@ -273,7 +264,6 @@ enabled: service.service.enabled }); } - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Router ${item.name} updated`); } catch (err) { const e = ConnectError.from(err); @@ -318,25 +308,18 @@ break; } - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Successfully ${action}d ${rows.length} routers`); } catch (err) { const e = ConnectError.from(err); toast.error(`Failed to ${action}d routers`, { description: e.message }); } } - async function refreshData(pageSize: number, pageIndex: number) { - const response = await routerClient.listRouters({ - profileId: profile.id, - limit: BigInt(pageSize), - offset: BigInt(pageIndex * pageSize) - }); - data = response.routers; - rowCount = Number(response.totalCount); - } - $effect(() => { - if (profile) refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); + if (profile.isValid()) { + routerClient.listRouters({ profileId: profile.id }).then((response) => { + routers.set(response.routers); + }); + } }); @@ -358,10 +341,8 @@
- + diff --git a/web/src/routes/transport/+page.svelte b/web/src/routes/transport/+page.svelte index dbf772b..afdd230 100644 --- a/web/src/routes/transport/+page.svelte +++ b/web/src/routes/transport/+page.svelte @@ -6,7 +6,6 @@ import type { BulkAction } from '$lib/components/tables/types'; import { renderComponent } from '$lib/components/ui/data-table'; import { type ServersTransport } from '$lib/gen/mantrae/v1/servers_transport_pb'; - import { pageIndex, pageSize } from '$lib/stores/common'; import { profile } from '$lib/stores/profile'; import type { IconComponent } from '$lib/types'; import { ConnectError } from '@connectrpc/connect'; @@ -21,17 +20,14 @@ TriangleAlert, Truck } from '@lucide/svelte'; - import type { ColumnDef, PaginationState } from '@tanstack/table-core'; + import type { ColumnDef } from '@tanstack/table-core'; import { toast } from 'svelte-sonner'; import { ProtocolType } from '$lib/gen/mantrae/v1/protocol_pb'; + import { serversTransports } from '$lib/stores/realtime'; let item = $state({} as ServersTransport); let open = $state(false); - // Data state - let data = $state([]); - let rowCount = $state(0); - const columns: ColumnDef[] = [ { header: 'Name', @@ -139,14 +135,9 @@ } ]; - async function onPaginationChange(p: PaginationState) { - await refreshData(p.pageSize, p.pageIndex); - } - async function deleteItem(id: bigint) { try { await serversTransportClient.deleteServersTransport({ id: id }); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success('Transport deleted'); } catch (err) { const e = ConnectError.from(err); @@ -163,7 +154,6 @@ type: item.type, enabled: item.enabled }); - await refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); toast.success(`Transport ${item.name} updated`); } catch (err) { const e = ConnectError.from(err); @@ -179,7 +169,6 @@ for (const s of rows) { await serversTransportClient.deleteServersTransport({ id: s.id }); } - await refreshData(pageSize.value ?? 10, 0); toast.success(`Successfully deleted ${rows.length} transports`); } catch (err) { const e = ConnectError.from(err); @@ -187,18 +176,12 @@ } } - async function refreshData(pageSize: number, pageIndex: number) { - const response = await serversTransportClient.listServersTransports({ - profileId: profile.id, - limit: BigInt(pageSize), - offset: BigInt(pageIndex * pageSize) - }); - data = response.serversTransports; - rowCount = Number(response.totalCount); - } - $effect(() => { - if (profile) refreshData(pageSize.value ?? 10, pageIndex.value ?? 0); + if (profile.isValid()) { + serversTransportClient.listServersTransports({ profileId: profile.id }).then((response) => { + serversTransports.set(response.serversTransports); + }); + } }); @@ -220,10 +203,8 @@
- + diff --git a/web/src/routes/users/+page.svelte b/web/src/routes/users/+page.svelte index 6af84a9..3a7b01d 100644 --- a/web/src/routes/users/+page.svelte +++ b/web/src/routes/users/+page.svelte @@ -1,12 +1,12 @@ @@ -156,10 +139,8 @@
- + diff --git a/web/vite.config.ts b/web/vite.config.ts index d09560b..5096447 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -1,12 +1,12 @@ -import { sveltekit } from "@sveltejs/kit/vite"; -import { defineConfig } from "vite"; -import tailwindcss from "@tailwindcss/vite"; -import { compression } from "vite-plugin-compression2"; +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; +import tailwindcss from '@tailwindcss/vite'; +import { compression } from 'vite-plugin-compression2'; export default defineConfig({ plugins: [tailwindcss(), sveltekit(), compression()], define: {}, server: { - host: "127.0.0.1", - }, + host: '127.0.0.1' + } });