From 335d952e46ac97a4aec29374611d8013c11b994d Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Wed, 6 Mar 2024 11:18:18 +1100 Subject: [PATCH] refactor: pull ingress handler out of Controller (#1020) Add some basic e2e tests for the ingress handler. --- backend/controller/controller.go | 122 +- backend/controller/ingress/handler.go | 142 ++ backend/controller/ingress/handler_test.go | 111 + .../block/ftl/v1/console/console_connect.ts | 57 - .../xyz/block/ftl/v1/console/console_pb.ts | 1306 ---------- .../protos/xyz/block/ftl/v1/ftl_connect.ts | 274 --- .../src/protos/xyz/block/ftl/v1/ftl_pb.ts | 2136 ----------------- .../xyz/block/ftl/v1/schema/runtime_pb.ts | 150 -- .../xyz/block/ftl/v1/schema/schema_pb.ts | 1607 ------------- 9 files changed, 254 insertions(+), 5651 deletions(-) create mode 100644 backend/controller/ingress/handler.go create mode 100644 backend/controller/ingress/handler_test.go delete mode 100644 backend/frontend/src/protos/xyz/block/ftl/v1/console/console_connect.ts delete mode 100644 backend/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts delete mode 100644 backend/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts delete mode 100644 backend/frontend/src/protos/xyz/block/ftl/v1/ftl_pb.ts delete mode 100644 backend/frontend/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts delete mode 100644 backend/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts diff --git a/backend/controller/controller.go b/backend/controller/controller.go index b2702ce5bb..9f07e9b1c9 100644 --- a/backend/controller/controller.go +++ b/backend/controller/controller.go @@ -2,7 +2,6 @@ package controller import ( "context" - "encoding/json" "errors" "fmt" "io" @@ -179,10 +178,7 @@ func New(ctx context.Context, db *dal.DAL, config Config, runnerScaling scaling. return svc, nil } -// ServeHTTP handles ingress routes. func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { - logger := log.FromContext(r.Context()) - logger.Debugf("%s %s", r.Method, r.URL.Path) routes, err := s.dal.GetIngressRoutes(r.Context(), r.Method) if err != nil { if errors.Is(err, dal.ErrNotFound) { @@ -192,93 +188,17 @@ func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - route, err := ingress.GetIngressRoute(routes, r.Method, r.URL.Path) - if err != nil { - if errors.Is(err, dal.ErrNotFound) { - http.NotFound(w, r) - return - } - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - sch, err := s.getActiveSchema(r.Context()) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } - - body, err := ingress.BuildRequestBody(route, r, sch) - if err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - creq := connect.NewRequest(&ftlv1.CallRequest{ - Metadata: &ftlv1.Metadata{}, - Verb: &schemapb.VerbRef{Module: route.Module, Name: route.Verb}, - Body: body, - }) - requestName, err := s.dal.CreateIngressRequest(r.Context(), fmt.Sprintf("%s %s", r.Method, r.URL.Path), r.RemoteAddr) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return } - headers.SetRequestName(creq.Header(), requestName) - resp, err := s.Call(r.Context(), creq) - if err != nil { - if connectErr := new(connect.Error); errors.As(err, &connectErr) { - http.Error(w, err.Error(), connectCodeToHTTP(connectErr.Code())) - } else { - http.Error(w, err.Error(), http.StatusInternalServerError) - } - return - } - switch msg := resp.Msg.Response.(type) { - case *ftlv1.CallResponse_Body: - verb := sch.ResolveVerbRef(&schema.VerbRef{Name: route.Verb, Module: route.Module}) - if verb == nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - var responseBody []byte - - if metadata, ok := verb.GetMetadataIngress().Get(); ok && metadata.Type == "http" { - var response ingress.HTTPResponse - if err := json.Unmarshal(msg.Body, &response); err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - var responseHeaders http.Header - responseBody, responseHeaders, err = ingress.ResponseForVerb(sch, verb, response) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - for k, v := range responseHeaders { - w.Header()[k] = v - } - - if response.Status != 0 { - w.WriteHeader(response.Status) - } - } else { - w.WriteHeader(http.StatusOK) - w.Header().Set("Content-Type", "application/json; charset=utf-8") - responseBody = msg.Body - } - _, err = w.Write(responseBody) - if err != nil { - logger.Errorf(err, "Could not write response body") - } - - case *ftlv1.CallResponse_Error_: - http.Error(w, msg.Error.Message, http.StatusInternalServerError) - } + ingress.Handle(sch, requestName, routes, w, r, s.Call) } func (s *Service) ProcessList(ctx context.Context, req *connect.Request[ftlv1.ProcessListRequest]) (*connect.Response[ftlv1.ProcessListResponse], error) { @@ -1153,46 +1073,6 @@ func (s *Service) getActiveSchema(ctx context.Context) (*schema.Schema, error) { }) } -// Copied from the Apache-licensed connect-go source. -func connectCodeToHTTP(code connect.Code) int { - switch code { - case connect.CodeCanceled: - return 408 - case connect.CodeUnknown: - return 500 - case connect.CodeInvalidArgument: - return 400 - case connect.CodeDeadlineExceeded: - return 408 - case connect.CodeNotFound: - return 404 - case connect.CodeAlreadyExists: - return 409 - case connect.CodePermissionDenied: - return 403 - case connect.CodeResourceExhausted: - return 429 - case connect.CodeFailedPrecondition: - return 412 - case connect.CodeAborted: - return 409 - case connect.CodeOutOfRange: - return 400 - case connect.CodeUnimplemented: - return 404 - case connect.CodeInternal: - return 500 - case connect.CodeUnavailable: - return 503 - case connect.CodeDataLoss: - return 500 - case connect.CodeUnauthenticated: - return 401 - default: - return 500 // same as CodeUnknown - } -} - func runWithRetries(ctx context.Context, success, failure time.Duration, fn func(ctx context.Context) error) { name := runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name() name = name[strings.LastIndex(name, ".")+1:] diff --git a/backend/controller/ingress/handler.go b/backend/controller/ingress/handler.go new file mode 100644 index 0000000000..6a8ac714b4 --- /dev/null +++ b/backend/controller/ingress/handler.go @@ -0,0 +1,142 @@ +package ingress + +import ( + "context" + "encoding/json" + "errors" + "net/http" + + "connectrpc.com/connect" + + "github.com/TBD54566975/ftl/backend/controller/dal" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" + schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" + "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/internal/log" + "github.com/TBD54566975/ftl/internal/model" + "github.com/TBD54566975/ftl/internal/rpc/headers" +) + +// Handle HTTP ingress routes. +func Handle( + sch *schema.Schema, + requestName model.RequestName, + routes []dal.IngressRoute, + w http.ResponseWriter, + r *http.Request, + call func(context.Context, *connect.Request[ftlv1.CallRequest]) (*connect.Response[ftlv1.CallResponse], error), +) { + logger := log.FromContext(r.Context()) + logger.Debugf("%s %s", r.Method, r.URL.Path) + route, err := GetIngressRoute(routes, r.Method, r.URL.Path) + if err != nil { + if errors.Is(err, dal.ErrNotFound) { + http.NotFound(w, r) + return + } + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + body, err := BuildRequestBody(route, r, sch) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + creq := connect.NewRequest(&ftlv1.CallRequest{ + Metadata: &ftlv1.Metadata{}, + Verb: &schemapb.VerbRef{Module: route.Module, Name: route.Verb}, + Body: body, + }) + + headers.SetRequestName(creq.Header(), requestName) + resp, err := call(r.Context(), creq) + if err != nil { + if connectErr := new(connect.Error); errors.As(err, &connectErr) { + http.Error(w, err.Error(), connectCodeToHTTP(connectErr.Code())) + } else { + http.Error(w, err.Error(), http.StatusInternalServerError) + } + return + } + switch msg := resp.Msg.Response.(type) { + case *ftlv1.CallResponse_Body: + verb := sch.ResolveVerbRef(&schema.VerbRef{Name: route.Verb, Module: route.Module}) + var responseBody []byte + + if metadata, ok := verb.GetMetadataIngress().Get(); ok && metadata.Type == "http" { + var response HTTPResponse + if err := json.Unmarshal(msg.Body, &response); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + var responseHeaders http.Header + responseBody, responseHeaders, err = ResponseForVerb(sch, verb, response) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + for k, v := range responseHeaders { + w.Header()[k] = v + } + + if response.Status != 0 { + w.WriteHeader(response.Status) + } + } else { + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "application/json; charset=utf-8") + responseBody = msg.Body + } + _, err = w.Write(responseBody) + if err != nil { + logger.Errorf(err, "Could not write response body") + } + + case *ftlv1.CallResponse_Error_: + http.Error(w, msg.Error.Message, http.StatusInternalServerError) + } +} + +// Copied from the Apache-licensed connect-go source. +func connectCodeToHTTP(code connect.Code) int { + switch code { + case connect.CodeCanceled: + return 408 + case connect.CodeUnknown: + return 500 + case connect.CodeInvalidArgument: + return 400 + case connect.CodeDeadlineExceeded: + return 408 + case connect.CodeNotFound: + return 404 + case connect.CodeAlreadyExists: + return 409 + case connect.CodePermissionDenied: + return 403 + case connect.CodeResourceExhausted: + return 429 + case connect.CodeFailedPrecondition: + return 412 + case connect.CodeAborted: + return 409 + case connect.CodeOutOfRange: + return 400 + case connect.CodeUnimplemented: + return 404 + case connect.CodeInternal: + return 500 + case connect.CodeUnavailable: + return 503 + case connect.CodeDataLoss: + return 500 + case connect.CodeUnauthenticated: + return 401 + default: + return 500 // same as CodeUnknown + } +} diff --git a/backend/controller/ingress/handler_test.go b/backend/controller/ingress/handler_test.go new file mode 100644 index 0000000000..1a83c9df64 --- /dev/null +++ b/backend/controller/ingress/handler_test.go @@ -0,0 +1,111 @@ +package ingress_test + +import ( + "bytes" + "context" + "net/http" + "net/http/httptest" + "net/url" + "testing" + + "connectrpc.com/connect" + "github.com/alecthomas/assert/v2" + + "github.com/TBD54566975/ftl/backend/controller/dal" + "github.com/TBD54566975/ftl/backend/controller/ingress" + ftlv1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" + "github.com/TBD54566975/ftl/backend/schema" + "github.com/TBD54566975/ftl/go-runtime/encoding" + "github.com/TBD54566975/ftl/internal/log" +) + +func TestIngress(t *testing.T) { + sch, err := schema.ParseString("", ` + module test { + data AliasRequest { + aliased String alias json "alias" + } + + data PathParameterRequest { + username String + } + + data MissingTypes { + optional String? + array [String] + map {String: String} + any Any + unit Unit + } + + data JsonPayload { + foo String + } + + verb getAlias(HttpRequest) HttpResponse + ingress http GET /getAlias + + verb getPath(HttpRequest) HttpResponse + ingress http GET /getPath/{username} + + verb postMissingTypes(HttpRequest) HttpResponse + ingress http POST /postMissingTypes + + verb postJsonPayload(HttpRequest) HttpResponse + ingress http POST /postJsonPayload + } + `) + assert.NoError(t, err) + + routes := []dal.IngressRoute{ + {Path: "/getAlias", Module: "test", Verb: "getAlias"}, + {Path: "/getPath/{username}", Module: "test", Verb: "getPath"}, + {Path: "/postMissingTypes", Module: "test", Verb: "postMissingTypes"}, + {Path: "/postJsonPayload", Module: "test", Verb: "postJsonPayload"}, + } + + ctx := log.ContextWithNewDefaultLogger(context.Background()) + + for _, test := range []struct { + name string + method string + path string + query url.Values + payload []byte + response *ingress.HTTPResponse + statusCode int + }{ + {name: "InvalidRoute", + method: "GET", + path: "/invalid", + statusCode: http.StatusNotFound}, + {name: "GetAlias", + method: "GET", + path: "/getAlias", + query: url.Values{"alias": {"value"}}, + response: &ingress.HTTPResponse{Body: []byte(`{}`)}, + statusCode: http.StatusOK}, + } { + t.Run(test.name, func(t *testing.T) { + rec := httptest.NewRecorder() + rec.Body = &bytes.Buffer{} + if test.response == nil { + test.response = &ingress.HTTPResponse{Body: []byte(`{}`)} + } + req := httptest.NewRequest(test.method, test.path, bytes.NewBuffer(test.payload)).WithContext(ctx) + req.URL.RawQuery = test.query.Encode() + ingress.Handle(sch, "test", routes, rec, req, func(ctx context.Context, r *connect.Request[ftlv1.CallRequest]) (*connect.Response[ftlv1.CallResponse], error) { + body, err := encoding.Marshal(test.response) + assert.NoError(t, err) + return connect.NewResponse(&ftlv1.CallResponse{Response: &ftlv1.CallResponse_Body{Body: body}}), nil + }) + result := rec.Result() + defer result.Body.Close() + assert.Equal(t, test.statusCode, rec.Code, "%s: %s", result.Status, rec.Body.Bytes()) + if rec.Code >= 300 { + return + } + assert.Equal(t, test.response.Body, rec.Body.Bytes()) + }) + } +} 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 deleted file mode 100644 index f06ba2d7f9..0000000000 --- a/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_connect.ts +++ /dev/null @@ -1,57 +0,0 @@ -// @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 deleted file mode 100644 index 8561629927..0000000000 --- a/backend/frontend/src/protos/xyz/block/ftl/v1/console/console_pb.ts +++ /dev/null @@ -1,1306 +0,0 @@ -// @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 deleted file mode 100644 index bb841b2d94..0000000000 --- a/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_connect.ts +++ /dev/null @@ -1,274 +0,0 @@ -// @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 deleted file mode 100644 index e0024b4401..0000000000 --- a/backend/frontend/src/protos/xyz/block/ftl/v1/ftl_pb.ts +++ /dev/null @@ -1,2136 +0,0 @@ -// @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 deleted file mode 100644 index 98899c6cd8..0000000000 --- a/backend/frontend/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts +++ /dev/null @@ -1,150 +0,0 @@ -// @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 deleted file mode 100644 index 2fe14ca519..0000000000 --- a/backend/frontend/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts +++ /dev/null @@ -1,1607 +0,0 @@ -// @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