@neo-tickets/contracts 1.19.1 → 1.19.3

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.
@@ -0,0 +1,13 @@
1
+ export declare enum SeatStatus {
2
+ SEAT_STATUS_UNSPECIFIED = 0,
3
+ AVAILABLE = 1,
4
+ UNAVAILABLE = 2,
5
+ UNRECOGNIZED = -1
6
+ }
7
+ export declare enum SeatType {
8
+ SEAT_TYPE_UNSPECIFIED = 0,
9
+ STANDARD = 1,
10
+ VIP = 2,
11
+ ACCESSIBLE = 3,
12
+ UNRECOGNIZED = -1
13
+ }
@@ -0,0 +1,24 @@
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: common.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SeatType = exports.SeatStatus = void 0;
9
+ /* eslint-disable */
10
+ var SeatStatus;
11
+ (function (SeatStatus) {
12
+ SeatStatus[SeatStatus["SEAT_STATUS_UNSPECIFIED"] = 0] = "SEAT_STATUS_UNSPECIFIED";
13
+ SeatStatus[SeatStatus["AVAILABLE"] = 1] = "AVAILABLE";
14
+ SeatStatus[SeatStatus["UNAVAILABLE"] = 2] = "UNAVAILABLE";
15
+ SeatStatus[SeatStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
16
+ })(SeatStatus || (exports.SeatStatus = SeatStatus = {}));
17
+ var SeatType;
18
+ (function (SeatType) {
19
+ SeatType[SeatType["SEAT_TYPE_UNSPECIFIED"] = 0] = "SEAT_TYPE_UNSPECIFIED";
20
+ SeatType[SeatType["STANDARD"] = 1] = "STANDARD";
21
+ SeatType[SeatType["VIP"] = 2] = "VIP";
22
+ SeatType[SeatType["ACCESSIBLE"] = 3] = "ACCESSIBLE";
23
+ SeatType[SeatType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
24
+ })(SeatType || (exports.SeatType = SeatType = {}));
@@ -1,4 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
+ import { SeatType } from "./common";
2
3
  export interface GetHallRequest {
3
4
  id: string;
4
5
  }
@@ -27,7 +28,7 @@ export interface Hall {
27
28
  export interface RowLayout {
28
29
  row: number;
29
30
  columns: number;
30
- type: string;
31
+ seatType: SeatType;
31
32
  price: number;
32
33
  }
33
34
  export interface HallServiceClient {
@@ -0,0 +1 @@
1
+ export * as v1 from "./index.common.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.common.v1"));
@@ -0,0 +1 @@
1
+ export * from "./common";
@@ -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("./common"), exports);
@@ -2,6 +2,7 @@ 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 common from "./index.common";
5
6
  export * as hall from "./index.hall";
6
7
  export * as media from "./index.media";
7
8
  export * as movie from "./index.movie";
@@ -37,12 +37,13 @@ var __importStar = (this && this.__importStar) || (function () {
37
37
  };
38
38
  })();
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.users = exports.theater = exports.seat = exports.screening = exports.movie = exports.media = exports.hall = exports.category = exports.auth = exports.google = exports.account = void 0;
40
+ exports.users = exports.theater = exports.seat = exports.screening = exports.movie = exports.media = exports.hall = exports.common = 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.common = __importStar(require("./index.common"));
46
47
  exports.hall = __importStar(require("./index.hall"));
47
48
  exports.media = __importStar(require("./index.media"));
48
49
  exports.movie = __importStar(require("./index.movie"));
@@ -1,10 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
- export declare enum SeatStatus {
3
- SEAT_STATUS_UNSPECIFIED = 0,
4
- SEAT_STATUS_AVAILABLE = 1,
5
- SEAT_STATUS_UNAVAILABLE = 2,
6
- UNRECOGNIZED = -1
7
- }
2
+ import { SeatStatus, SeatType } from "./common";
8
3
  export interface GetSeatRequest {
9
4
  id: string;
10
5
  }
