diff --git a/backend/spec/state/v1/statev1connect/state.connect.go b/backend/spec/state/v1/statev1connect/state.connect.go index fba2f96..23ec261 100644 --- a/backend/spec/state/v1/statev1connect/state.connect.go +++ b/backend/spec/state/v1/statev1connect/state.connect.go @@ -18,7 +18,7 @@ import ( // generated with a version of connect newer than the one compiled into your binary. You can fix the // problem by either regenerating this code with an older version of connect or updating the connect // version compiled into your binary. -const _ = connect.IsAtLeastVersion0_1_0 +const _ = connect.IsAtLeastVersion1_13_0 const ( // StateManagerServiceName is the fully-qualified name of the StateManagerService service. @@ -62,6 +62,20 @@ const ( StateManagerServiceUpdateTrainProcedure = "/state.v1.StateManagerService/UpdateTrain" ) +// These variables are the protoreflect.Descriptor objects for the RPCs defined in this package. +var ( + stateManagerServiceServiceDescriptor = v1.File_state_v1_state_proto.Services().ByName("StateManagerService") + stateManagerServiceGetBlockStatesMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetBlockStates") + stateManagerServiceUpdateBlockStateMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdateBlockState") + stateManagerServiceUpdatePointStateMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdatePointState") + stateManagerServiceGetPointStatesMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetPointStates") + stateManagerServiceUpdateStopStateMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdateStopState") + stateManagerServiceGetStopStatesMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetStopStates") + stateManagerServiceGetTrainsMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("GetTrains") + stateManagerServiceAddTrainMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("AddTrain") + stateManagerServiceUpdateTrainMethodDescriptor = stateManagerServiceServiceDescriptor.Methods().ByName("UpdateTrain") +) + // StateManagerServiceClient is a client for the state.v1.StateManagerService service. type StateManagerServiceClient interface { // Block @@ -92,47 +106,56 @@ func NewStateManagerServiceClient(httpClient connect.HTTPClient, baseURL string, getBlockStates: connect.NewClient[v1.GetBlockStatesRequest, v1.GetBlockStatesResponse]( httpClient, baseURL+StateManagerServiceGetBlockStatesProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetBlockStatesMethodDescriptor), + connect.WithClientOptions(opts...), ), updateBlockState: connect.NewClient[v1.UpdateBlockStateRequest, v1.UpdateBlockStateResponse]( httpClient, baseURL+StateManagerServiceUpdateBlockStateProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdateBlockStateMethodDescriptor), + connect.WithClientOptions(opts...), ), updatePointState: connect.NewClient[v1.UpdatePointStateRequest, v1.UpdatePointStateResponse]( httpClient, baseURL+StateManagerServiceUpdatePointStateProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdatePointStateMethodDescriptor), + connect.WithClientOptions(opts...), ), getPointStates: connect.NewClient[v1.GetPointStatesRequest, v1.GetPointStatesResponse]( httpClient, baseURL+StateManagerServiceGetPointStatesProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetPointStatesMethodDescriptor), + connect.WithClientOptions(opts...), ), updateStopState: connect.NewClient[v1.UpdateStopStateRequest, v1.UpdateStopStateResponse]( httpClient, baseURL+StateManagerServiceUpdateStopStateProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdateStopStateMethodDescriptor), + connect.WithClientOptions(opts...), ), getStopStates: connect.NewClient[v1.GetStopStatesRequest, v1.GetStopStatesResponse]( httpClient, baseURL+StateManagerServiceGetStopStatesProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetStopStatesMethodDescriptor), + connect.WithClientOptions(opts...), ), getTrains: connect.NewClient[v1.GetTrainsRequest, v1.GetTrainsResponse]( httpClient, baseURL+StateManagerServiceGetTrainsProcedure, - opts..., + connect.WithSchema(stateManagerServiceGetTrainsMethodDescriptor), + connect.WithClientOptions(opts...), ), addTrain: connect.NewClient[v1.AddTrainRequest, v1.AddTrainResponse]( httpClient, baseURL+StateManagerServiceAddTrainProcedure, - opts..., + connect.WithSchema(stateManagerServiceAddTrainMethodDescriptor), + connect.WithClientOptions(opts...), ), updateTrain: connect.NewClient[v1.UpdateTrainRequest, v1.UpdateTrainResponse]( httpClient, baseURL+StateManagerServiceUpdateTrainProcedure, - opts..., + connect.WithSchema(stateManagerServiceUpdateTrainMethodDescriptor), + connect.WithClientOptions(opts...), ), } } @@ -221,47 +244,56 @@ func NewStateManagerServiceHandler(svc StateManagerServiceHandler, opts ...conne stateManagerServiceGetBlockStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetBlockStatesProcedure, svc.GetBlockStates, - opts..., + connect.WithSchema(stateManagerServiceGetBlockStatesMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdateBlockStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdateBlockStateProcedure, svc.UpdateBlockState, - opts..., + connect.WithSchema(stateManagerServiceUpdateBlockStateMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdatePointStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdatePointStateProcedure, svc.UpdatePointState, - opts..., + connect.WithSchema(stateManagerServiceUpdatePointStateMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceGetPointStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetPointStatesProcedure, svc.GetPointStates, - opts..., + connect.WithSchema(stateManagerServiceGetPointStatesMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdateStopStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdateStopStateProcedure, svc.UpdateStopState, - opts..., + connect.WithSchema(stateManagerServiceUpdateStopStateMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceGetStopStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetStopStatesProcedure, svc.GetStopStates, - opts..., + connect.WithSchema(stateManagerServiceGetStopStatesMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceGetTrainsHandler := connect.NewUnaryHandler( StateManagerServiceGetTrainsProcedure, svc.GetTrains, - opts..., + connect.WithSchema(stateManagerServiceGetTrainsMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceAddTrainHandler := connect.NewUnaryHandler( StateManagerServiceAddTrainProcedure, svc.AddTrain, - opts..., + connect.WithSchema(stateManagerServiceAddTrainMethodDescriptor), + connect.WithHandlerOptions(opts...), ) stateManagerServiceUpdateTrainHandler := connect.NewUnaryHandler( StateManagerServiceUpdateTrainProcedure, svc.UpdateTrain, - opts..., + connect.WithSchema(stateManagerServiceUpdateTrainMethodDescriptor), + connect.WithHandlerOptions(opts...), ) return "/state.v1.StateManagerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { switch r.URL.Path { diff --git a/frontend/dashboard/package.json b/frontend/dashboard/package.json index 8bd0406..ea33b35 100644 --- a/frontend/dashboard/package.json +++ b/frontend/dashboard/package.json @@ -26,7 +26,7 @@ "@connectrpc/protoc-gen-connect-query": "^0.6.0", "@svgr/webpack": "^8.1.0", "@types/node": "20.9.5", - "@types/react": "18.2.38", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "eslint-config-prettier": "^9.0.0", "prettier": "3.1.0", diff --git a/frontend/editor/package.json b/frontend/editor/package.json index ba9b895..fd855aa 100644 --- a/frontend/editor/package.json +++ b/frontend/editor/package.json @@ -14,7 +14,7 @@ "devDependencies": { "prettier": "3.1.0", "@types/node": "20.9.5", - "@types/react": "18.2.38", + "@types/react": "18.2.43", "@types/react-dom": "18.2.17", "typescript": "5.3.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93a561b..7189c40 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -92,8 +92,8 @@ importers: specifier: 20.9.5 version: 20.9.5 '@types/react': - specifier: 18.2.38 - version: 18.2.38 + specifier: 18.2.43 + version: 18.2.43 '@types/react-dom': specifier: 18.2.17 version: 18.2.17 @@ -135,8 +135,8 @@ importers: specifier: 20.9.5 version: 20.9.5 '@types/react': - specifier: 18.2.38 - version: 18.2.38 + specifier: 18.2.43 + version: 18.2.43 '@types/react-dom': specifier: 18.2.17 version: 18.2.17 @@ -2349,17 +2349,17 @@ packages: /@types/react-dom@18.2.17: resolution: {integrity: sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==} dependencies: - '@types/react': 18.2.38 + '@types/react': 18.2.43 dev: true /@types/react-reconciler@0.28.8: resolution: {integrity: sha512-SN9c4kxXZonFhbX4hJrZy37yw9e7EIxcpHCxQv5JUS18wDE5ovkQKlqQEkufdJCCMfuI9BnjUJvhYeJ9x5Ra7g==} dependencies: - '@types/react': 18.2.38 + '@types/react': 18.2.43 dev: false - /@types/react@18.2.38: - resolution: {integrity: sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw==} + /@types/react@18.2.43: + resolution: {integrity: sha512-nvOV01ZdBdd/KW6FahSbcNplt2jCJfyWdTos61RYHV+FVv5L/g9AOX1bmbVcWcLFL8+KHQfh1zVIQrud6ihyQA==} dependencies: '@types/prop-types': 15.7.11 '@types/scheduler': 0.16.7