@funpay-plasma/contracts 1.0.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.
@@ -0,0 +1,48 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.2
4
+ // protoc v5.29.6
5
+ // source: funpay-transport.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "funpayTransport.v1";
12
+
13
+ export interface GetAccountRequest {
14
+ id: string;
15
+ }
16
+
17
+ export interface GetAccountResponse {
18
+ ok: boolean;
19
+ }
20
+
21
+ export const FUNPAY_TRANSPORT_V1_PACKAGE_NAME = "funpayTransport.v1";
22
+
23
+ export interface FunpayTransportServiceClient {
24
+ getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
25
+ }
26
+
27
+ export interface FunpayTransportServiceController {
28
+ getAccount(
29
+ request: GetAccountRequest,
30
+ ): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
31
+ }
32
+
33
+ export function FunpayTransportServiceControllerMethods() {
34
+ return function (constructor: Function) {
35
+ const grpcMethods: string[] = ["getAccount"];
36
+ for (const method of grpcMethods) {
37
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
38
+ GrpcMethod("FunpayTransportService", method)(constructor.prototype[method], method, descriptor);
39
+ }
40
+ const grpcStreamMethods: string[] = [];
41
+ for (const method of grpcStreamMethods) {
42
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
43
+ GrpcStreamMethod("FunpayTransportService", method)(constructor.prototype[method], method, descriptor);
44
+ }
45
+ };
46
+ }
47
+
48
+ export const FUNPAY_TRANSPORT_SERVICE_NAME = "FunpayTransportService";
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@funpay-plasma/contracts",
3
+ "version": "1.0.0",
4
+ "description": "Protobuf definitions and generated TypeScript types",
5
+ "scripts": {
6
+ "generate": "npx protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
+ },
8
+ "files": [
9
+ "proto",
10
+ "gen"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "dependencies": {
16
+ "@nestjs/microservices": "^11.1.14",
17
+ "rxjs": "^7.8.2",
18
+ "ts-proto": "^2.11.2"
19
+ }
20
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+
3
+ package funpayTransport.v1;
4
+
5
+ service FunpayTransportService {
6
+ rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
7
+ }
8
+
9
+ message GetAccountRequest {
10
+ string id = 1;
11
+ }
12
+
13
+ message GetAccountResponse {
14
+ bool ok = 1;
15
+ }