@funpay-pilot/contracts 0.1.12 → 0.1.14
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/gen/funpay.ts +18 -4
- package/package.json +1 -1
- package/proto/funpay.proto +8 -2
package/gen/funpay.ts
CHANGED
|
@@ -35,6 +35,12 @@ export interface GetAccountRequest {
|
|
|
35
35
|
id: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export interface SetAccountStatusRequest {
|
|
39
|
+
userId: string;
|
|
40
|
+
id: string;
|
|
41
|
+
status: Status;
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
export interface DeleteAccountRequest {
|
|
39
45
|
userId: string;
|
|
40
46
|
id: string;
|
|
@@ -48,14 +54,12 @@ export interface Account {
|
|
|
48
54
|
id: string;
|
|
49
55
|
userId: string;
|
|
50
56
|
funpayId: number;
|
|
51
|
-
/** need remove */
|
|
52
|
-
cookies: string;
|
|
53
57
|
phpsessid: string;
|
|
54
58
|
csrfToken: string;
|
|
55
59
|
username: string;
|
|
56
60
|
avatarUrl: string;
|
|
57
61
|
balance: number;
|
|
58
|
-
|
|
62
|
+
status: Status;
|
|
59
63
|
error?: string | undefined;
|
|
60
64
|
createdAt: Timestamp | undefined;
|
|
61
65
|
updatedAt: Timestamp | undefined;
|
|
@@ -70,6 +74,8 @@ export interface FunpayServiceClient {
|
|
|
70
74
|
|
|
71
75
|
getAccount(request: GetAccountRequest): Observable<Account>;
|
|
72
76
|
|
|
77
|
+
setAccountStatus(request: SetAccountStatusRequest): Observable<Account>;
|
|
78
|
+
|
|
73
79
|
deleteAccount(request: DeleteAccountRequest): Observable<DeleteAccountResponse>;
|
|
74
80
|
}
|
|
75
81
|
|
|
@@ -82,6 +88,8 @@ export interface FunpayServiceController {
|
|
|
82
88
|
|
|
83
89
|
getAccount(request: GetAccountRequest): Promise<Account> | Observable<Account> | Account;
|
|
84
90
|
|
|
91
|
+
setAccountStatus(request: SetAccountStatusRequest): Promise<Account> | Observable<Account> | Account;
|
|
92
|
+
|
|
85
93
|
deleteAccount(
|
|
86
94
|
request: DeleteAccountRequest,
|
|
87
95
|
): Promise<DeleteAccountResponse> | Observable<DeleteAccountResponse> | DeleteAccountResponse;
|
|
@@ -89,7 +97,13 @@ export interface FunpayServiceController {
|
|
|
89
97
|
|
|
90
98
|
export function FunpayServiceControllerMethods() {
|
|
91
99
|
return function (constructor: Function) {
|
|
92
|
-
const grpcMethods: string[] = [
|
|
100
|
+
const grpcMethods: string[] = [
|
|
101
|
+
"createAccount",
|
|
102
|
+
"getAccountsList",
|
|
103
|
+
"getAccount",
|
|
104
|
+
"setAccountStatus",
|
|
105
|
+
"deleteAccount",
|
|
106
|
+
];
|
|
93
107
|
for (const method of grpcMethods) {
|
|
94
108
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
95
109
|
GrpcMethod("FunpayService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/funpay.proto
CHANGED
|
@@ -8,6 +8,7 @@ service FunpayService {
|
|
|
8
8
|
rpc CreateAccount(CreateAccountRequest) returns (Account);
|
|
9
9
|
rpc GetAccountsList(GetAccountsListRequest) returns (GetAccountsListResponse);
|
|
10
10
|
rpc GetAccount(GetAccountRequest) returns (Account);
|
|
11
|
+
rpc SetAccountStatus(SetAccountStatusRequest) returns (Account);
|
|
11
12
|
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse);
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -29,6 +30,12 @@ message GetAccountRequest {
|
|
|
29
30
|
string id = 2;
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
message SetAccountStatusRequest {
|
|
34
|
+
string user_id = 1;
|
|
35
|
+
string id = 2;
|
|
36
|
+
Status status = 3;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
message DeleteAccountRequest {
|
|
33
40
|
string user_id = 1;
|
|
34
41
|
string id = 2;
|
|
@@ -42,13 +49,12 @@ message Account {
|
|
|
42
49
|
string id = 1;
|
|
43
50
|
string user_id = 2;
|
|
44
51
|
int32 funpay_id = 3;
|
|
45
|
-
string cookies = 4; // need remove
|
|
46
52
|
string phpsessid = 5;
|
|
47
53
|
string csrf_token = 6;
|
|
48
54
|
string username = 7;
|
|
49
55
|
string avatar_url = 8;
|
|
50
56
|
float balance = 9;
|
|
51
|
-
|
|
57
|
+
Status status = 10;
|
|
52
58
|
optional string error = 11;
|
|
53
59
|
google.protobuf.Timestamp created_at = 12;
|
|
54
60
|
google.protobuf.Timestamp updated_at = 13;
|