@funpay-plasma/contracts 1.0.0 → 1.0.2
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.
|
@@ -2,47 +2,45 @@
|
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.2
|
|
4
4
|
// protoc v5.29.6
|
|
5
|
-
// source:
|
|
5
|
+
// source: account.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
10
|
|
|
11
|
-
export const protobufPackage = "
|
|
11
|
+
export const protobufPackage = "account.v1";
|
|
12
12
|
|
|
13
13
|
export interface GetAccountRequest {
|
|
14
|
-
id: string;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export interface GetAccountResponse {
|
|
18
|
-
ok: boolean;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
export const
|
|
19
|
+
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
22
20
|
|
|
23
|
-
export interface
|
|
21
|
+
export interface AccountServiceClient {
|
|
24
22
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
|
-
export interface
|
|
25
|
+
export interface AccountServiceController {
|
|
28
26
|
getAccount(
|
|
29
27
|
request: GetAccountRequest,
|
|
30
28
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
31
29
|
}
|
|
32
30
|
|
|
33
|
-
export function
|
|
31
|
+
export function AccountServiceControllerMethods() {
|
|
34
32
|
return function (constructor: Function) {
|
|
35
33
|
const grpcMethods: string[] = ["getAccount"];
|
|
36
34
|
for (const method of grpcMethods) {
|
|
37
35
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
38
|
-
GrpcMethod("
|
|
36
|
+
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
39
37
|
}
|
|
40
38
|
const grpcStreamMethods: string[] = [];
|
|
41
39
|
for (const method of grpcStreamMethods) {
|
|
42
40
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
43
|
-
GrpcStreamMethod("
|
|
41
|
+
GrpcStreamMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
|
44
42
|
}
|
|
45
43
|
};
|
|
46
44
|
}
|
|
47
45
|
|
|
48
|
-
export const
|
|
46
|
+
export const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funpay-plasma/contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Protobuf definitions and generated TypeScript types",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "npx protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|