@microservsforsell/contracts 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen/ts/movie.d.ts +1 -1
- package/dist/gen/ts/theater.d.ts +37 -0
- package/dist/gen/ts/theater.js +28 -0
- package/package.json +1 -1
- package/proto/movie.proto +1 -1
- package/proto/theater.proto +41 -0
package/dist/gen/ts/movie.d.ts
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { Empty } from "./google/protobuf/empty";
|
|
3
|
+
export declare const protobufPackage = "theater.v1";
|
|
4
|
+
export interface ListTheatersResponse {
|
|
5
|
+
theater: Theater[];
|
|
6
|
+
}
|
|
7
|
+
export interface GetTheaterRequest {
|
|
8
|
+
id: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GetTheaterResponse {
|
|
11
|
+
theater: Theater | undefined;
|
|
12
|
+
}
|
|
13
|
+
export interface CreateTheaterRequest {
|
|
14
|
+
nane: string;
|
|
15
|
+
address: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateTheaterResponse {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface Theater {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
address: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const THEATER_V1_PACKAGE_NAME = "theater.v1";
|
|
26
|
+
export interface TheaterServiceClient {
|
|
27
|
+
listTheaters(request: Empty): Observable<ListTheatersResponse>;
|
|
28
|
+
getTheater(request: GetTheaterRequest): Observable<GetTheaterResponse>;
|
|
29
|
+
createTheater(request: CreateTheaterRequest): Observable<CreateTheaterResponse>;
|
|
30
|
+
}
|
|
31
|
+
export interface TheaterServiceController {
|
|
32
|
+
listTheaters(request: Empty): Promise<ListTheatersResponse> | Observable<ListTheatersResponse> | ListTheatersResponse;
|
|
33
|
+
getTheater(request: GetTheaterRequest): Promise<GetTheaterResponse> | Observable<GetTheaterResponse> | GetTheaterResponse;
|
|
34
|
+
createTheater(request: CreateTheaterRequest): Promise<CreateTheaterResponse> | Observable<CreateTheaterResponse> | CreateTheaterResponse;
|
|
35
|
+
}
|
|
36
|
+
export declare function TheaterServiceControllerMethods(): (constructor: Function) => void;
|
|
37
|
+
export declare const THEATER_SERVICE_NAME = "TheaterService";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.0
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: theater.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.THEATER_SERVICE_NAME = exports.THEATER_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.TheaterServiceControllerMethods = TheaterServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "theater.v1";
|
|
13
|
+
exports.THEATER_V1_PACKAGE_NAME = "theater.v1";
|
|
14
|
+
function TheaterServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = ["listTheaters", "getTheater", "createTheater"];
|
|
17
|
+
for (const method of grpcMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
(0, microservices_1.GrpcMethod)("TheaterService", method)(constructor.prototype[method], method, descriptor);
|
|
20
|
+
}
|
|
21
|
+
const grpcStreamMethods = [];
|
|
22
|
+
for (const method of grpcStreamMethods) {
|
|
23
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
24
|
+
(0, microservices_1.GrpcStreamMethod)("TheaterService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.THEATER_SERVICE_NAME = "TheaterService";
|
package/package.json
CHANGED
package/proto/movie.proto
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package theater.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
service TheaterService {
|
|
8
|
+
rpc ListTheaters (google.protobuf.Empty) returns (ListTheatersResponse);
|
|
9
|
+
rpc GetTheater (GetTheaterRequest) returns (GetTheaterResponse);
|
|
10
|
+
|
|
11
|
+
rpc CreateTheater (CreateTheaterRequest) returns (CreateTheaterResponse);
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message ListTheatersResponse {
|
|
16
|
+
repeated Theater theater = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message GetTheaterRequest {
|
|
20
|
+
string id = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message GetTheaterResponse {
|
|
24
|
+
Theater theater = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message CreateTheaterRequest {
|
|
28
|
+
string nane = 1;
|
|
29
|
+
string address = 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message CreateTheaterResponse {
|
|
33
|
+
bool ok = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message Theater {
|
|
37
|
+
string id = 1;
|
|
38
|
+
string name = 2;
|
|
39
|
+
string address = 3;
|
|
40
|
+
}
|
|
41
|
+
|