90 lines
2.4 KiB
TypeScript
90 lines
2.4 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: hall.proto
|
|
|
|
/* eslint-disable */
|
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
import { Observable } from "rxjs";
|
|
|
|
export const protobufPackage = "hall.v1";
|
|
|
|
export interface CreateHallRequest {
|
|
name: string;
|
|
theaterId: string;
|
|
layout: RowLayout[];
|
|
}
|
|
|
|
export interface CreateHallResponse {
|
|
hall: Hall | undefined;
|
|
}
|
|
|
|
export interface ListHallsByTheaterRequest {
|
|
theaterId: string;
|
|
}
|
|
|
|
export interface ListHallsByTheaterResponse {
|
|
halls: Hall[];
|
|
}
|
|
|
|
export interface GetHallRequest {
|
|
id: string;
|
|
}
|
|
|
|
export interface GetHallResponse {
|
|
hall: Hall | undefined;
|
|
}
|
|
|
|
export interface Hall {
|
|
id: string;
|
|
name: string;
|
|
theaterId: string;
|
|
}
|
|
|
|
export interface RowLayout {
|
|
row: number;
|
|
columns: number;
|
|
type: string;
|
|
price: number;
|
|
}
|
|
|
|
export const HALL_V1_PACKAGE_NAME = "hall.v1";
|
|
|
|
export interface HallServiceClient {
|
|
createHall(request: CreateHallRequest): Observable<CreateHallResponse>;
|
|
|
|
getHall(request: GetHallRequest): Observable<GetHallResponse>;
|
|
|
|
listHallsByTheater(request: ListHallsByTheaterRequest): Observable<ListHallsByTheaterResponse>;
|
|
}
|
|
|
|
export interface HallServiceController {
|
|
createHall(
|
|
request: CreateHallRequest,
|
|
): Promise<CreateHallResponse> | Observable<CreateHallResponse> | CreateHallResponse;
|
|
|
|
getHall(request: GetHallRequest): Promise<GetHallResponse> | Observable<GetHallResponse> | GetHallResponse;
|
|
|
|
listHallsByTheater(
|
|
request: ListHallsByTheaterRequest,
|
|
): Promise<ListHallsByTheaterResponse> | Observable<ListHallsByTheaterResponse> | ListHallsByTheaterResponse;
|
|
}
|
|
|
|
export function HallServiceControllerMethods() {
|
|
return function (constructor: Function) {
|
|
const grpcMethods: string[] = ["createHall", "getHall", "listHallsByTheater"];
|
|
for (const method of grpcMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
const grpcStreamMethods: string[] = [];
|
|
for (const method of grpcStreamMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcStreamMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
};
|
|
}
|
|
|
|
export const HALL_SERVICE_NAME = "HallService";
|