@vsniksnet/contracts 1.0.1 → 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.
- package/gen/account.ts +19 -0
- package/package.json +1 -1
- package/proto/account.proto +11 -0
package/gen/account.ts
CHANGED
|
@@ -10,6 +10,14 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "account.v1";
|
|
12
12
|
|
|
13
|
+
export interface VerifyAccountRequest {
|
|
14
|
+
token: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface VerifyAccountResponse {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
export interface ChangeTwoFactorRequest {
|
|
14
22
|
isTwoFactor: boolean;
|
|
15
23
|
userId: string;
|
|
@@ -70,6 +78,10 @@ export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
|
70
78
|
/** * User account service */
|
|
71
79
|
|
|
72
80
|
export interface AccountServiceClient {
|
|
81
|
+
/** Verify account */
|
|
82
|
+
|
|
83
|
+
verifyAccount(request: VerifyAccountRequest): Observable<VerifyAccountResponse>;
|
|
84
|
+
|
|
73
85
|
/** Switch two factor authentication */
|
|
74
86
|
|
|
75
87
|
changeTwoFactor(request: ChangeTwoFactorRequest): Observable<ChangeTwoFactorResponse>;
|
|
@@ -98,6 +110,12 @@ export interface AccountServiceClient {
|
|
|
98
110
|
/** * User account service */
|
|
99
111
|
|
|
100
112
|
export interface AccountServiceController {
|
|
113
|
+
/** Verify account */
|
|
114
|
+
|
|
115
|
+
verifyAccount(
|
|
116
|
+
request: VerifyAccountRequest,
|
|
117
|
+
): Promise<VerifyAccountResponse> | Observable<VerifyAccountResponse> | VerifyAccountResponse;
|
|
118
|
+
|
|
101
119
|
/** Switch two factor authentication */
|
|
102
120
|
|
|
103
121
|
changeTwoFactor(
|
|
@@ -138,6 +156,7 @@ export interface AccountServiceController {
|
|
|
138
156
|
export function AccountServiceControllerMethods() {
|
|
139
157
|
return function (constructor: Function) {
|
|
140
158
|
const grpcMethods: string[] = [
|
|
159
|
+
"verifyAccount",
|
|
141
160
|
"changeTwoFactor",
|
|
142
161
|
"changePassword",
|
|
143
162
|
"initEmailChange",
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -4,6 +4,9 @@ package account.v1;
|
|
|
4
4
|
|
|
5
5
|
/*** User account service */
|
|
6
6
|
service AccountService {
|
|
7
|
+
/** Verify account */
|
|
8
|
+
rpc VerifyAccount (VerifyAccountRequest) returns (VerifyAccountResponse);
|
|
9
|
+
|
|
7
10
|
/** Switch two factor authentication */
|
|
8
11
|
rpc ChangeTwoFactor (ChangeTwoFactorRequest) returns (ChangeTwoFactorResponse);
|
|
9
12
|
|
|
@@ -23,6 +26,14 @@ service AccountService {
|
|
|
23
26
|
rpc ConfirmPasswirdReset (ConfirmPasswirdResetRequest) returns (ConfirmPasswirdResetResponse);
|
|
24
27
|
}
|
|
25
28
|
|
|
29
|
+
message VerifyAccountRequest {
|
|
30
|
+
string token = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message VerifyAccountResponse {
|
|
34
|
+
bool ok = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
26
37
|
message ChangeTwoFactorRequest {
|
|
27
38
|
bool is_two_factor = 1;
|
|
28
39
|
string user_id = 2;
|