@neo-tickets/contracts 1.16.0 → 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
  }
@@ -28,7 +36,7 @@ export interface Seat {
28
36
  y: number;
29
37
  type: string;
30
38
  price: number;
31
- status: string;
39
+ status: SeatStatus;
32
40
  hallId: string;
33
41
  }
34
42
  export interface SeatServiceClient {
@@ -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
  }
@@ -43,7 +52,7 @@ export interface Seat {
43
52
  y: number;
44
53
  type: string;
45
54
  price: number;
46
- status: string;
55
+ status: SeatStatus;
47
56
  hallId: string;
48
57
  }
49
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo-tickets/contracts",
3
- "version": "1.16.0",
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
@@ -41,6 +41,13 @@ message Seat {
41
41
  int32 y = 5;
42
42
  string type = 6;
43
43
  int32 price = 7;
44
- string status = 8;
44
+ SeatStatus status = 8;
45
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;
46
53
  }