@neo-tickets/contracts 1.14.5 → 1.15.0
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/hall.d.ts +45 -0
- package/dist/gen/ts/hall.js +28 -0
- package/dist/gen/ts/index.d.ts +2 -0
- package/dist/gen/ts/index.hall.d.ts +1 -0
- package/dist/gen/ts/index.hall.js +42 -0
- package/dist/gen/ts/index.hall.v1.d.ts +1 -0
- package/dist/gen/ts/index.hall.v1.js +22 -0
- package/dist/gen/ts/index.js +3 -1
- package/dist/gen/ts/index.seat.d.ts +1 -0
- package/dist/gen/ts/index.seat.js +42 -0
- package/dist/gen/ts/index.seat.v1.d.ts +1 -0
- package/dist/gen/ts/index.seat.v1.js +22 -0
- package/dist/gen/ts/seat.d.ts +43 -0
- package/dist/gen/ts/seat.js +28 -0
- package/dist/src/proto/paths.d.ts +2 -0
- package/dist/src/proto/paths.js +2 -0
- package/gen/ts/hall.ts +86 -0
- package/gen/ts/index.hall.ts +8 -0
- package/gen/ts/index.hall.v1.ts +8 -0
- package/gen/ts/index.seat.ts +8 -0
- package/gen/ts/index.seat.v1.ts +8 -0
- package/gen/ts/index.ts +2 -0
- package/gen/ts/seat.ts +83 -0
- package/package.json +1 -1
- package/proto/hall.proto +49 -0
- package/proto/seat.proto +44 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export interface GetHallRequest {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
export interface GetHallResponse {
|
|
6
|
+
hall: Hall | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface ListHallsRequest {
|
|
9
|
+
theaterId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ListHallsResponse {
|
|
12
|
+
halls: Hall[];
|
|
13
|
+
}
|
|
14
|
+
export interface CreateHallRequest {
|
|
15
|
+
name: string;
|
|
16
|
+
theaterId: string;
|
|
17
|
+
layout: RowLayout[];
|
|
18
|
+
}
|
|
19
|
+
export interface CreateHallResponse {
|
|
20
|
+
hall: Hall | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface Hall {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
theaterId: string;
|
|
26
|
+
layout: RowLayout[];
|
|
27
|
+
}
|
|
28
|
+
export interface RowLayout {
|
|
29
|
+
row: number;
|
|
30
|
+
columns: number;
|
|
31
|
+
type: string;
|
|
32
|
+
price: number;
|
|
33
|
+
}
|
|
34
|
+
export interface HallServiceClient {
|
|
35
|
+
getHall(request: GetHallRequest): Observable<GetHallResponse>;
|
|
36
|
+
listHalls(request: ListHallsRequest): Observable<ListHallsResponse>;
|
|
37
|
+
createHall(request: CreateHallRequest): Observable<CreateHallResponse>;
|
|
38
|
+
}
|
|
39
|
+
export interface HallServiceController {
|
|
40
|
+
getHall(request: GetHallRequest): Promise<GetHallResponse> | Observable<GetHallResponse> | GetHallResponse;
|
|
41
|
+
listHalls(request: ListHallsRequest): Promise<ListHallsResponse> | Observable<ListHallsResponse> | ListHallsResponse;
|
|
42
|
+
createHall(request: CreateHallRequest): Promise<CreateHallResponse> | Observable<CreateHallResponse> | CreateHallResponse;
|
|
43
|
+
}
|
|
44
|
+
export declare function HallServiceControllerMethods(): (constructor: Function) => void;
|
|
45
|
+
export declare const HALL_SERVICE_NAME = "HallService";
|
|
@@ -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.12.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: hall.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.HALL_SERVICE_NAME = void 0;
|
|
9
|
+
exports.HallServiceControllerMethods = HallServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
function HallServiceControllerMethods() {
|
|
13
|
+
return function (constructor) {
|
|
14
|
+
const grpcMethods = ["getHall", "listHalls", "createHall"];
|
|
15
|
+
for (const method of grpcMethods) {
|
|
16
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
17
|
+
(0, microservices_1.GrpcMethod)("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
18
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
19
|
+
}
|
|
20
|
+
const grpcStreamMethods = [];
|
|
21
|
+
for (const method of grpcStreamMethods) {
|
|
22
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
23
|
+
(0, microservices_1.GrpcStreamMethod)("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
24
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.HALL_SERVICE_NAME = "HallService";
|
package/dist/gen/ts/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ export * as account from "./index.account";
|
|
|
2
2
|
export * as google from "./index.google";
|
|
3
3
|
export * as auth from "./index.auth";
|
|
4
4
|
export * as category from "./index.category";
|
|
5
|
+
export * as hall from "./index.hall";
|
|
5
6
|
export * as media from "./index.media";
|
|
6
7
|
export * as movie from "./index.movie";
|
|
8
|
+
export * as seat from "./index.seat";
|
|
7
9
|
export * as theater from "./index.theater";
|
|
8
10
|
export * as users from "./index.users";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as v1 from "./index.hall.v1";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.v1 = void 0;
|
|
41
|
+
/* eslint-disable */
|
|
42
|
+
exports.v1 = __importStar(require("./index.hall.v1"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./hall";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
/* eslint-disable */
|
|
22
|
+
__exportStar(require("./hall"), exports);
|
package/dist/gen/ts/index.js
CHANGED
|
@@ -37,13 +37,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
};
|
|
38
38
|
})();
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.users = exports.theater = exports.movie = exports.media = exports.category = exports.auth = exports.google = exports.account = void 0;
|
|
40
|
+
exports.users = exports.theater = exports.seat = exports.movie = exports.media = exports.hall = exports.category = exports.auth = exports.google = exports.account = void 0;
|
|
41
41
|
/* eslint-disable */
|
|
42
42
|
exports.account = __importStar(require("./index.account"));
|
|
43
43
|
exports.google = __importStar(require("./index.google"));
|
|
44
44
|
exports.auth = __importStar(require("./index.auth"));
|
|
45
45
|
exports.category = __importStar(require("./index.category"));
|
|
46
|
+
exports.hall = __importStar(require("./index.hall"));
|
|
46
47
|
exports.media = __importStar(require("./index.media"));
|
|
47
48
|
exports.movie = __importStar(require("./index.movie"));
|
|
49
|
+
exports.seat = __importStar(require("./index.seat"));
|
|
48
50
|
exports.theater = __importStar(require("./index.theater"));
|
|
49
51
|
exports.users = __importStar(require("./index.users"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as v1 from "./index.seat.v1";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
23
|
+
var ownKeys = function(o) {
|
|
24
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
25
|
+
var ar = [];
|
|
26
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
return ownKeys(o);
|
|
30
|
+
};
|
|
31
|
+
return function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
})();
|
|
39
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
+
exports.v1 = void 0;
|
|
41
|
+
/* eslint-disable */
|
|
42
|
+
exports.v1 = __importStar(require("./index.seat.v1"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./seat";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.12.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
/* eslint-disable */
|
|
22
|
+
__exportStar(require("./seat"), exports);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export interface GetSeatRequest {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
export interface GetSeatResponse {
|
|
6
|
+
seat: Seat | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface ListSeatsRequest {
|
|
9
|
+
hallId: string;
|
|
10
|
+
screeningId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ListSeatsResponse {
|
|
13
|
+
seats: Seat[];
|
|
14
|
+
}
|
|
15
|
+
export interface CreateSeatRequest {
|
|
16
|
+
hallId: string;
|
|
17
|
+
row: number;
|
|
18
|
+
column: number;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateSeatResponse {
|
|
21
|
+
seat: Seat | undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface Seat {
|
|
24
|
+
id: string;
|
|
25
|
+
hallId: string;
|
|
26
|
+
row: number;
|
|
27
|
+
number: number;
|
|
28
|
+
status: string;
|
|
29
|
+
price: number;
|
|
30
|
+
type: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SeatServiceClient {
|
|
33
|
+
getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
|
|
34
|
+
listSeats(request: ListSeatsRequest): Observable<ListSeatsResponse>;
|
|
35
|
+
createSeat(request: CreateSeatRequest): Observable<CreateSeatResponse>;
|
|
36
|
+
}
|
|
37
|
+
export interface SeatServiceController {
|
|
38
|
+
getSeat(request: GetSeatRequest): Promise<GetSeatResponse> | Observable<GetSeatResponse> | GetSeatResponse;
|
|
39
|
+
listSeats(request: ListSeatsRequest): Promise<ListSeatsResponse> | Observable<ListSeatsResponse> | ListSeatsResponse;
|
|
40
|
+
createSeat(request: CreateSeatRequest): Promise<CreateSeatResponse> | Observable<CreateSeatResponse> | CreateSeatResponse;
|
|
41
|
+
}
|
|
42
|
+
export declare function SeatServiceControllerMethods(): (constructor: Function) => void;
|
|
43
|
+
export declare const SEAT_SERVICE_NAME = "SeatService";
|
|
@@ -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.12.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: seat.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SEAT_SERVICE_NAME = void 0;
|
|
9
|
+
exports.SeatServiceControllerMethods = SeatServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
function SeatServiceControllerMethods() {
|
|
13
|
+
return function (constructor) {
|
|
14
|
+
const grpcMethods = ["getSeat", "listSeats", "createSeat"];
|
|
15
|
+
for (const method of grpcMethods) {
|
|
16
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
17
|
+
(0, microservices_1.GrpcMethod)("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
18
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
19
|
+
}
|
|
20
|
+
const grpcStreamMethods = [];
|
|
21
|
+
for (const method of grpcStreamMethods) {
|
|
22
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
23
|
+
(0, microservices_1.GrpcStreamMethod)("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
24
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.SEAT_SERVICE_NAME = "SeatService";
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -10,4 +10,6 @@ exports.PROTO_PATHS = {
|
|
|
10
10
|
MOVIE: (0, path_1.join)(__dirname, "../../../proto/movie.proto"),
|
|
11
11
|
CATEGORY: (0, path_1.join)(__dirname, "../../../proto/category.proto"),
|
|
12
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/ts/hall.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.12.4
|
|
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 interface GetHallRequest {
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GetHallResponse {
|
|
16
|
+
hall: Hall | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ListHallsRequest {
|
|
20
|
+
theaterId: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ListHallsResponse {
|
|
24
|
+
halls: Hall[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface CreateHallRequest {
|
|
28
|
+
name: string;
|
|
29
|
+
theaterId: string;
|
|
30
|
+
layout: RowLayout[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CreateHallResponse {
|
|
34
|
+
hall: Hall | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface Hall {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
theaterId: string;
|
|
41
|
+
layout: RowLayout[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface RowLayout {
|
|
45
|
+
row: number;
|
|
46
|
+
columns: number;
|
|
47
|
+
type: string;
|
|
48
|
+
price: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface HallServiceClient {
|
|
52
|
+
getHall(request: GetHallRequest): Observable<GetHallResponse>;
|
|
53
|
+
|
|
54
|
+
listHalls(request: ListHallsRequest): Observable<ListHallsResponse>;
|
|
55
|
+
|
|
56
|
+
createHall(request: CreateHallRequest): Observable<CreateHallResponse>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface HallServiceController {
|
|
60
|
+
getHall(request: GetHallRequest): Promise<GetHallResponse> | Observable<GetHallResponse> | GetHallResponse;
|
|
61
|
+
|
|
62
|
+
listHalls(request: ListHallsRequest): Promise<ListHallsResponse> | Observable<ListHallsResponse> | ListHallsResponse;
|
|
63
|
+
|
|
64
|
+
createHall(
|
|
65
|
+
request: CreateHallRequest,
|
|
66
|
+
): Promise<CreateHallResponse> | Observable<CreateHallResponse> | CreateHallResponse;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function HallServiceControllerMethods() {
|
|
70
|
+
return function (constructor: Function) {
|
|
71
|
+
const grpcMethods: string[] = ["getHall", "listHalls", "createHall"];
|
|
72
|
+
for (const method of grpcMethods) {
|
|
73
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
74
|
+
GrpcMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
75
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
76
|
+
}
|
|
77
|
+
const grpcStreamMethods: string[] = [];
|
|
78
|
+
for (const method of grpcStreamMethods) {
|
|
79
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
80
|
+
GrpcStreamMethod("HallService", method)(constructor.prototype[method], method, descriptor);
|
|
81
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const HALL_SERVICE_NAME = "HallService";
|
package/gen/ts/index.ts
CHANGED
|
@@ -9,7 +9,9 @@ export * as account from "./index.account";
|
|
|
9
9
|
export * as google from "./index.google";
|
|
10
10
|
export * as auth from "./index.auth";
|
|
11
11
|
export * as category from "./index.category";
|
|
12
|
+
export * as hall from "./index.hall";
|
|
12
13
|
export * as media from "./index.media";
|
|
13
14
|
export * as movie from "./index.movie";
|
|
15
|
+
export * as seat from "./index.seat";
|
|
14
16
|
export * as theater from "./index.theater";
|
|
15
17
|
export * as users from "./index.users";
|
package/gen/ts/seat.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.12.4
|
|
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 interface GetSeatRequest {
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GetSeatResponse {
|
|
16
|
+
seat: Seat | undefined;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ListSeatsRequest {
|
|
20
|
+
hallId: string;
|
|
21
|
+
screeningId: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ListSeatsResponse {
|
|
25
|
+
seats: Seat[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CreateSeatRequest {
|
|
29
|
+
hallId: string;
|
|
30
|
+
row: number;
|
|
31
|
+
column: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CreateSeatResponse {
|
|
35
|
+
seat: Seat | undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface Seat {
|
|
39
|
+
id: string;
|
|
40
|
+
hallId: string;
|
|
41
|
+
row: number;
|
|
42
|
+
number: number;
|
|
43
|
+
status: string;
|
|
44
|
+
price: number;
|
|
45
|
+
type: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SeatServiceClient {
|
|
49
|
+
getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
|
|
50
|
+
|
|
51
|
+
listSeats(request: ListSeatsRequest): Observable<ListSeatsResponse>;
|
|
52
|
+
|
|
53
|
+
createSeat(request: CreateSeatRequest): Observable<CreateSeatResponse>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface SeatServiceController {
|
|
57
|
+
getSeat(request: GetSeatRequest): Promise<GetSeatResponse> | Observable<GetSeatResponse> | GetSeatResponse;
|
|
58
|
+
|
|
59
|
+
listSeats(request: ListSeatsRequest): Promise<ListSeatsResponse> | Observable<ListSeatsResponse> | ListSeatsResponse;
|
|
60
|
+
|
|
61
|
+
createSeat(
|
|
62
|
+
request: CreateSeatRequest,
|
|
63
|
+
): Promise<CreateSeatResponse> | Observable<CreateSeatResponse> | CreateSeatResponse;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function SeatServiceControllerMethods() {
|
|
67
|
+
return function (constructor: Function) {
|
|
68
|
+
const grpcMethods: string[] = ["getSeat", "listSeats", "createSeat"];
|
|
69
|
+
for (const method of grpcMethods) {
|
|
70
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
71
|
+
GrpcMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
72
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
73
|
+
}
|
|
74
|
+
const grpcStreamMethods: string[] = [];
|
|
75
|
+
for (const method of grpcStreamMethods) {
|
|
76
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
77
|
+
GrpcStreamMethod("SeatService", method)(constructor.prototype[method], method, descriptor);
|
|
78
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const SEAT_SERVICE_NAME = "SeatService";
|
package/package.json
CHANGED
package/proto/hall.proto
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package hall.v1;
|
|
4
|
+
|
|
5
|
+
service HallService {
|
|
6
|
+
rpc GetHall (GetHallRequest) returns (GetHallResponse);
|
|
7
|
+
rpc ListHalls (ListHallsRequest) returns (ListHallsResponse);
|
|
8
|
+
rpc CreateHall (CreateHallRequest) returns (CreateHallResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message GetHallRequest {
|
|
12
|
+
string id = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message GetHallResponse {
|
|
16
|
+
Hall hall = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message ListHallsRequest {
|
|
20
|
+
string theater_id = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message ListHallsResponse {
|
|
24
|
+
repeated Hall halls = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message CreateHallRequest {
|
|
28
|
+
string name = 1;
|
|
29
|
+
string theater_id = 2;
|
|
30
|
+
repeated RowLayout layout = 3;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message CreateHallResponse {
|
|
34
|
+
Hall hall = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message Hall {
|
|
38
|
+
string id = 1;
|
|
39
|
+
string name = 2;
|
|
40
|
+
string theater_id = 3;
|
|
41
|
+
repeated RowLayout layout = 4;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message RowLayout {
|
|
45
|
+
int32 row = 1;
|
|
46
|
+
int32 columns = 2;
|
|
47
|
+
string type = 3;
|
|
48
|
+
int32 price = 4;
|
|
49
|
+
}
|
package/proto/seat.proto
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package seat.v1;
|
|
4
|
+
|
|
5
|
+
service SeatService {
|
|
6
|
+
rpc GetSeat (GetSeatRequest) returns (GetSeatResponse);
|
|
7
|
+
rpc ListSeats (ListSeatsRequest) returns (ListSeatsResponse);
|
|
8
|
+
rpc CreateSeat (CreateSeatRequest) returns (CreateSeatResponse);
|
|
9
|
+
}
|
|
10
|
+
message GetSeatRequest {
|
|
11
|
+
string id = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message GetSeatResponse {
|
|
15
|
+
Seat seat = 1;
|
|
16
|
+
}
|
|
17
|
+
message ListSeatsRequest {
|
|
18
|
+
string hall_id = 1;
|
|
19
|
+
string screening_id = 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message ListSeatsResponse {
|
|
23
|
+
repeated Seat seats = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CreateSeatRequest {
|
|
27
|
+
string hall_id = 1;
|
|
28
|
+
int32 row = 2;
|
|
29
|
+
int32 column = 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message CreateSeatResponse {
|
|
33
|
+
Seat seat = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message Seat {
|
|
37
|
+
string id = 1;
|
|
38
|
+
string hall_id = 2;
|
|
39
|
+
int32 row = 3;
|
|
40
|
+
int32 number = 4;
|
|
41
|
+
string status = 5;
|
|
42
|
+
int32 price = 6;
|
|
43
|
+
string type = 7;
|
|
44
|
+
}
|