@neo-tickets/contracts 1.20.0 → 1.21.1
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/index.d.ts +1 -0
- package/dist/gen/ts/index.js +2 -1
- package/dist/gen/ts/index.payment.d.ts +1 -0
- package/dist/gen/ts/index.payment.js +42 -0
- package/dist/gen/ts/index.payment.v1.d.ts +1 -0
- package/dist/gen/ts/index.payment.v1.js +22 -0
- package/dist/gen/ts/payment.d.ts +38 -0
- package/dist/gen/ts/payment.js +28 -0
- package/dist/src/proto/paths.d.ts +1 -0
- package/dist/src/proto/paths.js +1 -0
- package/gen/ts/index.payment.ts +8 -0
- package/gen/ts/index.payment.v1.ts +8 -0
- package/gen/ts/index.ts +1 -0
- package/gen/ts/payment.ts +76 -0
- package/package.json +1 -1
- package/proto/payment.proto +40 -0
package/dist/gen/ts/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * as common from "./index.common";
|
|
|
6
6
|
export * as hall from "./index.hall";
|
|
7
7
|
export * as media from "./index.media";
|
|
8
8
|
export * as movie from "./index.movie";
|
|
9
|
+
export * as payment from "./index.payment";
|
|
9
10
|
export * as screening from "./index.screening";
|
|
10
11
|
export * as seat from "./index.seat";
|
|
11
12
|
export * as theater from "./index.theater";
|
package/dist/gen/ts/index.js
CHANGED
|
@@ -37,7 +37,7 @@ 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.common = exports.category = exports.auth = exports.google = exports.account = void 0;
|
|
40
|
+
exports.users = exports.theater = exports.seat = exports.screening = exports.payment = 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"));
|
|
@@ -47,6 +47,7 @@ exports.common = __importStar(require("./index.common"));
|
|
|
47
47
|
exports.hall = __importStar(require("./index.hall"));
|
|
48
48
|
exports.media = __importStar(require("./index.media"));
|
|
49
49
|
exports.movie = __importStar(require("./index.movie"));
|
|
50
|
+
exports.payment = __importStar(require("./index.payment"));
|
|
50
51
|
exports.screening = __importStar(require("./index.screening"));
|
|
51
52
|
exports.seat = __importStar(require("./index.seat"));
|
|
52
53
|
exports.theater = __importStar(require("./index.theater"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as v1 from "./index.payment.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.payment.v1"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./payment";
|
|
@@ -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("./payment"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export interface CreatePaymentRequest {
|
|
3
|
+
userId: string;
|
|
4
|
+
screeningId: string;
|
|
5
|
+
paymentMethodId?: string | undefined;
|
|
6
|
+
savePaymentMethod: boolean;
|
|
7
|
+
seats: SeatInput[];
|
|
8
|
+
}
|
|
9
|
+
export interface CreatePaymentResponse {
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ProcessPaymentEventRequest {
|
|
13
|
+
eventStatus: string;
|
|
14
|
+
paymentId: string;
|
|
15
|
+
bookingId: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
savePaymentMethod: boolean;
|
|
18
|
+
providerMethodId: string;
|
|
19
|
+
cardFirst6: string;
|
|
20
|
+
cardLast4: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ProcessPaymentEventResponse {
|
|
23
|
+
ok: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface SeatInput {
|
|
26
|
+
seatId: string;
|
|
27
|
+
seatPrice: number;
|
|
28
|
+
}
|
|
29
|
+
export interface PaymentServiceClient {
|
|
30
|
+
createPayment(request: CreatePaymentRequest): Observable<CreatePaymentResponse>;
|
|
31
|
+
processPaymentEvent(request: ProcessPaymentEventRequest): Observable<ProcessPaymentEventResponse>;
|
|
32
|
+
}
|
|
33
|
+
export interface PaymentServiceController {
|
|
34
|
+
createPayment(request: CreatePaymentRequest): Promise<CreatePaymentResponse> | Observable<CreatePaymentResponse> | CreatePaymentResponse;
|
|
35
|
+
processPaymentEvent(request: ProcessPaymentEventRequest): Promise<ProcessPaymentEventResponse> | Observable<ProcessPaymentEventResponse> | ProcessPaymentEventResponse;
|
|
36
|
+
}
|
|
37
|
+
export declare function PaymentServiceControllerMethods(): (constructor: Function) => void;
|
|
38
|
+
export declare const PAYMENT_SERVICE_NAME = "PaymentService";
|
|
@@ -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: payment.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.PAYMENT_SERVICE_NAME = void 0;
|
|
9
|
+
exports.PaymentServiceControllerMethods = PaymentServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
function PaymentServiceControllerMethods() {
|
|
13
|
+
return function (constructor) {
|
|
14
|
+
const grpcMethods = ["createPayment", "processPaymentEvent"];
|
|
15
|
+
for (const method of grpcMethods) {
|
|
16
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
17
|
+
(0, microservices_1.GrpcMethod)("PaymentService", 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)("PaymentService", method)(constructor.prototype[method], method, descriptor);
|
|
24
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.PAYMENT_SERVICE_NAME = "PaymentService";
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -13,4 +13,5 @@ exports.PROTO_PATHS = {
|
|
|
13
13
|
HALL: (0, path_1.join)(__dirname, "../../../proto/hall.proto"),
|
|
14
14
|
SEAT: (0, path_1.join)(__dirname, "../../../proto/seat.proto"),
|
|
15
15
|
SCREENING: (0, path_1.join)(__dirname, "../../../proto/screening.proto"),
|
|
16
|
+
PAYMENT: (0, path_1.join)(__dirname, "../../../proto/payment.proto"),
|
|
16
17
|
};
|
package/gen/ts/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * as common from "./index.common";
|
|
|
13
13
|
export * as hall from "./index.hall";
|
|
14
14
|
export * as media from "./index.media";
|
|
15
15
|
export * as movie from "./index.movie";
|
|
16
|
+
export * as payment from "./index.payment";
|
|
16
17
|
export * as screening from "./index.screening";
|
|
17
18
|
export * as seat from "./index.seat";
|
|
18
19
|
export * as theater from "./index.theater";
|
|
@@ -0,0 +1,76 @@
|
|
|
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: payment.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export interface CreatePaymentRequest {
|
|
12
|
+
userId: string;
|
|
13
|
+
screeningId: string;
|
|
14
|
+
paymentMethodId?: string | undefined;
|
|
15
|
+
savePaymentMethod: boolean;
|
|
16
|
+
seats: SeatInput[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CreatePaymentResponse {
|
|
20
|
+
url: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ProcessPaymentEventRequest {
|
|
24
|
+
eventStatus: string;
|
|
25
|
+
paymentId: string;
|
|
26
|
+
bookingId: string;
|
|
27
|
+
userId: string;
|
|
28
|
+
savePaymentMethod: boolean;
|
|
29
|
+
providerMethodId: string;
|
|
30
|
+
cardFirst6: string;
|
|
31
|
+
cardLast4: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ProcessPaymentEventResponse {
|
|
35
|
+
ok: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface SeatInput {
|
|
39
|
+
seatId: string;
|
|
40
|
+
seatPrice: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface PaymentServiceClient {
|
|
44
|
+
createPayment(request: CreatePaymentRequest): Observable<CreatePaymentResponse>;
|
|
45
|
+
|
|
46
|
+
processPaymentEvent(request: ProcessPaymentEventRequest): Observable<ProcessPaymentEventResponse>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface PaymentServiceController {
|
|
50
|
+
createPayment(
|
|
51
|
+
request: CreatePaymentRequest,
|
|
52
|
+
): Promise<CreatePaymentResponse> | Observable<CreatePaymentResponse> | CreatePaymentResponse;
|
|
53
|
+
|
|
54
|
+
processPaymentEvent(
|
|
55
|
+
request: ProcessPaymentEventRequest,
|
|
56
|
+
): Promise<ProcessPaymentEventResponse> | Observable<ProcessPaymentEventResponse> | ProcessPaymentEventResponse;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function PaymentServiceControllerMethods() {
|
|
60
|
+
return function (constructor: Function) {
|
|
61
|
+
const grpcMethods: string[] = ["createPayment", "processPaymentEvent"];
|
|
62
|
+
for (const method of grpcMethods) {
|
|
63
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
64
|
+
GrpcMethod("PaymentService", method)(constructor.prototype[method], method, descriptor);
|
|
65
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
66
|
+
}
|
|
67
|
+
const grpcStreamMethods: string[] = [];
|
|
68
|
+
for (const method of grpcStreamMethods) {
|
|
69
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
70
|
+
GrpcStreamMethod("PaymentService", method)(constructor.prototype[method], method, descriptor);
|
|
71
|
+
Object.defineProperty(constructor.prototype, method, descriptor);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const PAYMENT_SERVICE_NAME = "PaymentService";
|
package/package.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package payment.v1;
|
|
4
|
+
|
|
5
|
+
service PaymentService {
|
|
6
|
+
rpc CreatePayment(CreatePaymentRequest) returns (CreatePaymentResponse);
|
|
7
|
+
rpc ProcessPaymentEvent(ProcessPaymentEventRequest) returns (ProcessPaymentEventResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message CreatePaymentRequest {
|
|
11
|
+
string user_id = 1;
|
|
12
|
+
string screening_id = 2;
|
|
13
|
+
optional string payment_method_id = 3;
|
|
14
|
+
bool save_payment_method = 4;
|
|
15
|
+
repeated SeatInput seats = 5;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message CreatePaymentResponse {
|
|
19
|
+
string url = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message ProcessPaymentEventRequest {
|
|
23
|
+
string event_status = 1;
|
|
24
|
+
string payment_id = 2;
|
|
25
|
+
string booking_id = 3;
|
|
26
|
+
string user_id = 4;
|
|
27
|
+
bool save_payment_method = 5;
|
|
28
|
+
string provider_method_id = 6;
|
|
29
|
+
string card_first6 = 7;
|
|
30
|
+
string card_last4 = 8;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message ProcessPaymentEventResponse {
|
|
34
|
+
bool ok = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message SeatInput {
|
|
38
|
+
string seat_id = 1;
|
|
39
|
+
int32 seat_price = 2;
|
|
40
|
+
}
|