@tcinema-pro/contracts 1.0.6 → 1.0.7
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 +69 -1
- package/package.json +1 -1
- package/proto/account.proto +52 -0
package/gen/account.ts
CHANGED
|
@@ -16,6 +16,44 @@ export enum Role {
|
|
|
16
16
|
UNRECOGNIZED = -1,
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export interface ChangeEmailRequest {
|
|
20
|
+
userId: string;
|
|
21
|
+
email: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ChangeEmailResponse {
|
|
25
|
+
ok: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ChangeEmailConfirmRequest {
|
|
29
|
+
userId: string;
|
|
30
|
+
email: string;
|
|
31
|
+
code: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ChangeEmailConfirmResponse {
|
|
35
|
+
ok: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ChangePhoneRequest {
|
|
39
|
+
userId: string;
|
|
40
|
+
phone: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ChangePhoneResponse {
|
|
44
|
+
ok: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ChangePhoneConfirmRequest {
|
|
48
|
+
userId: string;
|
|
49
|
+
phone: string;
|
|
50
|
+
code: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ChangePhoneConfirmResponse {
|
|
54
|
+
ok: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
19
57
|
export interface GetAccountRequest {
|
|
20
58
|
id: string;
|
|
21
59
|
}
|
|
@@ -33,17 +71,47 @@ export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
|
33
71
|
|
|
34
72
|
export interface AccountServiceClient {
|
|
35
73
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
74
|
+
|
|
75
|
+
changeEmail(request: ChangeEmailRequest): Observable<ChangeEmailResponse>;
|
|
76
|
+
|
|
77
|
+
changeEmailConfirm(request: ChangeEmailConfirmRequest): Observable<ChangeEmailConfirmResponse>;
|
|
78
|
+
|
|
79
|
+
changePhone(request: ChangePhoneRequest): Observable<ChangePhoneResponse>;
|
|
80
|
+
|
|
81
|
+
changePhoneConfirm(request: ChangePhoneConfirmRequest): Observable<ChangePhoneConfirmResponse>;
|
|
36
82
|
}
|
|
37
83
|
|
|
38
84
|
export interface AccountServiceController {
|
|
39
85
|
getAccount(
|
|
40
86
|
request: GetAccountRequest,
|
|
41
87
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
88
|
+
|
|
89
|
+
changeEmail(
|
|
90
|
+
request: ChangeEmailRequest,
|
|
91
|
+
): Promise<ChangeEmailResponse> | Observable<ChangeEmailResponse> | ChangeEmailResponse;
|
|
92
|
+
|
|
93
|
+
changeEmailConfirm(
|
|
94
|
+
request: ChangeEmailConfirmRequest,
|
|
95
|
+
): Promise<ChangeEmailConfirmResponse> | Observable<ChangeEmailConfirmResponse> | ChangeEmailConfirmResponse;
|
|
96
|
+
|
|
97
|
+
changePhone(
|
|
98
|
+
request: ChangePhoneRequest,
|
|
99
|
+
): Promise<ChangePhoneResponse> | Observable<ChangePhoneResponse> | ChangePhoneResponse;
|
|
100
|
+
|
|
101
|
+
changePhoneConfirm(
|
|
102
|
+
request: ChangePhoneConfirmRequest,
|
|
103
|
+
): Promise<ChangePhoneConfirmResponse> | Observable<ChangePhoneConfirmResponse> | ChangePhoneConfirmResponse;
|
|
42
104
|
}
|
|
43
105
|
|
|
44
106
|
export function AccountServiceControllerMethods() {
|
|
45
107
|
return function (constructor: Function) {
|
|
46
|
-
const grpcMethods: string[] = [
|
|
108
|
+
const grpcMethods: string[] = [
|
|
109
|
+
"getAccount",
|
|
110
|
+
"changeEmail",
|
|
111
|
+
"changeEmailConfirm",
|
|
112
|
+
"changePhone",
|
|
113
|
+
"changePhoneConfirm",
|
|
114
|
+
];
|
|
47
115
|
for (const method of grpcMethods) {
|
|
48
116
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
49
117
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -4,6 +4,58 @@ package account.v1;
|
|
|
4
4
|
|
|
5
5
|
service AccountService {
|
|
6
6
|
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
7
|
+
|
|
8
|
+
rpc ChangeEmail(ChangeEmailRequest) returns (ChangeEmailResponse);
|
|
9
|
+
rpc ChangeEmailConfirm(ChangeEmailConfirmRequest) returns (ChangeEmailConfirmResponse);
|
|
10
|
+
|
|
11
|
+
rpc ChangePhone(ChangePhoneRequest) returns (ChangePhoneResponse);
|
|
12
|
+
rpc ChangePhoneConfirm(ChangePhoneConfirmRequest) returns (ChangePhoneConfirmResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* -------- CHANGE EMAIL -------- */
|
|
16
|
+
|
|
17
|
+
message ChangeEmailRequest {
|
|
18
|
+
string user_id = 1;
|
|
19
|
+
string email = 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message ChangeEmailResponse {
|
|
23
|
+
bool ok = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* -------- CHANGE EMAIL CONFIRM -------- */
|
|
27
|
+
|
|
28
|
+
message ChangeEmailConfirmRequest {
|
|
29
|
+
string user_id = 1;
|
|
30
|
+
string email = 2;
|
|
31
|
+
string code = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message ChangeEmailConfirmResponse {
|
|
35
|
+
bool ok = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* -------- CHANGE PHONE -------- */
|
|
39
|
+
|
|
40
|
+
message ChangePhoneRequest {
|
|
41
|
+
string user_id = 1;
|
|
42
|
+
string phone = 2;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message ChangePhoneResponse {
|
|
46
|
+
bool ok = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* -------- CHANGE PHONE CONFIRM -------- */
|
|
50
|
+
|
|
51
|
+
message ChangePhoneConfirmRequest {
|
|
52
|
+
string user_id = 1;
|
|
53
|
+
string phone = 2;
|
|
54
|
+
string code = 3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message ChangePhoneConfirmResponse {
|
|
58
|
+
bool ok = 1;
|
|
7
59
|
}
|
|
8
60
|
|
|
9
61
|
message GetAccountRequest {
|