diff --git a/.golangci.yml b/.golangci.yml index 897de041f2..46e34e8fe9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -102,7 +102,7 @@ linters-settings: - pkg: braces.dev/errtrace desc: "use fmt.Errorf or errors.New" - pkg: os/exec - desc: "use github.com/TBD54566975/ftl/backend/common/exec" + desc: "use github.com/TBD54566975/ftl/internal/exec" # wrapcheck: # ignorePackageGlobs: # - github.com/TBD54566975/ftl/* diff --git a/Bitfile b/Bitfile index f75b820639..779b49fb6f 100644 --- a/Bitfile +++ b/Bitfile @@ -5,7 +5,7 @@ RELEASE = %{DEST}/release GO_SOURCES = **/*.go SCHEMA_IN = backend/schema/**/*.go cmd/ftl-schema/**/*.go -SCHEMA_OUT = protos/xyz/block/ftl/v1/schema/schema.proto +SCHEMA_OUT = backend/protos/xyz/block/ftl/v1/schema/schema.proto NODE_PROTOC_PLUGINS = frontend/node_modules/.bin/protoc-gen-connect-es \ frontend/node_modules/.bin/protoc-gen-es @@ -13,25 +13,19 @@ NODE_PROTOC_PLUGINS = frontend/node_modules/.bin/protoc-gen-connect-es \ PROTO_IN = **/*.proto **/buf.* bin/protoc* bin/buf %{NODE_PROTOC_PLUGINS} # There's no real way to mechanically generate the list of outputs, so we just # explicitly list them here. -PROTO_OUT = protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go \ - protos/xyz/block/ftl/v1/schema/schema.pb.go \ - protos/xyz/block/ftl/v1/console/console.pb.go \ - protos/xyz/block/ftl/v1/schema/runtime.pb.go \ - protos/xyz/block/ftl/v1/ftl.pb.go \ +PROTO_OUT = backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go \ + backend/protos/xyz/block/ftl/v1/schema/schema.pb.go \ + backend/protos/xyz/block/ftl/v1/console/console.pb.go \ + backend/protos/xyz/block/ftl/v1/schema/runtime.pb.go \ + backend/protos/xyz/block/ftl/v1/ftl.pb.go \ frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts \ frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts \ frontend/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts \ frontend/src/protos/xyz/block/ftl/v1/ftl_pb.ts \ - frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts \ - frontend/src/protos/google/protobuf/timestamp_pb.ts \ - frontend/src/protos/opentelemetry/proto/collector/metrics/v1/metrics_service_pb.ts \ - frontend/src/protos/opentelemetry/proto/common/v1/common_pb.ts \ - frontend/src/protos/opentelemetry/proto/metrics/v1/metrics_pb.ts \ - frontend/src/protos/opentelemetry/proto/resource/v1/resource_pb.ts \ - frontend/src/protos/opentelemetry/proto/trace/v1/trace_pb.ts + frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts -COMMON_LOG_IN = backend/common/log/api.go -COMMON_LOG_OUT = backend/common/log/log_level_string.go +COMMON_LOG_IN = internal/log/api.go +COMMON_LOG_OUT = internal/log/log_level_string.go KT_RUNTIME_IN = kotlin-runtime/ftl-runtime/**/*.{kt,kts} pom.xml kotlin-runtime/ftl-runtime/**/pom.xml KT_RUNTIME_OUT = kotlin-runtime/ftl-runtime/target/ftl-runtime-1.0-SNAPSHOT.jar @@ -111,8 +105,7 @@ kotlin-runtime/scaffolding.zip: kotlin-runtime/scaffolding/**/* build: buf format -w buf lint - (cd protos && buf generate) - (cd backend/common/3rdparty/protos && buf generate) + (cd backend/protos && buf generate) # There's a build cycle dependency here, so we can't clean: ftl-schema depends on generated .pb.go files -clean diff --git a/Justfile b/Justfile index cafe9cee11..2522911e09 100644 --- a/Justfile +++ b/Justfile @@ -15,8 +15,8 @@ deploy-echo-kotlin: ftl deploy examples/echo-kotlin regen-schema: - bit protos/xyz/block/ftl/v1/schema/schema.proto - bit protos/xyz/block/ftl/v1/schema/schema.pb.go + bit backend/protos/xyz/block/ftl/v1/schema/schema.proto + bit backend/protos/xyz/block/ftl/v1/schema/schema.pb.go # Run errtrace on Go files to add stacks errtrace: diff --git a/Procfile b/Procfile index af92d48d0d..8c09d30839 100644 --- a/Procfile +++ b/Procfile @@ -1,5 +1,5 @@ controller: watchexec -r -e go -i "frontend" -i "examples/**" -- ftl-controller --key C01H5BRT09Y07547SETZ4HWRA09 --bind http://localhost:8892 -regenerate: watchexec -e yaml -e sql -e proto -i "frontend" -i "examples/**" --debounce 1s -- bit protos/xyz/block/ftl/v1/schema/schema.proto protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go backend/controller/sql/db.go +regenerate: watchexec -e yaml -e sql -e proto -i "frontend" -i "examples/**" --debounce 1s -- bit backend/protos/xyz/block/ftl/v1/schema/schema.proto backend/protos/xyz/block/ftl/v1/ftlv1connect/ftl.connect.go backend/controller/sql/db.go runner0: watchexec -r -e go -i "frontend" -i "examples/**" -- ftl-runner --key R01H5BTS6ABP1EHGZSAGJMBV50A --language go --language kotlin --bind http://localhost:8894 --template-dir build/template runner1: watchexec -r -e go -i "frontend" -i "examples/**" -- ftl-runner --key R01H5BTSGKQ8AZ9S22N9N1SM9HV --language go --language kotlin --bind http://localhost:8895 --template-dir build/template runner2: watchexec -r -e go -i "frontend" -i "examples/**" -- ftl-runner --key R01H8DD0H13WX636B70WV7D216G --language go --language kotlin --bind http://localhost:8896 --template-dir build/template diff --git a/authn/authn.go b/authn/authn.go index 94b5eb930f..9ebdd4ea55 100644 --- a/authn/authn.go +++ b/authn/authn.go @@ -15,8 +15,8 @@ import ( "github.com/zalando/go-keyring" - "github.com/TBD54566975/ftl/backend/common/exec" - "github.com/TBD54566975/ftl/backend/common/log" + "github.com/TBD54566975/ftl/internal/exec" + "github.com/TBD54566975/ftl/internal/log" ) // GetAuthenticationHeaders returns authentication headers for the given endpoint. diff --git a/backend/common/3rdparty/protos/buf.gen.yaml b/backend/common/3rdparty/protos/buf.gen.yaml deleted file mode 100644 index 32a783fe1d..0000000000 --- a/backend/common/3rdparty/protos/buf.gen.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: v1 -plugins: - - plugin: connect-go - out: . - opt: paths=source_relative - - plugin: es - out: ../../../../frontend/src/protos - opt: target=ts - - plugin: connect-es - out: ../../../../frontend/src/protos - opt: target=ts diff --git a/backend/common/3rdparty/protos/google/protobuf/timestamp.proto b/backend/common/3rdparty/protos/google/protobuf/timestamp.proto deleted file mode 100644 index 354c5be3ce..0000000000 --- a/backend/common/3rdparty/protos/google/protobuf/timestamp.proto +++ /dev/null @@ -1,144 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "google.golang.org/protobuf/types/known/timestamppb"; -option java_multiple_files = true; -option java_outer_classname = "TimestampProto"; -option java_package = "com.google.protobuf"; -option objc_class_prefix = "GPB"; - -// A Timestamp represents a point in time independent of any time zone or local -// calendar, encoded as a count of seconds and fractions of seconds at -// nanosecond resolution. The count is relative to an epoch at UTC midnight on -// January 1, 1970, in the proleptic Gregorian calendar which extends the -// Gregorian calendar backwards to year one. -// -// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -// second table is needed for interpretation, using a [24-hour linear -// smear](https://developers.google.com/time/smear). -// -// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -// restricting to that range, we ensure that we can convert to and from [RFC -// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; -// gettimeofday(&tv, NULL); -// -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); -// -// Example 5: Compute Timestamp from Java `Instant.now()`. -// -// Instant now = Instant.now(); -// -// Timestamp timestamp = -// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) -// .setNanos(now.getNano()).build(); -// -// Example 6: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() -// timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the -// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, {day}, -// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -// is required. A proto3 JSON serializer should always use UTC (as indicated by -// "Z") when printing the Timestamp type and a proto3 JSON parser should be -// able to accept both UTC and other timezones (as indicated by an offset). -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard -// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -// method. In Python, a standard `datetime.datetime` object can be converted -// to this format using -// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() -// ) to obtain a formatter capable of generating timestamps in this format. -// -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/metrics_service.proto b/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/metrics_service.proto deleted file mode 100644 index cb2a343712..0000000000 --- a/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/metrics_service.proto +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.collector.metrics.v1; - -import "opentelemetry/proto/metrics/v1/metrics.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Collector.Metrics.V1"; -option go_package = "go.opentelemetry.io/proto/otlp/collector/metrics/v1"; -option java_multiple_files = true; -option java_outer_classname = "MetricsServiceProto"; -option java_package = "io.opentelemetry.proto.collector.metrics.v1"; - -// Service that can be used to push metrics between one Application -// instrumented with OpenTelemetry and a collector, or between a collector and a -// central collector. -service MetricsService { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - rpc Export(ExportMetricsServiceRequest) returns (ExportMetricsServiceResponse) {} -} - -message ExportMetricsServiceRequest { - // An array of ResourceMetrics. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - repeated opentelemetry.proto.metrics.v1.ResourceMetrics resource_metrics = 1; -} - -message ExportMetricsServiceResponse { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - ExportMetricsPartialSuccess partial_success = 1; -} - -message ExportMetricsPartialSuccess { - // The number of rejected data points. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - int64 rejected_data_points = 1; - - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - string error_message = 2; -} diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go b/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go deleted file mode 100644 index 3d27c156c3..0000000000 --- a/backend/common/3rdparty/protos/opentelemetry/proto/collector/metrics/v1/v1connect/metrics_service.connect.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-connect-go. DO NOT EDIT. -// -// Source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto - -package v1connect - -import ( - connect "connectrpc.com/connect" - context "context" - errors "errors" - v1 "go.opentelemetry.io/proto/otlp/collector/metrics/v1" - http "net/http" - strings "strings" -) - -// This is a compile-time assertion to ensure that this generated file and the connect package are -// compatible. If you get a compiler error that this constant is not defined, this code was -// generated with a version of connect newer than the one compiled into your binary. You can fix the -// problem by either regenerating this code with an older version of connect or updating the connect -// version compiled into your binary. -const _ = connect.IsAtLeastVersion0_1_0 - -const ( - // MetricsServiceName is the fully-qualified name of the MetricsService service. - MetricsServiceName = "opentelemetry.proto.collector.metrics.v1.MetricsService" -) - -// These constants are the fully-qualified names of the RPCs defined in this package. They're -// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. -// -// Note that these are different from the fully-qualified method names used by -// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to -// reflection-formatted method names, remove the leading slash and convert the remaining slash to a -// period. -const ( - // MetricsServiceExportProcedure is the fully-qualified name of the MetricsService's Export RPC. - MetricsServiceExportProcedure = "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export" -) - -// MetricsServiceClient is a client for the opentelemetry.proto.collector.metrics.v1.MetricsService -// service. -type MetricsServiceClient interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(context.Context, *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) -} - -// NewMetricsServiceClient constructs a client for the -// opentelemetry.proto.collector.metrics.v1.MetricsService service. By default, it uses the Connect -// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed -// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or -// connect.WithGRPCWeb() options. -// -// The URL supplied here should be the base URL for the Connect or gRPC server (for example, -// http://api.acme.com or https://acme.com/grpc). -func NewMetricsServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MetricsServiceClient { - baseURL = strings.TrimRight(baseURL, "/") - return &metricsServiceClient{ - export: connect.NewClient[v1.ExportMetricsServiceRequest, v1.ExportMetricsServiceResponse]( - httpClient, - baseURL+MetricsServiceExportProcedure, - opts..., - ), - } -} - -// metricsServiceClient implements MetricsServiceClient. -type metricsServiceClient struct { - export *connect.Client[v1.ExportMetricsServiceRequest, v1.ExportMetricsServiceResponse] -} - -// Export calls opentelemetry.proto.collector.metrics.v1.MetricsService.Export. -func (c *metricsServiceClient) Export(ctx context.Context, req *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) { - return c.export.CallUnary(ctx, req) -} - -// MetricsServiceHandler is an implementation of the -// opentelemetry.proto.collector.metrics.v1.MetricsService service. -type MetricsServiceHandler interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(context.Context, *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) -} - -// NewMetricsServiceHandler builds an HTTP handler from the service implementation. It returns the -// path on which to mount the handler and the handler itself. -// -// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf -// and JSON codecs. They also support gzip compression. -func NewMetricsServiceHandler(svc MetricsServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { - metricsServiceExportHandler := connect.NewUnaryHandler( - MetricsServiceExportProcedure, - svc.Export, - opts..., - ) - return "/opentelemetry.proto.collector.metrics.v1.MetricsService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case MetricsServiceExportProcedure: - metricsServiceExportHandler.ServeHTTP(w, r) - default: - http.NotFound(w, r) - } - }) -} - -// UnimplementedMetricsServiceHandler returns CodeUnimplemented from all methods. -type UnimplementedMetricsServiceHandler struct{} - -func (UnimplementedMetricsServiceHandler) Export(context.Context, *connect.Request[v1.ExportMetricsServiceRequest]) (*connect.Response[v1.ExportMetricsServiceResponse], error) { - return nil, connect.NewError(connect.CodeUnimplemented, errors.New("opentelemetry.proto.collector.metrics.v1.MetricsService.Export is not implemented")) -} diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/common/v1/common.proto b/backend/common/3rdparty/protos/opentelemetry/proto/common/v1/common.proto deleted file mode 100644 index 97b97b7232..0000000000 --- a/backend/common/3rdparty/protos/opentelemetry/proto/common/v1/common.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.common.v1; - -option csharp_namespace = "OpenTelemetry.Proto.Common.V1"; -option go_package = "go.opentelemetry.io/proto/otlp/common/v1"; -option java_multiple_files = true; -option java_outer_classname = "CommonProto"; -option java_package = "io.opentelemetry.proto.common.v1"; - -// AnyValue is used to represent any type of attribute value. AnyValue may contain a -// primitive value such as a string or integer or it may contain an arbitrary nested -// object containing arrays, key-value lists and primitives. -message AnyValue { - // The value is one of the listed fields. It is valid for all values to be unspecified - // in which case this AnyValue is considered to be "empty". - oneof value { - string string_value = 1; - bool bool_value = 2; - int64 int_value = 3; - double double_value = 4; - ArrayValue array_value = 5; - KeyValueList kvlist_value = 6; - bytes bytes_value = 7; - } -} - -// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message -// since oneof in AnyValue does not allow repeated fields. -message ArrayValue { - // Array of values. The array may be empty (contain 0 elements). - repeated AnyValue values = 1; -} - -// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message -// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need -// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to -// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches -// are semantically equivalent. -message KeyValueList { - // A collection of key/value pairs of key-value pairs. The list may be empty (may - // contain 0 elements). - // The keys MUST be unique (it is not allowed to have more than one - // value with the same key). - repeated KeyValue values = 1; -} - -// KeyValue is a key-value pair that is used to store Span attributes, Link -// attributes, etc. -message KeyValue { - string key = 1; - AnyValue value = 2; -} - -// InstrumentationScope is a message representing the instrumentation scope information -// such as the fully qualified name and version. -message InstrumentationScope { - // An empty instrumentation scope name means the name is unknown. - string name = 1; - string version = 2; - - // Additional attributes that describe the scope. [Optional]. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated KeyValue attributes = 3; - uint32 dropped_attributes_count = 4; -} diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/metrics/v1/metrics.proto b/backend/common/3rdparty/protos/opentelemetry/proto/metrics/v1/metrics.proto deleted file mode 100644 index 2fb08f5c33..0000000000 --- a/backend/common/3rdparty/protos/opentelemetry/proto/metrics/v1/metrics.proto +++ /dev/null @@ -1,676 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.metrics.v1; - -import "opentelemetry/proto/common/v1/common.proto"; -import "opentelemetry/proto/resource/v1/resource.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Metrics.V1"; -option go_package = "go.opentelemetry.io/proto/otlp/metrics/v1"; -option java_multiple_files = true; -option java_outer_classname = "MetricsProto"; -option java_package = "io.opentelemetry.proto.metrics.v1"; - -// MetricsData represents the metrics data that can be stored in a persistent -// storage, OR can be embedded by other protocols that transfer OTLP metrics -// data but do not implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -message MetricsData { - // An array of ResourceMetrics. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - repeated ResourceMetrics resource_metrics = 1; -} - -// A collection of ScopeMetrics from a Resource. -message ResourceMetrics { - reserved 1000; - - // The resource for the metrics in this message. - // If this field is not set then no resource info is known. - opentelemetry.proto.resource.v1.Resource resource = 1; - - // A list of metrics that originate from a resource. - repeated ScopeMetrics scope_metrics = 2; - - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_metrics" field which have their own schema_url field. - string schema_url = 3; -} - -// A collection of Metrics produced by an Scope. -message ScopeMetrics { - // The instrumentation scope information for the metrics in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - opentelemetry.proto.common.v1.InstrumentationScope scope = 1; - - // A list of metrics that originate from an instrumentation library. - repeated Metric metrics = 2; - - // This schema_url applies to all metrics in the "metrics" field. - string schema_url = 3; -} - -// Defines a Metric which has one or more timeseries. The following is a -// brief summary of the Metric data model. For more details, see: -// -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md -// -// -// The data model and relation between entities is shown in the -// diagram below. Here, "DataPoint" is the term used to refer to any -// one of the specific data point value types, and "points" is the term used -// to refer to any one of the lists of points contained in the Metric. -// -// - Metric is composed of a metadata and data. -// - Metadata part contains a name, description, unit. -// - Data is one of the possible types (Sum, Gauge, Histogram, Summary). -// - DataPoint contains timestamps, attributes, and one of the possible value type -// fields. -// -// Metric -// +------------+ -// |name | -// |description | -// |unit | +------------------------------------+ -// |data |---> |Gauge, Sum, Histogram, Summary, ... | -// +------------+ +------------------------------------+ -// -// Data [One of Gauge, Sum, Histogram, Summary, ...] -// +-----------+ -// |... | // Metadata about the Data. -// |points |--+ -// +-----------+ | -// | +---------------------------+ -// | |DataPoint 1 | -// v |+------+------+ +------+ | -// +-----+ ||label |label |...|label | | -// | 1 |-->||value1|value2|...|valueN| | -// +-----+ |+------+------+ +------+ | -// | . | |+-----+ | -// | . | ||value| | -// | . | |+-----+ | -// | . | +---------------------------+ -// | . | . -// | . | . -// | . | . -// | . | +---------------------------+ -// | . | |DataPoint M | -// +-----+ |+------+------+ +------+ | -// | M |-->||label |label |...|label | | -// +-----+ ||value1|value2|...|valueN| | -// |+------+------+ +------+ | -// |+-----+ | -// ||value| | -// |+-----+ | -// +---------------------------+ -// -// Each distinct type of DataPoint represents the output of a specific -// aggregation function, the result of applying the DataPoint's -// associated function of to one or more measurements. -// -// All DataPoint types have three common fields: -// - Attributes includes key-value pairs associated with the data point -// - TimeUnixNano is required, set to the end time of the aggregation -// - StartTimeUnixNano is optional, but strongly encouraged for DataPoints -// having an AggregationTemporality field, as discussed below. -// -// Both TimeUnixNano and StartTimeUnixNano values are expressed as -// UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. -// -// # TimeUnixNano -// -// This field is required, having consistent interpretation across -// DataPoint types. TimeUnixNano is the moment corresponding to when -// the data point's aggregate value was captured. -// -// Data points with the 0 value for TimeUnixNano SHOULD be rejected -// by consumers. -// -// # StartTimeUnixNano -// -// StartTimeUnixNano in general allows detecting when a sequence of -// observations is unbroken. This field indicates to consumers the -// start time for points with cumulative and delta -// AggregationTemporality, and it should be included whenever possible -// to support correct rate calculation. Although it may be omitted -// when the start time is truly unknown, setting StartTimeUnixNano is -// strongly encouraged. -message Metric { - reserved 4, 6, 8; - - // name of the metric, including its DNS name prefix. It must be unique. - string name = 1; - - // description of the metric, which can be used in documentation. - string description = 2; - - // unit in which the metric value is reported. Follows the format - // described by http://unitsofmeasure.org/ucum.html. - string unit = 3; - - // Data determines the aggregation type (if any) of the metric, what is the - // reported value type for the data points, as well as the relatationship to - // the time interval over which they are reported. - oneof data { - Gauge gauge = 5; - Sum sum = 7; - Histogram histogram = 9; - ExponentialHistogram exponential_histogram = 10; - Summary summary = 11; - } -} - -// Gauge represents the type of a scalar metric that always exports the -// "current value" for every data point. It should be used for an "unknown" -// aggregation. -// -// A Gauge does not support different aggregation temporalities. Given the -// aggregation is unknown, points cannot be combined using the same -// aggregation, regardless of aggregation temporalities. Therefore, -// AggregationTemporality is not included. Consequently, this also means -// "StartTimeUnixNano" is ignored for all data points. -message Gauge { - repeated NumberDataPoint data_points = 1; -} - -// Sum represents the type of a scalar metric that is calculated as a sum of all -// reported measurements over a time interval. -message Sum { - repeated NumberDataPoint data_points = 1; - - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality aggregation_temporality = 2; - - // If "true" means that the sum is monotonic. - bool is_monotonic = 3; -} - -// Histogram represents the type of a metric that is calculated by aggregating -// as a Histogram of all reported measurements over a time interval. -message Histogram { - repeated HistogramDataPoint data_points = 1; - - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality aggregation_temporality = 2; -} - -// ExponentialHistogram represents the type of a metric that is calculated by aggregating -// as a ExponentialHistogram of all reported double measurements over a time interval. -message ExponentialHistogram { - repeated ExponentialHistogramDataPoint data_points = 1; - - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality aggregation_temporality = 2; -} - -// Summary metric data are used to convey quantile summaries, -// a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) -// and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) -// data type. These data points cannot always be merged in a meaningful way. -// While they can be useful in some applications, histogram data points are -// recommended for new applications. -message Summary { - repeated SummaryDataPoint data_points = 1; -} - -// AggregationTemporality defines how a metric aggregator reports aggregated -// values. It describes how those values relate to the time interval over -// which they are aggregated. -enum AggregationTemporality { - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AGGREGATION_TEMPORALITY_UNSPECIFIED = 0; - - // DELTA is an AggregationTemporality for a metric aggregator which reports - // changes since last report time. Successive metrics contain aggregation of - // values from continuous and non-overlapping intervals. - // - // The values for a DELTA metric are based only on the time interval - // associated with one measurement cycle. There is no dependency on - // previous measurements like is the case for CUMULATIVE metrics. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // DELTA metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0+1 to - // t_0+2 with a value of 2. - AGGREGATION_TEMPORALITY_DELTA = 1; - - // CUMULATIVE is an AggregationTemporality for a metric aggregator which - // reports changes since a fixed start time. This means that current values - // of a CUMULATIVE metric depend on all previous measurements since the - // start time. Because of this, the sender is required to retain this state - // in some form. If this state is lost or invalidated, the CUMULATIVE metric - // values MUST be reset and a new fixed start time following the last - // reported measurement time sent MUST be used. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // CUMULATIVE metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+2 with a value of 5. - // 9. The system experiences a fault and loses state. - // 10. The system recovers and resumes receiving at time=t_1. - // 11. A request is received, the system measures 1 request. - // 12. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_1 to - // t_0+1 with a value of 1. - // - // Note: Even though, when reporting changes since last report time, using - // CUMULATIVE is valid, it is not recommended. This may cause problems for - // systems that do not use start_time to determine when the aggregation - // value was reset (e.g. Prometheus). - AGGREGATION_TEMPORALITY_CUMULATIVE = 2; -} - -// DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a -// bit-field representing 32 distinct boolean flags. Each flag defined in this -// enum is a bit-mask. To test the presence of a single flag in the flags of -// a data point, for example, use an expression like: -// -// (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK -// -enum DataPointFlags { - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - DATA_POINT_FLAGS_DO_NOT_USE = 0; - - // This DataPoint is valid but has no recorded value. This value - // SHOULD be used to reflect explicitly missing data in a series, as - // for an equivalent to the Prometheus "staleness marker". - DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK = 1; - - // Bits 2-31 are reserved for future use. -} - -// NumberDataPoint is a single data point in a timeseries that describes the -// time-varying scalar value of a metric. -message NumberDataPoint { - reserved 1; - - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // The value itself. A point is considered invalid when one of the recognized - // value fields is not present inside this oneof. - oneof value { - double as_double = 4; - sfixed64 as_int = 6; - } - - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - repeated Exemplar exemplars = 5; - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 8; -} - -// HistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Histogram. A Histogram contains summary statistics -// for a population of values, it may optionally contain the distribution of -// those values across a set of buckets. -// -// If the histogram contains the distribution of values, then both -// "explicit_bounds" and "bucket counts" fields must be defined. -// If the histogram does not contain the distribution of values, then both -// "explicit_bounds" and "bucket_counts" must be omitted and only "count" and -// "sum" are known. -message HistogramDataPoint { - reserved 1; - - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be non-negative. This - // value must be equal to the sum of the "count" fields in buckets if a - // histogram is provided. - fixed64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram - optional double sum = 5; - - // bucket_counts is an optional field contains the count values of histogram - // for each bucket. - // - // The sum of the bucket_counts must equal the value in the count field. - // - // The number of elements in bucket_counts array must be by one greater than - // the number of elements in explicit_bounds array. - repeated fixed64 bucket_counts = 6; - - // explicit_bounds specifies buckets with explicitly defined bounds for values. - // - // The boundaries for bucket at index i are: - // - // (-infinity, explicit_bounds[i]] for i == 0 - // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) - // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) - // - // The values in the explicit_bounds array must be strictly increasing. - // - // Histogram buckets are inclusive of their upper boundary, except the last - // bucket where the boundary is at infinity. This format is intentionally - // compatible with the OpenMetrics histogram definition. - repeated double explicit_bounds = 7; - - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - repeated Exemplar exemplars = 8; - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 10; - - // min is the minimum value over (start_time, end_time]. - optional double min = 11; - - // max is the maximum value over (start_time, end_time]. - optional double max = 12; -} - -// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains -// summary statistics for a population of values, it may optionally contain the -// distribution of those values across a set of buckets. -// -message ExponentialHistogramDataPoint { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be - // non-negative. This value must be equal to the sum of the "bucket_counts" - // values in the positive and negative Buckets plus the "zero_count" field. - fixed64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram - optional double sum = 5; - - // scale describes the resolution of the histogram. Boundaries are - // located at powers of the base, where: - // - // base = (2^(2^-scale)) - // - // The histogram bucket identified by `index`, a signed integer, - // contains values that are greater than (base^index) and - // less than or equal to (base^(index+1)). - // - // The positive and negative ranges of the histogram are expressed - // separately. Negative values are mapped by their absolute value - // into the negative range using the same scale as the positive range. - // - // scale is not restricted by the protocol, as the permissible - // values depend on the range of the data. - sint32 scale = 6; - - // zero_count is the count of values that are either exactly zero or - // within the region considered zero by the instrumentation at the - // tolerated degree of precision. This bucket stores values that - // cannot be expressed using the standard exponential formula as - // well as values that have been rounded to zero. - // - // Implementations MAY consider the zero bucket to have probability - // mass equal to (zero_count / count). - fixed64 zero_count = 7; - - // positive carries the positive range of exponential bucket counts. - Buckets positive = 8; - - // negative carries the negative range of exponential bucket counts. - Buckets negative = 9; - - // Buckets are a set of bucket counts, encoded in a contiguous array - // of counts. - message Buckets { - // Offset is the bucket index of the first entry in the bucket_counts array. - // - // Note: This uses a varint encoding as a simple form of compression. - sint32 offset = 1; - - // bucket_counts is an array of count values, where bucket_counts[i] carries - // the count of the bucket at index (offset+i). bucket_counts[i] is the count - // of values greater than base^(offset+i) and less than or equal to - // base^(offset+i+1). - // - // Note: By contrast, the explicit HistogramDataPoint uses - // fixed64. This field is expected to have many buckets, - // especially zeros, so uint64 has been selected to ensure - // varint encoding. - repeated uint64 bucket_counts = 2; - } - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 10; - - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - repeated Exemplar exemplars = 11; - - // min is the minimum value over (start_time, end_time]. - optional double min = 12; - - // max is the maximum value over (start_time, end_time]. - optional double max = 13; - - // ZeroThreshold may be optionally set to convey the width of the zero - // region. Where the zero region is defined as the closed interval - // [-ZeroThreshold, ZeroThreshold]. - // When ZeroThreshold is 0, zero count bucket stores values that cannot be - // expressed using the standard exponential formula as well as values that - // have been rounded to zero. - double zero_threshold = 14; -} - -// SummaryDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Summary metric. -message SummaryDataPoint { - reserved 1; - - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; - - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 start_time_unix_nano = 2; - - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 3; - - // count is the number of values in the population. Must be non-negative. - fixed64 count = 4; - - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary - double sum = 5; - - // Represents the value at a given quantile of a distribution. - // - // To record Min and Max values following conventions are used: - // - The 1.0 quantile is equivalent to the maximum value observed. - // - The 0.0 quantile is equivalent to the minimum value observed. - // - // See the following issue for more context: - // https://github.com/open-telemetry/opentelemetry-proto/issues/125 - message ValueAtQuantile { - // The quantile of a distribution. Must be in the interval - // [0.0, 1.0]. - double quantile = 1; - - // The value at the given quantile of a distribution. - // - // Quantile values must NOT be negative. - double value = 2; - } - - // (Optional) list of values at different quantiles of the distribution calculated - // from the current snapshot. The quantiles must be strictly increasing. - repeated ValueAtQuantile quantile_values = 6; - - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - uint32 flags = 8; -} - -// A representation of an exemplar, which is a sample input measurement. -// Exemplars also hold information about the environment when the measurement -// was recorded, for example the span and trace ID of the active span when the -// exemplar was recorded. -message Exemplar { - reserved 1; - - // The set of key/value pairs that were filtered out by the aggregator, but - // recorded alongside the original measurement. Only key/value pairs that were - // filtered out by the aggregator should be included - repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7; - - // time_unix_nano is the exact time when this exemplar was recorded - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - fixed64 time_unix_nano = 2; - - // The value of the measurement that was recorded. An exemplar is - // considered invalid when one of the recognized value fields is not present - // inside this oneof. - oneof value { - double as_double = 3; - sfixed64 as_int = 6; - } - - // (Optional) Span ID of the exemplar trace. - // span_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - bytes span_id = 4; - - // (Optional) Trace ID of the exemplar trace. - // trace_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - bytes trace_id = 5; -} diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/resource/v1/resource.proto b/backend/common/3rdparty/protos/opentelemetry/proto/resource/v1/resource.proto deleted file mode 100644 index 28c224aa1a..0000000000 --- a/backend/common/3rdparty/protos/opentelemetry/proto/resource/v1/resource.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.resource.v1; - -import "opentelemetry/proto/common/v1/common.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Resource.V1"; -option go_package = "go.opentelemetry.io/proto/otlp/resource/v1"; -option java_multiple_files = true; -option java_outer_classname = "ResourceProto"; -option java_package = "io.opentelemetry.proto.resource.v1"; - -// Resource information. -message Resource { - // Set of attributes that describe the resource. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; - - // dropped_attributes_count is the number of dropped attributes. If the value is 0, then - // no attributes were dropped. - uint32 dropped_attributes_count = 2; -} diff --git a/backend/common/3rdparty/protos/opentelemetry/proto/trace/v1/trace.proto b/backend/common/3rdparty/protos/opentelemetry/proto/trace/v1/trace.proto deleted file mode 100644 index e7f82fedd4..0000000000 --- a/backend/common/3rdparty/protos/opentelemetry/proto/trace/v1/trace.proto +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright 2019, OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package opentelemetry.proto.trace.v1; - -import "opentelemetry/proto/common/v1/common.proto"; -import "opentelemetry/proto/resource/v1/resource.proto"; - -option csharp_namespace = "OpenTelemetry.Proto.Trace.V1"; -option go_package = "go.opentelemetry.io/proto/otlp/trace/v1"; -option java_multiple_files = true; -option java_outer_classname = "TraceProto"; -option java_package = "io.opentelemetry.proto.trace.v1"; - -// TracesData represents the traces data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP traces data but do -// not implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -message TracesData { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - repeated ResourceSpans resource_spans = 1; -} - -// A collection of ScopeSpans from a Resource. -message ResourceSpans { - reserved 1000; - - // The resource for the spans in this message. - // If this field is not set then no resource info is known. - opentelemetry.proto.resource.v1.Resource resource = 1; - - // A list of ScopeSpans that originate from a resource. - repeated ScopeSpans scope_spans = 2; - - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_spans" field which have their own schema_url field. - string schema_url = 3; -} - -// A collection of Spans produced by an InstrumentationScope. -message ScopeSpans { - // The instrumentation scope information for the spans in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - opentelemetry.proto.common.v1.InstrumentationScope scope = 1; - - // A list of Spans that originate from an instrumentation scope. - repeated Span spans = 2; - - // This schema_url applies to all spans and span events in the "spans" field. - string schema_url = 3; -} - -// A Span represents a single operation performed by a single component of the system. -// -// The next available field id is 17. -message Span { - // A unique identifier for a trace. All spans from the same trace share - // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - bytes trace_id = 1; - - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - bytes span_id = 2; - - // trace_state conveys information about request position in multiple distributed tracing graphs. - // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header - // See also https://github.com/w3c/distributed-tracing for more details about this field. - string trace_state = 3; - - // The `span_id` of this span's parent span. If this is a root span, then this - // field must be empty. The ID is an 8-byte array. - bytes parent_span_id = 4; - - // A description of the span's operation. - // - // For example, the name can be a qualified method name or a file name - // and a line number where the operation is called. A best practice is to use - // the same display name at the same call point in an application. - // This makes it easier to correlate spans in different traces. - // - // This field is semantically required to be set to non-empty string. - // Empty value is equivalent to an unknown span name. - // - // This field is required. - string name = 5; - - // SpanKind is the type of span. Can be used to specify additional relationships between spans - // in addition to a parent/child relationship. - enum SpanKind { - // Unspecified. Do NOT use as default. - // Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. - SPAN_KIND_UNSPECIFIED = 0; - - // Indicates that the span represents an internal operation within an application, - // as opposed to an operation happening at the boundaries. Default value. - SPAN_KIND_INTERNAL = 1; - - // Indicates that the span covers server-side handling of an RPC or other - // remote network request. - SPAN_KIND_SERVER = 2; - - // Indicates that the span describes a request to some remote service. - SPAN_KIND_CLIENT = 3; - - // Indicates that the span describes a producer sending a message to a broker. - // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship - // between producer and consumer spans. A PRODUCER span ends when the message was accepted - // by the broker while the logical processing of the message might span a much longer time. - SPAN_KIND_PRODUCER = 4; - - // Indicates that the span describes consumer receiving a message from a broker. - // Like the PRODUCER kind, there is often no direct critical path latency relationship - // between producer and consumer spans. - SPAN_KIND_CONSUMER = 5; - } - - // Distinguishes between spans generated in a particular context. For example, - // two spans with the same name may be distinguished using `CLIENT` (caller) - // and `SERVER` (callee) to identify queueing latency associated with the span. - SpanKind kind = 6; - - // start_time_unix_nano is the start time of the span. On the client side, this is the time - // kept by the local machine where the span execution starts. On the server side, this - // is the time when the server's application handler starts running. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - fixed64 start_time_unix_nano = 7; - - // end_time_unix_nano is the end time of the span. On the client side, this is the time - // kept by the local machine where the span execution ends. On the server side, this - // is the time when the server application handler stops running. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - fixed64 end_time_unix_nano = 8; - - // attributes is a collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "example.com/myattribute": true - // "example.com/score": 10.239 - // - // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; - - // dropped_attributes_count is the number of attributes that were discarded. Attributes - // can be discarded because their keys are too long or because there are too many - // attributes. If this value is 0, then no attributes were dropped. - uint32 dropped_attributes_count = 10; - - // Event is a time-stamped annotation of the span, consisting of user-supplied - // text description and key-value pairs. - message Event { - // time_unix_nano is the time the event occurred. - fixed64 time_unix_nano = 1; - - // name of the event. - // This field is semantically required to be set to non-empty string. - string name = 2; - - // attributes is a collection of attribute key/value pairs on the event. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; - - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - uint32 dropped_attributes_count = 4; - } - - // events is a collection of Event items. - repeated Event events = 11; - - // dropped_events_count is the number of dropped events. If the value is 0, then no - // events were dropped. - uint32 dropped_events_count = 12; - - // A pointer from the current span to another span in the same trace or in a - // different trace. For example, this can be used in batching operations, - // where a single batch handler processes multiple requests from different - // traces or when the handler receives a request from a different project. - message Link { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - bytes trace_id = 1; - - // A unique identifier for the linked span. The ID is an 8-byte array. - bytes span_id = 2; - - // The trace_state associated with the link. - string trace_state = 3; - - // attributes is a collection of attribute key/value pairs on the link. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - repeated opentelemetry.proto.common.v1.KeyValue attributes = 4; - - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - uint32 dropped_attributes_count = 5; - } - - // links is a collection of Links, which are references from this span to a span - // in the same or different trace. - repeated Link links = 13; - - // dropped_links_count is the number of dropped links after the maximum size was - // enforced. If this value is 0, then no links were dropped. - uint32 dropped_links_count = 14; - - // An optional final status for this span. Semantically when Status isn't set, it means - // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). - Status status = 15; -} - -// The Status type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. -message Status { - reserved 1; - - // A developer-facing human readable error message. - string message = 2; - - // For the semantics of status codes see - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status - enum StatusCode { - // The default status. - STATUS_CODE_UNSET = 0; - // The Span has been validated by an Application developer or Operator to - // have completed successfully. - STATUS_CODE_OK = 1; - // The Span contains an error. - STATUS_CODE_ERROR = 2; - } - - // The status code. - StatusCode code = 3; -} diff --git a/backend/controller/console.go b/backend/controller/console.go index 5a6fadcb54..c2bac66aed 100644 --- a/backend/controller/console.go +++ b/backend/controller/console.go @@ -12,15 +12,15 @@ import ( "google.golang.org/protobuf/types/known/durationpb" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" - "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/backend/controller/dal" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" + pbconsole "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console" + "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console/pbconsoleconnect" + schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" "github.com/TBD54566975/ftl/backend/schema" - ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" - pbconsole "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/console" - "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/console/pbconsoleconnect" - schemapb "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/schema" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/slices" ) type ConsoleService struct { diff --git a/backend/controller/controller.go b/backend/controller/controller.go index 8d9ca20f61..3310d932f4 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -29,24 +29,24 @@ import ( "google.golang.org/protobuf/types/known/structpb" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/TBD54566975/ftl/backend/common/cors" - "github.com/TBD54566975/ftl/backend/common/log" - ftlmaps "github.com/TBD54566975/ftl/backend/common/maps" - "github.com/TBD54566975/ftl/backend/common/model" - "github.com/TBD54566975/ftl/backend/common/rpc" - "github.com/TBD54566975/ftl/backend/common/rpc/headers" - "github.com/TBD54566975/ftl/backend/common/sha256" - "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/backend/controller/dal" "github.com/TBD54566975/ftl/backend/controller/ingress" "github.com/TBD54566975/ftl/backend/controller/scaling" "github.com/TBD54566975/ftl/backend/controller/scheduledtask" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" + "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/console/pbconsoleconnect" + "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect" + schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" "github.com/TBD54566975/ftl/backend/schema" frontend "github.com/TBD54566975/ftl/frontend" - ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" - "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/console/pbconsoleconnect" - "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/ftlv1connect" - schemapb "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1/schema" + "github.com/TBD54566975/ftl/internal/cors" + "github.com/TBD54566975/ftl/internal/log" + ftlmaps "github.com/TBD54566975/ftl/internal/maps" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/rpc" + "github.com/TBD54566975/ftl/internal/rpc/headers" + "github.com/TBD54566975/ftl/internal/sha256" + "github.com/TBD54566975/ftl/internal/slices" ) type Config struct { diff --git a/backend/controller/dal/dal.go b/backend/controller/dal/dal.go index 6e33bfc581..c8654e0151 100644 --- a/backend/controller/dal/dal.go +++ b/backend/controller/dal/dal.go @@ -19,15 +19,15 @@ import ( "github.com/jackc/pgx/v5/pgxpool" "google.golang.org/protobuf/proto" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/maps" - "github.com/TBD54566975/ftl/backend/common/model" - "github.com/TBD54566975/ftl/backend/common/pubsub" - "github.com/TBD54566975/ftl/backend/common/sha256" - "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/backend/controller/sql" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/schema" - ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/maps" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/pubsub" + "github.com/TBD54566975/ftl/internal/sha256" + "github.com/TBD54566975/ftl/internal/slices" ) var ( diff --git a/backend/controller/dal/dal_test.go b/backend/controller/dal/dal_test.go index bdfa2ccadf..cdd9355c65 100644 --- a/backend/controller/dal/dal_test.go +++ b/backend/controller/dal/dal_test.go @@ -12,12 +12,12 @@ import ( "github.com/alecthomas/assert/v2" "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" - "github.com/TBD54566975/ftl/backend/common/sha256" "github.com/TBD54566975/ftl/backend/controller/sql/sqltest" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/schema" - ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/sha256" ) //nolint:maintidx diff --git a/backend/controller/dal/events.go b/backend/controller/dal/events.go index b716388b17..cb81c50203 100644 --- a/backend/controller/dal/events.go +++ b/backend/controller/dal/events.go @@ -10,10 +10,10 @@ import ( "github.com/alecthomas/types/optional" "github.com/jackc/pgx/v5" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" "github.com/TBD54566975/ftl/backend/controller/sql" "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" ) type EventType = sql.EventType diff --git a/backend/controller/dal/notify.go b/backend/controller/dal/notify.go index 0220344fb5..dff0d759de 100644 --- a/backend/controller/dal/notify.go +++ b/backend/controller/dal/notify.go @@ -12,8 +12,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/jpillora/backoff" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" ) // NotificationPayload is a row from the database. diff --git a/backend/controller/deployment_logs.go b/backend/controller/deployment_logs.go index cb42119248..8a246a943f 100644 --- a/backend/controller/deployment_logs.go +++ b/backend/controller/deployment_logs.go @@ -7,9 +7,9 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" "github.com/TBD54566975/ftl/backend/controller/dal" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" ) var _ log.Sink = (*deploymentLogsSink)(nil) diff --git a/backend/controller/ingress/ingress.go b/backend/controller/ingress/ingress.go index 6af57fe3bb..4ae58aa0bf 100644 --- a/backend/controller/ingress/ingress.go +++ b/backend/controller/ingress/ingress.go @@ -10,9 +10,9 @@ import ( "strings" "time" - "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/backend/controller/dal" "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/slices" ) type path []string diff --git a/backend/controller/observability.go b/backend/controller/observability.go index 5e0399d16f..f750f9e42a 100644 --- a/backend/controller/observability.go +++ b/backend/controller/observability.go @@ -6,11 +6,11 @@ import ( "github.com/alecthomas/types/optional" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" "github.com/TBD54566975/ftl/backend/controller/dal" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" "github.com/TBD54566975/ftl/backend/schema" - ftlv1 "github.com/TBD54566975/ftl/protos/xyz/block/ftl/v1" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" ) type Call struct { diff --git a/backend/controller/scaling/k8s_scaling.go b/backend/controller/scaling/k8s_scaling.go index 4032dc3566..193b555ffa 100644 --- a/backend/controller/scaling/k8s_scaling.go +++ b/backend/controller/scaling/k8s_scaling.go @@ -3,7 +3,7 @@ package scaling import ( "context" - "github.com/TBD54566975/ftl/backend/common/model" + "github.com/TBD54566975/ftl/internal/model" ) var _ RunnerScaling = (*K8sScaling)(nil) diff --git a/backend/controller/scaling/localscaling/devel.go b/backend/controller/scaling/localscaling/devel.go index 9e1d26dcbe..86799f1b2a 100644 --- a/backend/controller/scaling/localscaling/devel.go +++ b/backend/controller/scaling/localscaling/devel.go @@ -7,9 +7,9 @@ import ( "path/filepath" "sync" - "github.com/TBD54566975/ftl/backend/common/exec" - "github.com/TBD54566975/ftl/backend/common/log" "github.com/TBD54566975/ftl/internal" + "github.com/TBD54566975/ftl/internal/exec" + "github.com/TBD54566975/ftl/internal/log" ) var templateDirOnce sync.Once diff --git a/backend/controller/scaling/localscaling/local_scaling.go b/backend/controller/scaling/localscaling/local_scaling.go index 760ff4d57e..c60ab080f0 100644 --- a/backend/controller/scaling/localscaling/local_scaling.go +++ b/backend/controller/scaling/localscaling/local_scaling.go @@ -12,11 +12,11 @@ import ( "github.com/alecthomas/kong" - "github.com/TBD54566975/ftl/backend/common/bind" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" "github.com/TBD54566975/ftl/backend/controller/scaling" "github.com/TBD54566975/ftl/backend/runner" + "github.com/TBD54566975/ftl/internal/bind" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" ) var _ scaling.RunnerScaling = (*LocalScaling)(nil) diff --git a/backend/controller/scaling/scaling.go b/backend/controller/scaling/scaling.go index 97c5ea4094..e622895f36 100644 --- a/backend/controller/scaling/scaling.go +++ b/backend/controller/scaling/scaling.go @@ -3,7 +3,7 @@ package scaling import ( "context" - "github.com/TBD54566975/ftl/backend/common/model" + "github.com/TBD54566975/ftl/internal/model" ) type RunnerScaling interface { diff --git a/backend/controller/scheduledtask/scheduledtask.go b/backend/controller/scheduledtask/scheduledtask.go index ba2e825cb2..0f3283a05f 100644 --- a/backend/controller/scheduledtask/scheduledtask.go +++ b/backend/controller/scheduledtask/scheduledtask.go @@ -15,10 +15,10 @@ import ( "github.com/jpillora/backoff" "github.com/serialx/hashring" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" - "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/backend/controller/dal" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/slices" ) type descriptor struct { diff --git a/backend/controller/scheduledtask/scheduledtask_test.go b/backend/controller/scheduledtask/scheduledtask_test.go index cfcbe6d610..a64fe3cb97 100644 --- a/backend/controller/scheduledtask/scheduledtask_test.go +++ b/backend/controller/scheduledtask/scheduledtask_test.go @@ -11,10 +11,10 @@ import ( "github.com/benbjohnson/clock" "github.com/jpillora/backoff" - "github.com/TBD54566975/ftl/backend/common/log" - "github.com/TBD54566975/ftl/backend/common/model" - "github.com/TBD54566975/ftl/backend/common/slices" "github.com/TBD54566975/ftl/backend/controller/dal" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/slices" ) func TestCron(t *testing.T) { diff --git a/backend/controller/sql/databasetesting/devel.go b/backend/controller/sql/databasetesting/devel.go index 430d35eb7c..7a22d66ccf 100644 --- a/backend/controller/sql/databasetesting/devel.go +++ b/backend/controller/sql/databasetesting/devel.go @@ -8,8 +8,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" - "github.com/TBD54566975/ftl/backend/common/log" "github.com/TBD54566975/ftl/backend/controller/sql" + "github.com/TBD54566975/ftl/internal/log" ) // CreateForDevel creates and migrates a new database for development or testing. diff --git a/backend/controller/sql/migrate.go b/backend/controller/sql/migrate.go index e5ebc167d2..27ee8b106a 100644 --- a/backend/controller/sql/migrate.go +++ b/backend/controller/sql/migrate.go @@ -11,7 +11,7 @@ import ( _ "github.com/amacneil/dbmate/v2/pkg/driver/postgres" _ "github.com/jackc/pgx/v5/stdlib" // SQL driver - "github.com/TBD54566975/ftl/backend/common/log" + "github.com/TBD54566975/ftl/internal/log" ) //go:embed schema diff --git a/backend/controller/sql/models.go b/backend/controller/sql/models.go index ce1d15dfda..28bb5fb2cd 100644 --- a/backend/controller/sql/models.go +++ b/backend/controller/sql/models.go @@ -10,8 +10,8 @@ import ( "fmt" "time" - "github.com/TBD54566975/ftl/backend/common/model" "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/model" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/sql/querier.go b/backend/controller/sql/querier.go index c0bf893d51..ed20a23e83 100644 --- a/backend/controller/sql/querier.go +++ b/backend/controller/sql/querier.go @@ -8,7 +8,7 @@ import ( "context" "time" - "github.com/TBD54566975/ftl/backend/common/model" + "github.com/TBD54566975/ftl/internal/model" "github.com/alecthomas/types/optional" ) diff --git a/backend/controller/sql/queries.sql.go b/backend/controller/sql/queries.sql.go index e4f739d880..26f94eaf5f 100644 --- a/backend/controller/sql/queries.sql.go +++ b/backend/controller/sql/queries.sql.go @@ -10,8 +10,8 @@ import ( "encoding/json" "time" - "github.com/TBD54566975/ftl/backend/common/model" "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/model" "github.com/alecthomas/types/optional" ) diff --git a/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_connect.ts b/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_connect.ts new file mode 100644 index 0000000000..f06ba2d7f9 --- /dev/null +++ b/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_connect.ts @@ -0,0 +1,57 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/console/console.proto (package xyz.block.ftl.v1.console, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { PingRequest, PingResponse } from "../ftl_pb.js"; +import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; +import { EventsQuery, GetEventsResponse, GetModulesRequest, GetModulesResponse, StreamEventsRequest, StreamEventsResponse } from "./console_pb.js"; + +/** + * @generated from service xyz.block.ftl.v1.console.ConsoleService + */ +export const ConsoleService = { + typeName: "xyz.block.ftl.v1.console.ConsoleService", + methods: { + /** + * Ping service for readiness. + * + * @generated from rpc xyz.block.ftl.v1.console.ConsoleService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, + /** + * @generated from rpc xyz.block.ftl.v1.console.ConsoleService.GetModules + */ + getModules: { + name: "GetModules", + I: GetModulesRequest, + O: GetModulesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc xyz.block.ftl.v1.console.ConsoleService.StreamEvents + */ + streamEvents: { + name: "StreamEvents", + I: StreamEventsRequest, + O: StreamEventsResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * @generated from rpc xyz.block.ftl.v1.console.ConsoleService.GetEvents + */ + getEvents: { + name: "GetEvents", + I: EventsQuery, + O: GetEventsResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts b/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts new file mode 100644 index 0000000000..8561629927 --- /dev/null +++ b/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts @@ -0,0 +1,1306 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/console/console.proto (package xyz.block.ftl.v1.console, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Duration, Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; +import { Data as Data$1, Verb as Verb$1, VerbRef } from "../schema/schema_pb.js"; + +/** + * @generated from enum xyz.block.ftl.v1.console.EventType + */ +export enum EventType { + /** + * @generated from enum value: EVENT_TYPE_UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: EVENT_TYPE_LOG = 1; + */ + LOG = 1, + + /** + * @generated from enum value: EVENT_TYPE_CALL = 2; + */ + CALL = 2, + + /** + * @generated from enum value: EVENT_TYPE_DEPLOYMENT_CREATED = 3; + */ + DEPLOYMENT_CREATED = 3, + + /** + * @generated from enum value: EVENT_TYPE_DEPLOYMENT_UPDATED = 4; + */ + DEPLOYMENT_UPDATED = 4, +} +// Retrieve enum metadata with: proto3.getEnumType(EventType) +proto3.util.setEnumType(EventType, "xyz.block.ftl.v1.console.EventType", [ + { no: 0, name: "EVENT_TYPE_UNKNOWN" }, + { no: 1, name: "EVENT_TYPE_LOG" }, + { no: 2, name: "EVENT_TYPE_CALL" }, + { no: 3, name: "EVENT_TYPE_DEPLOYMENT_CREATED" }, + { no: 4, name: "EVENT_TYPE_DEPLOYMENT_UPDATED" }, +]); + +/** + * @generated from enum xyz.block.ftl.v1.console.LogLevel + */ +export enum LogLevel { + /** + * @generated from enum value: LOG_LEVEL_UNKNOWN = 0; + */ + UNKNOWN = 0, + + /** + * @generated from enum value: LOG_LEVEL_TRACE = 1; + */ + TRACE = 1, + + /** + * @generated from enum value: LOG_LEVEL_DEBUG = 5; + */ + DEBUG = 5, + + /** + * @generated from enum value: LOG_LEVEL_INFO = 9; + */ + INFO = 9, + + /** + * @generated from enum value: LOG_LEVEL_WARN = 13; + */ + WARN = 13, + + /** + * @generated from enum value: LOG_LEVEL_ERROR = 17; + */ + ERROR = 17, +} +// Retrieve enum metadata with: proto3.getEnumType(LogLevel) +proto3.util.setEnumType(LogLevel, "xyz.block.ftl.v1.console.LogLevel", [ + { no: 0, name: "LOG_LEVEL_UNKNOWN" }, + { no: 1, name: "LOG_LEVEL_TRACE" }, + { no: 5, name: "LOG_LEVEL_DEBUG" }, + { no: 9, name: "LOG_LEVEL_INFO" }, + { no: 13, name: "LOG_LEVEL_WARN" }, + { no: 17, name: "LOG_LEVEL_ERROR" }, +]); + +/** + * @generated from message xyz.block.ftl.v1.console.LogEvent + */ +export class LogEvent extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: optional string request_name = 2; + */ + requestName?: string; + + /** + * @generated from field: google.protobuf.Timestamp time_stamp = 3; + */ + timeStamp?: Timestamp; + + /** + * @generated from field: int32 log_level = 4; + */ + logLevel = 0; + + /** + * @generated from field: map attributes = 5; + */ + attributes: { [key: string]: string } = {}; + + /** + * @generated from field: string message = 6; + */ + message = ""; + + /** + * @generated from field: optional string error = 7; + */ + error?: string; + + /** + * @generated from field: optional string stack = 8; + */ + stack?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.LogEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "request_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "time_stamp", kind: "message", T: Timestamp }, + { no: 4, name: "log_level", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 6, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 8, name: "stack", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LogEvent { + return new LogEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LogEvent { + return new LogEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LogEvent { + return new LogEvent().fromJsonString(jsonString, options); + } + + static equals(a: LogEvent | PlainMessage | undefined, b: LogEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(LogEvent, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.CallEvent + */ +export class CallEvent extends Message { + /** + * @generated from field: optional string request_name = 1; + */ + requestName?: string; + + /** + * @generated from field: string deployment_name = 2; + */ + deploymentName = ""; + + /** + * @generated from field: google.protobuf.Timestamp time_stamp = 3; + */ + timeStamp?: Timestamp; + + /** + * @generated from field: optional xyz.block.ftl.v1.schema.VerbRef source_verb_ref = 4; + */ + sourceVerbRef?: VerbRef; + + /** + * @generated from field: xyz.block.ftl.v1.schema.VerbRef destination_verb_ref = 5; + */ + destinationVerbRef?: VerbRef; + + /** + * @generated from field: google.protobuf.Duration duration = 6; + */ + duration?: Duration; + + /** + * @generated from field: string request = 7; + */ + request = ""; + + /** + * @generated from field: string response = 8; + */ + response = ""; + + /** + * @generated from field: optional string error = 9; + */ + error?: string; + + /** + * @generated from field: optional string stack = 10; + */ + stack?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.CallEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "request_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "time_stamp", kind: "message", T: Timestamp }, + { no: 4, name: "source_verb_ref", kind: "message", T: VerbRef, opt: true }, + { no: 5, name: "destination_verb_ref", kind: "message", T: VerbRef }, + { no: 6, name: "duration", kind: "message", T: Duration }, + { no: 7, name: "request", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 8, name: "response", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 9, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 10, name: "stack", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CallEvent { + return new CallEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CallEvent { + return new CallEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CallEvent { + return new CallEvent().fromJsonString(jsonString, options); + } + + static equals(a: CallEvent | PlainMessage | undefined, b: CallEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(CallEvent, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.DeploymentCreatedEvent + */ +export class DeploymentCreatedEvent extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: string language = 2; + */ + language = ""; + + /** + * @generated from field: string module_name = 3; + */ + moduleName = ""; + + /** + * @generated from field: int32 min_replicas = 4; + */ + minReplicas = 0; + + /** + * @generated from field: optional string replaced = 5; + */ + replaced?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.DeploymentCreatedEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "module_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 5, name: "replaced", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeploymentCreatedEvent { + return new DeploymentCreatedEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeploymentCreatedEvent { + return new DeploymentCreatedEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeploymentCreatedEvent { + return new DeploymentCreatedEvent().fromJsonString(jsonString, options); + } + + static equals(a: DeploymentCreatedEvent | PlainMessage | undefined, b: DeploymentCreatedEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(DeploymentCreatedEvent, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.DeploymentUpdatedEvent + */ +export class DeploymentUpdatedEvent extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: int32 min_replicas = 2; + */ + minReplicas = 0; + + /** + * @generated from field: int32 prev_min_replicas = 3; + */ + prevMinReplicas = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.DeploymentUpdatedEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "prev_min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeploymentUpdatedEvent { + return new DeploymentUpdatedEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeploymentUpdatedEvent { + return new DeploymentUpdatedEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeploymentUpdatedEvent { + return new DeploymentUpdatedEvent().fromJsonString(jsonString, options); + } + + static equals(a: DeploymentUpdatedEvent | PlainMessage | undefined, b: DeploymentUpdatedEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(DeploymentUpdatedEvent, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.Verb + */ +export class Verb extends Message { + /** + * @generated from field: xyz.block.ftl.v1.schema.Verb verb = 1; + */ + verb?: Verb$1; + + /** + * @generated from field: string schema = 2; + */ + schema = ""; + + /** + * @generated from field: string json_request_schema = 3; + */ + jsonRequestSchema = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.Verb"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "verb", kind: "message", T: Verb$1 }, + { no: 2, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "json_request_schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Verb { + return new Verb().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Verb { + return new Verb().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Verb { + return new Verb().fromJsonString(jsonString, options); + } + + static equals(a: Verb | PlainMessage | undefined, b: Verb | PlainMessage | undefined): boolean { + return proto3.util.equals(Verb, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.Data + */ +export class Data extends Message { + /** + * @generated from field: xyz.block.ftl.v1.schema.Data data = 1; + */ + data?: Data$1; + + /** + * @generated from field: string schema = 2; + */ + schema = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.Data"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "data", kind: "message", T: Data$1 }, + { no: 2, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Data { + return new Data().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Data { + return new Data().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Data { + return new Data().fromJsonString(jsonString, options); + } + + static equals(a: Data | PlainMessage | undefined, b: Data | PlainMessage | undefined): boolean { + return proto3.util.equals(Data, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.Module + */ +export class Module extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: string deployment_name = 2; + */ + deploymentName = ""; + + /** + * @generated from field: string language = 3; + */ + language = ""; + + /** + * @generated from field: string schema = 4; + */ + schema = ""; + + /** + * @generated from field: repeated xyz.block.ftl.v1.console.Verb verbs = 5; + */ + verbs: Verb[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.console.Data data = 6; + */ + data: Data[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.Module"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "schema", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "verbs", kind: "message", T: Verb, repeated: true }, + { no: 6, name: "data", kind: "message", T: Data, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Module { + return new Module().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Module { + return new Module().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Module { + return new Module().fromJsonString(jsonString, options); + } + + static equals(a: Module | PlainMessage | undefined, b: Module | PlainMessage | undefined): boolean { + return proto3.util.equals(Module, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.GetModulesRequest + */ +export class GetModulesRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.GetModulesRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetModulesRequest { + return new GetModulesRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetModulesRequest { + return new GetModulesRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetModulesRequest { + return new GetModulesRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetModulesRequest | PlainMessage | undefined, b: GetModulesRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetModulesRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.GetModulesResponse + */ +export class GetModulesResponse extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.console.Module modules = 1; + */ + modules: Module[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.GetModulesResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "modules", kind: "message", T: Module, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetModulesResponse { + return new GetModulesResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetModulesResponse { + return new GetModulesResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetModulesResponse { + return new GetModulesResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetModulesResponse | PlainMessage | undefined, b: GetModulesResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetModulesResponse, a, b); + } +} + +/** + * Query for events. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery + */ +export class EventsQuery extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.console.EventsQuery.Filter filters = 1; + */ + filters: EventsQuery_Filter[] = []; + + /** + * @generated from field: int32 limit = 2; + */ + limit = 0; + + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.Order order = 3; + */ + order = EventsQuery_Order.ASC; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "filters", kind: "message", T: EventsQuery_Filter, repeated: true }, + { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "order", kind: "enum", T: proto3.getEnumType(EventsQuery_Order) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery { + return new EventsQuery().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery { + return new EventsQuery().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery { + return new EventsQuery().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery | PlainMessage | undefined, b: EventsQuery | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery, a, b); + } +} + +/** + * @generated from enum xyz.block.ftl.v1.console.EventsQuery.Order + */ +export enum EventsQuery_Order { + /** + * @generated from enum value: ASC = 0; + */ + ASC = 0, + + /** + * @generated from enum value: DESC = 1; + */ + DESC = 1, +} +// Retrieve enum metadata with: proto3.getEnumType(EventsQuery_Order) +proto3.util.setEnumType(EventsQuery_Order, "xyz.block.ftl.v1.console.EventsQuery.Order", [ + { no: 0, name: "ASC" }, + { no: 1, name: "DESC" }, +]); + +/** + * Limit the number of events returned. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.LimitFilter + */ +export class EventsQuery_LimitFilter extends Message { + /** + * @generated from field: int32 limit = 1; + */ + limit = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.LimitFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_LimitFilter { + return new EventsQuery_LimitFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_LimitFilter { + return new EventsQuery_LimitFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_LimitFilter { + return new EventsQuery_LimitFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_LimitFilter | PlainMessage | undefined, b: EventsQuery_LimitFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_LimitFilter, a, b); + } +} + +/** + * Filters events by log level. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.LogLevelFilter + */ +export class EventsQuery_LogLevelFilter extends Message { + /** + * @generated from field: xyz.block.ftl.v1.console.LogLevel log_level = 1; + */ + logLevel = LogLevel.UNKNOWN; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.LogLevelFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "log_level", kind: "enum", T: proto3.getEnumType(LogLevel) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_LogLevelFilter { + return new EventsQuery_LogLevelFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_LogLevelFilter { + return new EventsQuery_LogLevelFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_LogLevelFilter { + return new EventsQuery_LogLevelFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_LogLevelFilter | PlainMessage | undefined, b: EventsQuery_LogLevelFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_LogLevelFilter, a, b); + } +} + +/** + * Filters events by deployment name. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.DeploymentFilter + */ +export class EventsQuery_DeploymentFilter extends Message { + /** + * @generated from field: repeated string deployments = 1; + */ + deployments: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.DeploymentFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_DeploymentFilter { + return new EventsQuery_DeploymentFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_DeploymentFilter { + return new EventsQuery_DeploymentFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_DeploymentFilter { + return new EventsQuery_DeploymentFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_DeploymentFilter | PlainMessage | undefined, b: EventsQuery_DeploymentFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_DeploymentFilter, a, b); + } +} + +/** + * Filters events by request key. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.RequestFilter + */ +export class EventsQuery_RequestFilter extends Message { + /** + * @generated from field: repeated string requests = 1; + */ + requests: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.RequestFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "requests", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_RequestFilter { + return new EventsQuery_RequestFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_RequestFilter { + return new EventsQuery_RequestFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_RequestFilter { + return new EventsQuery_RequestFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_RequestFilter | PlainMessage | undefined, b: EventsQuery_RequestFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_RequestFilter, a, b); + } +} + +/** + * Filters events by event type. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.EventTypeFilter + */ +export class EventsQuery_EventTypeFilter extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.console.EventType event_types = 1; + */ + eventTypes: EventType[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.EventTypeFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "event_types", kind: "enum", T: proto3.getEnumType(EventType), repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_EventTypeFilter { + return new EventsQuery_EventTypeFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_EventTypeFilter { + return new EventsQuery_EventTypeFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_EventTypeFilter { + return new EventsQuery_EventTypeFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_EventTypeFilter | PlainMessage | undefined, b: EventsQuery_EventTypeFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_EventTypeFilter, a, b); + } +} + +/** + * Filters events by time. + * + * Either end of the time range can be omitted to indicate no bound. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.TimeFilter + */ +export class EventsQuery_TimeFilter extends Message { + /** + * @generated from field: optional google.protobuf.Timestamp older_than = 1; + */ + olderThan?: Timestamp; + + /** + * @generated from field: optional google.protobuf.Timestamp newer_than = 2; + */ + newerThan?: Timestamp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.TimeFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "older_than", kind: "message", T: Timestamp, opt: true }, + { no: 2, name: "newer_than", kind: "message", T: Timestamp, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_TimeFilter { + return new EventsQuery_TimeFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_TimeFilter { + return new EventsQuery_TimeFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_TimeFilter { + return new EventsQuery_TimeFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_TimeFilter | PlainMessage | undefined, b: EventsQuery_TimeFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_TimeFilter, a, b); + } +} + +/** + * Filters events by ID. + * + * Either end of the ID range can be omitted to indicate no bound. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.IDFilter + */ +export class EventsQuery_IDFilter extends Message { + /** + * @generated from field: optional int64 lower_than = 1; + */ + lowerThan?: bigint; + + /** + * @generated from field: optional int64 higher_than = 2; + */ + higherThan?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.IDFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "lower_than", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + { no: 2, name: "higher_than", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_IDFilter { + return new EventsQuery_IDFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_IDFilter { + return new EventsQuery_IDFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_IDFilter { + return new EventsQuery_IDFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_IDFilter | PlainMessage | undefined, b: EventsQuery_IDFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_IDFilter, a, b); + } +} + +/** + * Filters events by call. + * + * @generated from message xyz.block.ftl.v1.console.EventsQuery.CallFilter + */ +export class EventsQuery_CallFilter extends Message { + /** + * @generated from field: string dest_module = 1; + */ + destModule = ""; + + /** + * @generated from field: optional string dest_verb = 2; + */ + destVerb?: string; + + /** + * @generated from field: optional string source_module = 3; + */ + sourceModule?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.CallFilter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "dest_module", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "dest_verb", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "source_module", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_CallFilter { + return new EventsQuery_CallFilter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_CallFilter { + return new EventsQuery_CallFilter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_CallFilter { + return new EventsQuery_CallFilter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_CallFilter | PlainMessage | undefined, b: EventsQuery_CallFilter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_CallFilter, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.EventsQuery.Filter + */ +export class EventsQuery_Filter extends Message { + /** + * These map 1:1 with filters in backend/controller/internal/dal/events.go + * + * @generated from oneof xyz.block.ftl.v1.console.EventsQuery.Filter.filter + */ + filter: { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.LimitFilter limit = 1; + */ + value: EventsQuery_LimitFilter; + case: "limit"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.LogLevelFilter log_level = 2; + */ + value: EventsQuery_LogLevelFilter; + case: "logLevel"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.DeploymentFilter deployments = 3; + */ + value: EventsQuery_DeploymentFilter; + case: "deployments"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.RequestFilter requests = 4; + */ + value: EventsQuery_RequestFilter; + case: "requests"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.EventTypeFilter event_types = 5; + */ + value: EventsQuery_EventTypeFilter; + case: "eventTypes"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.TimeFilter time = 6; + */ + value: EventsQuery_TimeFilter; + case: "time"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.IDFilter id = 7; + */ + value: EventsQuery_IDFilter; + case: "id"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery.CallFilter call = 8; + */ + value: EventsQuery_CallFilter; + case: "call"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.EventsQuery.Filter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "limit", kind: "message", T: EventsQuery_LimitFilter, oneof: "filter" }, + { no: 2, name: "log_level", kind: "message", T: EventsQuery_LogLevelFilter, oneof: "filter" }, + { no: 3, name: "deployments", kind: "message", T: EventsQuery_DeploymentFilter, oneof: "filter" }, + { no: 4, name: "requests", kind: "message", T: EventsQuery_RequestFilter, oneof: "filter" }, + { no: 5, name: "event_types", kind: "message", T: EventsQuery_EventTypeFilter, oneof: "filter" }, + { no: 6, name: "time", kind: "message", T: EventsQuery_TimeFilter, oneof: "filter" }, + { no: 7, name: "id", kind: "message", T: EventsQuery_IDFilter, oneof: "filter" }, + { no: 8, name: "call", kind: "message", T: EventsQuery_CallFilter, oneof: "filter" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): EventsQuery_Filter { + return new EventsQuery_Filter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): EventsQuery_Filter { + return new EventsQuery_Filter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): EventsQuery_Filter { + return new EventsQuery_Filter().fromJsonString(jsonString, options); + } + + static equals(a: EventsQuery_Filter | PlainMessage | undefined, b: EventsQuery_Filter | PlainMessage | undefined): boolean { + return proto3.util.equals(EventsQuery_Filter, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.StreamEventsRequest + */ +export class StreamEventsRequest extends Message { + /** + * @generated from field: optional google.protobuf.Duration update_interval = 1; + */ + updateInterval?: Duration; + + /** + * @generated from field: xyz.block.ftl.v1.console.EventsQuery query = 2; + */ + query?: EventsQuery; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.StreamEventsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "update_interval", kind: "message", T: Duration, opt: true }, + { no: 2, name: "query", kind: "message", T: EventsQuery }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamEventsRequest { + return new StreamEventsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamEventsRequest { + return new StreamEventsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamEventsRequest { + return new StreamEventsRequest().fromJsonString(jsonString, options); + } + + static equals(a: StreamEventsRequest | PlainMessage | undefined, b: StreamEventsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(StreamEventsRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.StreamEventsResponse + */ +export class StreamEventsResponse extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.console.Event events = 1; + */ + events: Event[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.StreamEventsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "events", kind: "message", T: Event, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamEventsResponse { + return new StreamEventsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamEventsResponse { + return new StreamEventsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamEventsResponse { + return new StreamEventsResponse().fromJsonString(jsonString, options); + } + + static equals(a: StreamEventsResponse | PlainMessage | undefined, b: StreamEventsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(StreamEventsResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.Event + */ +export class Event extends Message { + /** + * @generated from field: google.protobuf.Timestamp time_stamp = 1; + */ + timeStamp?: Timestamp; + + /** + * Unique ID for event. + * + * @generated from field: int64 id = 2; + */ + id = protoInt64.zero; + + /** + * @generated from oneof xyz.block.ftl.v1.console.Event.entry + */ + entry: { + /** + * @generated from field: xyz.block.ftl.v1.console.LogEvent log = 3; + */ + value: LogEvent; + case: "log"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.CallEvent call = 4; + */ + value: CallEvent; + case: "call"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.DeploymentCreatedEvent deployment_created = 5; + */ + value: DeploymentCreatedEvent; + case: "deploymentCreated"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.console.DeploymentUpdatedEvent deployment_updated = 6; + */ + value: DeploymentUpdatedEvent; + case: "deploymentUpdated"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.Event"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "time_stamp", kind: "message", T: Timestamp }, + { no: 2, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "log", kind: "message", T: LogEvent, oneof: "entry" }, + { no: 4, name: "call", kind: "message", T: CallEvent, oneof: "entry" }, + { no: 5, name: "deployment_created", kind: "message", T: DeploymentCreatedEvent, oneof: "entry" }, + { no: 6, name: "deployment_updated", kind: "message", T: DeploymentUpdatedEvent, oneof: "entry" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Event { + return new Event().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Event { + return new Event().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Event { + return new Event().fromJsonString(jsonString, options); + } + + static equals(a: Event | PlainMessage | undefined, b: Event | PlainMessage | undefined): boolean { + return proto3.util.equals(Event, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.console.GetEventsResponse + */ +export class GetEventsResponse extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.console.Event events = 1; + */ + events: Event[] = []; + + /** + * For pagination, this cursor is where we should start our next query + * + * @generated from field: optional int64 cursor = 2; + */ + cursor?: bigint; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.console.GetEventsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "events", kind: "message", T: Event, repeated: true }, + { no: 2, name: "cursor", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetEventsResponse { + return new GetEventsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetEventsResponse { + return new GetEventsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetEventsResponse { + return new GetEventsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetEventsResponse | PlainMessage | undefined, b: GetEventsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetEventsResponse, a, b); + } +} + diff --git a/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts b/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts new file mode 100644 index 0000000000..bb841b2d94 --- /dev/null +++ b/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts @@ -0,0 +1,274 @@ +// @generated by protoc-gen-connect-es v1.3.0 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/ftl.proto (package xyz.block.ftl.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { CallRequest, CallResponse, CreateDeploymentRequest, CreateDeploymentResponse, DeployRequest, DeployResponse, GetArtefactDiffsRequest, GetArtefactDiffsResponse, GetDeploymentArtefactsRequest, GetDeploymentArtefactsResponse, GetDeploymentRequest, GetDeploymentResponse, GetSchemaRequest, GetSchemaResponse, PingRequest, PingResponse, ProcessListRequest, ProcessListResponse, PullSchemaRequest, PullSchemaResponse, RegisterRunnerRequest, RegisterRunnerResponse, ReplaceDeployRequest, ReplaceDeployResponse, ReserveRequest, ReserveResponse, StatusRequest, StatusResponse, StreamDeploymentLogsRequest, StreamDeploymentLogsResponse, TerminateRequest, UpdateDeployRequest, UpdateDeployResponse, UploadArtefactRequest, UploadArtefactResponse } from "./ftl_pb.js"; +import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; + +/** + * VerbService is a common interface shared by multiple services for calling Verbs. + * + * @generated from service xyz.block.ftl.v1.VerbService + */ +export const VerbService = { + typeName: "xyz.block.ftl.v1.VerbService", + methods: { + /** + * Ping service for readiness. + * + * @generated from rpc xyz.block.ftl.v1.VerbService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, + /** + * Issue a synchronous call to a Verb. + * + * @generated from rpc xyz.block.ftl.v1.VerbService.Call + */ + call: { + name: "Call", + I: CallRequest, + O: CallResponse, + kind: MethodKind.Unary, + }, + } +} as const; + +/** + * @generated from service xyz.block.ftl.v1.ControllerService + */ +export const ControllerService = { + typeName: "xyz.block.ftl.v1.ControllerService", + methods: { + /** + * Ping service for readiness. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, + /** + * List "processes" running on the cluster. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.ProcessList + */ + processList: { + name: "ProcessList", + I: ProcessListRequest, + O: ProcessListResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc xyz.block.ftl.v1.ControllerService.Status + */ + status: { + name: "Status", + I: StatusRequest, + O: StatusResponse, + kind: MethodKind.Unary, + }, + /** + * Get list of artefacts that differ between the server and client. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.GetArtefactDiffs + */ + getArtefactDiffs: { + name: "GetArtefactDiffs", + I: GetArtefactDiffsRequest, + O: GetArtefactDiffsResponse, + kind: MethodKind.Unary, + }, + /** + * Upload an artefact to the server. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.UploadArtefact + */ + uploadArtefact: { + name: "UploadArtefact", + I: UploadArtefactRequest, + O: UploadArtefactResponse, + kind: MethodKind.Unary, + }, + /** + * Create a deployment. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.CreateDeployment + */ + createDeployment: { + name: "CreateDeployment", + I: CreateDeploymentRequest, + O: CreateDeploymentResponse, + kind: MethodKind.Unary, + }, + /** + * Get the schema and artefact metadata for a deployment. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.GetDeployment + */ + getDeployment: { + name: "GetDeployment", + I: GetDeploymentRequest, + O: GetDeploymentResponse, + kind: MethodKind.Unary, + }, + /** + * Stream deployment artefacts from the server. + * + * Each artefact is streamed one after the other as a sequence of max 1MB + * chunks. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.GetDeploymentArtefacts + */ + getDeploymentArtefacts: { + name: "GetDeploymentArtefacts", + I: GetDeploymentArtefactsRequest, + O: GetDeploymentArtefactsResponse, + kind: MethodKind.ServerStreaming, + }, + /** + * Register a Runner with the Controller. + * + * Each runner issue a RegisterRunnerRequest to the ControllerService + * every 10 seconds to maintain its heartbeat. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.RegisterRunner + */ + registerRunner: { + name: "RegisterRunner", + I: RegisterRunnerRequest, + O: RegisterRunnerResponse, + kind: MethodKind.ClientStreaming, + }, + /** + * Update an existing deployment. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.UpdateDeploy + */ + updateDeploy: { + name: "UpdateDeploy", + I: UpdateDeployRequest, + O: UpdateDeployResponse, + kind: MethodKind.Unary, + }, + /** + * Gradually replace an existing deployment with a new one. + * + * If a deployment already exists for the module of the new deployment, + * it will be scaled down and replaced by the new one. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.ReplaceDeploy + */ + replaceDeploy: { + name: "ReplaceDeploy", + I: ReplaceDeployRequest, + O: ReplaceDeployResponse, + kind: MethodKind.Unary, + }, + /** + * Stream logs from a deployment + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.StreamDeploymentLogs + */ + streamDeploymentLogs: { + name: "StreamDeploymentLogs", + I: StreamDeploymentLogsRequest, + O: StreamDeploymentLogsResponse, + kind: MethodKind.ClientStreaming, + }, + /** + * Get the full schema. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.GetSchema + */ + getSchema: { + name: "GetSchema", + I: GetSchemaRequest, + O: GetSchemaResponse, + kind: MethodKind.Unary, + }, + /** + * Pull schema changes from the Controller. + * + * Note that if there are no deployments this will block indefinitely, making it unsuitable for + * just retrieving the schema. Use GetSchema for that. + * + * @generated from rpc xyz.block.ftl.v1.ControllerService.PullSchema + */ + pullSchema: { + name: "PullSchema", + I: PullSchemaRequest, + O: PullSchemaResponse, + kind: MethodKind.ServerStreaming, + }, + } +} as const; + +/** + * RunnerService is the service that executes Deployments. + * + * The Controller will scale the Runner horizontally as required. The Runner will + * register itself automatically with the ControllerService, which will then + * assign modules to it. + * + * @generated from service xyz.block.ftl.v1.RunnerService + */ +export const RunnerService = { + typeName: "xyz.block.ftl.v1.RunnerService", + methods: { + /** + * @generated from rpc xyz.block.ftl.v1.RunnerService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, + /** + * Reserve synchronously reserves a Runner for a deployment but does nothing else. + * + * @generated from rpc xyz.block.ftl.v1.RunnerService.Reserve + */ + reserve: { + name: "Reserve", + I: ReserveRequest, + O: ReserveResponse, + kind: MethodKind.Unary, + }, + /** + * Initiate a deployment on this Runner. + * + * @generated from rpc xyz.block.ftl.v1.RunnerService.Deploy + */ + deploy: { + name: "Deploy", + I: DeployRequest, + O: DeployResponse, + kind: MethodKind.Unary, + }, + /** + * Terminate the deployment on this Runner. + * + * @generated from rpc xyz.block.ftl.v1.RunnerService.Terminate + */ + terminate: { + name: "Terminate", + I: TerminateRequest, + O: RegisterRunnerRequest, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_pb.ts b/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_pb.ts new file mode 100644 index 0000000000..e0024b4401 --- /dev/null +++ b/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_pb.ts @@ -0,0 +1,2136 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/ftl.proto (package xyz.block.ftl.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, Struct, Timestamp } from "@bufbuild/protobuf"; +import { Module, Schema, VerbRef } from "./schema/schema_pb.js"; + +/** + * @generated from enum xyz.block.ftl.v1.DeploymentChangeType + */ +export enum DeploymentChangeType { + /** + * @generated from enum value: DEPLOYMENT_ADDED = 0; + */ + DEPLOYMENT_ADDED = 0, + + /** + * @generated from enum value: DEPLOYMENT_REMOVED = 1; + */ + DEPLOYMENT_REMOVED = 1, + + /** + * @generated from enum value: DEPLOYMENT_CHANGED = 2; + */ + DEPLOYMENT_CHANGED = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(DeploymentChangeType) +proto3.util.setEnumType(DeploymentChangeType, "xyz.block.ftl.v1.DeploymentChangeType", [ + { no: 0, name: "DEPLOYMENT_ADDED" }, + { no: 1, name: "DEPLOYMENT_REMOVED" }, + { no: 2, name: "DEPLOYMENT_CHANGED" }, +]); + +/** + * @generated from enum xyz.block.ftl.v1.ControllerState + */ +export enum ControllerState { + /** + * @generated from enum value: CONTROLLER_LIVE = 0; + */ + CONTROLLER_LIVE = 0, + + /** + * @generated from enum value: CONTROLLER_DEAD = 1; + */ + CONTROLLER_DEAD = 1, +} +// Retrieve enum metadata with: proto3.getEnumType(ControllerState) +proto3.util.setEnumType(ControllerState, "xyz.block.ftl.v1.ControllerState", [ + { no: 0, name: "CONTROLLER_LIVE" }, + { no: 1, name: "CONTROLLER_DEAD" }, +]); + +/** + * @generated from enum xyz.block.ftl.v1.RunnerState + */ +export enum RunnerState { + /** + * The Runner is waiting for a deployment. + * + * @generated from enum value: RUNNER_IDLE = 0; + */ + RUNNER_IDLE = 0, + + /** + * The Runner and Controller have agreed that the Runner is reserved. + * + * @generated from enum value: RUNNER_RESERVED = 1; + */ + RUNNER_RESERVED = 1, + + /** + * The Runner is assigned to a deployment. + * + * @generated from enum value: RUNNER_ASSIGNED = 2; + */ + RUNNER_ASSIGNED = 2, + + /** + * The Runner is dead. + * + * @generated from enum value: RUNNER_DEAD = 3; + */ + RUNNER_DEAD = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(RunnerState) +proto3.util.setEnumType(RunnerState, "xyz.block.ftl.v1.RunnerState", [ + { no: 0, name: "RUNNER_IDLE" }, + { no: 1, name: "RUNNER_RESERVED" }, + { no: 2, name: "RUNNER_ASSIGNED" }, + { no: 3, name: "RUNNER_DEAD" }, +]); + +/** + * @generated from message xyz.block.ftl.v1.PingRequest + */ +export class PingRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.PingRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PingRequest { + return new PingRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PingRequest { + return new PingRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PingRequest { + return new PingRequest().fromJsonString(jsonString, options); + } + + static equals(a: PingRequest | PlainMessage | undefined, b: PingRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(PingRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.PingResponse + */ +export class PingResponse extends Message { + /** + * If present, the service is not ready to accept requests and this is the + * reason. + * + * @generated from field: optional string not_ready = 1; + */ + notReady?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.PingResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "not_ready", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PingResponse { + return new PingResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PingResponse { + return new PingResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PingResponse { + return new PingResponse().fromJsonString(jsonString, options); + } + + static equals(a: PingResponse | PlainMessage | undefined, b: PingResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(PingResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.Metadata + */ +export class Metadata extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.Metadata.Pair values = 1; + */ + values: Metadata_Pair[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.Metadata"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "values", kind: "message", T: Metadata_Pair, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { + return new Metadata().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Metadata { + return new Metadata().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Metadata { + return new Metadata().fromJsonString(jsonString, options); + } + + static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean { + return proto3.util.equals(Metadata, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.Metadata.Pair + */ +export class Metadata_Pair extends Message { + /** + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: string value = 2; + */ + value = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.Metadata.Pair"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Metadata_Pair { + return new Metadata_Pair().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Metadata_Pair { + return new Metadata_Pair().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Metadata_Pair { + return new Metadata_Pair().fromJsonString(jsonString, options); + } + + static equals(a: Metadata_Pair | PlainMessage | undefined, b: Metadata_Pair | PlainMessage | undefined): boolean { + return proto3.util.equals(Metadata_Pair, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.CallRequest + */ +export class CallRequest extends Message { + /** + * @generated from field: xyz.block.ftl.v1.Metadata metadata = 1; + */ + metadata?: Metadata; + + /** + * @generated from field: xyz.block.ftl.v1.schema.VerbRef verb = 2; + */ + verb?: VerbRef; + + /** + * @generated from field: bytes body = 3; + */ + body = new Uint8Array(0); + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.CallRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "metadata", kind: "message", T: Metadata }, + { no: 2, name: "verb", kind: "message", T: VerbRef }, + { no: 3, name: "body", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CallRequest { + return new CallRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CallRequest { + return new CallRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CallRequest { + return new CallRequest().fromJsonString(jsonString, options); + } + + static equals(a: CallRequest | PlainMessage | undefined, b: CallRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CallRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.CallResponse + */ +export class CallResponse extends Message { + /** + * @generated from oneof xyz.block.ftl.v1.CallResponse.response + */ + response: { + /** + * @generated from field: bytes body = 1; + */ + value: Uint8Array; + case: "body"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.CallResponse.Error error = 2; + */ + value: CallResponse_Error; + case: "error"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.CallResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "body", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "response" }, + { no: 2, name: "error", kind: "message", T: CallResponse_Error, oneof: "response" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CallResponse { + return new CallResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CallResponse { + return new CallResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CallResponse { + return new CallResponse().fromJsonString(jsonString, options); + } + + static equals(a: CallResponse | PlainMessage | undefined, b: CallResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CallResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.CallResponse.Error + */ +export class CallResponse_Error extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + /** + * TODO: Richer error type. + * + * @generated from field: optional string stack = 2; + */ + stack?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.CallResponse.Error"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "stack", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CallResponse_Error { + return new CallResponse_Error().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CallResponse_Error { + return new CallResponse_Error().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CallResponse_Error { + return new CallResponse_Error().fromJsonString(jsonString, options); + } + + static equals(a: CallResponse_Error | PlainMessage | undefined, b: CallResponse_Error | PlainMessage | undefined): boolean { + return proto3.util.equals(CallResponse_Error, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetSchemaRequest + */ +export class GetSchemaRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetSchemaRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSchemaRequest { + return new GetSchemaRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSchemaRequest { + return new GetSchemaRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetSchemaRequest { + return new GetSchemaRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetSchemaRequest | PlainMessage | undefined, b: GetSchemaRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetSchemaRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetSchemaResponse + */ +export class GetSchemaResponse extends Message { + /** + * @generated from field: xyz.block.ftl.v1.schema.Schema schema = 1; + */ + schema?: Schema; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetSchemaResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "schema", kind: "message", T: Schema }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetSchemaResponse { + return new GetSchemaResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetSchemaResponse { + return new GetSchemaResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetSchemaResponse { + return new GetSchemaResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetSchemaResponse | PlainMessage | undefined, b: GetSchemaResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetSchemaResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.PullSchemaRequest + */ +export class PullSchemaRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.PullSchemaRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PullSchemaRequest { + return new PullSchemaRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PullSchemaRequest { + return new PullSchemaRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PullSchemaRequest { + return new PullSchemaRequest().fromJsonString(jsonString, options); + } + + static equals(a: PullSchemaRequest | PlainMessage | undefined, b: PullSchemaRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(PullSchemaRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.PullSchemaResponse + */ +export class PullSchemaResponse extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: string module_name = 2; + */ + moduleName = ""; + + /** + * For deletes this will not be present. + * + * @generated from field: optional xyz.block.ftl.v1.schema.Module schema = 4; + */ + schema?: Module; + + /** + * If true there are more schema changes immediately following this one as part of the initial batch. + * If false this is the last schema change in the initial batch, but others may follow later. + * + * @generated from field: bool more = 3; + */ + more = false; + + /** + * @generated from field: xyz.block.ftl.v1.DeploymentChangeType change_type = 5; + */ + changeType = DeploymentChangeType.DEPLOYMENT_ADDED; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.PullSchemaResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "module_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "schema", kind: "message", T: Module, opt: true }, + { no: 3, name: "more", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 5, name: "change_type", kind: "enum", T: proto3.getEnumType(DeploymentChangeType) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PullSchemaResponse { + return new PullSchemaResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PullSchemaResponse { + return new PullSchemaResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PullSchemaResponse { + return new PullSchemaResponse().fromJsonString(jsonString, options); + } + + static equals(a: PullSchemaResponse | PlainMessage | undefined, b: PullSchemaResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(PullSchemaResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetArtefactDiffsRequest + */ +export class GetArtefactDiffsRequest extends Message { + /** + * @generated from field: repeated string client_digests = 1; + */ + clientDigests: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetArtefactDiffsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "client_digests", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetArtefactDiffsRequest { + return new GetArtefactDiffsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetArtefactDiffsRequest { + return new GetArtefactDiffsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetArtefactDiffsRequest { + return new GetArtefactDiffsRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetArtefactDiffsRequest | PlainMessage | undefined, b: GetArtefactDiffsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetArtefactDiffsRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetArtefactDiffsResponse + */ +export class GetArtefactDiffsResponse extends Message { + /** + * @generated from field: repeated string missing_digests = 1; + */ + missingDigests: string[] = []; + + /** + * Artefacts that the client already has, and their path+executable status. + * + * @generated from field: repeated xyz.block.ftl.v1.DeploymentArtefact client_artefacts = 2; + */ + clientArtefacts: DeploymentArtefact[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetArtefactDiffsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "missing_digests", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 2, name: "client_artefacts", kind: "message", T: DeploymentArtefact, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetArtefactDiffsResponse { + return new GetArtefactDiffsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetArtefactDiffsResponse { + return new GetArtefactDiffsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetArtefactDiffsResponse { + return new GetArtefactDiffsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetArtefactDiffsResponse | PlainMessage | undefined, b: GetArtefactDiffsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetArtefactDiffsResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.UploadArtefactRequest + */ +export class UploadArtefactRequest extends Message { + /** + * @generated from field: bytes content = 1; + */ + content = new Uint8Array(0); + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.UploadArtefactRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "content", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UploadArtefactRequest { + return new UploadArtefactRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UploadArtefactRequest { + return new UploadArtefactRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UploadArtefactRequest { + return new UploadArtefactRequest().fromJsonString(jsonString, options); + } + + static equals(a: UploadArtefactRequest | PlainMessage | undefined, b: UploadArtefactRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(UploadArtefactRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.UploadArtefactResponse + */ +export class UploadArtefactResponse extends Message { + /** + * @generated from field: bytes digest = 2; + */ + digest = new Uint8Array(0); + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.UploadArtefactResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 2, name: "digest", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UploadArtefactResponse { + return new UploadArtefactResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UploadArtefactResponse { + return new UploadArtefactResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UploadArtefactResponse { + return new UploadArtefactResponse().fromJsonString(jsonString, options); + } + + static equals(a: UploadArtefactResponse | PlainMessage | undefined, b: UploadArtefactResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(UploadArtefactResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.DeploymentArtefact + */ +export class DeploymentArtefact extends Message { + /** + * @generated from field: string digest = 1; + */ + digest = ""; + + /** + * @generated from field: string path = 2; + */ + path = ""; + + /** + * @generated from field: bool executable = 3; + */ + executable = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.DeploymentArtefact"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "digest", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "executable", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeploymentArtefact { + return new DeploymentArtefact().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeploymentArtefact { + return new DeploymentArtefact().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeploymentArtefact { + return new DeploymentArtefact().fromJsonString(jsonString, options); + } + + static equals(a: DeploymentArtefact | PlainMessage | undefined, b: DeploymentArtefact | PlainMessage | undefined): boolean { + return proto3.util.equals(DeploymentArtefact, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.CreateDeploymentRequest + */ +export class CreateDeploymentRequest extends Message { + /** + * @generated from field: xyz.block.ftl.v1.schema.Module schema = 1; + */ + schema?: Module; + + /** + * @generated from field: repeated xyz.block.ftl.v1.DeploymentArtefact artefacts = 2; + */ + artefacts: DeploymentArtefact[] = []; + + /** + * Runner labels required to run this deployment. + * + * @generated from field: optional google.protobuf.Struct labels = 3; + */ + labels?: Struct; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.CreateDeploymentRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "schema", kind: "message", T: Module }, + { no: 2, name: "artefacts", kind: "message", T: DeploymentArtefact, repeated: true }, + { no: 3, name: "labels", kind: "message", T: Struct, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateDeploymentRequest { + return new CreateDeploymentRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateDeploymentRequest { + return new CreateDeploymentRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateDeploymentRequest { + return new CreateDeploymentRequest().fromJsonString(jsonString, options); + } + + static equals(a: CreateDeploymentRequest | PlainMessage | undefined, b: CreateDeploymentRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateDeploymentRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.CreateDeploymentResponse + */ +export class CreateDeploymentResponse extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * Currently active deployment for this module, if any. + * + * @generated from field: optional string active_deployment_name = 2; + */ + activeDeploymentName?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.CreateDeploymentResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "active_deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateDeploymentResponse { + return new CreateDeploymentResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateDeploymentResponse { + return new CreateDeploymentResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateDeploymentResponse { + return new CreateDeploymentResponse().fromJsonString(jsonString, options); + } + + static equals(a: CreateDeploymentResponse | PlainMessage | undefined, b: CreateDeploymentResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateDeploymentResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetDeploymentArtefactsRequest + */ +export class GetDeploymentArtefactsRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: repeated xyz.block.ftl.v1.DeploymentArtefact have_artefacts = 2; + */ + haveArtefacts: DeploymentArtefact[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetDeploymentArtefactsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "have_artefacts", kind: "message", T: DeploymentArtefact, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDeploymentArtefactsRequest { + return new GetDeploymentArtefactsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDeploymentArtefactsRequest { + return new GetDeploymentArtefactsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetDeploymentArtefactsRequest { + return new GetDeploymentArtefactsRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetDeploymentArtefactsRequest | PlainMessage | undefined, b: GetDeploymentArtefactsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetDeploymentArtefactsRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetDeploymentArtefactsResponse + */ +export class GetDeploymentArtefactsResponse extends Message { + /** + * @generated from field: xyz.block.ftl.v1.DeploymentArtefact artefact = 1; + */ + artefact?: DeploymentArtefact; + + /** + * @generated from field: bytes chunk = 2; + */ + chunk = new Uint8Array(0); + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetDeploymentArtefactsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "artefact", kind: "message", T: DeploymentArtefact }, + { no: 2, name: "chunk", kind: "scalar", T: 12 /* ScalarType.BYTES */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDeploymentArtefactsResponse { + return new GetDeploymentArtefactsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDeploymentArtefactsResponse { + return new GetDeploymentArtefactsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetDeploymentArtefactsResponse { + return new GetDeploymentArtefactsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetDeploymentArtefactsResponse | PlainMessage | undefined, b: GetDeploymentArtefactsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetDeploymentArtefactsResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetDeploymentRequest + */ +export class GetDeploymentRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetDeploymentRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDeploymentRequest { + return new GetDeploymentRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDeploymentRequest { + return new GetDeploymentRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetDeploymentRequest { + return new GetDeploymentRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetDeploymentRequest | PlainMessage | undefined, b: GetDeploymentRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetDeploymentRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.GetDeploymentResponse + */ +export class GetDeploymentResponse extends Message { + /** + * @generated from field: xyz.block.ftl.v1.schema.Module schema = 1; + */ + schema?: Module; + + /** + * @generated from field: repeated xyz.block.ftl.v1.DeploymentArtefact artefacts = 2; + */ + artefacts: DeploymentArtefact[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.GetDeploymentResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "schema", kind: "message", T: Module }, + { no: 2, name: "artefacts", kind: "message", T: DeploymentArtefact, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetDeploymentResponse { + return new GetDeploymentResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetDeploymentResponse { + return new GetDeploymentResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetDeploymentResponse { + return new GetDeploymentResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetDeploymentResponse | PlainMessage | undefined, b: GetDeploymentResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetDeploymentResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.RegisterRunnerRequest + */ +export class RegisterRunnerRequest extends Message { + /** + * UUID representing the runner instance. + * + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: string endpoint = 2; + */ + endpoint = ""; + + /** + * @generated from field: optional string deployment = 3; + */ + deployment?: string; + + /** + * @generated from field: xyz.block.ftl.v1.RunnerState state = 4; + */ + state = RunnerState.RUNNER_IDLE; + + /** + * @generated from field: google.protobuf.Struct labels = 5; + */ + labels?: Struct; + + /** + * If present, the reason the Runner is transitioning from ASSIGNED to IDLE. + * + * @generated from field: optional string error = 7; + */ + error?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.RegisterRunnerRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "deployment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "state", kind: "enum", T: proto3.getEnumType(RunnerState) }, + { no: 5, name: "labels", kind: "message", T: Struct }, + { no: 7, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RegisterRunnerRequest { + return new RegisterRunnerRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RegisterRunnerRequest { + return new RegisterRunnerRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RegisterRunnerRequest { + return new RegisterRunnerRequest().fromJsonString(jsonString, options); + } + + static equals(a: RegisterRunnerRequest | PlainMessage | undefined, b: RegisterRunnerRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(RegisterRunnerRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.RegisterRunnerResponse + */ +export class RegisterRunnerResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.RegisterRunnerResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RegisterRunnerResponse { + return new RegisterRunnerResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RegisterRunnerResponse { + return new RegisterRunnerResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RegisterRunnerResponse { + return new RegisterRunnerResponse().fromJsonString(jsonString, options); + } + + static equals(a: RegisterRunnerResponse | PlainMessage | undefined, b: RegisterRunnerResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(RegisterRunnerResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.UpdateDeployRequest + */ +export class UpdateDeployRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: int32 min_replicas = 2; + */ + minReplicas = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.UpdateDeployRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateDeployRequest { + return new UpdateDeployRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateDeployRequest { + return new UpdateDeployRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateDeployRequest { + return new UpdateDeployRequest().fromJsonString(jsonString, options); + } + + static equals(a: UpdateDeployRequest | PlainMessage | undefined, b: UpdateDeployRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateDeployRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.UpdateDeployResponse + */ +export class UpdateDeployResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.UpdateDeployResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateDeployResponse { + return new UpdateDeployResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateDeployResponse { + return new UpdateDeployResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateDeployResponse { + return new UpdateDeployResponse().fromJsonString(jsonString, options); + } + + static equals(a: UpdateDeployResponse | PlainMessage | undefined, b: UpdateDeployResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateDeployResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ReplaceDeployRequest + */ +export class ReplaceDeployRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: int32 min_replicas = 2; + */ + minReplicas = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ReplaceDeployRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ReplaceDeployRequest { + return new ReplaceDeployRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ReplaceDeployRequest { + return new ReplaceDeployRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ReplaceDeployRequest { + return new ReplaceDeployRequest().fromJsonString(jsonString, options); + } + + static equals(a: ReplaceDeployRequest | PlainMessage | undefined, b: ReplaceDeployRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ReplaceDeployRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ReplaceDeployResponse + */ +export class ReplaceDeployResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ReplaceDeployResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ReplaceDeployResponse { + return new ReplaceDeployResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ReplaceDeployResponse { + return new ReplaceDeployResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ReplaceDeployResponse { + return new ReplaceDeployResponse().fromJsonString(jsonString, options); + } + + static equals(a: ReplaceDeployResponse | PlainMessage | undefined, b: ReplaceDeployResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ReplaceDeployResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StreamDeploymentLogsRequest + */ +export class StreamDeploymentLogsRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: optional string request_name = 2; + */ + requestName?: string; + + /** + * @generated from field: google.protobuf.Timestamp time_stamp = 3; + */ + timeStamp?: Timestamp; + + /** + * @generated from field: int32 log_level = 4; + */ + logLevel = 0; + + /** + * @generated from field: map attributes = 5; + */ + attributes: { [key: string]: string } = {}; + + /** + * @generated from field: string message = 6; + */ + message = ""; + + /** + * @generated from field: optional string error = 7; + */ + error?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StreamDeploymentLogsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "request_name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "time_stamp", kind: "message", T: Timestamp }, + { no: 4, name: "log_level", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 5, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, + { no: 6, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamDeploymentLogsRequest { + return new StreamDeploymentLogsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamDeploymentLogsRequest { + return new StreamDeploymentLogsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamDeploymentLogsRequest { + return new StreamDeploymentLogsRequest().fromJsonString(jsonString, options); + } + + static equals(a: StreamDeploymentLogsRequest | PlainMessage | undefined, b: StreamDeploymentLogsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(StreamDeploymentLogsRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StreamDeploymentLogsResponse + */ +export class StreamDeploymentLogsResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StreamDeploymentLogsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StreamDeploymentLogsResponse { + return new StreamDeploymentLogsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StreamDeploymentLogsResponse { + return new StreamDeploymentLogsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StreamDeploymentLogsResponse { + return new StreamDeploymentLogsResponse().fromJsonString(jsonString, options); + } + + static equals(a: StreamDeploymentLogsResponse | PlainMessage | undefined, b: StreamDeploymentLogsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(StreamDeploymentLogsResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusRequest + */ +export class StatusRequest extends Message { + /** + * @generated from field: bool all_deployments = 1; + */ + allDeployments = false; + + /** + * @generated from field: bool all_runners = 2; + */ + allRunners = false; + + /** + * @generated from field: bool all_controllers = 3; + */ + allControllers = false; + + /** + * @generated from field: bool all_ingress_routes = 4; + */ + allIngressRoutes = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "all_deployments", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 2, name: "all_runners", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "all_controllers", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "all_ingress_routes", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusRequest { + return new StatusRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusRequest { + return new StatusRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusRequest { + return new StatusRequest().fromJsonString(jsonString, options); + } + + static equals(a: StatusRequest | PlainMessage | undefined, b: StatusRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusResponse + */ +export class StatusResponse extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.StatusResponse.Controller controllers = 1; + */ + controllers: StatusResponse_Controller[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.StatusResponse.Runner runners = 2; + */ + runners: StatusResponse_Runner[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.StatusResponse.Deployment deployments = 3; + */ + deployments: StatusResponse_Deployment[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.StatusResponse.IngressRoute ingress_routes = 4; + */ + ingressRoutes: StatusResponse_IngressRoute[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.StatusResponse.Route routes = 5; + */ + routes: StatusResponse_Route[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "controllers", kind: "message", T: StatusResponse_Controller, repeated: true }, + { no: 2, name: "runners", kind: "message", T: StatusResponse_Runner, repeated: true }, + { no: 3, name: "deployments", kind: "message", T: StatusResponse_Deployment, repeated: true }, + { no: 4, name: "ingress_routes", kind: "message", T: StatusResponse_IngressRoute, repeated: true }, + { no: 5, name: "routes", kind: "message", T: StatusResponse_Route, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusResponse { + return new StatusResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusResponse { + return new StatusResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusResponse { + return new StatusResponse().fromJsonString(jsonString, options); + } + + static equals(a: StatusResponse | PlainMessage | undefined, b: StatusResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusResponse.Controller + */ +export class StatusResponse_Controller extends Message { + /** + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: string endpoint = 2; + */ + endpoint = ""; + + /** + * @generated from field: xyz.block.ftl.v1.ControllerState state = 4; + */ + state = ControllerState.CONTROLLER_LIVE; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusResponse.Controller"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "state", kind: "enum", T: proto3.getEnumType(ControllerState) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusResponse_Controller { + return new StatusResponse_Controller().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusResponse_Controller { + return new StatusResponse_Controller().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusResponse_Controller { + return new StatusResponse_Controller().fromJsonString(jsonString, options); + } + + static equals(a: StatusResponse_Controller | PlainMessage | undefined, b: StatusResponse_Controller | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusResponse_Controller, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusResponse.Runner + */ +export class StatusResponse_Runner extends Message { + /** + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: repeated string languages = 2; + */ + languages: string[] = []; + + /** + * @generated from field: string endpoint = 3; + */ + endpoint = ""; + + /** + * @generated from field: xyz.block.ftl.v1.RunnerState state = 4; + */ + state = RunnerState.RUNNER_IDLE; + + /** + * @generated from field: optional string deployment = 5; + */ + deployment?: string; + + /** + * @generated from field: google.protobuf.Struct labels = 6; + */ + labels?: Struct; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusResponse.Runner"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "languages", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "state", kind: "enum", T: proto3.getEnumType(RunnerState) }, + { no: 5, name: "deployment", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "labels", kind: "message", T: Struct }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusResponse_Runner { + return new StatusResponse_Runner().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusResponse_Runner { + return new StatusResponse_Runner().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusResponse_Runner { + return new StatusResponse_Runner().fromJsonString(jsonString, options); + } + + static equals(a: StatusResponse_Runner | PlainMessage | undefined, b: StatusResponse_Runner | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusResponse_Runner, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusResponse.Deployment + */ +export class StatusResponse_Deployment extends Message { + /** + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: string language = 2; + */ + language = ""; + + /** + * @generated from field: string name = 3; + */ + name = ""; + + /** + * @generated from field: int32 min_replicas = 4; + */ + minReplicas = 0; + + /** + * @generated from field: int32 replicas = 7; + */ + replicas = 0; + + /** + * @generated from field: google.protobuf.Struct labels = 5; + */ + labels?: Struct; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Module schema = 6; + */ + schema?: Module; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusResponse.Deployment"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 7, name: "replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 5, name: "labels", kind: "message", T: Struct }, + { no: 6, name: "schema", kind: "message", T: Module }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusResponse_Deployment { + return new StatusResponse_Deployment().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusResponse_Deployment { + return new StatusResponse_Deployment().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusResponse_Deployment { + return new StatusResponse_Deployment().fromJsonString(jsonString, options); + } + + static equals(a: StatusResponse_Deployment | PlainMessage | undefined, b: StatusResponse_Deployment | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusResponse_Deployment, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusResponse.IngressRoute + */ +export class StatusResponse_IngressRoute extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + /** + * @generated from field: xyz.block.ftl.v1.schema.VerbRef verb = 2; + */ + verb?: VerbRef; + + /** + * @generated from field: string method = 3; + */ + method = ""; + + /** + * @generated from field: string path = 4; + */ + path = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusResponse.IngressRoute"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "verb", kind: "message", T: VerbRef }, + { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusResponse_IngressRoute { + return new StatusResponse_IngressRoute().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusResponse_IngressRoute { + return new StatusResponse_IngressRoute().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusResponse_IngressRoute { + return new StatusResponse_IngressRoute().fromJsonString(jsonString, options); + } + + static equals(a: StatusResponse_IngressRoute | PlainMessage | undefined, b: StatusResponse_IngressRoute | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusResponse_IngressRoute, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.StatusResponse.Route + */ +export class StatusResponse_Route extends Message { + /** + * @generated from field: string module = 1; + */ + module = ""; + + /** + * @generated from field: string runner = 2; + */ + runner = ""; + + /** + * @generated from field: string deployment = 3; + */ + deployment = ""; + + /** + * @generated from field: string endpoint = 4; + */ + endpoint = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.StatusResponse.Route"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "module", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "runner", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "deployment", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StatusResponse_Route { + return new StatusResponse_Route().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StatusResponse_Route { + return new StatusResponse_Route().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StatusResponse_Route { + return new StatusResponse_Route().fromJsonString(jsonString, options); + } + + static equals(a: StatusResponse_Route | PlainMessage | undefined, b: StatusResponse_Route | PlainMessage | undefined): boolean { + return proto3.util.equals(StatusResponse_Route, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ProcessListRequest + */ +export class ProcessListRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ProcessListRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ProcessListRequest { + return new ProcessListRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ProcessListRequest { + return new ProcessListRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ProcessListRequest { + return new ProcessListRequest().fromJsonString(jsonString, options); + } + + static equals(a: ProcessListRequest | PlainMessage | undefined, b: ProcessListRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ProcessListRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ProcessListResponse + */ +export class ProcessListResponse extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.ProcessListResponse.Process processes = 1; + */ + processes: ProcessListResponse_Process[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ProcessListResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "processes", kind: "message", T: ProcessListResponse_Process, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ProcessListResponse { + return new ProcessListResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ProcessListResponse { + return new ProcessListResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ProcessListResponse { + return new ProcessListResponse().fromJsonString(jsonString, options); + } + + static equals(a: ProcessListResponse | PlainMessage | undefined, b: ProcessListResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ProcessListResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ProcessListResponse.ProcessRunner + */ +export class ProcessListResponse_ProcessRunner extends Message { + /** + * @generated from field: string key = 1; + */ + key = ""; + + /** + * @generated from field: string endpoint = 2; + */ + endpoint = ""; + + /** + * @generated from field: google.protobuf.Struct labels = 3; + */ + labels?: Struct; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ProcessListResponse.ProcessRunner"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "endpoint", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "labels", kind: "message", T: Struct }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ProcessListResponse_ProcessRunner { + return new ProcessListResponse_ProcessRunner().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ProcessListResponse_ProcessRunner { + return new ProcessListResponse_ProcessRunner().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ProcessListResponse_ProcessRunner { + return new ProcessListResponse_ProcessRunner().fromJsonString(jsonString, options); + } + + static equals(a: ProcessListResponse_ProcessRunner | PlainMessage | undefined, b: ProcessListResponse_ProcessRunner | PlainMessage | undefined): boolean { + return proto3.util.equals(ProcessListResponse_ProcessRunner, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ProcessListResponse.Process + */ +export class ProcessListResponse_Process extends Message { + /** + * @generated from field: string deployment = 1; + */ + deployment = ""; + + /** + * @generated from field: int32 min_replicas = 2; + */ + minReplicas = 0; + + /** + * @generated from field: google.protobuf.Struct labels = 3; + */ + labels?: Struct; + + /** + * @generated from field: optional xyz.block.ftl.v1.ProcessListResponse.ProcessRunner runner = 4; + */ + runner?: ProcessListResponse_ProcessRunner; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ProcessListResponse.Process"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + { no: 3, name: "labels", kind: "message", T: Struct }, + { no: 4, name: "runner", kind: "message", T: ProcessListResponse_ProcessRunner, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ProcessListResponse_Process { + return new ProcessListResponse_Process().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ProcessListResponse_Process { + return new ProcessListResponse_Process().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ProcessListResponse_Process { + return new ProcessListResponse_Process().fromJsonString(jsonString, options); + } + + static equals(a: ProcessListResponse_Process | PlainMessage | undefined, b: ProcessListResponse_Process | PlainMessage | undefined): boolean { + return proto3.util.equals(ProcessListResponse_Process, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.DeployRequest + */ +export class DeployRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.DeployRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeployRequest { + return new DeployRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeployRequest { + return new DeployRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeployRequest { + return new DeployRequest().fromJsonString(jsonString, options); + } + + static equals(a: DeployRequest | PlainMessage | undefined, b: DeployRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(DeployRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.DeployResponse + */ +export class DeployResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.DeployResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DeployResponse { + return new DeployResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DeployResponse { + return new DeployResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DeployResponse { + return new DeployResponse().fromJsonString(jsonString, options); + } + + static equals(a: DeployResponse | PlainMessage | undefined, b: DeployResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(DeployResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.TerminateRequest + */ +export class TerminateRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.TerminateRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): TerminateRequest { + return new TerminateRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): TerminateRequest { + return new TerminateRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): TerminateRequest { + return new TerminateRequest().fromJsonString(jsonString, options); + } + + static equals(a: TerminateRequest | PlainMessage | undefined, b: TerminateRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(TerminateRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ReserveRequest + */ +export class ReserveRequest extends Message { + /** + * @generated from field: string deployment_name = 1; + */ + deploymentName = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ReserveRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployment_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ReserveRequest { + return new ReserveRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ReserveRequest { + return new ReserveRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ReserveRequest { + return new ReserveRequest().fromJsonString(jsonString, options); + } + + static equals(a: ReserveRequest | PlainMessage | undefined, b: ReserveRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ReserveRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.ReserveResponse + */ +export class ReserveResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.ReserveResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ReserveResponse { + return new ReserveResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ReserveResponse { + return new ReserveResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ReserveResponse { + return new ReserveResponse().fromJsonString(jsonString, options); + } + + static equals(a: ReserveResponse | PlainMessage | undefined, b: ReserveResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ReserveResponse, a, b); + } +} + diff --git a/backend/frontend/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts b/backend/frontend/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts new file mode 100644 index 0000000000..98899c6cd8 --- /dev/null +++ b/backend/frontend/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts @@ -0,0 +1,150 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/schema/runtime.proto (package xyz.block.ftl.v1.schema, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, Timestamp } from "@bufbuild/protobuf"; + +/** + * @generated from enum xyz.block.ftl.v1.schema.Status + */ +export enum Status { + /** + * @generated from enum value: OFFLINE = 0; + */ + OFFLINE = 0, + + /** + * @generated from enum value: STARTING = 1; + */ + STARTING = 1, + + /** + * @generated from enum value: ONLINE = 2; + */ + ONLINE = 2, + + /** + * @generated from enum value: STOPPING = 3; + */ + STOPPING = 3, + + /** + * @generated from enum value: STOPPED = 4; + */ + STOPPED = 4, + + /** + * @generated from enum value: ERRORED = 5; + */ + ERRORED = 5, +} +// Retrieve enum metadata with: proto3.getEnumType(Status) +proto3.util.setEnumType(Status, "xyz.block.ftl.v1.schema.Status", [ + { no: 0, name: "OFFLINE" }, + { no: 1, name: "STARTING" }, + { no: 2, name: "ONLINE" }, + { no: 3, name: "STOPPING" }, + { no: 4, name: "STOPPED" }, + { no: 5, name: "ERRORED" }, +]); + +/** + * @generated from message xyz.block.ftl.v1.schema.ModuleRuntime + */ +export class ModuleRuntime extends Message { + /** + * @generated from field: google.protobuf.Timestamp create_time = 1; + */ + createTime?: Timestamp; + + /** + * @generated from field: string language = 2; + */ + language = ""; + + /** + * @generated from field: int32 min_replicas = 3; + */ + minReplicas = 0; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.ModuleRuntime"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "create_time", kind: "message", T: Timestamp }, + { no: 2, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "min_replicas", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ModuleRuntime { + return new ModuleRuntime().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ModuleRuntime { + return new ModuleRuntime().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ModuleRuntime { + return new ModuleRuntime().fromJsonString(jsonString, options); + } + + static equals(a: ModuleRuntime | PlainMessage | undefined, b: ModuleRuntime | PlainMessage | undefined): boolean { + return proto3.util.equals(ModuleRuntime, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.VerbRuntime + */ +export class VerbRuntime extends Message { + /** + * @generated from field: google.protobuf.Timestamp create_time = 1; + */ + createTime?: Timestamp; + + /** + * @generated from field: google.protobuf.Timestamp start_time = 2; + */ + startTime?: Timestamp; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Status status = 3; + */ + status = Status.OFFLINE; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.VerbRuntime"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "create_time", kind: "message", T: Timestamp }, + { no: 2, name: "start_time", kind: "message", T: Timestamp }, + { no: 3, name: "status", kind: "enum", T: proto3.getEnumType(Status) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): VerbRuntime { + return new VerbRuntime().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): VerbRuntime { + return new VerbRuntime().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): VerbRuntime { + return new VerbRuntime().fromJsonString(jsonString, options); + } + + static equals(a: VerbRuntime | PlainMessage | undefined, b: VerbRuntime | PlainMessage | undefined): boolean { + return proto3.util.equals(VerbRuntime, a, b); + } +} + diff --git a/backend/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts b/backend/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts new file mode 100644 index 0000000000..2fe14ca519 --- /dev/null +++ b/backend/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts @@ -0,0 +1,1607 @@ +// @generated by protoc-gen-es v1.7.2 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/schema/schema.proto (package xyz.block.ftl.v1.schema, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +// This file is generated by github.com/TBD54566975/ftl/backend/schema/protobuf.go, DO NOT MODIFY + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import { ModuleRuntime, VerbRuntime } from "./runtime_pb.js"; + +/** + * @generated from message xyz.block.ftl.v1.schema.SinkRef + */ +export class SinkRef extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: string module = 3; + */ + module = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.SinkRef"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "module", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SinkRef { + return new SinkRef().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SinkRef { + return new SinkRef().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SinkRef { + return new SinkRef().fromJsonString(jsonString, options); + } + + static equals(a: SinkRef | PlainMessage | undefined, b: SinkRef | PlainMessage | undefined): boolean { + return proto3.util.equals(SinkRef, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.SourceRef + */ +export class SourceRef extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: string module = 3; + */ + module = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.SourceRef"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "module", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SourceRef { + return new SourceRef().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SourceRef { + return new SourceRef().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SourceRef { + return new SourceRef().fromJsonString(jsonString, options); + } + + static equals(a: SourceRef | PlainMessage | undefined, b: SourceRef | PlainMessage | undefined): boolean { + return proto3.util.equals(SourceRef, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.VerbRef + */ +export class VerbRef extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: string module = 3; + */ + module = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.VerbRef"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "module", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): VerbRef { + return new VerbRef().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): VerbRef { + return new VerbRef().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): VerbRef { + return new VerbRef().fromJsonString(jsonString, options); + } + + static equals(a: VerbRef | PlainMessage | undefined, b: VerbRef | PlainMessage | undefined): boolean { + return proto3.util.equals(VerbRef, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Any + */ +export class Any extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Any"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Any { + return new Any().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Any { + return new Any().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Any { + return new Any().fromJsonString(jsonString, options); + } + + static equals(a: Any | PlainMessage | undefined, b: Any | PlainMessage | undefined): boolean { + return proto3.util.equals(Any, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Array + */ +export class Array extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Type element = 2; + */ + element?: Type; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Array"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "element", kind: "message", T: Type }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Array { + return new Array().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Array { + return new Array().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Array { + return new Array().fromJsonString(jsonString, options); + } + + static equals(a: Array | PlainMessage | undefined, b: Array | PlainMessage | undefined): boolean { + return proto3.util.equals(Array, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Bool + */ +export class Bool extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Bool"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Bool { + return new Bool().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Bool { + return new Bool().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Bool { + return new Bool().fromJsonString(jsonString, options); + } + + static equals(a: Bool | PlainMessage | undefined, b: Bool | PlainMessage | undefined): boolean { + return proto3.util.equals(Bool, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Bytes + */ +export class Bytes extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Bytes"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Bytes { + return new Bytes().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Bytes { + return new Bytes().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Bytes { + return new Bytes().fromJsonString(jsonString, options); + } + + static equals(a: Bytes | PlainMessage | undefined, b: Bytes | PlainMessage | undefined): boolean { + return proto3.util.equals(Bytes, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Data + */ +export class Data extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: repeated string comments = 2; + */ + comments: string[] = []; + + /** + * @generated from field: string name = 3; + */ + name = ""; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Field fields = 4; + */ + fields: Field[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Metadata metadata = 5; + */ + metadata: Metadata[] = []; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.TypeParameter typeParameters = 6; + */ + typeParameters: TypeParameter[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Data"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "fields", kind: "message", T: Field, repeated: true }, + { no: 5, name: "metadata", kind: "message", T: Metadata, repeated: true }, + { no: 6, name: "typeParameters", kind: "message", T: TypeParameter, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Data { + return new Data().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Data { + return new Data().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Data { + return new Data().fromJsonString(jsonString, options); + } + + static equals(a: Data | PlainMessage | undefined, b: Data | PlainMessage | undefined): boolean { + return proto3.util.equals(Data, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.DataRef + */ +export class DataRef extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: string module = 3; + */ + module = ""; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Type typeParameters = 4; + */ + typeParameters: Type[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.DataRef"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "module", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "typeParameters", kind: "message", T: Type, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DataRef { + return new DataRef().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DataRef { + return new DataRef().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DataRef { + return new DataRef().fromJsonString(jsonString, options); + } + + static equals(a: DataRef | PlainMessage | undefined, b: DataRef | PlainMessage | undefined): boolean { + return proto3.util.equals(DataRef, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Database + */ +export class Database extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: repeated string comments = 3; + */ + comments: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Database"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Database { + return new Database().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Database { + return new Database().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Database { + return new Database().fromJsonString(jsonString, options); + } + + static equals(a: Database | PlainMessage | undefined, b: Database | PlainMessage | undefined): boolean { + return proto3.util.equals(Database, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Decl + */ +export class Decl extends Message { + /** + * @generated from oneof xyz.block.ftl.v1.schema.Decl.value + */ + value: { + /** + * @generated from field: xyz.block.ftl.v1.schema.Data data = 1; + */ + value: Data; + case: "data"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.Verb verb = 2; + */ + value: Verb; + case: "verb"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.Database database = 3; + */ + value: Database; + case: "database"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Decl"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "data", kind: "message", T: Data, oneof: "value" }, + { no: 2, name: "verb", kind: "message", T: Verb, oneof: "value" }, + { no: 3, name: "database", kind: "message", T: Database, oneof: "value" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Decl { + return new Decl().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Decl { + return new Decl().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Decl { + return new Decl().fromJsonString(jsonString, options); + } + + static equals(a: Decl | PlainMessage | undefined, b: Decl | PlainMessage | undefined): boolean { + return proto3.util.equals(Decl, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Field + */ +export class Field extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: repeated string comments = 3; + */ + comments: string[] = []; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Type type = 4; + */ + type?: Type; + + /** + * @generated from field: string jsonAlias = 5; + */ + jsonAlias = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Field"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 4, name: "type", kind: "message", T: Type }, + { no: 5, name: "jsonAlias", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Field { + return new Field().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Field { + return new Field().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Field { + return new Field().fromJsonString(jsonString, options); + } + + static equals(a: Field | PlainMessage | undefined, b: Field | PlainMessage | undefined): boolean { + return proto3.util.equals(Field, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Float + */ +export class Float extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Float"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Float { + return new Float().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Float { + return new Float().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Float { + return new Float().fromJsonString(jsonString, options); + } + + static equals(a: Float | PlainMessage | undefined, b: Float | PlainMessage | undefined): boolean { + return proto3.util.equals(Float, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.IngressPathComponent + */ +export class IngressPathComponent extends Message { + /** + * @generated from oneof xyz.block.ftl.v1.schema.IngressPathComponent.value + */ + value: { + /** + * @generated from field: xyz.block.ftl.v1.schema.IngressPathLiteral ingressPathLiteral = 1; + */ + value: IngressPathLiteral; + case: "ingressPathLiteral"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.IngressPathParameter ingressPathParameter = 2; + */ + value: IngressPathParameter; + case: "ingressPathParameter"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.IngressPathComponent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "ingressPathLiteral", kind: "message", T: IngressPathLiteral, oneof: "value" }, + { no: 2, name: "ingressPathParameter", kind: "message", T: IngressPathParameter, oneof: "value" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressPathComponent { + return new IngressPathComponent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressPathComponent { + return new IngressPathComponent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): IngressPathComponent { + return new IngressPathComponent().fromJsonString(jsonString, options); + } + + static equals(a: IngressPathComponent | PlainMessage | undefined, b: IngressPathComponent | PlainMessage | undefined): boolean { + return proto3.util.equals(IngressPathComponent, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.IngressPathLiteral + */ +export class IngressPathLiteral extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string text = 2; + */ + text = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.IngressPathLiteral"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressPathLiteral { + return new IngressPathLiteral().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressPathLiteral { + return new IngressPathLiteral().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): IngressPathLiteral { + return new IngressPathLiteral().fromJsonString(jsonString, options); + } + + static equals(a: IngressPathLiteral | PlainMessage | undefined, b: IngressPathLiteral | PlainMessage | undefined): boolean { + return proto3.util.equals(IngressPathLiteral, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.IngressPathParameter + */ +export class IngressPathParameter extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.IngressPathParameter"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): IngressPathParameter { + return new IngressPathParameter().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): IngressPathParameter { + return new IngressPathParameter().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): IngressPathParameter { + return new IngressPathParameter().fromJsonString(jsonString, options); + } + + static equals(a: IngressPathParameter | PlainMessage | undefined, b: IngressPathParameter | PlainMessage | undefined): boolean { + return proto3.util.equals(IngressPathParameter, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Int + */ +export class Int extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Int"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Int { + return new Int().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Int { + return new Int().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Int { + return new Int().fromJsonString(jsonString, options); + } + + static equals(a: Int | PlainMessage | undefined, b: Int | PlainMessage | undefined): boolean { + return proto3.util.equals(Int, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Map + */ +export class Map extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Type key = 2; + */ + key?: Type; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Type value = 3; + */ + value?: Type; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Map"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "key", kind: "message", T: Type }, + { no: 3, name: "value", kind: "message", T: Type }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Map { + return new Map().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Map { + return new Map().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Map { + return new Map().fromJsonString(jsonString, options); + } + + static equals(a: Map | PlainMessage | undefined, b: Map | PlainMessage | undefined): boolean { + return proto3.util.equals(Map, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Metadata + */ +export class Metadata extends Message { + /** + * @generated from oneof xyz.block.ftl.v1.schema.Metadata.value + */ + value: { + /** + * @generated from field: xyz.block.ftl.v1.schema.MetadataCalls calls = 1; + */ + value: MetadataCalls; + case: "calls"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.MetadataIngress ingress = 2; + */ + value: MetadataIngress; + case: "ingress"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.schema.MetadataDatabases databases = 3; + */ + value: MetadataDatabases; + case: "databases"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Metadata"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "calls", kind: "message", T: MetadataCalls, oneof: "value" }, + { no: 2, name: "ingress", kind: "message", T: MetadataIngress, oneof: "value" }, + { no: 3, name: "databases", kind: "message", T: MetadataDatabases, oneof: "value" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { + return new Metadata().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Metadata { + return new Metadata().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Metadata { + return new Metadata().fromJsonString(jsonString, options); + } + + static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean { + return proto3.util.equals(Metadata, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.MetadataCalls + */ +export class MetadataCalls extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.VerbRef calls = 2; + */ + calls: VerbRef[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.MetadataCalls"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "calls", kind: "message", T: VerbRef, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataCalls { + return new MetadataCalls().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataCalls { + return new MetadataCalls().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataCalls { + return new MetadataCalls().fromJsonString(jsonString, options); + } + + static equals(a: MetadataCalls | PlainMessage | undefined, b: MetadataCalls | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataCalls, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.MetadataDatabases + */ +export class MetadataDatabases extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Database calls = 2; + */ + calls: Database[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.MetadataDatabases"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "calls", kind: "message", T: Database, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataDatabases { + return new MetadataDatabases().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataDatabases { + return new MetadataDatabases().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataDatabases { + return new MetadataDatabases().fromJsonString(jsonString, options); + } + + static equals(a: MetadataDatabases | PlainMessage | undefined, b: MetadataDatabases | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataDatabases, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.MetadataIngress + */ +export class MetadataIngress extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: string type = 2; + */ + type = ""; + + /** + * @generated from field: string method = 3; + */ + method = ""; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.IngressPathComponent path = 4; + */ + path: IngressPathComponent[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.MetadataIngress"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "path", kind: "message", T: IngressPathComponent, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataIngress { + return new MetadataIngress().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataIngress { + return new MetadataIngress().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataIngress { + return new MetadataIngress().fromJsonString(jsonString, options); + } + + static equals(a: MetadataIngress | PlainMessage | undefined, b: MetadataIngress | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataIngress, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Module + */ +export class Module extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.ModuleRuntime runtime = 31634; + */ + runtime?: ModuleRuntime; + + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: repeated string comments = 2; + */ + comments: string[] = []; + + /** + * @generated from field: bool builtin = 3; + */ + builtin = false; + + /** + * @generated from field: string name = 4; + */ + name = ""; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Decl decls = 5; + */ + decls: Decl[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Module"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 31634, name: "runtime", kind: "message", T: ModuleRuntime, opt: true }, + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "comments", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "builtin", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "decls", kind: "message", T: Decl, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Module { + return new Module().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Module { + return new Module().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Module { + return new Module().fromJsonString(jsonString, options); + } + + static equals(a: Module | PlainMessage | undefined, b: Module | PlainMessage | undefined): boolean { + return proto3.util.equals(Module, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Optional + */ +export class Optional extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Type type = 2; + */ + type?: Type; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Optional"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "type", kind: "message", T: Type, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Optional { + return new Optional().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Optional { + return new Optional().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Optional { + return new Optional().fromJsonString(jsonString, options); + } + + static equals(a: Optional | PlainMessage | undefined, b: Optional | PlainMessage | undefined): boolean { + return proto3.util.equals(Optional, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Position + */ +export class Position extends Message { + /** + * @generated from field: string filename = 1; + */ + filename = ""; + + /** + * @generated from field: int64 line = 2; + */ + line = protoInt64.zero; + + /** + * @generated from field: int64 column = 3; + */ + column = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Position"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "filename", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "line", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "column", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Position { + return new Position().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Position { + return new Position().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Position { + return new Position().fromJsonString(jsonString, options); + } + + static equals(a: Position | PlainMessage | undefined, b: Position | PlainMessage | undefined): boolean { + return proto3.util.equals(Position, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Schema + */ +export class Schema extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + /** + * @generated from field: repeated xyz.block.ftl.v1.schema.Module modules = 2; + */ + modules: Module[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.Schema"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + { no: 2, name: "modules", kind: "message", T: Module, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Schema { + return new Schema().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Schema { + return new Schema().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Schema { + return new Schema().fromJsonString(jsonString, options); + } + + static equals(a: Schema | PlainMessage | undefined, b: Schema | PlainMessage | undefined): boolean { + return proto3.util.equals(Schema, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.String + */ +export class String extends Message { + /** + * @generated from field: optional xyz.block.ftl.v1.schema.Position pos = 1; + */ + pos?: Position; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.schema.String"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "pos", kind: "message", T: Position, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): String { + return new String().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): String { + return new String().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): String { + return new String().fromJsonString(jsonString, options); + } + + static equals(a: String | PlainMessage | undefined, b: String | PlainMessage | undefined): boolean { + return proto3.util.equals(String, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.schema.Time + */ +export class Time extends Message