@funpay-pilot/contracts 0.0.4 → 0.0.6
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/proto/paths.d.ts +2 -0
- package/dist/proto/paths.js +2 -0
- package/gen/funpay.ts +55 -0
- package/package.json +1 -1
- package/proto/funpay.proto +22 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -4,4 +4,6 @@ exports.PROTO_PATHS = void 0;
|
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
exports.PROTO_PATHS = {
|
|
6
6
|
AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
|
|
7
|
+
USERS: (0, path_1.join)(__dirname, '../../proto/users.proto'),
|
|
8
|
+
FUNPAY: (0, path_1.join)(__dirname, '../../proto/funpay.proto'),
|
|
7
9
|
};
|
package/gen/funpay.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.6
|
|
4
|
+
// protoc v7.34.0
|
|
5
|
+
// source: funpay.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "funpay.v1";
|
|
12
|
+
|
|
13
|
+
export interface CreateAccountRequest {
|
|
14
|
+
userId: string;
|
|
15
|
+
goldenKey: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface CreateAccountResponse {
|
|
19
|
+
id: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
funpayId: number;
|
|
22
|
+
goldenKey: string;
|
|
23
|
+
csrfToken: string;
|
|
24
|
+
username: string;
|
|
25
|
+
avatarUrl: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const FUNPAY_V1_PACKAGE_NAME = "funpay.v1";
|
|
29
|
+
|
|
30
|
+
export interface FunpayServiceClient {
|
|
31
|
+
createAccount(request: CreateAccountRequest): Observable<CreateAccountResponse>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface FunpayServiceController {
|
|
35
|
+
createAccount(
|
|
36
|
+
request: CreateAccountRequest,
|
|
37
|
+
): Promise<CreateAccountResponse> | Observable<CreateAccountResponse> | CreateAccountResponse;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function FunpayServiceControllerMethods() {
|
|
41
|
+
return function (constructor: Function) {
|
|
42
|
+
const grpcMethods: string[] = ["createAccount"];
|
|
43
|
+
for (const method of grpcMethods) {
|
|
44
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
45
|
+
GrpcMethod("FunpayService", method)(constructor.prototype[method], method, descriptor);
|
|
46
|
+
}
|
|
47
|
+
const grpcStreamMethods: string[] = [];
|
|
48
|
+
for (const method of grpcStreamMethods) {
|
|
49
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
50
|
+
GrpcStreamMethod("FunpayService", method)(constructor.prototype[method], method, descriptor);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const FUNPAY_SERVICE_NAME = "FunpayService";
|
package/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package funpay.v1;
|
|
4
|
+
|
|
5
|
+
service FunpayService {
|
|
6
|
+
rpc CreateAccount(CreateAccountRequest) returns (CreateAccountResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message CreateAccountRequest {
|
|
10
|
+
string user_id = 1;
|
|
11
|
+
string golden_key = 2;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message CreateAccountResponse {
|
|
15
|
+
string id = 1;
|
|
16
|
+
string user_id = 2;
|
|
17
|
+
int32 funpay_id = 3;
|
|
18
|
+
string golden_key = 4;
|
|
19
|
+
string csrf_token = 5;
|
|
20
|
+
string username = 6;
|
|
21
|
+
string avatar_url = 7;
|
|
22
|
+
}
|