From f2496fa5814c23d246eb777c79cd6f49034b8ecc Mon Sep 17 00:00:00 2001 From: Koichi Hirachi Date: Fri, 24 Nov 2023 19:19:29 +0900 Subject: [PATCH] add --- .../dashboard/proto/state/v1/block_pb.d.ts | 163 ------------ frontend/dashboard/proto/state/v1/block_pb.js | 78 ------ frontend/dashboard/proto/state/v1/block_pb.ts | 233 ----------------- .../dashboard/proto/state/v1/point_pb.d.ts | 161 ------------ frontend/dashboard/proto/state/v1/point_pb.js | 76 ------ frontend/dashboard/proto/state/v1/point_pb.ts | 231 ----------------- .../proto/state/v1/state_connectweb.d.ts | 113 --------- .../proto/state/v1/state_connectweb.js | 113 --------- .../proto/state/v1/state_connectweb.ts | 104 -------- .../dashboard/proto/state/v1/stop_pb.d.ts | 161 ------------ frontend/dashboard/proto/state/v1/stop_pb.js | 76 ------ frontend/dashboard/proto/state/v1/stop_pb.ts | 231 ----------------- .../dashboard/proto/state/v1/train_pb.d.ts | 231 ----------------- frontend/dashboard/proto/state/v1/train_pb.js | 101 -------- frontend/dashboard/proto/state/v1/train_pb.ts | 237 ------------------ .../src/app/{test => debug}/page.tsx | 7 +- frontend/dashboard/src/components/Client.tsx | 0 .../src/components/debug/TrainList.tsx | 21 ++ .../dashboard/src/components/debug/index.tsx | 0 19 files changed, 27 insertions(+), 2310 deletions(-) delete mode 100644 frontend/dashboard/proto/state/v1/block_pb.d.ts delete mode 100644 frontend/dashboard/proto/state/v1/block_pb.js delete mode 100644 frontend/dashboard/proto/state/v1/block_pb.ts delete mode 100644 frontend/dashboard/proto/state/v1/point_pb.d.ts delete mode 100644 frontend/dashboard/proto/state/v1/point_pb.js delete mode 100644 frontend/dashboard/proto/state/v1/point_pb.ts delete mode 100644 frontend/dashboard/proto/state/v1/state_connectweb.d.ts delete mode 100644 frontend/dashboard/proto/state/v1/state_connectweb.js delete mode 100644 frontend/dashboard/proto/state/v1/state_connectweb.ts delete mode 100644 frontend/dashboard/proto/state/v1/stop_pb.d.ts delete mode 100644 frontend/dashboard/proto/state/v1/stop_pb.js delete mode 100644 frontend/dashboard/proto/state/v1/stop_pb.ts delete mode 100644 frontend/dashboard/proto/state/v1/train_pb.d.ts delete mode 100644 frontend/dashboard/proto/state/v1/train_pb.js delete mode 100644 frontend/dashboard/proto/state/v1/train_pb.ts rename frontend/dashboard/src/app/{test => debug}/page.tsx (87%) create mode 100644 frontend/dashboard/src/components/Client.tsx create mode 100644 frontend/dashboard/src/components/debug/TrainList.tsx create mode 100644 frontend/dashboard/src/components/debug/index.tsx diff --git a/frontend/dashboard/proto/state/v1/block_pb.d.ts b/frontend/dashboard/proto/state/v1/block_pb.d.ts deleted file mode 100644 index 7e4a370..0000000 --- a/frontend/dashboard/proto/state/v1/block_pb.d.ts +++ /dev/null @@ -1,163 +0,0 @@ -// -//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 deleted file mode 100644 index 5c9843a..0000000 --- a/frontend/dashboard/proto/state/v1/block_pb.js +++ /dev/null @@ -1,78 +0,0 @@ -// -//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 deleted file mode 100644 index f5527ee..0000000 --- a/frontend/dashboard/proto/state/v1/block_pb.ts +++ /dev/null @@ -1,233 +0,0 @@ -// -//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 deleted file mode 100644 index 3549e61..0000000 --- a/frontend/dashboard/proto/state/v1/point_pb.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// -//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 deleted file mode 100644 index 623ba2e..0000000 --- a/frontend/dashboard/proto/state/v1/point_pb.js +++ /dev/null @@ -1,76 +0,0 @@ -// -//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 deleted file mode 100644 index 5735423..0000000 --- a/frontend/dashboard/proto/state/v1/point_pb.ts +++ /dev/null @@ -1,231 +0,0 @@ -// -//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 deleted file mode 100644 index ce3b061..0000000 --- a/frontend/dashboard/proto/state/v1/state_connectweb.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -// @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 { AddTrainRequest, AddTrainResponse, GetTrainsRequest, GetTrainsResponse, UpdateTrainRequest, UpdateTrainResponse } 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.AddTrain - */ - readonly addTrain: { - readonly name: "AddTrain", - readonly I: typeof AddTrainRequest, - readonly O: typeof AddTrainResponse, - readonly kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.UpdateTrain - */ - readonly updateTrain: { - readonly name: "UpdateTrain", - readonly I: typeof UpdateTrainRequest, - readonly O: typeof UpdateTrainResponse, - readonly kind: MethodKind.Unary, - }, - } -}; - diff --git a/frontend/dashboard/proto/state/v1/state_connectweb.js b/frontend/dashboard/proto/state/v1/state_connectweb.js deleted file mode 100644 index 1f4e198..0000000 --- a/frontend/dashboard/proto/state/v1/state_connectweb.js +++ /dev/null @@ -1,113 +0,0 @@ -// @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 { AddTrainRequest, AddTrainResponse, GetTrainsRequest, GetTrainsResponse, UpdateTrainRequest, UpdateTrainResponse } 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.AddTrain - */ - addTrain: { - name: "AddTrain", - I: AddTrainRequest, - O: AddTrainResponse, - kind: MethodKind.Unary, - }, - /** - * @generated from rpc state.v1.StateManagerService.UpdateTrain - */ - updateTrain: { - name: "UpdateTrain", - I: UpdateTrainRequest, - O: UpdateTrainResponse, - kind: MethodKind.Unary, - }, - } -}; - diff --git a/frontend/dashboard/proto/state/v1/state_connectweb.ts b/frontend/dashboard/proto/state/v1/state_connectweb.ts deleted file mode 100644 index 242d032..0000000 --- a/frontend/dashboard/proto/state/v1/state_connectweb.ts +++ /dev/null @@ -1,104 +0,0 @@ -// @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 deleted file mode 100644 index bdb5b92..0000000 --- a/frontend/dashboard/proto/state/v1/stop_pb.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// -//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 deleted file mode 100644 index caf0be2..0000000 --- a/frontend/dashboard/proto/state/v1/stop_pb.js +++ /dev/null @@ -1,76 +0,0 @@ -// -//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 deleted file mode 100644 index fccb87e..0000000 --- a/frontend/dashboard/proto/state/v1/stop_pb.ts +++ /dev/null @@ -1,231 +0,0 @@ -// -//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 deleted file mode 100644 index 0bfa21b..0000000 --- a/frontend/dashboard/proto/state/v1/train_pb.d.ts +++ /dev/null @@ -1,231 +0,0 @@ -// -//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; - - /** - * 駅 or 閉塞のID - * - * @generated from field: string position_id = 2; - */ - positionId: string; - - /** - * 列車の優先度 - * - * @generated from field: state.v1.Priority priority = 3; - */ - priority: Priority; - - /** - * NFCのUUID - * - * @generated from field: string uuid = 4; - */ - uuid: string; - - /** - * 行き先 - * - * @generated from field: string destination = 5; - */ - destination: 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; -} - -/** - * - * Add Train : 列車を追加するAPI - * - * @generated from message state.v1.AddTrainRequest - */ -export declare class AddTrainRequest extends Message { - /** - * @generated from field: state.v1.Train train = 1; - */ - train?: Train; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "state.v1.AddTrainRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddTrainRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddTrainRequest; - - static fromJsonString(jsonString: string, options?: Partial): AddTrainRequest; - - static equals(a: AddTrainRequest | PlainMessage | undefined, b: AddTrainRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message state.v1.AddTrainResponse - */ -export declare class AddTrainResponse extends Message { - /** - * @generated from field: state.v1.Train train = 1; - */ - train?: Train; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "state.v1.AddTrainResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AddTrainResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): AddTrainResponse; - - static fromJsonString(jsonString: string, options?: Partial): AddTrainResponse; - - static equals(a: AddTrainResponse | PlainMessage | undefined, b: AddTrainResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message state.v1.UpdateTrainRequest - */ -export declare class UpdateTrainRequest extends Message { - /** - * @generated from field: state.v1.Train train = 1; - */ - train?: Train; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "state.v1.UpdateTrainRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrainRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrainRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateTrainRequest; - - static equals(a: UpdateTrainRequest | PlainMessage | undefined, b: UpdateTrainRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message state.v1.UpdateTrainResponse - */ -export declare class UpdateTrainResponse extends Message { - /** - * @generated from field: state.v1.Train train = 1; - */ - train?: Train; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "state.v1.UpdateTrainResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateTrainResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateTrainResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateTrainResponse; - - static equals(a: UpdateTrainResponse | PlainMessage | undefined, b: UpdateTrainResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/dashboard/proto/state/v1/train_pb.js b/frontend/dashboard/proto/state/v1/train_pb.js deleted file mode 100644 index a8b6149..0000000 --- a/frontend/dashboard/proto/state/v1/train_pb.js +++ /dev/null @@ -1,101 +0,0 @@ -// -//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: "position_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "priority", kind: "enum", T: proto3.getEnumType(Priority) }, - { no: 4, name: "uuid", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "destination", 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 }, - ], -); - -/** - * - * Add Train : 列車を追加するAPI - * - * @generated from message state.v1.AddTrainRequest - */ -export const AddTrainRequest = proto3.makeMessageType( - "state.v1.AddTrainRequest", - () => [ - { no: 1, name: "train", kind: "message", T: Train }, - ], -); - -/** - * @generated from message state.v1.AddTrainResponse - */ -export const AddTrainResponse = proto3.makeMessageType( - "state.v1.AddTrainResponse", - () => [ - { no: 1, name: "train", kind: "message", T: Train }, - ], -); - -/** - * @generated from message state.v1.UpdateTrainRequest - */ -export const UpdateTrainRequest = proto3.makeMessageType( - "state.v1.UpdateTrainRequest", - () => [ - { no: 1, name: "train", kind: "message", T: Train }, - ], -); - -/** - * @generated from message state.v1.UpdateTrainResponse - */ -export const UpdateTrainResponse = proto3.makeMessageType( - "state.v1.UpdateTrainResponse", - () => [ - { no: 1, name: "train", kind: "message", T: Train }, - ], -); - diff --git a/frontend/dashboard/proto/state/v1/train_pb.ts b/frontend/dashboard/proto/state/v1/train_pb.ts deleted file mode 100644 index 6027cb6..0000000 --- a/frontend/dashboard/proto/state/v1/train_pb.ts +++ /dev/null @@ -1,237 +0,0 @@ -// -//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/src/app/test/page.tsx b/frontend/dashboard/src/app/debug/page.tsx similarity index 87% rename from frontend/dashboard/src/app/test/page.tsx rename to frontend/dashboard/src/app/debug/page.tsx index 1db5e65..7b5aadd 100644 --- a/frontend/dashboard/src/app/test/page.tsx +++ b/frontend/dashboard/src/app/debug/page.tsx @@ -3,6 +3,7 @@ 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"; +import { useQuery } from '@tanstack/react-query'; export default function Test() { const transport = createConnectTransport({ @@ -19,10 +20,14 @@ export default function Test() { })(); }; + const {trains} = + return (
-

Test

+

デバッグ画面

+ + {}
); } diff --git a/frontend/dashboard/src/components/Client.tsx b/frontend/dashboard/src/components/Client.tsx new file mode 100644 index 0000000..e69de29 diff --git a/frontend/dashboard/src/components/debug/TrainList.tsx b/frontend/dashboard/src/components/debug/TrainList.tsx new file mode 100644 index 0000000..c797e0c --- /dev/null +++ b/frontend/dashboard/src/components/debug/TrainList.tsx @@ -0,0 +1,21 @@ +import {useQuery} from "@tanstack/react-query"; +import {getTrains} from "@/proto/state/v1/state-StateManagerService_connectquery" +import {FC} from "react"; + +type Props = { + userId: string; +}; + +export const TrainList: FC = ({userId}) => { + const {isLoading, isError, error, data} = useQuery( + getTrains.useQuery({userId}) + ); + + return ( +
+ {isLoading &&

読み込み中...

} + {isError &&

{error?.message}

} + {!isLoading && !isError && data != null &&

{data?.trains.length}

} +
+ ); +}; diff --git a/frontend/dashboard/src/components/debug/index.tsx b/frontend/dashboard/src/components/debug/index.tsx new file mode 100644 index 0000000..e69de29