diff --git a/.github/workflows/create-proto.yaml b/.github/workflows/create-proto.yaml index 742813b7..2aa19e36 100644 --- a/.github/workflows/create-proto.yaml +++ b/.github/workflows/create-proto.yaml @@ -14,10 +14,23 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 - # - name: Set up Node in ats - # uses: actions/setup-node@v4 - # with: - # node-version: 20 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + working-directory: ./frontend/dashboard + - uses: actions/cache@v3 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --immutable + working-directory: ./frontend/dashboard - name: Set up Go uses: actions/setup-go@v4 with: diff --git a/backend/spec/state/v1/statev1connect/state.connect.go b/backend/spec/state/v1/statev1connect/state.connect.go index 4c89198d..9f93f21b 100644 --- a/backend/spec/state/v1/statev1connect/state.connect.go +++ b/backend/spec/state/v1/statev1connect/state.connect.go @@ -5,9 +5,9 @@ package statev1connect import ( + connect "connectrpc.com/connect" context "context" errors "errors" - connect_go "github.com/bufbuild/connect-go" v1 "github.com/ueckoken/plarail2023/backend/spec/state/v1" http "net/http" strings "strings" @@ -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_go.IsAtLeastVersion0_1_0 +const _ = connect.IsAtLeastVersion0_1_0 const ( // StateManagerServiceName is the fully-qualified name of the StateManagerService service. @@ -62,17 +62,17 @@ const ( // StateManagerServiceClient is a client for the state.v1.StateManagerService service. type StateManagerServiceClient interface { // Block - GetBlockStates(context.Context, *connect_go.Request[v1.GetBlockStatesRequest]) (*connect_go.Response[v1.GetBlockStatesResponse], error) - UpdateBlockState(context.Context, *connect_go.Request[v1.UpdateBlockStateRequest]) (*connect_go.Response[v1.UpdateBlockStateResponse], error) + GetBlockStates(context.Context, *connect.Request[v1.GetBlockStatesRequest]) (*connect.Response[v1.GetBlockStatesResponse], error) + UpdateBlockState(context.Context, *connect.Request[v1.UpdateBlockStateRequest]) (*connect.Response[v1.UpdateBlockStateResponse], error) // Point - UpdatePointState(context.Context, *connect_go.Request[v1.UpdatePointStateRequest]) (*connect_go.Response[v1.UpdatePointStateResponse], error) - GetPointStates(context.Context, *connect_go.Request[v1.GetPointStatesRequest]) (*connect_go.Response[v1.GetPointStatesResponse], error) + UpdatePointState(context.Context, *connect.Request[v1.UpdatePointStateRequest]) (*connect.Response[v1.UpdatePointStateResponse], error) + GetPointStates(context.Context, *connect.Request[v1.GetPointStatesRequest]) (*connect.Response[v1.GetPointStatesResponse], error) // Stop - UpdateStopState(context.Context, *connect_go.Request[v1.UpdateStopStateRequest]) (*connect_go.Response[v1.UpdateStopStateResponse], error) - GetStopStates(context.Context, *connect_go.Request[v1.GetStopStatesRequest]) (*connect_go.Response[v1.GetStopStatesResponse], error) + UpdateStopState(context.Context, *connect.Request[v1.UpdateStopStateRequest]) (*connect.Response[v1.UpdateStopStateResponse], error) + GetStopStates(context.Context, *connect.Request[v1.GetStopStatesRequest]) (*connect.Response[v1.GetStopStatesResponse], error) // Train - GetTrains(context.Context, *connect_go.Request[v1.GetTrainsRequest]) (*connect_go.Response[v1.GetTrainsResponse], error) - UpdateTrainUUID(context.Context, *connect_go.Request[v1.UpdateTrainUUIDRequest]) (*connect_go.Response[v1.UpdateTrainUUIDResponse], error) + GetTrains(context.Context, *connect.Request[v1.GetTrainsRequest]) (*connect.Response[v1.GetTrainsResponse], error) + UpdateTrainUUID(context.Context, *connect.Request[v1.UpdateTrainUUIDRequest]) (*connect.Response[v1.UpdateTrainUUIDResponse], error) } // NewStateManagerServiceClient constructs a client for the state.v1.StateManagerService service. By @@ -82,45 +82,45 @@ type StateManagerServiceClient interface { // // The URL supplied here should be the base URL for the Connect or gRPC server (for example, // http://api.acme.com or https://acme.com/grpc). -func NewStateManagerServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) StateManagerServiceClient { +func NewStateManagerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) StateManagerServiceClient { baseURL = strings.TrimRight(baseURL, "/") return &stateManagerServiceClient{ - getBlockStates: connect_go.NewClient[v1.GetBlockStatesRequest, v1.GetBlockStatesResponse]( + getBlockStates: connect.NewClient[v1.GetBlockStatesRequest, v1.GetBlockStatesResponse]( httpClient, baseURL+StateManagerServiceGetBlockStatesProcedure, opts..., ), - updateBlockState: connect_go.NewClient[v1.UpdateBlockStateRequest, v1.UpdateBlockStateResponse]( + updateBlockState: connect.NewClient[v1.UpdateBlockStateRequest, v1.UpdateBlockStateResponse]( httpClient, baseURL+StateManagerServiceUpdateBlockStateProcedure, opts..., ), - updatePointState: connect_go.NewClient[v1.UpdatePointStateRequest, v1.UpdatePointStateResponse]( + updatePointState: connect.NewClient[v1.UpdatePointStateRequest, v1.UpdatePointStateResponse]( httpClient, baseURL+StateManagerServiceUpdatePointStateProcedure, opts..., ), - getPointStates: connect_go.NewClient[v1.GetPointStatesRequest, v1.GetPointStatesResponse]( + getPointStates: connect.NewClient[v1.GetPointStatesRequest, v1.GetPointStatesResponse]( httpClient, baseURL+StateManagerServiceGetPointStatesProcedure, opts..., ), - updateStopState: connect_go.NewClient[v1.UpdateStopStateRequest, v1.UpdateStopStateResponse]( + updateStopState: connect.NewClient[v1.UpdateStopStateRequest, v1.UpdateStopStateResponse]( httpClient, baseURL+StateManagerServiceUpdateStopStateProcedure, opts..., ), - getStopStates: connect_go.NewClient[v1.GetStopStatesRequest, v1.GetStopStatesResponse]( + getStopStates: connect.NewClient[v1.GetStopStatesRequest, v1.GetStopStatesResponse]( httpClient, baseURL+StateManagerServiceGetStopStatesProcedure, opts..., ), - getTrains: connect_go.NewClient[v1.GetTrainsRequest, v1.GetTrainsResponse]( + getTrains: connect.NewClient[v1.GetTrainsRequest, v1.GetTrainsResponse]( httpClient, baseURL+StateManagerServiceGetTrainsProcedure, opts..., ), - updateTrainUUID: connect_go.NewClient[v1.UpdateTrainUUIDRequest, v1.UpdateTrainUUIDResponse]( + updateTrainUUID: connect.NewClient[v1.UpdateTrainUUIDRequest, v1.UpdateTrainUUIDResponse]( httpClient, baseURL+StateManagerServiceUpdateTrainUUIDProcedure, opts..., @@ -130,70 +130,70 @@ func NewStateManagerServiceClient(httpClient connect_go.HTTPClient, baseURL stri // stateManagerServiceClient implements StateManagerServiceClient. type stateManagerServiceClient struct { - getBlockStates *connect_go.Client[v1.GetBlockStatesRequest, v1.GetBlockStatesResponse] - updateBlockState *connect_go.Client[v1.UpdateBlockStateRequest, v1.UpdateBlockStateResponse] - updatePointState *connect_go.Client[v1.UpdatePointStateRequest, v1.UpdatePointStateResponse] - getPointStates *connect_go.Client[v1.GetPointStatesRequest, v1.GetPointStatesResponse] - updateStopState *connect_go.Client[v1.UpdateStopStateRequest, v1.UpdateStopStateResponse] - getStopStates *connect_go.Client[v1.GetStopStatesRequest, v1.GetStopStatesResponse] - getTrains *connect_go.Client[v1.GetTrainsRequest, v1.GetTrainsResponse] - updateTrainUUID *connect_go.Client[v1.UpdateTrainUUIDRequest, v1.UpdateTrainUUIDResponse] + getBlockStates *connect.Client[v1.GetBlockStatesRequest, v1.GetBlockStatesResponse] + updateBlockState *connect.Client[v1.UpdateBlockStateRequest, v1.UpdateBlockStateResponse] + updatePointState *connect.Client[v1.UpdatePointStateRequest, v1.UpdatePointStateResponse] + getPointStates *connect.Client[v1.GetPointStatesRequest, v1.GetPointStatesResponse] + updateStopState *connect.Client[v1.UpdateStopStateRequest, v1.UpdateStopStateResponse] + getStopStates *connect.Client[v1.GetStopStatesRequest, v1.GetStopStatesResponse] + getTrains *connect.Client[v1.GetTrainsRequest, v1.GetTrainsResponse] + updateTrainUUID *connect.Client[v1.UpdateTrainUUIDRequest, v1.UpdateTrainUUIDResponse] } // GetBlockStates calls state.v1.StateManagerService.GetBlockStates. -func (c *stateManagerServiceClient) GetBlockStates(ctx context.Context, req *connect_go.Request[v1.GetBlockStatesRequest]) (*connect_go.Response[v1.GetBlockStatesResponse], error) { +func (c *stateManagerServiceClient) GetBlockStates(ctx context.Context, req *connect.Request[v1.GetBlockStatesRequest]) (*connect.Response[v1.GetBlockStatesResponse], error) { return c.getBlockStates.CallUnary(ctx, req) } // UpdateBlockState calls state.v1.StateManagerService.UpdateBlockState. -func (c *stateManagerServiceClient) UpdateBlockState(ctx context.Context, req *connect_go.Request[v1.UpdateBlockStateRequest]) (*connect_go.Response[v1.UpdateBlockStateResponse], error) { +func (c *stateManagerServiceClient) UpdateBlockState(ctx context.Context, req *connect.Request[v1.UpdateBlockStateRequest]) (*connect.Response[v1.UpdateBlockStateResponse], error) { return c.updateBlockState.CallUnary(ctx, req) } // UpdatePointState calls state.v1.StateManagerService.UpdatePointState. -func (c *stateManagerServiceClient) UpdatePointState(ctx context.Context, req *connect_go.Request[v1.UpdatePointStateRequest]) (*connect_go.Response[v1.UpdatePointStateResponse], error) { +func (c *stateManagerServiceClient) UpdatePointState(ctx context.Context, req *connect.Request[v1.UpdatePointStateRequest]) (*connect.Response[v1.UpdatePointStateResponse], error) { return c.updatePointState.CallUnary(ctx, req) } // GetPointStates calls state.v1.StateManagerService.GetPointStates. -func (c *stateManagerServiceClient) GetPointStates(ctx context.Context, req *connect_go.Request[v1.GetPointStatesRequest]) (*connect_go.Response[v1.GetPointStatesResponse], error) { +func (c *stateManagerServiceClient) GetPointStates(ctx context.Context, req *connect.Request[v1.GetPointStatesRequest]) (*connect.Response[v1.GetPointStatesResponse], error) { return c.getPointStates.CallUnary(ctx, req) } // UpdateStopState calls state.v1.StateManagerService.UpdateStopState. -func (c *stateManagerServiceClient) UpdateStopState(ctx context.Context, req *connect_go.Request[v1.UpdateStopStateRequest]) (*connect_go.Response[v1.UpdateStopStateResponse], error) { +func (c *stateManagerServiceClient) UpdateStopState(ctx context.Context, req *connect.Request[v1.UpdateStopStateRequest]) (*connect.Response[v1.UpdateStopStateResponse], error) { return c.updateStopState.CallUnary(ctx, req) } // GetStopStates calls state.v1.StateManagerService.GetStopStates. -func (c *stateManagerServiceClient) GetStopStates(ctx context.Context, req *connect_go.Request[v1.GetStopStatesRequest]) (*connect_go.Response[v1.GetStopStatesResponse], error) { +func (c *stateManagerServiceClient) GetStopStates(ctx context.Context, req *connect.Request[v1.GetStopStatesRequest]) (*connect.Response[v1.GetStopStatesResponse], error) { return c.getStopStates.CallUnary(ctx, req) } // GetTrains calls state.v1.StateManagerService.GetTrains. -func (c *stateManagerServiceClient) GetTrains(ctx context.Context, req *connect_go.Request[v1.GetTrainsRequest]) (*connect_go.Response[v1.GetTrainsResponse], error) { +func (c *stateManagerServiceClient) GetTrains(ctx context.Context, req *connect.Request[v1.GetTrainsRequest]) (*connect.Response[v1.GetTrainsResponse], error) { return c.getTrains.CallUnary(ctx, req) } // UpdateTrainUUID calls state.v1.StateManagerService.UpdateTrainUUID. -func (c *stateManagerServiceClient) UpdateTrainUUID(ctx context.Context, req *connect_go.Request[v1.UpdateTrainUUIDRequest]) (*connect_go.Response[v1.UpdateTrainUUIDResponse], error) { +func (c *stateManagerServiceClient) UpdateTrainUUID(ctx context.Context, req *connect.Request[v1.UpdateTrainUUIDRequest]) (*connect.Response[v1.UpdateTrainUUIDResponse], error) { return c.updateTrainUUID.CallUnary(ctx, req) } // StateManagerServiceHandler is an implementation of the state.v1.StateManagerService service. type StateManagerServiceHandler interface { // Block - GetBlockStates(context.Context, *connect_go.Request[v1.GetBlockStatesRequest]) (*connect_go.Response[v1.GetBlockStatesResponse], error) - UpdateBlockState(context.Context, *connect_go.Request[v1.UpdateBlockStateRequest]) (*connect_go.Response[v1.UpdateBlockStateResponse], error) + GetBlockStates(context.Context, *connect.Request[v1.GetBlockStatesRequest]) (*connect.Response[v1.GetBlockStatesResponse], error) + UpdateBlockState(context.Context, *connect.Request[v1.UpdateBlockStateRequest]) (*connect.Response[v1.UpdateBlockStateResponse], error) // Point - UpdatePointState(context.Context, *connect_go.Request[v1.UpdatePointStateRequest]) (*connect_go.Response[v1.UpdatePointStateResponse], error) - GetPointStates(context.Context, *connect_go.Request[v1.GetPointStatesRequest]) (*connect_go.Response[v1.GetPointStatesResponse], error) + UpdatePointState(context.Context, *connect.Request[v1.UpdatePointStateRequest]) (*connect.Response[v1.UpdatePointStateResponse], error) + GetPointStates(context.Context, *connect.Request[v1.GetPointStatesRequest]) (*connect.Response[v1.GetPointStatesResponse], error) // Stop - UpdateStopState(context.Context, *connect_go.Request[v1.UpdateStopStateRequest]) (*connect_go.Response[v1.UpdateStopStateResponse], error) - GetStopStates(context.Context, *connect_go.Request[v1.GetStopStatesRequest]) (*connect_go.Response[v1.GetStopStatesResponse], error) + UpdateStopState(context.Context, *connect.Request[v1.UpdateStopStateRequest]) (*connect.Response[v1.UpdateStopStateResponse], error) + GetStopStates(context.Context, *connect.Request[v1.GetStopStatesRequest]) (*connect.Response[v1.GetStopStatesResponse], error) // Train - GetTrains(context.Context, *connect_go.Request[v1.GetTrainsRequest]) (*connect_go.Response[v1.GetTrainsResponse], error) - UpdateTrainUUID(context.Context, *connect_go.Request[v1.UpdateTrainUUIDRequest]) (*connect_go.Response[v1.UpdateTrainUUIDResponse], error) + GetTrains(context.Context, *connect.Request[v1.GetTrainsRequest]) (*connect.Response[v1.GetTrainsResponse], error) + UpdateTrainUUID(context.Context, *connect.Request[v1.UpdateTrainUUIDRequest]) (*connect.Response[v1.UpdateTrainUUIDResponse], error) } // NewStateManagerServiceHandler builds an HTTP handler from the service implementation. It returns @@ -201,43 +201,43 @@ type StateManagerServiceHandler interface { // // By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf // and JSON codecs. They also support gzip compression. -func NewStateManagerServiceHandler(svc StateManagerServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) { - stateManagerServiceGetBlockStatesHandler := connect_go.NewUnaryHandler( +func NewStateManagerServiceHandler(svc StateManagerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + stateManagerServiceGetBlockStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetBlockStatesProcedure, svc.GetBlockStates, opts..., ) - stateManagerServiceUpdateBlockStateHandler := connect_go.NewUnaryHandler( + stateManagerServiceUpdateBlockStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdateBlockStateProcedure, svc.UpdateBlockState, opts..., ) - stateManagerServiceUpdatePointStateHandler := connect_go.NewUnaryHandler( + stateManagerServiceUpdatePointStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdatePointStateProcedure, svc.UpdatePointState, opts..., ) - stateManagerServiceGetPointStatesHandler := connect_go.NewUnaryHandler( + stateManagerServiceGetPointStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetPointStatesProcedure, svc.GetPointStates, opts..., ) - stateManagerServiceUpdateStopStateHandler := connect_go.NewUnaryHandler( + stateManagerServiceUpdateStopStateHandler := connect.NewUnaryHandler( StateManagerServiceUpdateStopStateProcedure, svc.UpdateStopState, opts..., ) - stateManagerServiceGetStopStatesHandler := connect_go.NewUnaryHandler( + stateManagerServiceGetStopStatesHandler := connect.NewUnaryHandler( StateManagerServiceGetStopStatesProcedure, svc.GetStopStates, opts..., ) - stateManagerServiceGetTrainsHandler := connect_go.NewUnaryHandler( + stateManagerServiceGetTrainsHandler := connect.NewUnaryHandler( StateManagerServiceGetTrainsProcedure, svc.GetTrains, opts..., ) - stateManagerServiceUpdateTrainUUIDHandler := connect_go.NewUnaryHandler( + stateManagerServiceUpdateTrainUUIDHandler := connect.NewUnaryHandler( StateManagerServiceUpdateTrainUUIDProcedure, svc.UpdateTrainUUID, opts..., @@ -269,34 +269,34 @@ func NewStateManagerServiceHandler(svc StateManagerServiceHandler, opts ...conne // UnimplementedStateManagerServiceHandler returns CodeUnimplemented from all methods. type UnimplementedStateManagerServiceHandler struct{} -func (UnimplementedStateManagerServiceHandler) GetBlockStates(context.Context, *connect_go.Request[v1.GetBlockStatesRequest]) (*connect_go.Response[v1.GetBlockStatesResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetBlockStates is not implemented")) +func (UnimplementedStateManagerServiceHandler) GetBlockStates(context.Context, *connect.Request[v1.GetBlockStatesRequest]) (*connect.Response[v1.GetBlockStatesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetBlockStates is not implemented")) } -func (UnimplementedStateManagerServiceHandler) UpdateBlockState(context.Context, *connect_go.Request[v1.UpdateBlockStateRequest]) (*connect_go.Response[v1.UpdateBlockStateResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdateBlockState is not implemented")) +func (UnimplementedStateManagerServiceHandler) UpdateBlockState(context.Context, *connect.Request[v1.UpdateBlockStateRequest]) (*connect.Response[v1.UpdateBlockStateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdateBlockState is not implemented")) } -func (UnimplementedStateManagerServiceHandler) UpdatePointState(context.Context, *connect_go.Request[v1.UpdatePointStateRequest]) (*connect_go.Response[v1.UpdatePointStateResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdatePointState is not implemented")) +func (UnimplementedStateManagerServiceHandler) UpdatePointState(context.Context, *connect.Request[v1.UpdatePointStateRequest]) (*connect.Response[v1.UpdatePointStateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdatePointState is not implemented")) } -func (UnimplementedStateManagerServiceHandler) GetPointStates(context.Context, *connect_go.Request[v1.GetPointStatesRequest]) (*connect_go.Response[v1.GetPointStatesResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetPointStates is not implemented")) +func (UnimplementedStateManagerServiceHandler) GetPointStates(context.Context, *connect.Request[v1.GetPointStatesRequest]) (*connect.Response[v1.GetPointStatesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetPointStates is not implemented")) } -func (UnimplementedStateManagerServiceHandler) UpdateStopState(context.Context, *connect_go.Request[v1.UpdateStopStateRequest]) (*connect_go.Response[v1.UpdateStopStateResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdateStopState is not implemented")) +func (UnimplementedStateManagerServiceHandler) UpdateStopState(context.Context, *connect.Request[v1.UpdateStopStateRequest]) (*connect.Response[v1.UpdateStopStateResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdateStopState is not implemented")) } -func (UnimplementedStateManagerServiceHandler) GetStopStates(context.Context, *connect_go.Request[v1.GetStopStatesRequest]) (*connect_go.Response[v1.GetStopStatesResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetStopStates is not implemented")) +func (UnimplementedStateManagerServiceHandler) GetStopStates(context.Context, *connect.Request[v1.GetStopStatesRequest]) (*connect.Response[v1.GetStopStatesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetStopStates is not implemented")) } -func (UnimplementedStateManagerServiceHandler) GetTrains(context.Context, *connect_go.Request[v1.GetTrainsRequest]) (*connect_go.Response[v1.GetTrainsResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetTrains is not implemented")) +func (UnimplementedStateManagerServiceHandler) GetTrains(context.Context, *connect.Request[v1.GetTrainsRequest]) (*connect.Response[v1.GetTrainsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.GetTrains is not implemented")) } -func (UnimplementedStateManagerServiceHandler) UpdateTrainUUID(context.Context, *connect_go.Request[v1.UpdateTrainUUIDRequest]) (*connect_go.Response[v1.UpdateTrainUUIDResponse], error) { - return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdateTrainUUID is not implemented")) +func (UnimplementedStateManagerServiceHandler) UpdateTrainUUID(context.Context, *connect.Request[v1.UpdateTrainUUIDRequest]) (*connect.Response[v1.UpdateTrainUUIDResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("state.v1.StateManagerService.UpdateTrainUUID is not implemented")) } diff --git a/backend/state-manager/cmd/main.go b/backend/state-manager/cmd/main.go index 4e1b7777..d388a0f1 100644 --- a/backend/state-manager/cmd/main.go +++ b/backend/state-manager/cmd/main.go @@ -15,6 +15,7 @@ import ( "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/httplog/v2" "github.com/joho/godotenv" + "github.com/rs/cors" "github.com/ueckoken/plarail2023/backend/spec/state/v1/statev1connect" connectHandler "github.com/ueckoken/plarail2023/backend/state-manager/pkg/connect" "github.com/ueckoken/plarail2023/backend/state-manager/pkg/db" @@ -145,7 +146,7 @@ func main() { srv := &http.Server{ Addr: net.JoinHostPort("0.0.0.0", "8080"), - Handler: h2c.NewHandler(r, &http2.Server{}), + Handler: cors.Default().Handler(h2c.NewHandler(r, &http2.Server{})), ReadHeaderTimeout: 60 * time.Second, BaseContext: func(net.Listener) context.Context { return ctx }, } diff --git a/frontend/dashboard/app/test/page.tsx b/frontend/dashboard/app/test/page.tsx new file mode 100644 index 00000000..fc112bc7 --- /dev/null +++ b/frontend/dashboard/app/test/page.tsx @@ -0,0 +1,28 @@ +"use client"; +import {createPromiseClient} from "@connectrpc/connect"; +import {StateManagerService} from "@/proto/state/v1/state_connectweb"; +import {createConnectTransport} from "@bufbuild/connect-web"; +import {GetBlockStatesRequest} from "@/proto/state/v1/block_pb"; + +export default function Test() { + + const transport = createConnectTransport( + { + // baseUrl: process.env.NEXT_PUBLIC_API_ENDPOINT!, + baseUrl: "http://localhost:8080", + }); + const sendData = () => { + (async () => { + const client = createPromiseClient(StateManagerService, transport); + const res = await client.getBlockStates(new GetBlockStatesRequest({})); + console.log(res); + })(); + } + + return ( +
+

