@neo-tickets/contracts 1.15.1 → 1.17.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.
@@ -1,4 +1,12 @@
1
1
  import { Observable } from "rxjs";
2
+ export declare enum SeatStatus {
3
+ SEAT_STATUS_UNSPECIFIED = 0,
4
+ SEAT_STATUS_AVAILABLE = 1,
5
+ SEAT_STATUS_BOOKED = 2,
6
+ SEAT_STATUS_OCCUPIED = 3,
7
+ SEAT_STATUS_UNAVAILABLE = 4,
8
+ UNRECOGNIZED = -1
9
+ }
2
10
  export interface GetSeatRequest {
3
11
  id: string;
4
12
  }
@@ -22,12 +30,14 @@ export interface CreateSeatResponse {
22
30
  }
23
31
  export interface Seat {
24
32
  id: string;
25
- hallId: string;
26
33
  row: number;
27
34
  number: number;
28
- status: string;
29
- price: number;
35
+ x: number;
36
+ y: number;
30
37
  type: string;
38
+ price: number;
39
+ status: SeatStatus;
40
+ hallId: string;
31
41
  }
32
42
  export interface SeatServiceClient {
33
43
  getSeat(request: GetSeatRequest): Observable<GetSeatResponse>;
@@ -5,10 +5,19 @@
5
5
  // protoc v3.21.12
6
6
  // source: seat.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.SEAT_SERVICE_NAME = void 0;
8
+ exports.SEAT_SERVICE_NAME = exports.SeatStatus = void 0;
9
9
  exports.SeatServiceControllerMethods = SeatServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
+ var SeatStatus;
13
+ (function (SeatStatus) {
14
+ SeatStatus[SeatStatus["SEAT_STATUS_UNSPECIFIED"] = 0] = "SEAT_STATUS_UNSPECIFIED";
15
+ SeatStatus[SeatStatus["SEAT_STATUS_AVAILABLE"] = 1] = "SEAT_STATUS_AVAILABLE";
16
+ SeatStatus[SeatStatus["SEAT_STATUS_BOOKED"] = 2] = "SEAT_STATUS_BOOKED";
17
+ SeatStatus[SeatStatus["SEAT_STATUS_OCCUPIED"] = 3] = "SEAT_STATUS_OCCUPIED";
18
+ SeatStatus[SeatStatus["SEAT_STATUS_UNAVAILABLE"] = 4] = "SEAT_STATUS_UNAVAILABLE";
19
+ SeatStatus[SeatStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
20
+ })(SeatStatus || (exports.SeatStatus = SeatStatus = {}));
12
21
  function SeatServiceControllerMethods() {
13
22
  return function (constructor) {
14
23
  const grpcMethods = ["getSeat", "listSeats", "createSeat"];
package/gen/ts/seat.ts CHANGED
@@ -8,6 +8,15 @@
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
10
 
11
+ export enum SeatStatus {
12
+ SEAT_STATUS_UNSPECIFIED = 0,
13
+ SEAT_STATUS_AVAILABLE = 1,
14
+ SEAT_STATUS_BOOKED = 2,
15
+ SEAT_STATUS_OCCUPIED = 3,
16
+ SEAT_STATUS_UNAVAILABLE = 4,
17
+ UNRECOGNIZED = -1,
18
+ }
19
+
11
20
  export interface GetSeatRequest {
12
21
  id: string;
13
22
  }
@@ -37,12 +46,14 @@ export interface CreateSeatResponse {
37
46
 
38
47
  export interface Seat {
39
48
  id: string;
40
- hallId: string;
41
49
  row: number;
42
50
  number: number;
43
- status: string;
44
- price: number;
51
+ x: number;
52
+ y: number;
45
53
  type: string;
54
+ price: number;
55
+ status: SeatStatus;
56
+ hallId: string;
46
57
  }
47
58
 
48
59
  export interface SeatServiceClient {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo-tickets/contracts",
3
- "version": "1.15.1",
3
+ "version": "1.17.0",
4
4
  "main": "./dist/src/index.js",
5
5
  "types": "./dist/src/index.d.ts",
6
6
  "scripts": {
package/proto/seat.proto CHANGED
@@ -35,10 +35,19 @@ message CreateSeatResponse {
35
35
 
36
36
  message Seat {
37
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;
38
+ int32 row = 2;
39
+ int32 number = 3;
40
+ int32 x = 4;
41
+ int32 y = 5;
42
+ string type = 6;
43
+ int32 price = 7;
44
+ SeatStatus status = 8;
45
+ string hall_id = 9;
46
+ }
47
+ enum SeatStatus {
48
+ SEAT_STATUS_UNSPECIFIED = 0;
49
+ SEAT_STATUS_AVAILABLE = 1;
50
+ SEAT_STATUS_BOOKED = 2;
51
+ SEAT_STATUS_OCCUPIED = 3;
52
+ SEAT_STATUS_UNAVAILABLE = 4;
44
53
  }