@tcinema-pro/contracts 1.3.8 → 1.3.9
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/proto/paths.d.ts +2 -0
- package/dist/proto/paths.js +3 -1
- package/gen/hall.ts +90 -0
- package/gen/seat.ts +71 -0
- package/gen/theater.ts +1 -1
- package/package.json +1 -1
- package/proto/hall.proto +51 -0
- package/proto/seat.proto +37 -0
- package/proto/theater.proto +1 -1
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -9,5 +9,7 @@ exports.PROTO_PATHS = {
|
|
|
9
9
|
MEDIA: (0, path_1.join)(__dirname, '../../proto/media.proto'),
|
|
10
10
|
MOVIE: (0, path_1.join)(__dirname, '../../proto/movie.proto'),
|
|
11
11
|
CATEGORY: (0, path_1.join)(__dirname, '../../proto/category.proto'),
|
|
12
|
-
THEATER: (0, path_1.join)(__dirname, '../../proto/theater.proto')
|
|
12
|
+
THEATER: (0, path_1.join)(__dirname, '../../proto/theater.proto'),
|
|
13
|
+
HALL: (0, path_1.join)(__dirname, '../../proto/hall.proto'),
|
|
14
|
+
SEAT: (0, path_1.join)(__dirname, '../../proto/seat.proto'),
|
|
13
15
|
};
|
package/gen/hall.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.2
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: hall.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "hall.v1";
|
|
12
|
+
|
|
13
|
+
export interface GetHallsByTheaterRequest {
|
|
14
|
+
theaterId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface GetHallsByTheaterResponse {
|
|
18
|
+
hall: Hall | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface GetHallRequest {
|
|
22
|
+
id: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface GetHallResponse {
|
|
26
|
+
hall: Hall | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface CreateHallRequest {
|
|
30
|
+
name: string;
|
|
31
|
+
theaterId: string;
|
|
32
|
+
layout: RowLayout[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface RowLayout {
|
|
36
|
+
row: number;
|
|
37
|
+
cols: number;
|
|
38
|
+
type: string;
|
|
39
|
+
price: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface CreateHallResponse {
|
|
43
|
+
hall: Hall | undefined;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface Hall {
|
|
47
|
+
name: string;
|
|
48
|
+
theaterId: string;
|
|
49
|
+
layout: RowLayout[];
|
|
50
|
+
id: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const HALL_V1_PACKAGE_NAME = "hall.v1";
|
|
54
|
+
|
|
55
|
+
export interface HallServiceClient {
|
|
56
|
+
getHall(request: GetHallRequest): Observable<GetHallResponse>;
|
|
57
|
+
|
|
58
|
+
getHallsByTheater(request: GetHallsByTheaterRequest): Observable<GetHallsByTheaterResponse>;
|
|
59
|
+
|
|
60
|
+
createHall(request: CreateHallRequest): Observable<CreateHallResponse>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface HallServiceController {
|
|
64
|
+
getHall(request: GetHallRequest): Promise<GetHallResponse> | Observable<GetHallResponse> | GetHallResponse;
|
|
65
|
+
|
|
66
|
+
getHallsByTheater(
|
|
67
|
+
request: GetHallsByTheaterRequest,
|
|
68
|
+
): Promise<GetHallsByTheaterResponse> | Observable<GetHallsByTheaterResponse> | GetHallsByTheaterResponse;
|
|
69
|
+
|
|
70
|
+
createHall(
|
|
71
|
+
request: CreateHallRequest,
|
|
72
|
+
): Promise<CreateHallResponse> | Observable<CreateHallResponse> | CreateHallResponse;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function HallServiceControllerMethods() {
|
|
76
|
+
return function (constructor: Function) {
|
|
77
|
+
const grpcMethods: string[] = ["getHall", "getHallsByTheater", "createHall"];
|
|
78
|
+
for (const method of grpcMethods) {
|
|
79
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
80
|
+
GrpcMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
81
|
+
}
|
|
82
|
+
const grpcStreamMethods: string[] = [];
|
|
83
|
+
for (const method of grpcStreamMethods) {
|
|
84
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
85
|
+
GrpcStreamMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const HALL_SERVICE_NAME = "HallService";
|
package/gen/seat.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.2
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: seat.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "seat.v1";
|
|
12
|
+
|
|
13
|
+
export interface GetSeatsByHallRequest {
|
|
14
|
+
hallId: string;
|
|
15
|
+
screeningId: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface GetSeatsByHallResponse {
|
|
19
|
+
seat: Seat[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GetSeatRequest {
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface GetSeatResponse {
|
|
27
|
+
seat: Seat | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Seat {
|
|
31
|
+
id: string;
|
|
32
|
+
row: number;
|
|
33
|
+
number: number;
|
|
34
|
+
price: number;
|
|
35
|
+
status: string;
|
|
36
|
+
type: string;
|
|
37
|
+
hallId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const SEAT_V1_PACKAGE_NAME = "seat.v1";
|
|
41
|
+
|
|
42
|
+
export interface SeatServiceClient {
|
|
43
|
+
getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
|
|
44
|
+
|
|
45
|
+
getSeatsByHall(request: GetSeatsByHallRequest): Observable<GetSeatsByHallResponse>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SeatServiceController {
|
|
49
|
+
getSeat(request: GetSeatRequest): Promise<GetSeatResponse> | Observable<GetSeatResponse> | GetSeatResponse;
|
|
50
|
+
|
|
51
|
+
getSeatsByHall(
|
|
52
|
+
request: GetSeatsByHallRequest,
|
|
53
|
+
): Promise<GetSeatsByHallResponse> | Observable<GetSeatsByHallResponse> | GetSeatsByHallResponse;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SeatServiceControllerMethods() {
|
|
57
|
+
return function (constructor: Function) {
|
|
58
|
+
const grpcMethods: string[] = ["getSeat", "getSeatsByHall"];
|
|
59
|
+
for (const method of grpcMethods) {
|
|
60
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
61
|
+
GrpcMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
62
|
+
}
|
|
63
|
+
const grpcStreamMethods: string[] = [];
|
|
64
|
+
for (const method of grpcStreamMethods) {
|
|
65
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
66
|
+
GrpcStreamMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const SEAT_SERVICE_NAME = "SeatService";
|
package/gen/theater.ts
CHANGED
package/package.json
CHANGED
package/proto/hall.proto
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
syntax = 'proto3';
|
|
2
|
+
|
|
3
|
+
package hall.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
service HallService {
|
|
8
|
+
rpc GetHall (GetHallRequest) returns (GetHallResponse);
|
|
9
|
+
rpc GetHallsByTheater (GetHallsByTheaterRequest) returns (GetHallsByTheaterResponse);
|
|
10
|
+
rpc CreateHall (CreateHallRequest) returns (CreateHallResponse);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message GetHallsByTheaterRequest {
|
|
14
|
+
string theater_id = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message GetHallsByTheaterResponse {
|
|
18
|
+
Hall hall = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message GetHallRequest {
|
|
22
|
+
string id = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message GetHallResponse {
|
|
26
|
+
Hall hall = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message CreateHallRequest {
|
|
30
|
+
string name = 1;
|
|
31
|
+
string theater_id = 2;
|
|
32
|
+
repeated RowLayout layout = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message RowLayout {
|
|
36
|
+
int32 row = 1;
|
|
37
|
+
int32 cols = 2;
|
|
38
|
+
string type = 3;
|
|
39
|
+
int32 price = 4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message CreateHallResponse {
|
|
43
|
+
Hall hall = 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message Hall {
|
|
47
|
+
string name = 1;
|
|
48
|
+
string theater_id = 2;
|
|
49
|
+
repeated RowLayout layout = 3;
|
|
50
|
+
string id = 4;
|
|
51
|
+
}
|
package/proto/seat.proto
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
syntax = 'proto3';
|
|
2
|
+
|
|
3
|
+
package seat.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
service SeatService {
|
|
8
|
+
rpc GetSeat (GetSeatRequest) returns (GetSeatResponse);
|
|
9
|
+
rpc GetSeatsByHall (GetSeatsByHallRequest) returns (GetSeatsByHallResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message GetSeatsByHallRequest {
|
|
13
|
+
string hall_id = 1;
|
|
14
|
+
string screening_id = 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message GetSeatsByHallResponse {
|
|
18
|
+
repeated Seat seat = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message GetSeatRequest {
|
|
22
|
+
string id = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message GetSeatResponse {
|
|
26
|
+
Seat seat = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message Seat {
|
|
30
|
+
string id = 1;
|
|
31
|
+
int32 row = 2;
|
|
32
|
+
int32 number = 3;
|
|
33
|
+
int32 price = 4;
|
|
34
|
+
string status = 5;
|
|
35
|
+
string type = 6;
|
|
36
|
+
string hall_id = 8;
|
|
37
|
+
}
|