79 lines
2.3 KiB
TypeScript
79 lines
2.3 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: theater.proto
|
|
|
|
/* eslint-disable */
|
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
import { Observable } from "rxjs";
|
|
import { Empty } from "./google/protobuf/empty";
|
|
|
|
export const protobufPackage = "theater.v1";
|
|
|
|
export interface ListTheaterResponse {
|
|
theaters: Theater[];
|
|
}
|
|
|
|
export interface GetTheaterRequest {
|
|
id: string;
|
|
}
|
|
|
|
export interface GetTheaterResponse {
|
|
theater: Theater | undefined;
|
|
}
|
|
|
|
export interface CreateTheaterRequest {
|
|
name: string;
|
|
address: string;
|
|
}
|
|
|
|
export interface CreateTheaterResponse {
|
|
theater: Theater | undefined;
|
|
}
|
|
|
|
export interface Theater {
|
|
id: string;
|
|
name: string;
|
|
address: string;
|
|
}
|
|
|
|
export const THEATER_V1_PACKAGE_NAME = "theater.v1";
|
|
|
|
export interface TheaterServiceClient {
|
|
listTheater(request: Empty): Observable<ListTheaterResponse>;
|
|
|
|
getTheater(request: GetTheaterRequest): Observable<GetTheaterResponse>;
|
|
|
|
createTheater(request: CreateTheaterRequest): Observable<CreateTheaterResponse>;
|
|
}
|
|
|
|
export interface TheaterServiceController {
|
|
listTheater(request: Empty): Promise<ListTheaterResponse> | Observable<ListTheaterResponse> | ListTheaterResponse;
|
|
|
|
getTheater(
|
|
request: GetTheaterRequest,
|
|
): Promise<GetTheaterResponse> | Observable<GetTheaterResponse> | GetTheaterResponse;
|
|
|
|
createTheater(
|
|
request: CreateTheaterRequest,
|
|
): Promise<CreateTheaterResponse> | Observable<CreateTheaterResponse> | CreateTheaterResponse;
|
|
}
|
|
|
|
export function TheaterServiceControllerMethods() {
|
|
return function (constructor: Function) {
|
|
const grpcMethods: string[] = ["listTheater", "getTheater", "createTheater"];
|
|
for (const method of grpcMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcMethod("TheaterService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
const grpcStreamMethods: string[] = [];
|
|
for (const method of grpcStreamMethods) {
|
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
GrpcStreamMethod("TheaterService", method)(constructor.prototype[method], method, descriptor);
|
|
}
|
|
};
|
|
}
|
|
|
|
export const THEATER_SERVICE_NAME = "TheaterService";
|