Test

+ +
+ ) +} \ No newline at end of file diff --git a/frontend/dashboard/package.json b/frontend/dashboard/package.json index 3a83929d..a5ad05e0 100644 --- a/frontend/dashboard/package.json +++ b/frontend/dashboard/package.json @@ -9,19 +9,27 @@ "lint": "next lint" }, "dependencies": { + "@bufbuild/connect-web": "^0.13.0", + "@bufbuild/protobuf": "^1.4.2", + "@connectrpc/connect": "^1.1.3", + "@connectrpc/connect-web": "^1.1.3", + "next": "14.0.3", "react": "18.2.0", - "react-dom": "18.2.0", - "next": "14.0.3" + "react-dom": "18.2.0" }, "devDependencies": { - "typescript": "5.3.2", - "@types/node": "20.9.3", - "@types/react": "18.2.38", - "@types/react-dom": "18.2.16" + "@bufbuild/buf": "^1.28.1", + "@bufbuild/protoc-gen-connect-web": "^0.11.0", + "@bufbuild/protoc-gen-es": "^1.4.2", + "@connectrpc/protoc-gen-connect-es": "^1.1.3", + "@types/node": "20.9.2", + "@types/react": "18.2.37", + "@types/react-dom": "18.2.15", + "typescript": "5.2.2" }, "files": [ ".next/standalone", ".next/static", "public" ] -} +} \ No newline at end of file diff --git a/frontend/dashboard/proto/state/v1/block_pb.d.ts b/frontend/dashboard/proto/state/v1/block_pb.d.ts new file mode 100644 index 00000000..7e4a3702 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/block_pb.d.ts @@ -0,0 +1,163 @@ +// +//Block Proto +//閉塞の状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/block.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.BlockStateEnum + */ +export declare enum BlockStateEnum { + /** + * @generated from enum value: BLOCK_STATE_UNKNOWN = 0; + */ + BLOCK_STATE_UNKNOWN = 0, + + /** + * 閉塞が開の状態(列車がいない) + * + * @generated from enum value: BLOCK_STATE_OPEN = 1; + */ + BLOCK_STATE_OPEN = 1, + + /** + * 閉塞が閉の状態(列車がいない) + * + * @generated from enum value: BLOCK_STATE_CLOSE = 2; + */ + BLOCK_STATE_CLOSE = 2, +} + +/** + * 閉塞の状態 + * + * @generated from message state.v1.BlockState + */ +export declare class BlockState extends Message { + /** + * 閉塞のID + * + * @generated from field: string block_id = 1; + */ + blockId: string; + + /** + * 閉塞の状態 + * + * @generated from field: state.v1.BlockStateEnum state = 2; + */ + state: BlockStateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.BlockState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): BlockState; + + static fromJson(jsonValue: JsonValue, options?: Partial): BlockState; + + static fromJsonString(jsonString: string, options?: Partial): BlockState; + + static equals(a: BlockState | PlainMessage | undefined, b: BlockState | PlainMessage | undefined): boolean; +} + +/** + * + * GetBlockStates : 閉塞の状態を取得するAPI + * + * @generated from message state.v1.GetBlockStatesRequest + */ +export declare class GetBlockStatesRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetBlockStatesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetBlockStatesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetBlockStatesRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetBlockStatesRequest; + + static equals(a: GetBlockStatesRequest | PlainMessage | undefined, b: GetBlockStatesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.GetBlockStatesResponse + */ +export declare class GetBlockStatesResponse extends Message { + /** + * @generated from field: repeated state.v1.BlockState states = 1; + */ + states: BlockState[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetBlockStatesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetBlockStatesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetBlockStatesResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetBlockStatesResponse; + + static equals(a: GetBlockStatesResponse | PlainMessage | undefined, b: GetBlockStatesResponse | PlainMessage | undefined): boolean; +} + +/** + * + * UpdateBLockState: 閉塞の状態を更新するAPI + * + * @generated from message state.v1.UpdateBlockStateRequest + */ +export declare class UpdateBlockStateRequest extends Message { + /** + * @generated from field: state.v1.BlockState state = 1; + */ + state?: BlockState; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdateBlockStateRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateBlockStateRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateBlockStateRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateBlockStateRequest; + + static equals(a: UpdateBlockStateRequest | PlainMessage | undefined, b: UpdateBlockStateRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.UpdateBlockStateResponse + */ +export declare class UpdateBlockStateResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdateBlockStateResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateBlockStateResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateBlockStateResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateBlockStateResponse; + + static equals(a: UpdateBlockStateResponse | PlainMessage | undefined, b: UpdateBlockStateResponse | PlainMessage | undefined): boolean; +} + diff --git a/frontend/dashboard/proto/state/v1/block_pb.js b/frontend/dashboard/proto/state/v1/block_pb.js new file mode 100644 index 00000000..5c9843ab --- /dev/null +++ b/frontend/dashboard/proto/state/v1/block_pb.js @@ -0,0 +1,78 @@ +// +//Block Proto +//閉塞の状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/block.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.BlockStateEnum + */ +export const BlockStateEnum = proto3.makeEnum( + "state.v1.BlockStateEnum", + [ + {no: 0, name: "BLOCK_STATE_UNKNOWN"}, + {no: 1, name: "BLOCK_STATE_OPEN"}, + {no: 2, name: "BLOCK_STATE_CLOSE"}, + ], +); + +/** + * 閉塞の状態 + * + * @generated from message state.v1.BlockState + */ +export const BlockState = proto3.makeMessageType( + "state.v1.BlockState", + () => [ + { no: 1, name: "block_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(BlockStateEnum) }, + ], +); + +/** + * + * GetBlockStates : 閉塞の状態を取得するAPI + * + * @generated from message state.v1.GetBlockStatesRequest + */ +export const GetBlockStatesRequest = proto3.makeMessageType( + "state.v1.GetBlockStatesRequest", + [], +); + +/** + * @generated from message state.v1.GetBlockStatesResponse + */ +export const GetBlockStatesResponse = proto3.makeMessageType( + "state.v1.GetBlockStatesResponse", + () => [ + { no: 1, name: "states", kind: "message", T: BlockState, repeated: true }, + ], +); + +/** + * + * UpdateBLockState: 閉塞の状態を更新するAPI + * + * @generated from message state.v1.UpdateBlockStateRequest + */ +export const UpdateBlockStateRequest = proto3.makeMessageType( + "state.v1.UpdateBlockStateRequest", + () => [ + { no: 1, name: "state", kind: "message", T: BlockState }, + ], +); + +/** + * @generated from message state.v1.UpdateBlockStateResponse + */ +export const UpdateBlockStateResponse = proto3.makeMessageType( + "state.v1.UpdateBlockStateResponse", + [], +); + diff --git a/frontend/dashboard/proto/state/v1/block_pb.ts b/frontend/dashboard/proto/state/v1/block_pb.ts new file mode 100644 index 00000000..f5527eec --- /dev/null +++ b/frontend/dashboard/proto/state/v1/block_pb.ts @@ -0,0 +1,233 @@ +// +//Block Proto +//閉塞の状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=ts" +// @generated from file state/v1/block.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.BlockStateEnum + */ +export enum BlockStateEnum { + /** + * @generated from enum value: BLOCK_STATE_UNKNOWN = 0; + */ + BLOCK_STATE_UNKNOWN = 0, + + /** + * 閉塞が開の状態(列車がいない) + * + * @generated from enum value: BLOCK_STATE_OPEN = 1; + */ + BLOCK_STATE_OPEN = 1, + + /** + * 閉塞が閉の状態(列車がいない) + * + * @generated from enum value: BLOCK_STATE_CLOSE = 2; + */ + BLOCK_STATE_CLOSE = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(BlockStateEnum) +proto3.util.setEnumType(BlockStateEnum, "state.v1.BlockStateEnum", [ + { no: 0, name: "BLOCK_STATE_UNKNOWN" }, + { no: 1, name: "BLOCK_STATE_OPEN" }, + { no: 2, name: "BLOCK_STATE_CLOSE" }, +]); + +/** + * 閉塞の状態 + * + * @generated from message state.v1.BlockState + */ +export class BlockState extends Message { + /** + * 閉塞のID + * + * @generated from field: string block_id = 1; + */ + blockId = ""; + + /** + * 閉塞の状態 + * + * @generated from field: state.v1.BlockStateEnum state = 2; + */ + state = BlockStateEnum.BLOCK_STATE_UNKNOWN; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.BlockState"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "block_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(BlockStateEnum) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BlockState { + return new BlockState().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BlockState { + return new BlockState().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BlockState { + return new BlockState().fromJsonString(jsonString, options); + } + + static equals(a: BlockState | PlainMessage | undefined, b: BlockState | PlainMessage | undefined): boolean { + return proto3.util.equals(BlockState, a, b); + } +} + +/** + * + * GetBlockStates : 閉塞の状態を取得するAPI + * + * @generated from message state.v1.GetBlockStatesRequest + */ +export class GetBlockStatesRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetBlockStatesRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetBlockStatesRequest { + return new GetBlockStatesRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetBlockStatesRequest { + return new GetBlockStatesRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetBlockStatesRequest { + return new GetBlockStatesRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetBlockStatesRequest | PlainMessage | undefined, b: GetBlockStatesRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetBlockStatesRequest, a, b); + } +} + +/** + * @generated from message state.v1.GetBlockStatesResponse + */ +export class GetBlockStatesResponse extends Message { + /** + * @generated from field: repeated state.v1.BlockState states = 1; + */ + states: BlockState[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetBlockStatesResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "states", kind: "message", T: BlockState, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetBlockStatesResponse { + return new GetBlockStatesResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetBlockStatesResponse { + return new GetBlockStatesResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetBlockStatesResponse { + return new GetBlockStatesResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetBlockStatesResponse | PlainMessage | undefined, b: GetBlockStatesResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetBlockStatesResponse, a, b); + } +} + +/** + * + * UpdateBLockState: 閉塞の状態を更新するAPI + * + * @generated from message state.v1.UpdateBlockStateRequest + */ +export class UpdateBlockStateRequest extends Message { + /** + * @generated from field: state.v1.BlockState state = 1; + */ + state?: BlockState; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdateBlockStateRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "state", kind: "message", T: BlockState }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateBlockStateRequest { + return new UpdateBlockStateRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateBlockStateRequest { + return new UpdateBlockStateRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateBlockStateRequest { + return new UpdateBlockStateRequest().fromJsonString(jsonString, options); + } + + static equals(a: UpdateBlockStateRequest | PlainMessage | undefined, b: UpdateBlockStateRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateBlockStateRequest, a, b); + } +} + +/** + * @generated from message state.v1.UpdateBlockStateResponse + */ +export class UpdateBlockStateResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdateBlockStateResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateBlockStateResponse { + return new UpdateBlockStateResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateBlockStateResponse { + return new UpdateBlockStateResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateBlockStateResponse { + return new UpdateBlockStateResponse().fromJsonString(jsonString, options); + } + + static equals(a: UpdateBlockStateResponse | PlainMessage | undefined, b: UpdateBlockStateResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateBlockStateResponse, a, b); + } +} + diff --git a/frontend/dashboard/proto/state/v1/point_pb.d.ts b/frontend/dashboard/proto/state/v1/point_pb.d.ts new file mode 100644 index 00000000..3549e61c --- /dev/null +++ b/frontend/dashboard/proto/state/v1/point_pb.d.ts @@ -0,0 +1,161 @@ +// +//Point Proto +//ポイントレールの状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/point.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.PointStateEnum + */ +export declare enum PointStateEnum { + /** + * @generated from enum value: POINT_STATE_UNKNOWN = 0; + */ + POINT_STATE_UNKNOWN = 0, + + /** + * ポイントがまっすぐな状態 + * + * @generated from enum value: POINT_STATE_NORMAL = 1; + */ + POINT_STATE_NORMAL = 1, + + /** + * ポイントが移動している状態 + * + * @generated from enum value: POINT_STATE_REVERSE = 2; + */ + POINT_STATE_REVERSE = 2, +} + +/** + * @generated from message state.v1.PointAndState + */ +export declare class PointAndState extends Message { + /** + * ポイントのid + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * ポイントの状態 + * + * @generated from field: state.v1.PointStateEnum state = 2; + */ + state: PointStateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.PointAndState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): PointAndState; + + static fromJson(jsonValue: JsonValue, options?: Partial): PointAndState; + + static fromJsonString(jsonString: string, options?: Partial): PointAndState; + + static equals(a: PointAndState | PlainMessage | undefined, b: PointAndState | PlainMessage | undefined): boolean; +} + +/** + * + * UpdatePointState : ポイントの状態を更新するAPI + * + * @generated from message state.v1.UpdatePointStateRequest + */ +export declare class UpdatePointStateRequest extends Message { + /** + * @generated from field: state.v1.PointAndState state = 1; + */ + state?: PointAndState; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdatePointStateRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdatePointStateRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdatePointStateRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdatePointStateRequest; + + static equals(a: UpdatePointStateRequest | PlainMessage | undefined, b: UpdatePointStateRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.UpdatePointStateResponse + */ +export declare class UpdatePointStateResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdatePointStateResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdatePointStateResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdatePointStateResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdatePointStateResponse; + + static equals(a: UpdatePointStateResponse | PlainMessage | undefined, b: UpdatePointStateResponse | PlainMessage | undefined): boolean; +} + +/** + * + * GetPointStates : 全てのポイントの状態を取得するAPI + * + * @generated from message state.v1.GetPointStatesRequest + */ +export declare class GetPointStatesRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetPointStatesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetPointStatesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetPointStatesRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetPointStatesRequest; + + static equals(a: GetPointStatesRequest | PlainMessage | undefined, b: GetPointStatesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.GetPointStatesResponse + */ +export declare class GetPointStatesResponse extends Message { + /** + * @generated from field: repeated state.v1.PointAndState states = 1; + */ + states: PointAndState[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetPointStatesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetPointStatesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetPointStatesResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetPointStatesResponse; + + static equals(a: GetPointStatesResponse | PlainMessage | undefined, b: GetPointStatesResponse | PlainMessage | undefined): boolean; +} + diff --git a/frontend/dashboard/proto/state/v1/point_pb.js b/frontend/dashboard/proto/state/v1/point_pb.js new file mode 100644 index 00000000..623ba2ee --- /dev/null +++ b/frontend/dashboard/proto/state/v1/point_pb.js @@ -0,0 +1,76 @@ +// +//Point Proto +//ポイントレールの状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/point.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.PointStateEnum + */ +export const PointStateEnum = proto3.makeEnum( + "state.v1.PointStateEnum", + [ + {no: 0, name: "POINT_STATE_UNKNOWN"}, + {no: 1, name: "POINT_STATE_NORMAL"}, + {no: 2, name: "POINT_STATE_REVERSE"}, + ], +); + +/** + * @generated from message state.v1.PointAndState + */ +export const PointAndState = proto3.makeMessageType( + "state.v1.PointAndState", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(PointStateEnum) }, + ], +); + +/** + * + * UpdatePointState : ポイントの状態を更新するAPI + * + * @generated from message state.v1.UpdatePointStateRequest + */ +export const UpdatePointStateRequest = proto3.makeMessageType( + "state.v1.UpdatePointStateRequest", + () => [ + { no: 1, name: "state", kind: "message", T: PointAndState }, + ], +); + +/** + * @generated from message state.v1.UpdatePointStateResponse + */ +export const UpdatePointStateResponse = proto3.makeMessageType( + "state.v1.UpdatePointStateResponse", + [], +); + +/** + * + * GetPointStates : 全てのポイントの状態を取得するAPI + * + * @generated from message state.v1.GetPointStatesRequest + */ +export const GetPointStatesRequest = proto3.makeMessageType( + "state.v1.GetPointStatesRequest", + [], +); + +/** + * @generated from message state.v1.GetPointStatesResponse + */ +export const GetPointStatesResponse = proto3.makeMessageType( + "state.v1.GetPointStatesResponse", + () => [ + { no: 1, name: "states", kind: "message", T: PointAndState, repeated: true }, + ], +); + diff --git a/frontend/dashboard/proto/state/v1/point_pb.ts b/frontend/dashboard/proto/state/v1/point_pb.ts new file mode 100644 index 00000000..57354235 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/point_pb.ts @@ -0,0 +1,231 @@ +// +//Point Proto +//ポイントレールの状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=ts" +// @generated from file state/v1/point.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.PointStateEnum + */ +export enum PointStateEnum { + /** + * @generated from enum value: POINT_STATE_UNKNOWN = 0; + */ + POINT_STATE_UNKNOWN = 0, + + /** + * ポイントがまっすぐな状態 + * + * @generated from enum value: POINT_STATE_NORMAL = 1; + */ + POINT_STATE_NORMAL = 1, + + /** + * ポイントが移動している状態 + * + * @generated from enum value: POINT_STATE_REVERSE = 2; + */ + POINT_STATE_REVERSE = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(PointStateEnum) +proto3.util.setEnumType(PointStateEnum, "state.v1.PointStateEnum", [ + { no: 0, name: "POINT_STATE_UNKNOWN" }, + { no: 1, name: "POINT_STATE_NORMAL" }, + { no: 2, name: "POINT_STATE_REVERSE" }, +]); + +/** + * @generated from message state.v1.PointAndState + */ +export class PointAndState extends Message { + /** + * ポイントのid + * + * @generated from field: string id = 1; + */ + id = ""; + + /** + * ポイントの状態 + * + * @generated from field: state.v1.PointStateEnum state = 2; + */ + state = PointStateEnum.POINT_STATE_UNKNOWN; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.PointAndState"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(PointStateEnum) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): PointAndState { + return new PointAndState().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): PointAndState { + return new PointAndState().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): PointAndState { + return new PointAndState().fromJsonString(jsonString, options); + } + + static equals(a: PointAndState | PlainMessage | undefined, b: PointAndState | PlainMessage | undefined): boolean { + return proto3.util.equals(PointAndState, a, b); + } +} + +/** + * + * UpdatePointState : ポイントの状態を更新するAPI + * + * @generated from message state.v1.UpdatePointStateRequest + */ +export class UpdatePointStateRequest extends Message { + /** + * @generated from field: state.v1.PointAndState state = 1; + */ + state?: PointAndState; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdatePointStateRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "state", kind: "message", T: PointAndState }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdatePointStateRequest { + return new UpdatePointStateRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdatePointStateRequest { + return new UpdatePointStateRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdatePointStateRequest { + return new UpdatePointStateRequest().fromJsonString(jsonString, options); + } + + static equals(a: UpdatePointStateRequest | PlainMessage | undefined, b: UpdatePointStateRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdatePointStateRequest, a, b); + } +} + +/** + * @generated from message state.v1.UpdatePointStateResponse + */ +export class UpdatePointStateResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdatePointStateResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdatePointStateResponse { + return new UpdatePointStateResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdatePointStateResponse { + return new UpdatePointStateResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdatePointStateResponse { + return new UpdatePointStateResponse().fromJsonString(jsonString, options); + } + + static equals(a: UpdatePointStateResponse | PlainMessage | undefined, b: UpdatePointStateResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdatePointStateResponse, a, b); + } +} + +/** + * + * GetPointStates : 全てのポイントの状態を取得するAPI + * + * @generated from message state.v1.GetPointStatesRequest + */ +export class GetPointStatesRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetPointStatesRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetPointStatesRequest { + return new GetPointStatesRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetPointStatesRequest { + return new GetPointStatesRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetPointStatesRequest { + return new GetPointStatesRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetPointStatesRequest | PlainMessage | undefined, b: GetPointStatesRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetPointStatesRequest, a, b); + } +} + +/** + * @generated from message state.v1.GetPointStatesResponse + */ +export class GetPointStatesResponse extends Message { + /** + * @generated from field: repeated state.v1.PointAndState states = 1; + */ + states: PointAndState[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetPointStatesResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "states", kind: "message", T: PointAndState, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetPointStatesResponse { + return new GetPointStatesResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetPointStatesResponse { + return new GetPointStatesResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetPointStatesResponse { + return new GetPointStatesResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetPointStatesResponse | PlainMessage | undefined, b: GetPointStatesResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetPointStatesResponse, a, b); + } +} + diff --git a/frontend/dashboard/proto/state/v1/state_connectweb.d.ts b/frontend/dashboard/proto/state/v1/state_connectweb.d.ts new file mode 100644 index 00000000..2e087925 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/state_connectweb.d.ts @@ -0,0 +1,104 @@ +// @generated by protoc-gen-connect-web v0.11.0 with parameter "target=dts+js" +// @generated from file state/v1/state.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetBlockStatesRequest, GetBlockStatesResponse, UpdateBlockStateRequest, UpdateBlockStateResponse } from "./block_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; +import { GetPointStatesRequest, GetPointStatesResponse, UpdatePointStateRequest, UpdatePointStateResponse } from "./point_pb.js"; +import { GetStopStatesRequest, GetStopStatesResponse, UpdateStopStateRequest, UpdateStopStateResponse } from "./stop_pb.js"; +import { GetTrainsRequest, GetTrainsResponse, UpdateTrainUUIDRequest, UpdateTrainUUIDResponse } from "./train_pb.js"; + +/** + * + * StateManagerが提供するサービス + * AutoOperationとフロントエンド間の通信に利用される + * + * @generated from service state.v1.StateManagerService + */ +export declare const StateManagerService: { + readonly typeName: "state.v1.StateManagerService", + readonly methods: { + /** + * Block + * + * @generated from rpc state.v1.StateManagerService.GetBlockStates + */ + readonly getBlockStates: { + readonly name: "GetBlockStates", + readonly I: typeof GetBlockStatesRequest, + readonly O: typeof GetBlockStatesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.UpdateBlockState + */ + readonly updateBlockState: { + readonly name: "UpdateBlockState", + readonly I: typeof UpdateBlockStateRequest, + readonly O: typeof UpdateBlockStateResponse, + readonly kind: MethodKind.Unary, + }, + /** + * Point + * + * @generated from rpc state.v1.StateManagerService.UpdatePointState + */ + readonly updatePointState: { + readonly name: "UpdatePointState", + readonly I: typeof UpdatePointStateRequest, + readonly O: typeof UpdatePointStateResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.GetPointStates + */ + readonly getPointStates: { + readonly name: "GetPointStates", + readonly I: typeof GetPointStatesRequest, + readonly O: typeof GetPointStatesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * Stop + * + * @generated from rpc state.v1.StateManagerService.UpdateStopState + */ + readonly updateStopState: { + readonly name: "UpdateStopState", + readonly I: typeof UpdateStopStateRequest, + readonly O: typeof UpdateStopStateResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.GetStopStates + */ + readonly getStopStates: { + readonly name: "GetStopStates", + readonly I: typeof GetStopStatesRequest, + readonly O: typeof GetStopStatesResponse, + readonly kind: MethodKind.Unary, + }, + /** + * Train + * + * @generated from rpc state.v1.StateManagerService.GetTrains + */ + readonly getTrains: { + readonly name: "GetTrains", + readonly I: typeof GetTrainsRequest, + readonly O: typeof GetTrainsResponse, + readonly kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.UpdateTrainUUID + */ + readonly updateTrainUUID: { + readonly name: "UpdateTrainUUID", + readonly I: typeof UpdateTrainUUIDRequest, + readonly O: typeof UpdateTrainUUIDResponse, + readonly kind: MethodKind.Unary, + }, + } +}; + diff --git a/frontend/dashboard/proto/state/v1/state_connectweb.js b/frontend/dashboard/proto/state/v1/state_connectweb.js new file mode 100644 index 00000000..637fee8c --- /dev/null +++ b/frontend/dashboard/proto/state/v1/state_connectweb.js @@ -0,0 +1,104 @@ +// @generated by protoc-gen-connect-web v0.11.0 with parameter "target=dts+js" +// @generated from file state/v1/state.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetBlockStatesRequest, GetBlockStatesResponse, UpdateBlockStateRequest, UpdateBlockStateResponse } from "./block_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; +import { GetPointStatesRequest, GetPointStatesResponse, UpdatePointStateRequest, UpdatePointStateResponse } from "./point_pb.js"; +import { GetStopStatesRequest, GetStopStatesResponse, UpdateStopStateRequest, UpdateStopStateResponse } from "./stop_pb.js"; +import { GetTrainsRequest, GetTrainsResponse, UpdateTrainUUIDRequest, UpdateTrainUUIDResponse } from "./train_pb.js"; + +/** + * + * StateManagerが提供するサービス + * AutoOperationとフロントエンド間の通信に利用される + * + * @generated from service state.v1.StateManagerService + */ +export const StateManagerService = { + typeName: "state.v1.StateManagerService", + methods: { + /** + * Block + * + * @generated from rpc state.v1.StateManagerService.GetBlockStates + */ + getBlockStates: { + name: "GetBlockStates", + I: GetBlockStatesRequest, + O: GetBlockStatesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.UpdateBlockState + */ + updateBlockState: { + name: "UpdateBlockState", + I: UpdateBlockStateRequest, + O: UpdateBlockStateResponse, + kind: MethodKind.Unary, + }, + /** + * Point + * + * @generated from rpc state.v1.StateManagerService.UpdatePointState + */ + updatePointState: { + name: "UpdatePointState", + I: UpdatePointStateRequest, + O: UpdatePointStateResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.GetPointStates + */ + getPointStates: { + name: "GetPointStates", + I: GetPointStatesRequest, + O: GetPointStatesResponse, + kind: MethodKind.Unary, + }, + /** + * Stop + * + * @generated from rpc state.v1.StateManagerService.UpdateStopState + */ + updateStopState: { + name: "UpdateStopState", + I: UpdateStopStateRequest, + O: UpdateStopStateResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.GetStopStates + */ + getStopStates: { + name: "GetStopStates", + I: GetStopStatesRequest, + O: GetStopStatesResponse, + kind: MethodKind.Unary, + }, + /** + * Train + * + * @generated from rpc state.v1.StateManagerService.GetTrains + */ + getTrains: { + name: "GetTrains", + I: GetTrainsRequest, + O: GetTrainsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.UpdateTrainUUID + */ + updateTrainUUID: { + name: "UpdateTrainUUID", + I: UpdateTrainUUIDRequest, + O: UpdateTrainUUIDResponse, + kind: MethodKind.Unary, + }, + } +}; + diff --git a/frontend/dashboard/proto/state/v1/state_connectweb.ts b/frontend/dashboard/proto/state/v1/state_connectweb.ts new file mode 100644 index 00000000..242d0323 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/state_connectweb.ts @@ -0,0 +1,104 @@ +// @generated by protoc-gen-connect-web v0.11.0 with parameter "target=ts" +// @generated from file state/v1/state.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { GetBlockStatesRequest, GetBlockStatesResponse, UpdateBlockStateRequest, UpdateBlockStateResponse } from "./block_pb.js"; +import { MethodKind } from "@bufbuild/protobuf"; +import { GetPointStatesRequest, GetPointStatesResponse, UpdatePointStateRequest, UpdatePointStateResponse } from "./point_pb.js"; +import { GetStopStatesRequest, GetStopStatesResponse, UpdateStopStateRequest, UpdateStopStateResponse } from "./stop_pb.js"; +import { GetTrainsRequest, GetTrainsResponse, UpdateTrainUUIDRequest, UpdateTrainUUIDResponse } from "./train_pb.js"; + +/** + * + * StateManagerが提供するサービス + * AutoOperationとフロントエンド間の通信に利用される + * + * @generated from service state.v1.StateManagerService + */ +export const StateManagerService = { + typeName: "state.v1.StateManagerService", + methods: { + /** + * Block + * + * @generated from rpc state.v1.StateManagerService.GetBlockStates + */ + getBlockStates: { + name: "GetBlockStates", + I: GetBlockStatesRequest, + O: GetBlockStatesResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.UpdateBlockState + */ + updateBlockState: { + name: "UpdateBlockState", + I: UpdateBlockStateRequest, + O: UpdateBlockStateResponse, + kind: MethodKind.Unary, + }, + /** + * Point + * + * @generated from rpc state.v1.StateManagerService.UpdatePointState + */ + updatePointState: { + name: "UpdatePointState", + I: UpdatePointStateRequest, + O: UpdatePointStateResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.GetPointStates + */ + getPointStates: { + name: "GetPointStates", + I: GetPointStatesRequest, + O: GetPointStatesResponse, + kind: MethodKind.Unary, + }, + /** + * Stop + * + * @generated from rpc state.v1.StateManagerService.UpdateStopState + */ + updateStopState: { + name: "UpdateStopState", + I: UpdateStopStateRequest, + O: UpdateStopStateResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.GetStopStates + */ + getStopStates: { + name: "GetStopStates", + I: GetStopStatesRequest, + O: GetStopStatesResponse, + kind: MethodKind.Unary, + }, + /** + * Train + * + * @generated from rpc state.v1.StateManagerService.GetTrains + */ + getTrains: { + name: "GetTrains", + I: GetTrainsRequest, + O: GetTrainsResponse, + kind: MethodKind.Unary, + }, + /** + * @generated from rpc state.v1.StateManagerService.UpdateTrainUUID + */ + updateTrainUUID: { + name: "UpdateTrainUUID", + I: UpdateTrainUUIDRequest, + O: UpdateTrainUUIDResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/frontend/dashboard/proto/state/v1/stop_pb.d.ts b/frontend/dashboard/proto/state/v1/stop_pb.d.ts new file mode 100644 index 00000000..bdb5b921 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/stop_pb.d.ts @@ -0,0 +1,161 @@ +// +//Stop Proto +//ストップレールの状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/stop.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.StopStateEnum + */ +export declare enum StopStateEnum { + /** + * @generated from enum value: STOP_STATE_UNKNOWN = 0; + */ + STOP_STATE_UNKNOWN = 0, + + /** + * バーが下がってる状態 + * + * @generated from enum value: STOP_STATE_GO = 1; + */ + STOP_STATE_GO = 1, + + /** + * バーが上がってる状態 + * + * @generated from enum value: STOP_STATE_STOP = 2; + */ + STOP_STATE_STOP = 2, +} + +/** + * @generated from message state.v1.StopAndState + */ +export declare class StopAndState extends Message { + /** + * ポイントのid + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * ポイントの状態 + * + * @generated from field: state.v1.StopStateEnum state = 2; + */ + state: StopStateEnum; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.StopAndState"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): StopAndState; + + static fromJson(jsonValue: JsonValue, options?: Partial): StopAndState; + + static fromJsonString(jsonString: string, options?: Partial): StopAndState; + + static equals(a: StopAndState | PlainMessage | undefined, b: StopAndState | PlainMessage | undefined): boolean; +} + +/** + * + * UpdateStopState : ストップレールの状態を更新するAPI + * + * @generated from message state.v1.UpdateStopStateRequest + */ +export declare class UpdateStopStateRequest extends Message { + /** + * @generated from field: state.v1.StopAndState state = 1; + */ + state?: StopAndState; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdateStopStateRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateStopStateRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateStopStateRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateStopStateRequest; + + static equals(a: UpdateStopStateRequest | PlainMessage | undefined, b: UpdateStopStateRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.UpdateStopStateResponse + */ +export declare class UpdateStopStateResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdateStopStateResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateStopStateResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateStopStateResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateStopStateResponse; + + static equals(a: UpdateStopStateResponse | PlainMessage | undefined, b: UpdateStopStateResponse | PlainMessage | undefined): boolean; +} + +/** + * + * GetStopStates : 全てのストップレールの状態を取得するAPI + * + * @generated from message state.v1.GetStopStatesRequest + */ +export declare class GetStopStatesRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetStopStatesRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStopStatesRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStopStatesRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetStopStatesRequest; + + static equals(a: GetStopStatesRequest | PlainMessage | undefined, b: GetStopStatesRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.GetStopStatesResponse + */ +export declare class GetStopStatesResponse extends Message { + /** + * @generated from field: repeated state.v1.StopAndState states = 1; + */ + states: StopAndState[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetStopStatesResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStopStatesResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStopStatesResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetStopStatesResponse; + + static equals(a: GetStopStatesResponse | PlainMessage | undefined, b: GetStopStatesResponse | PlainMessage | undefined): boolean; +} + diff --git a/frontend/dashboard/proto/state/v1/stop_pb.js b/frontend/dashboard/proto/state/v1/stop_pb.js new file mode 100644 index 00000000..caf0be2d --- /dev/null +++ b/frontend/dashboard/proto/state/v1/stop_pb.js @@ -0,0 +1,76 @@ +// +//Stop Proto +//ストップレールの状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/stop.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.StopStateEnum + */ +export const StopStateEnum = proto3.makeEnum( + "state.v1.StopStateEnum", + [ + {no: 0, name: "STOP_STATE_UNKNOWN"}, + {no: 1, name: "STOP_STATE_GO"}, + {no: 2, name: "STOP_STATE_STOP"}, + ], +); + +/** + * @generated from message state.v1.StopAndState + */ +export const StopAndState = proto3.makeMessageType( + "state.v1.StopAndState", + () => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(StopStateEnum) }, + ], +); + +/** + * + * UpdateStopState : ストップレールの状態を更新するAPI + * + * @generated from message state.v1.UpdateStopStateRequest + */ +export const UpdateStopStateRequest = proto3.makeMessageType( + "state.v1.UpdateStopStateRequest", + () => [ + { no: 1, name: "state", kind: "message", T: StopAndState }, + ], +); + +/** + * @generated from message state.v1.UpdateStopStateResponse + */ +export const UpdateStopStateResponse = proto3.makeMessageType( + "state.v1.UpdateStopStateResponse", + [], +); + +/** + * + * GetStopStates : 全てのストップレールの状態を取得するAPI + * + * @generated from message state.v1.GetStopStatesRequest + */ +export const GetStopStatesRequest = proto3.makeMessageType( + "state.v1.GetStopStatesRequest", + [], +); + +/** + * @generated from message state.v1.GetStopStatesResponse + */ +export const GetStopStatesResponse = proto3.makeMessageType( + "state.v1.GetStopStatesResponse", + () => [ + { no: 1, name: "states", kind: "message", T: StopAndState, repeated: true }, + ], +); + diff --git a/frontend/dashboard/proto/state/v1/stop_pb.ts b/frontend/dashboard/proto/state/v1/stop_pb.ts new file mode 100644 index 00000000..fccb87ec --- /dev/null +++ b/frontend/dashboard/proto/state/v1/stop_pb.ts @@ -0,0 +1,231 @@ +// +//Stop Proto +//ストップレールの状態を扱うプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=ts" +// @generated from file state/v1/stop.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.StopStateEnum + */ +export enum StopStateEnum { + /** + * @generated from enum value: STOP_STATE_UNKNOWN = 0; + */ + STOP_STATE_UNKNOWN = 0, + + /** + * バーが下がってる状態 + * + * @generated from enum value: STOP_STATE_GO = 1; + */ + STOP_STATE_GO = 1, + + /** + * バーが上がってる状態 + * + * @generated from enum value: STOP_STATE_STOP = 2; + */ + STOP_STATE_STOP = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(StopStateEnum) +proto3.util.setEnumType(StopStateEnum, "state.v1.StopStateEnum", [ + { no: 0, name: "STOP_STATE_UNKNOWN" }, + { no: 1, name: "STOP_STATE_GO" }, + { no: 2, name: "STOP_STATE_STOP" }, +]); + +/** + * @generated from message state.v1.StopAndState + */ +export class StopAndState extends Message { + /** + * ポイントのid + * + * @generated from field: string id = 1; + */ + id = ""; + + /** + * ポイントの状態 + * + * @generated from field: state.v1.StopStateEnum state = 2; + */ + state = StopStateEnum.STOP_STATE_UNKNOWN; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.StopAndState"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "state", kind: "enum", T: proto3.getEnumType(StopStateEnum) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): StopAndState { + return new StopAndState().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): StopAndState { + return new StopAndState().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): StopAndState { + return new StopAndState().fromJsonString(jsonString, options); + } + + static equals(a: StopAndState | PlainMessage | undefined, b: StopAndState | PlainMessage | undefined): boolean { + return proto3.util.equals(StopAndState, a, b); + } +} + +/** + * + * UpdateStopState : ストップレールの状態を更新するAPI + * + * @generated from message state.v1.UpdateStopStateRequest + */ +export class UpdateStopStateRequest extends Message { + /** + * @generated from field: state.v1.StopAndState state = 1; + */ + state?: StopAndState; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdateStopStateRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "state", kind: "message", T: StopAndState }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateStopStateRequest { + return new UpdateStopStateRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateStopStateRequest { + return new UpdateStopStateRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateStopStateRequest { + return new UpdateStopStateRequest().fromJsonString(jsonString, options); + } + + static equals(a: UpdateStopStateRequest | PlainMessage | undefined, b: UpdateStopStateRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateStopStateRequest, a, b); + } +} + +/** + * @generated from message state.v1.UpdateStopStateResponse + */ +export class UpdateStopStateResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdateStopStateResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateStopStateResponse { + return new UpdateStopStateResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateStopStateResponse { + return new UpdateStopStateResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateStopStateResponse { + return new UpdateStopStateResponse().fromJsonString(jsonString, options); + } + + static equals(a: UpdateStopStateResponse | PlainMessage | undefined, b: UpdateStopStateResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateStopStateResponse, a, b); + } +} + +/** + * + * GetStopStates : 全てのストップレールの状態を取得するAPI + * + * @generated from message state.v1.GetStopStatesRequest + */ +export class GetStopStatesRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetStopStatesRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStopStatesRequest { + return new GetStopStatesRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStopStatesRequest { + return new GetStopStatesRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetStopStatesRequest { + return new GetStopStatesRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetStopStatesRequest | PlainMessage | undefined, b: GetStopStatesRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetStopStatesRequest, a, b); + } +} + +/** + * @generated from message state.v1.GetStopStatesResponse + */ +export class GetStopStatesResponse extends Message { + /** + * @generated from field: repeated state.v1.StopAndState states = 1; + */ + states: StopAndState[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetStopStatesResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "states", kind: "message", T: StopAndState, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetStopStatesResponse { + return new GetStopStatesResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetStopStatesResponse { + return new GetStopStatesResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetStopStatesResponse { + return new GetStopStatesResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetStopStatesResponse | PlainMessage | undefined, b: GetStopStatesResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetStopStatesResponse, a, b); + } +} + diff --git a/frontend/dashboard/proto/state/v1/train_pb.d.ts b/frontend/dashboard/proto/state/v1/train_pb.d.ts new file mode 100644 index 00000000..19040853 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/train_pb.d.ts @@ -0,0 +1,166 @@ +// +//Train Proto +//駅に停車している列車の情報を扱うためのプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/train.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.Priority + */ +export declare enum Priority { + /** + * @generated from enum value: PRIORITY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PRIORITY_LOW = 1; + */ + LOW = 1, + + /** + * @generated from enum value: PRIORITY_HIGH = 2; + */ + HIGH = 2, +} + +/** + * @generated from message state.v1.Train + */ +export declare class Train extends Message { + /** + * 列車ID(NFCのUUIDと一意に対応している) + * + * @generated from field: string train_id = 1; + */ + trainId: string; + + /** + * 駅のID + * + * @generated from field: string station_id = 2; + */ + stationId: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.Train"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): Train; + + static fromJson(jsonValue: JsonValue, options?: Partial): Train; + + static fromJsonString(jsonString: string, options?: Partial): Train; + + static equals(a: Train | PlainMessage | undefined, b: Train | PlainMessage | undefined): boolean; +} + +/** + * + * GetTrains : 列車の状態を取得するAPI + * + * @generated from message state.v1.GetTrainsRequest + */ +export declare class GetTrainsRequest extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetTrainsRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetTrainsRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetTrainsRequest; + + static fromJsonString(jsonString: string, options?: Partial): GetTrainsRequest; + + static equals(a: GetTrainsRequest | PlainMessage | undefined, b: GetTrainsRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.GetTrainsResponse + */ +export declare class GetTrainsResponse extends Message { + /** + * @generated from field: repeated state.v1.Train trains = 1; + */ + trains: Train[]; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.GetTrainsResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): GetTrainsResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): GetTrainsResponse; + + static fromJsonString(jsonString: string, options?: Partial): GetTrainsResponse; + + static equals(a: GetTrainsResponse | PlainMessage | undefined, b: GetTrainsResponse | PlainMessage | undefined): boolean; +} + +/** + * + * UpdateTrainUUID : NFCのUUID紐付けを更新するAPI + * + * @generated from message state.v1.UpdateTrainUUIDRequest + */ +export declare class UpdateTrainUUIDRequest extends Message { + /** + * 列車ID + * + * @generated from field: string train_id = 1; + */ + trainId: string; + + /** + * NFCのUUID + * + * @generated from field: string uuid = 2; + */ + uuid: string; + + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdateTrainUUIDRequest"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrainUUIDRequest; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrainUUIDRequest; + + static fromJsonString(jsonString: string, options?: Partial): UpdateTrainUUIDRequest; + + static equals(a: UpdateTrainUUIDRequest | PlainMessage | undefined, b: UpdateTrainUUIDRequest | PlainMessage | undefined): boolean; +} + +/** + * @generated from message state.v1.UpdateTrainUUIDResponse + */ +export declare class UpdateTrainUUIDResponse extends Message { + constructor(data?: PartialMessage); + + static readonly runtime: typeof proto3; + static readonly typeName = "state.v1.UpdateTrainUUIDResponse"; + static readonly fields: FieldList; + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrainUUIDResponse; + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrainUUIDResponse; + + static fromJsonString(jsonString: string, options?: Partial): UpdateTrainUUIDResponse; + + static equals(a: UpdateTrainUUIDResponse | PlainMessage | undefined, b: UpdateTrainUUIDResponse | PlainMessage | undefined): boolean; +} + diff --git a/frontend/dashboard/proto/state/v1/train_pb.js b/frontend/dashboard/proto/state/v1/train_pb.js new file mode 100644 index 00000000..d284bf40 --- /dev/null +++ b/frontend/dashboard/proto/state/v1/train_pb.js @@ -0,0 +1,77 @@ +// +//Train Proto +//駅に停車している列車の情報を扱うためのプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=dts+js" +// @generated from file state/v1/train.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.Priority + */ +export const Priority = proto3.makeEnum( + "state.v1.Priority", + [ + {no: 0, name: "PRIORITY_UNSPECIFIED", localName: "UNSPECIFIED"}, + {no: 1, name: "PRIORITY_LOW", localName: "LOW"}, + {no: 2, name: "PRIORITY_HIGH", localName: "HIGH"}, + ], +); + +/** + * @generated from message state.v1.Train + */ +export const Train = proto3.makeMessageType( + "state.v1.Train", + () => [ + { no: 1, name: "train_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "station_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * + * GetTrains : 列車の状態を取得するAPI + * + * @generated from message state.v1.GetTrainsRequest + */ +export const GetTrainsRequest = proto3.makeMessageType( + "state.v1.GetTrainsRequest", + [], +); + +/** + * @generated from message state.v1.GetTrainsResponse + */ +export const GetTrainsResponse = proto3.makeMessageType( + "state.v1.GetTrainsResponse", + () => [ + { no: 1, name: "trains", kind: "message", T: Train, repeated: true }, + ], +); + +/** + * + * UpdateTrainUUID : NFCのUUID紐付けを更新するAPI + * + * @generated from message state.v1.UpdateTrainUUIDRequest + */ +export const UpdateTrainUUIDRequest = proto3.makeMessageType( + "state.v1.UpdateTrainUUIDRequest", + () => [ + { no: 1, name: "train_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ], +); + +/** + * @generated from message state.v1.UpdateTrainUUIDResponse + */ +export const UpdateTrainUUIDResponse = proto3.makeMessageType( + "state.v1.UpdateTrainUUIDResponse", + [], +); + diff --git a/frontend/dashboard/proto/state/v1/train_pb.ts b/frontend/dashboard/proto/state/v1/train_pb.ts new file mode 100644 index 00000000..6027cb6b --- /dev/null +++ b/frontend/dashboard/proto/state/v1/train_pb.ts @@ -0,0 +1,237 @@ +// +//Train Proto +//駅に停車している列車の情報を扱うためのプロトコル + +// @generated by protoc-gen-es v1.4.2 with parameter "target=ts" +// @generated from file state/v1/train.proto (package state.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum state.v1.Priority + */ +export enum Priority { + /** + * @generated from enum value: PRIORITY_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PRIORITY_LOW = 1; + */ + LOW = 1, + + /** + * @generated from enum value: PRIORITY_HIGH = 2; + */ + HIGH = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(Priority) +proto3.util.setEnumType(Priority, "state.v1.Priority", [ + { no: 0, name: "PRIORITY_UNSPECIFIED" }, + { no: 1, name: "PRIORITY_LOW" }, + { no: 2, name: "PRIORITY_HIGH" }, +]); + +/** + * @generated from message state.v1.Train + */ +export class Train extends Message { + /** + * 列車ID(NFCのUUIDと一意に対応している) + * + * @generated from field: string train_id = 1; + */ + trainId = ""; + + /** + * 駅のID + * + * @generated from field: string station_id = 2; + */ + stationId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.Train"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "train_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "station_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Train { + return new Train().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Train { + return new Train().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Train { + return new Train().fromJsonString(jsonString, options); + } + + static equals(a: Train | PlainMessage | undefined, b: Train | PlainMessage | undefined): boolean { + return proto3.util.equals(Train, a, b); + } +} + +/** + * + * GetTrains : 列車の状態を取得するAPI + * + * @generated from message state.v1.GetTrainsRequest + */ +export class GetTrainsRequest extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetTrainsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetTrainsRequest { + return new GetTrainsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetTrainsRequest { + return new GetTrainsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetTrainsRequest { + return new GetTrainsRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetTrainsRequest | PlainMessage | undefined, b: GetTrainsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetTrainsRequest, a, b); + } +} + +/** + * @generated from message state.v1.GetTrainsResponse + */ +export class GetTrainsResponse extends Message { + /** + * @generated from field: repeated state.v1.Train trains = 1; + */ + trains: Train[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.GetTrainsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "trains", kind: "message", T: Train, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetTrainsResponse { + return new GetTrainsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetTrainsResponse { + return new GetTrainsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetTrainsResponse { + return new GetTrainsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetTrainsResponse | PlainMessage | undefined, b: GetTrainsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetTrainsResponse, a, b); + } +} + +/** + * + * UpdateTrainUUID : NFCのUUID紐付けを更新するAPI + * + * @generated from message state.v1.UpdateTrainUUIDRequest + */ +export class UpdateTrainUUIDRequest extends Message { + /** + * 列車ID + * + * @generated from field: string train_id = 1; + */ + trainId = ""; + + /** + * NFCのUUID + * + * @generated from field: string uuid = 2; + */ + uuid = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdateTrainUUIDRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "train_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrainUUIDRequest { + return new UpdateTrainUUIDRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrainUUIDRequest { + return new UpdateTrainUUIDRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateTrainUUIDRequest { + return new UpdateTrainUUIDRequest().fromJsonString(jsonString, options); + } + + static equals(a: UpdateTrainUUIDRequest | PlainMessage | undefined, b: UpdateTrainUUIDRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateTrainUUIDRequest, a, b); + } +} + +/** + * @generated from message state.v1.UpdateTrainUUIDResponse + */ +export class UpdateTrainUUIDResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "state.v1.UpdateTrainUUIDResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrainUUIDResponse { + return new UpdateTrainUUIDResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrainUUIDResponse { + return new UpdateTrainUUIDResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): UpdateTrainUUIDResponse { + return new UpdateTrainUUIDResponse().fromJsonString(jsonString, options); + } + + static equals(a: UpdateTrainUUIDResponse | PlainMessage | undefined, b: UpdateTrainUUIDResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(UpdateTrainUUIDResponse, a, b); + } +} + diff --git a/frontend/dashboard/yarn.lock b/frontend/dashboard/yarn.lock new file mode 100644 index 00000000..1381a240 --- /dev/null +++ b/frontend/dashboard/yarn.lock @@ -0,0 +1,376 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@bufbuild/buf-darwin-arm64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.28.1.tgz#ffe09c8b998d6cc714ab525999fe026b25c952e9" + integrity sha512-nAyvwKkcd8qQTExCZo5MtSRhXLK7e3vzKFKHjXfkveRakSUST2HFlFZAHfErZimN4wBrPTN0V0hNRU8PPjkMpQ== + +"@bufbuild/buf-darwin-x64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.28.1.tgz#03aa18f7961b651679e349a382f71f1bad3dadec" + integrity sha512-b0eT3xd3vX5a5lWAbo5h7FPuf9MsOJI4I39qs4TZnrlZ8BOuPfqzwzijiFf9UCwaX2vR1NQXexIoQ80Ci+fCHw== + +"@bufbuild/buf-linux-aarch64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.28.1.tgz#2af0683dd6a803bdaba7ea92148007393a058705" + integrity sha512-p5h9bZCVLMh8No9/7k7ulXzsFx5P7Lu6DiUMjSJ6aBXPMYo6Xl7r/6L2cQkpsZ53HMtIxCgMYS9a7zoS4K8wIw== + +"@bufbuild/buf-linux-x64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.28.1.tgz#dbac29d39fb4c0a509ebf49fb3a76d481aebe1e0" + integrity sha512-fVJ3DiRigIso06jgEl+JNp59Y5t2pxDHd10d3SA4r+14sXbZ2J7Gy/wBqVXPry4x/jW567KKlvmhg7M5ZBgCQQ== + +"@bufbuild/buf-win32-arm64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.28.1.tgz#69242d904c73368c2735aa9efc338dd1f5864bfa" + integrity sha512-KJiRJpugQRK/jXC46Xjlb68UydWhCZj2jHdWLIwNtgXd1WTJ3LngChZV7Y6pPK08pwBAVz0JYeVbD5IlTCD4TQ== + +"@bufbuild/buf-win32-x64@1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.28.1.tgz#5014fd87ed29fd26c1c6d2e97eba9ac7b8a14e51" + integrity sha512-vMnc+7OVCkmlRWQsgYHgUqiBPRIjD8XeoRyApJ07YZzGs7DkRH4LhvmacJbLd3wORylbn6gLz3pQa8J/M61mzg== + +"@bufbuild/buf@^1.28.1": + version "1.28.1" + resolved "https://registry.yarnpkg.com/@bufbuild/buf/-/buf-1.28.1.tgz#b107bd1b01a676040b1112de9eb94642bea48a08" + integrity sha512-WRDagrf0uBjfV9s5eyrSPJDcdI4A5Q7JMCA4aMrHRR8fo/TTjniDBjJprszhaguqsDkn/LS4QIu92HVFZCrl9A== + optionalDependencies: + "@bufbuild/buf-darwin-arm64" "1.28.1" + "@bufbuild/buf-darwin-x64" "1.28.1" + "@bufbuild/buf-linux-aarch64" "1.28.1" + "@bufbuild/buf-linux-x64" "1.28.1" + "@bufbuild/buf-win32-arm64" "1.28.1" + "@bufbuild/buf-win32-x64" "1.28.1" + +"@bufbuild/connect-web@^0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@bufbuild/connect-web/-/connect-web-0.13.0.tgz#87301c92d49d3c3f9acb99729c2f7505d739aa4a" + integrity sha512-Ys9VFDWYktD9yFQSLOlkpsD42LonDNMCysLCfjXFuxlupYuf4f7qg0zkT5bESyTfqk4xtRDSSGR3xygaj/ONIQ== + dependencies: + "@bufbuild/connect" "0.13.0" + +"@bufbuild/connect@0.13.0": + version "0.13.0" + resolved "https://registry.yarnpkg.com/@bufbuild/connect/-/connect-0.13.0.tgz#97a84a2cac747c7a52d4421a3382d8d165f61c99" + integrity sha512-eZSMbVLyUFtXiZNORgCEvv580xKZeYQdMOWj2i/nxOcpXQcrEzTMTA7SZzWv4k4gveWCOSRoWmYDeOhfWXJv0g== + +"@bufbuild/protobuf@1.4.2", "@bufbuild/protobuf@^1.2.1", "@bufbuild/protobuf@^1.3.3", "@bufbuild/protobuf@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.4.2.tgz#dc4faf21264a47b71a15806616043cb006e80ac8" + integrity sha512-JyEH8Z+OD5Sc2opSg86qMHn1EM1Sa+zj/Tc0ovxdwk56ByVNONJSabuCUbLQp+eKN3rWNfrho0X+3SEqEPXIow== + +"@bufbuild/protoc-gen-connect-web@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@bufbuild/protoc-gen-connect-web/-/protoc-gen-connect-web-0.11.0.tgz#985e12d0acc804a14033916bd2cebf3d88562dd1" + integrity sha512-7GvYkQjN6LP/ixtosI4JBN8eph2kS5XNju9zFwBuJ6aHqfl1sNRkRWG8LEdtTJtyW2R3QypAUyLfpLQf/ZyRVw== + dependencies: + "@bufbuild/protobuf" "^1.2.1" + "@bufbuild/protoplugin" "^1.2.1" + +"@bufbuild/protoc-gen-es@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@bufbuild/protoc-gen-es/-/protoc-gen-es-1.4.2.tgz#00c8b09430dd1154e626da7c247fd6425a1cd41d" + integrity sha512-/It7M2s8H1zTDvUMJu6vhBmtnzeFL2VS6e78RYIY38602pNXDK/vbteKUo4KrG0O07lOPFu87hHZ0Y+w5Ib6iw== + dependencies: + "@bufbuild/protobuf" "^1.4.2" + "@bufbuild/protoplugin" "1.4.2" + +"@bufbuild/protoplugin@1.4.2", "@bufbuild/protoplugin@^1.2.1", "@bufbuild/protoplugin@^1.3.3": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@bufbuild/protoplugin/-/protoplugin-1.4.2.tgz#abf9b0e6a3dc8b52b1d6699d7a1ce5219fa82322" + integrity sha512-5IwGC1ZRD2A+KydGXeaSOErwfILLqVtvMH/RkN+cOoHcQd4EYXFStcF7g7aR+yICRDEEjQVi5tQF/qPGBSr9vg== + dependencies: + "@bufbuild/protobuf" "1.4.2" + "@typescript/vfs" "^1.4.0" + typescript "4.5.2" + +"@connectrpc/connect-web@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@connectrpc/connect-web/-/connect-web-1.1.3.tgz#027922b4f1537ecb1eaaa31ec3a59dd471a65320" + integrity sha512-WfShOZt91duJngqivYF4wJFRbeRa4bF/fPMfDVN0MAYSX3VuaTMn8o9qgKN7tsg2H2ZClyOVQwMkZx6IdcP7Zw== + +"@connectrpc/connect@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@connectrpc/connect/-/connect-1.1.3.tgz#6099789e392bf3d4c3d831f294b1a9ff969703a1" + integrity sha512-AXkbsLQe2Nm7VuoN5nqp05GEb9mPa/f5oFzDqTbHME4i8TghTrlY03uefbhuAq4wjsnfDnmuxHZvn6ndlgXmbg== + +"@connectrpc/protoc-gen-connect-es@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@connectrpc/protoc-gen-connect-es/-/protoc-gen-connect-es-1.1.3.tgz#2472133dce58bbe433b4c10076c85d8f4f6833e3" + integrity sha512-Irt1WM1o45KL0DNz8D8nraNfRrOyZfn7rzRsOyfrwbNzeVO1JV3rELFpARqGAvtVveYBoO9uwYtQ8TKLXsnrng== + dependencies: + "@bufbuild/protobuf" "^1.3.3" + "@bufbuild/protoplugin" "^1.3.3" + +"@next/env@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.0.3.tgz#9a58b296e7ae04ffebce8a4e5bd0f87f71de86bd" + integrity sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA== + +"@next/swc-darwin-arm64@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.3.tgz#b1a0440ffbf69056451947c4aea5b6d887e9fbbc" + integrity sha512-64JbSvi3nbbcEtyitNn2LEDS/hcleAFpHdykpcnrstITFlzFgB/bW0ER5/SJJwUPj+ZPY+z3e+1jAfcczRLVGw== + +"@next/swc-darwin-x64@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.3.tgz#48b527ef7eb5dbdcaf62fd107bc3a78371f36f09" + integrity sha512-RkTf+KbAD0SgYdVn1XzqE/+sIxYGB7NLMZRn9I4Z24afrhUpVJx6L8hsRnIwxz3ERE2NFURNliPjJ2QNfnWicQ== + +"@next/swc-linux-arm64-gnu@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.3.tgz#0a36475a38b2855ab8ea0fe8b56899bc90184c0f" + integrity sha512-3tBWGgz7M9RKLO6sPWC6c4pAw4geujSwQ7q7Si4d6bo0l6cLs4tmO+lnSwFp1Tm3lxwfMk0SgkJT7EdwYSJvcg== + +"@next/swc-linux-arm64-musl@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.3.tgz#25328a9f55baa09fde6364e7e47ade65c655034f" + integrity sha512-v0v8Kb8j8T23jvVUWZeA2D8+izWspeyeDGNaT2/mTHWp7+37fiNfL8bmBWiOmeumXkacM/AB0XOUQvEbncSnHA== + +"@next/swc-linux-x64-gnu@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.3.tgz#594b747e3c8896b2da67bba54fcf8a6b5a410e5e" + integrity sha512-VM1aE1tJKLBwMGtyBR21yy+STfl0MapMQnNrXkxeyLs0GFv/kZqXS5Jw/TQ3TSUnbv0QPDf/X8sDXuMtSgG6eg== + +"@next/swc-linux-x64-musl@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.3.tgz#a02da58fc6ecad8cf5c5a2a96a7f6030ec7f6215" + integrity sha512-64EnmKy18MYFL5CzLaSuUn561hbO1Gk16jM/KHznYP3iCIfF9e3yULtHaMy0D8zbHfxset9LTOv6cuYKJgcOxg== + +"@next/swc-win32-arm64-msvc@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.3.tgz#bf2be23d3ba2ebd0d4a9376a31f783efdb677b48" + integrity sha512-WRDp8QrmsL1bbGtsh5GqQ/KWulmrnMBgbnb+59qNTW1kVi1nG/2ndZLkcbs2GX7NpFLlToLRMWSQXmPzQm4tog== + +"@next/swc-win32-ia32-msvc@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.3.tgz#839f8de85a4bf2c3c69242483ab87cb916427551" + integrity sha512-EKffQeqCrj+t6qFFhIFTRoqb2QwX1mU7iTOvMyLbYw3QtqTw9sMwjykyiMlZlrfm2a4fA84+/aeW+PMg1MjuTg== + +"@next/swc-win32-x64-msvc@14.0.3": + version "14.0.3" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.3.tgz#27b623612b1d0cea6efe0a0d31aa1a335fc99647" + integrity sha512-ERhKPSJ1vQrPiwrs15Pjz/rvDHZmkmvbf/BjPN/UCOI++ODftT0GtasDPi0j+y6PPJi5HsXw+dpRaXUaw4vjuQ== + +"@swc/helpers@0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d" + integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw== + dependencies: + tslib "^2.4.0" + +"@types/node@20.9.2": + version "20.9.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.2.tgz#002815c8e87fe0c9369121c78b52e800fadc0ac6" + integrity sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg== + dependencies: + undici-types "~5.26.4" + +"@types/prop-types@*": + version "15.7.11" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" + integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== + +"@types/react-dom@18.2.15": + version "18.2.15" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.15.tgz#921af67f9ee023ac37ea84b1bc0cc40b898ea522" + integrity sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg== + dependencies: + "@types/react" "*" + +"@types/react@*": + version "18.2.38" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.38.tgz#3605ca41d3daff2c434e0b98d79a2469d4c2dd52" + integrity sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/react@18.2.37": + version "18.2.37" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.37.tgz#0f03af69e463c0f19a356c2660dbca5d19c44cae" + integrity sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/scheduler@*": + version "0.16.7" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.7.tgz#d62f1bd54724c84089f51f9218393930ba4abcf4" + integrity sha512-8g25Nl3AuB1KulTlSUsUhUo/oBgBU6XIXQ+XURpeioEbEJvkO7qI4vDfREv3vJYHHzqXjcAHvoJy4pTtSQNZtA== + +"@typescript/vfs@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.5.0.tgz#ed942922724f9ace8c07c80b006c47e5e3833218" + integrity sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg== + dependencies: + debug "^4.1.1" + +busboy@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + +caniuse-lite@^1.0.30001406: + version "1.0.30001563" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz#aa68a64188903e98f36eb9c56e48fba0c1fe2a32" + integrity sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw== + +client-only@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" + integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== + +csstype@^3.0.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" + integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== + +debug@^4.1.1: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +graceful-fs@^4.1.2: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +loose-envify@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nanoid@^3.3.6: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + +next@14.0.3: + version "14.0.3" + resolved "https://registry.yarnpkg.com/next/-/next-14.0.3.tgz#8d801a08eaefe5974203d71092fccc463103a03f" + integrity sha512-AbYdRNfImBr3XGtvnwOxq8ekVCwbFTv/UJoLwmaX89nk9i051AEY4/HAWzU0YpaTDw8IofUpmuIlvzWF13jxIw== + dependencies: + "@next/env" "14.0.3" + "@swc/helpers" "0.5.2" + busboy "1.6.0" + caniuse-lite "^1.0.30001406" + postcss "8.4.31" + styled-jsx "5.1.1" + watchpack "2.4.0" + optionalDependencies: + "@next/swc-darwin-arm64" "14.0.3" + "@next/swc-darwin-x64" "14.0.3" + "@next/swc-linux-arm64-gnu" "14.0.3" + "@next/swc-linux-arm64-musl" "14.0.3" + "@next/swc-linux-x64-gnu" "14.0.3" + "@next/swc-linux-x64-musl" "14.0.3" + "@next/swc-win32-arm64-msvc" "14.0.3" + "@next/swc-win32-ia32-msvc" "14.0.3" + "@next/swc-win32-x64-msvc" "14.0.3" + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +postcss@8.4.31: + version "8.4.31" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" + integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== + dependencies: + nanoid "^3.3.6" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +react-dom@18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.0" + +react@18.2.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== + dependencies: + loose-envify "^1.1.0" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +styled-jsx@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== + dependencies: + client-only "0.0.1" + +tslib@^2.4.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + +typescript@4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998" + integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw== + +typescript@5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +watchpack@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" diff --git a/go.mod b/go.mod index d5b4d466..8f423c6b 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,12 @@ module github.com/ueckoken/plarail2023 go 1.21.4 require ( - connectrpc.com/connect v1.12.0 github.com/bufbuild/connect-go v1.10.0 github.com/eclipse/paho.mqtt.golang v1.4.3 github.com/go-chi/chi/v5 v5.0.10 github.com/go-chi/httplog/v2 v2.0.7 github.com/joho/godotenv v1.5.1 + github.com/rs/cors v1.10.1 go.mongodb.org/mongo-driver v1.13.0 golang.org/x/net v0.18.0 golang.org/x/sync v0.5.0 diff --git a/go.sum b/go.sum index 2eb2420b..a16577d0 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -connectrpc.com/connect v1.12.0 h1:HwKdOY0lGhhoHdsza+hW55aqHEC64pYpObRNoAgn70g= -connectrpc.com/connect v1.12.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= github.com/bufbuild/connect-go v1.10.0 h1:QAJ3G9A1OYQW2Jbk3DeoJbkCxuKArrvZgDt47mjdTbg= github.com/bufbuild/connect-go v1.10.0/go.mod h1:CAIePUgkDR5pAFaylSMtNK45ANQjp9JvpluG20rhpV8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -84,6 +82,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a4c774d..183824d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,18 @@ importers: frontend/dashboard: dependencies: + '@bufbuild/connect-web': + specifier: ^0.13.0 + version: 0.13.0(@bufbuild/protobuf@1.4.2) + '@bufbuild/protobuf': + specifier: ^1.4.2 + version: 1.4.2 + '@connectrpc/connect': + specifier: ^1.1.3 + version: 1.1.3(@bufbuild/protobuf@1.4.2) + '@connectrpc/connect-web': + specifier: ^1.1.3 + version: 1.1.3(@bufbuild/protobuf@1.4.2)(@connectrpc/connect@1.1.3) next: specifier: 14.0.3 version: 14.0.3(react-dom@18.2.0)(react@18.2.0) @@ -18,18 +30,30 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) devDependencies: + '@bufbuild/buf': + specifier: ^1.28.1 + version: 1.28.1 + '@bufbuild/protoc-gen-connect-web': + specifier: ^0.11.0 + version: 0.11.0(@bufbuild/protoc-gen-es@1.4.2) + '@bufbuild/protoc-gen-es': + specifier: ^1.4.2 + version: 1.4.2(@bufbuild/protobuf@1.4.2) + '@connectrpc/protoc-gen-connect-es': + specifier: ^1.1.3 + version: 1.1.3(@bufbuild/protoc-gen-es@1.4.2)(@connectrpc/connect@1.1.3) '@types/node': - specifier: 20.9.3 - version: 20.9.3 + specifier: 20.9.2 + version: 20.9.2 '@types/react': - specifier: 18.2.38 - version: 18.2.38 + specifier: 18.2.37 + version: 18.2.37 '@types/react-dom': - specifier: 18.2.16 - version: 18.2.16 + specifier: 18.2.15 + version: 18.2.15 typescript: - specifier: 5.3.2 - version: 5.3.2 + specifier: 5.2.2 + version: 5.2.2 frontend/editor: dependencies: @@ -89,6 +113,181 @@ importers: packages: + /@bufbuild/buf-darwin-arm64@1.28.1: + resolution: {integrity: sha512-nAyvwKkcd8qQTExCZo5MtSRhXLK7e3vzKFKHjXfkveRakSUST2HFlFZAHfErZimN4wBrPTN0V0hNRU8PPjkMpQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-darwin-x64@1.28.1: + resolution: {integrity: sha512-b0eT3xd3vX5a5lWAbo5h7FPuf9MsOJI4I39qs4TZnrlZ8BOuPfqzwzijiFf9UCwaX2vR1NQXexIoQ80Ci+fCHw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-linux-aarch64@1.28.1: + resolution: {integrity: sha512-p5h9bZCVLMh8No9/7k7ulXzsFx5P7Lu6DiUMjSJ6aBXPMYo6Xl7r/6L2cQkpsZ53HMtIxCgMYS9a7zoS4K8wIw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-linux-x64@1.28.1: + resolution: {integrity: sha512-fVJ3DiRigIso06jgEl+JNp59Y5t2pxDHd10d3SA4r+14sXbZ2J7Gy/wBqVXPry4x/jW567KKlvmhg7M5ZBgCQQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-win32-arm64@1.28.1: + resolution: {integrity: sha512-KJiRJpugQRK/jXC46Xjlb68UydWhCZj2jHdWLIwNtgXd1WTJ3LngChZV7Y6pPK08pwBAVz0JYeVbD5IlTCD4TQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf-win32-x64@1.28.1: + resolution: {integrity: sha512-vMnc+7OVCkmlRWQsgYHgUqiBPRIjD8XeoRyApJ07YZzGs7DkRH4LhvmacJbLd3wORylbn6gLz3pQa8J/M61mzg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@bufbuild/buf@1.28.1: + resolution: {integrity: sha512-WRDagrf0uBjfV9s5eyrSPJDcdI4A5Q7JMCA4aMrHRR8fo/TTjniDBjJprszhaguqsDkn/LS4QIu92HVFZCrl9A==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@bufbuild/buf-darwin-arm64': 1.28.1 + '@bufbuild/buf-darwin-x64': 1.28.1 + '@bufbuild/buf-linux-aarch64': 1.28.1 + '@bufbuild/buf-linux-x64': 1.28.1 + '@bufbuild/buf-win32-arm64': 1.28.1 + '@bufbuild/buf-win32-x64': 1.28.1 + dev: true + + /@bufbuild/connect-web@0.13.0(@bufbuild/protobuf@1.4.2): + resolution: {integrity: sha512-Ys9VFDWYktD9yFQSLOlkpsD42LonDNMCysLCfjXFuxlupYuf4f7qg0zkT5bESyTfqk4xtRDSSGR3xygaj/ONIQ==} + deprecated: Connect has moved to its own org @connectrpc and has a stable v1. Run `npx @connectrpc/connect-migrate@latest` to update. See https://github.com/connectrpc/connect-es/releases/tag/v0.13.1 for details. + peerDependencies: + '@bufbuild/protobuf': ^1.2.1 + dependencies: + '@bufbuild/connect': 0.13.0(@bufbuild/protobuf@1.4.2) + '@bufbuild/protobuf': 1.4.2 + dev: false + + /@bufbuild/connect@0.13.0(@bufbuild/protobuf@1.4.2): + resolution: {integrity: sha512-eZSMbVLyUFtXiZNORgCEvv580xKZeYQdMOWj2i/nxOcpXQcrEzTMTA7SZzWv4k4gveWCOSRoWmYDeOhfWXJv0g==} + deprecated: Connect has moved to its own org @connectrpc and has a stable v1. Run `npx @connectrpc/connect-migrate@latest` to update. See https://github.com/connectrpc/connect-es/releases/tag/v0.13.1 for details. + peerDependencies: + '@bufbuild/protobuf': ^1.2.1 + dependencies: + '@bufbuild/protobuf': 1.4.2 + dev: false + + /@bufbuild/protobuf@1.4.2: + resolution: {integrity: sha512-JyEH8Z+OD5Sc2opSg86qMHn1EM1Sa+zj/Tc0ovxdwk56ByVNONJSabuCUbLQp+eKN3rWNfrho0X+3SEqEPXIow==} + + /@bufbuild/protoc-gen-connect-web@0.11.0(@bufbuild/protoc-gen-es@1.4.2): + resolution: {integrity: sha512-7GvYkQjN6LP/ixtosI4JBN8eph2kS5XNju9zFwBuJ6aHqfl1sNRkRWG8LEdtTJtyW2R3QypAUyLfpLQf/ZyRVw==} + engines: {node: '>=16.0.0'} + deprecated: This package is no longer supported. Please switch to use https://www.npmjs.com/package/@bufbuild/protoc-gen-connect-es. Details for switching can be found at https://github.com/bufbuild/connect-es/discussions/647 + hasBin: true + peerDependencies: + '@bufbuild/connect': 0.11.0 + '@bufbuild/protoc-gen-es': ^1.2.1 + peerDependenciesMeta: + '@bufbuild/connect': + optional: true + '@bufbuild/protoc-gen-es': + optional: true + dependencies: + '@bufbuild/protobuf': 1.4.2 + '@bufbuild/protoc-gen-es': 1.4.2(@bufbuild/protobuf@1.4.2) + '@bufbuild/protoplugin': 1.4.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@bufbuild/protoc-gen-es@1.4.2(@bufbuild/protobuf@1.4.2): + resolution: {integrity: sha512-/It7M2s8H1zTDvUMJu6vhBmtnzeFL2VS6e78RYIY38602pNXDK/vbteKUo4KrG0O07lOPFu87hHZ0Y+w5Ib6iw==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + '@bufbuild/protobuf': 1.4.2 + peerDependenciesMeta: + '@bufbuild/protobuf': + optional: true + dependencies: + '@bufbuild/protobuf': 1.4.2 + '@bufbuild/protoplugin': 1.4.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@bufbuild/protoplugin@1.4.2: + resolution: {integrity: sha512-5IwGC1ZRD2A+KydGXeaSOErwfILLqVtvMH/RkN+cOoHcQd4EYXFStcF7g7aR+yICRDEEjQVi5tQF/qPGBSr9vg==} + dependencies: + '@bufbuild/protobuf': 1.4.2 + '@typescript/vfs': 1.5.0 + typescript: 4.5.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@connectrpc/connect-web@1.1.3(@bufbuild/protobuf@1.4.2)(@connectrpc/connect@1.1.3): + resolution: {integrity: sha512-WfShOZt91duJngqivYF4wJFRbeRa4bF/fPMfDVN0MAYSX3VuaTMn8o9qgKN7tsg2H2ZClyOVQwMkZx6IdcP7Zw==} + peerDependencies: + '@bufbuild/protobuf': ^1.3.3 + '@connectrpc/connect': 1.1.3 + dependencies: + '@bufbuild/protobuf': 1.4.2 + '@connectrpc/connect': 1.1.3(@bufbuild/protobuf@1.4.2) + dev: false + + /@connectrpc/connect@1.1.3(@bufbuild/protobuf@1.4.2): + resolution: {integrity: sha512-AXkbsLQe2Nm7VuoN5nqp05GEb9mPa/f5oFzDqTbHME4i8TghTrlY03uefbhuAq4wjsnfDnmuxHZvn6ndlgXmbg==} + peerDependencies: + '@bufbuild/protobuf': ^1.3.3 + dependencies: + '@bufbuild/protobuf': 1.4.2 + + /@connectrpc/protoc-gen-connect-es@1.1.3(@bufbuild/protoc-gen-es@1.4.2)(@connectrpc/connect@1.1.3): + resolution: {integrity: sha512-Irt1WM1o45KL0DNz8D8nraNfRrOyZfn7rzRsOyfrwbNzeVO1JV3rELFpARqGAvtVveYBoO9uwYtQ8TKLXsnrng==} + engines: {node: '>=16.0.0'} + hasBin: true + peerDependencies: + '@bufbuild/protoc-gen-es': ^1.3.3 + '@connectrpc/connect': 1.1.3 + peerDependenciesMeta: + '@bufbuild/protoc-gen-es': + optional: true + '@connectrpc/connect': + optional: true + dependencies: + '@bufbuild/protobuf': 1.4.2 + '@bufbuild/protoc-gen-es': 1.4.2(@bufbuild/protobuf@1.4.2) + '@bufbuild/protoplugin': 1.4.2 + '@connectrpc/connect': 1.1.3(@bufbuild/protobuf@1.4.2) + transitivePeerDependencies: + - supports-color + dev: true + /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -263,8 +462,8 @@ packages: '@types/node': 20.9.3 dev: true - /@types/connect-history-api-fallback@1.5.3: - resolution: {integrity: sha512-6mfQ6iNvhSKCZJoY6sIG3m0pKkdUcweVNOLuBBKvoWGzl2yRxOJcYOTRyLKt3nxXvBLJWa6QkW//tgbIwJehmA==} + /@types/connect-history-api-fallback@1.5.4: + resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} dependencies: '@types/express-serve-static-core': 4.17.41 '@types/node': 20.9.3 @@ -334,8 +533,8 @@ packages: resolution: {integrity: sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw==} dev: true - /@types/node-forge@1.3.9: - resolution: {integrity: sha512-meK88cx/sTalPSLSoCzkiUB4VPIFHmxtXm5FaaqRDqBX2i/Sy8bJ4odsan0b20RBjPh06dAQ+OTTdnyQyhJZyQ==} + /@types/node-forge@1.3.10: + resolution: {integrity: sha512-y6PJDYN4xYBxwd22l+OVH35N+1fCYWiuC3aiP2SlXVE6Lo7SS+rSx9r89hLxrP4pn6n1lBGhHJ12pj3F3Mpttw==} dependencies: '@types/node': 20.9.3 dev: true @@ -344,14 +543,20 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: false + /@types/node@20.9.2: + resolution: {integrity: sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/node@20.9.3: resolution: {integrity: sha512-nk5wXLAXGBKfrhLB0cyHGbSqopS+nz0BUgZkUQqSHSSgdee0kssp1IAqlQOu333bW+gMNs2QREx7iynm19Abxw==} dependencies: undici-types: 5.26.5 dev: true - /@types/prop-types@15.7.10: - resolution: {integrity: sha512-mxSnDQxPqsZxmeShFH+uwQ4kO4gcJcGahjjMFeLbKE95IAZiiZyiEepGZjtXJ7hN/yfu0bu9xN2ajcU0JcxX6A==} + /@types/prop-types@15.7.11: + resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} /@types/qs@6.9.10: resolution: {integrity: sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==} @@ -361,6 +566,12 @@ packages: resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} dev: true + /@types/react-dom@18.2.15: + resolution: {integrity: sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg==} + dependencies: + '@types/react': 18.2.38 + dev: true + /@types/react-dom@18.2.16: resolution: {integrity: sha512-766c37araZ9vxtYs25gvY2wNdFWsT2ZiUvOd0zMhTaoGj6B911N8CKQWgXXJoPMLF3J82thpRqQA7Rf3rBwyJw==} dependencies: @@ -373,19 +584,27 @@ packages: '@types/react': 18.2.38 dev: false + /@types/react@18.2.37: + resolution: {integrity: sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw==} + dependencies: + '@types/prop-types': 15.7.11 + '@types/scheduler': 0.16.7 + csstype: 3.1.2 + dev: true + /@types/react@18.2.38: resolution: {integrity: sha512-cBBXHzuPtQK6wNthuVMV6IjHAFkdl/FOPFIlkd81/Cd1+IqkHu/A+w4g43kaQQoYHik/ruaQBDL72HyCy1vuMw==} dependencies: - '@types/prop-types': 15.7.10 - '@types/scheduler': 0.16.6 + '@types/prop-types': 15.7.11 + '@types/scheduler': 0.16.7 csstype: 3.1.2 /@types/retry@0.12.0: resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} dev: true - /@types/scheduler@0.16.6: - resolution: {integrity: sha512-Vlktnchmkylvc9SnwwwozTv04L/e1NykF5vgoQ0XTmI8DD+wxfjQuHuvHS3p0r2jz2x2ghPs2h1FVeDirIteWA==} + /@types/scheduler@0.16.7: + resolution: {integrity: sha512-8g25Nl3AuB1KulTlSUsUhUo/oBgBU6XIXQ+XURpeioEbEJvkO7qI4vDfREv3vJYHHzqXjcAHvoJy4pTtSQNZtA==} /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} @@ -414,12 +633,20 @@ packages: '@types/node': 20.9.3 dev: true - /@types/ws@8.5.9: - resolution: {integrity: sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==} + /@types/ws@8.5.10: + resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: '@types/node': 20.9.3 dev: true + /@typescript/vfs@1.5.0: + resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + /@webassemblyjs/ast@1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -776,8 +1003,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001561 - electron-to-chromium: 1.4.578 + caniuse-lite: 1.0.30001563 + electron-to-chromium: 1.4.589 node-releases: 2.0.13 update-browserslist-db: 1.0.13(browserslist@4.22.1) dev: true @@ -818,8 +1045,8 @@ packages: set-function-length: 1.1.1 dev: true - /caniuse-lite@1.0.30001561: - resolution: {integrity: sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==} + /caniuse-lite@1.0.30001563: + resolution: {integrity: sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==} /canvas@2.11.2: resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} @@ -894,8 +1121,8 @@ packages: resolution: {integrity: sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==} dev: false - /component-emitter@1.3.0: - resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} + /component-emitter@1.3.1: + resolution: {integrity: sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==} dev: false /component-inherit@0.0.3: @@ -1086,8 +1313,8 @@ packages: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true - /electron-to-chromium@1.4.578: - resolution: {integrity: sha512-V0ZhSu1BQZKfG0yNEL6Dadzik8E1vAzfpVOapdSiT9F6yapEJ3Bk+4tZ4SMPdWiUchCgnM/ByYtBzp5ntzDMIA==} + /electron-to-chromium@1.4.589: + resolution: {integrity: sha512-zF6y5v/YfoFIgwf2dDfAqVlPPsyQeWNpEWXbAlDUS8Ax4Z2VoiiZpAPC0Jm9hXEkJm2vIZpwB6rc4KnLTQffbQ==} dev: true /emoji-regex@8.0.0: @@ -1102,7 +1329,7 @@ packages: /engine.io-client@3.5.3: resolution: {integrity: sha512-qsgyc/CEhJ6cgMUwxRRtOndGVhIu5hpL5tR4umSpmX/MvkFoIxUTM7oFMDQumHNzlNLwSVy6qhstFPoWTf7dOw==} dependencies: - component-emitter: 1.3.0 + component-emitter: 1.3.1 component-inherit: 0.0.3 debug: 3.1.0 engine.io-parser: 2.2.1 @@ -1148,8 +1375,8 @@ packages: hasBin: true dev: true - /es-module-lexer@1.3.1: - resolution: {integrity: sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==} + /es-module-lexer@1.4.1: + resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} dev: true /escalade@3.1.1: @@ -1922,7 +2149,7 @@ packages: '@next/env': 14.0.3 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001561 + caniuse-lite: 1.0.30001563 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -2365,7 +2592,7 @@ packages: resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} engines: {node: '>=10'} dependencies: - '@types/node-forge': 1.3.9 + '@types/node-forge': 1.3.10 node-forge: 1.3.1 dev: true @@ -2529,7 +2756,7 @@ packages: dependencies: backo2: 1.0.2 component-bind: 1.0.0 - component-emitter: 1.3.0 + component-emitter: 1.3.1 debug: 3.1.0 engine.io-client: 3.5.3 has-binary2: 1.0.3 @@ -2547,7 +2774,7 @@ packages: /socket.io-parser@3.3.3: resolution: {integrity: sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==} dependencies: - component-emitter: 1.3.0 + component-emitter: 1.3.1 debug: 3.1.0 isarray: 2.0.1 transitivePeerDependencies: @@ -2779,6 +3006,18 @@ packages: mime-types: 2.1.35 dev: true + /typescript@4.5.2: + resolution: {integrity: sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /typescript@5.3.2: resolution: {integrity: sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==} engines: {node: '>=14.17'} @@ -2908,12 +3147,12 @@ packages: optional: true dependencies: '@types/bonjour': 3.5.13 - '@types/connect-history-api-fallback': 1.5.3 + '@types/connect-history-api-fallback': 1.5.4 '@types/express': 4.17.21 '@types/serve-index': 1.9.4 '@types/serve-static': 1.15.5 '@types/sockjs': 0.3.36 - '@types/ws': 8.5.9 + '@types/ws': 8.5.10 ansi-html-community: 0.0.8 bonjour-service: 1.1.1 chokidar: 3.5.3 @@ -2980,7 +3219,7 @@ packages: browserslist: 4.22.1 chrome-trace-event: 1.0.3 enhanced-resolve: 5.15.0 - es-module-lexer: 1.3.1 + es-module-lexer: 1.4.1 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 diff --git a/proto/Makefile b/proto/Makefile index 7b8616a7..5fdfaa03 100644 --- a/proto/Makefile +++ b/proto/Makefile @@ -1,6 +1,3 @@ buf: rm -Rf ../backend/spec - buf generate - mkdir -p ../backend/spec - cd ../backend/spec && go mod init github.com/ueckoken/plarail2023/backend/spec - cd ../backend/spec && go mod tidy \ No newline at end of file + buf generate \ No newline at end of file diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 264bb227..64451ac0 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -11,4 +11,14 @@ plugins: - plugin: connect-go out: ../backend/spec opt: - - paths=source_relative \ No newline at end of file + - paths=source_relative + - plugin: es + path: ../frontend/dashboard/node_modules/.bin/protoc-gen-es + out: ../frontend/dashboard/proto + opt: + - target=dts+js + - plugin: connect-es + path: ../frontend/dashboard/node_modules/.bin/protoc-gen-connect-web + out: ../frontend/dashboard/proto + opt: + - target=dts+js