@@ -32,7 +27,7 @@ export interface Seat {
32
27
  number: number;
33
28
  x: number;
34
29
  y: number;
35
- type: string;
30
+ type: SeatType;
36
31
  price: number;
37
32
  status: SeatStatus;
38
33
  hallId: string;
@@ -5,17 +5,10 @@
5
5
  // protoc v3.21.12
6
6
  // source: seat.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.SEAT_SERVICE_NAME = exports.SeatStatus = void 0;
8
+ exports.SEAT_SERVICE_NAME = 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_UNAVAILABLE"] = 2] = "SEAT_STATUS_UNAVAILABLE";
17
- SeatStatus[SeatStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
18
- })(SeatStatus || (exports.SeatStatus = SeatStatus = {}));
19
12
  function SeatServiceControllerMethods() {
20
13
  return function (constructor) {
21
14
  const grpcMethods = ["getSeat", "listSeats", "createSeat"];
@@ -0,0 +1,22 @@
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: common.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ export enum SeatStatus {
10
+ SEAT_STATUS_UNSPECIFIED = 0,
11
+ AVAILABLE = 1,
12
+ UNAVAILABLE = 2,
13
+ UNRECOGNIZED = -1,
14
+ }
15
+
16
+ export enum SeatType {
17
+ SEAT_TYPE_UNSPECIFIED = 0,
18
+ STANDARD = 1,
19
+ VIP = 2,
20
+ ACCESSIBLE = 3,
21
+ UNRECOGNIZED = -1,
22
+ }
package/gen/ts/hall.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
+ import { SeatType } from "./common";
10
11
 
11
12
  export interface GetHallRequest {
12
13
  id: string;
@@ -43,7 +44,7 @@ export interface Hall {
43
44
  export interface RowLayout {
44
45
  row: number;
45
46
  columns: number;
46
- type: string;
47
+ seatType: SeatType;
47
48
  price: number;
48
49
  }
49
50
 
@@ -0,0 +1,8 @@
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
+
6
+ /* eslint-disable */
7
+
8
+ export * as v1 from "./index.common.v1";
@@ -0,0 +1,8 @@
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
+
6
+ /* eslint-disable */
7
+
8
+ export * from "./common";
package/gen/ts/index.ts CHANGED
@@ -9,6 +9,7 @@ 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 common from "./index.common";
12
13
  export * as hall from "./index.hall";
13
14
  export * as media from "./index.media";
14
15
  export * as movie from "./index.movie";
package/gen/ts/seat.ts CHANGED
@@ -7,13 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
9
  import { Observable } from "rxjs";
10
-
11
- export enum SeatStatus {
12
- SEAT_STATUS_UNSPECIFIED = 0,
13
- SEAT_STATUS_AVAILABLE = 1,
14
- SEAT_STATUS_UNAVAILABLE = 2,
15
- UNRECOGNIZED = -1,
16
- }
10
+ import { SeatStatus, SeatType } from "./common";
17
11
 
18
12
  export interface GetSeatRequest {
19
13
  id: string;
@@ -48,7 +42,7 @@ export interface Seat {
48
42
  number: number;
49
43
  x: number;
50
44
  y: number;
51
- type: string;
45
+ type: SeatType;
52
46
  price: number;
53
47
  status: SeatStatus;
54
48
  hallId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo-tickets/contracts",
3
- "version": "1.19.1",
3
+ "version": "1.19.3",
4
4
  "main": "./dist/src/index.js",
5
5
  "types": "./dist/src/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,16 @@
1
+ syntax = "proto3";
2
+
3
+ package common.v1;
4
+
5
+ enum SeatStatus {
6
+ SEAT_STATUS_UNSPECIFIED = 0;
7
+ AVAILABLE = 1;
8
+ UNAVAILABLE = 2;
9
+ }
10
+
11
+ enum SeatType {
12
+ SEAT_TYPE_UNSPECIFIED = 0;
13
+ STANDARD = 1;
14
+ VIP = 2;
15
+ ACCESSIBLE = 3;
16
+ }
package/proto/hall.proto CHANGED
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package hall.v1;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service HallService {
6
8
  rpc GetHall (GetHallRequest) returns (GetHallResponse);
7
9
  rpc ListHalls (ListHallsRequest) returns (ListHallsResponse);
@@ -43,6 +45,6 @@ message Hall {
43
45
  message RowLayout {
44
46
  int32 row = 1;
45
47
  int32 columns = 2;
46
- string type = 3;
48
+ common.v1.SeatType seat_type = 3;
47
49
  int32 price = 4;
48
50
  }
package/proto/seat.proto CHANGED
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package seat.v1;
4
4
 
5
+ import "common.proto";
6
+
5
7
  service SeatService {
6
8
  rpc GetSeat (GetSeatRequest) returns (GetSeatResponse);
7
9
  rpc ListSeats (ListSeatsRequest) returns (ListSeatsResponse);
@@ -39,13 +41,8 @@ message Seat {
39
41
  int32 number = 3;
40
42
  int32 x = 4;
41
43
  int32 y = 5;
42
- string type = 6;
44
+ common.v1.SeatType type = 6;
43
45
  int32 price = 7;
44
- SeatStatus status = 8;
46
+ common.v1.SeatStatus status = 8;
45
47
  string hall_id = 9;
46
- }
47
- enum SeatStatus {
48
- SEAT_STATUS_UNSPECIFIED = 0;
49
- SEAT_STATUS_AVAILABLE = 1;
50
- SEAT_STATUS_UNAVAILABLE = 2;
51
48
  }