72 lines
2.0 KiB
TypeScript
72 lines
2.0 KiB
TypeScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-ts_proto v2.11.0
|
|
// protoc v6.33.4
|
|
// source: seat.proto
|
|
|
|
/* eslint-disable */
|
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
import { Observable } from "rxjs";
|
|
|
|
export const protobufPackage = "seat.v1";
|
|
|
|
export interface GetSeatRequest {
|
|
id: string;
|
|
}
|
|
|
|
export interface GetSeatResponse {
|
|
seat: Seat | undefined;
|
|
}
|
|
|
|
export interface ListSeatsByHallRequest {
|
|
hallId: string;
|
|
screeningId: string;
|
|
}
|
|
|
|
export interface ListSeatsByHallResponse {
|
|
seats: Seat[];
|
|
}
|
|
|
|
export interface Seat {
|
|
id: string;
|
|
row: number;
|
|
number: number;
|
|
price: number;
|
|
status: string;
|
|
type: string;
|
|
hallId: string;
|
|
}
|
|
|
|
export const SEAT_V1_PACKAGE_NAME = "seat.v1";
|
|
|
|
export interface SeatServiceClient {
|
|
getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
|
|
|
|
listSeatsByHall(request: ListSeatsByHallRequest): Observable<ListSeatsByHallResponse>;
|
|
}
|
|
|
|
export interface SeatServiceController {
|
|
getSeat(request: GetSeatRequest): Promise<GetSeatResponse> | Observable<GetSeatResponse> | GetSeatResponse;
|
|
|
|
listSeatsByHall(
|
|
request: ListSeatsByHallRequest,
|
|
): Promise<ListSeatsByHallResponse> | Observable<ListSeatsByHallResponse> | ListSeatsByHallResponse;
|
|
}
|
|
|
|
export function SeatServiceControllerMethods() {
|
|
return function (constructor: Function) {
|
|
const grpcMethods: string[] = ["getSeat", "listSeatsByHall"];
|
|
for (const method of grpcMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
const grpcStreamMethods: string[] = [];
|
|
for (const method of grpcStreamMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcStreamMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
};
|
|
}
|
|
|
|
export const SEAT_SERVICE_NAME = "SeatService";
|