@cinema-mc/contacts 1.0.5 → 1.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/gen/account.ts +85 -1
- package/package.json +1 -1
- package/proto/account.proto +42 -1
package/gen/account.ts
CHANGED
|
@@ -29,6 +29,44 @@ export interface GetAccountResponse {
|
|
|
29
29
|
role: Role;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export interface InitEmailChangeRequest {
|
|
33
|
+
email: string;
|
|
34
|
+
userId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface InitEmailChangeResponse {
|
|
38
|
+
ok: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ConfirmEmailChangeRequest {
|
|
42
|
+
email: string;
|
|
43
|
+
code: string;
|
|
44
|
+
userId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ConfirmEmailChangeResponse {
|
|
48
|
+
ok: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface InitPhoneChangeRequest {
|
|
52
|
+
phone: string;
|
|
53
|
+
userId: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface InitPhoneChangeResponse {
|
|
57
|
+
ok: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ConfirmPhoneChangeRequest {
|
|
61
|
+
phone: string;
|
|
62
|
+
code: string;
|
|
63
|
+
userId: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ConfirmPhoneChangeResponse {
|
|
67
|
+
ok: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
32
70
|
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
33
71
|
|
|
34
72
|
/** Account Service */
|
|
@@ -37,6 +75,22 @@ export interface AccountServiceClient {
|
|
|
37
75
|
/** Get all account info */
|
|
38
76
|
|
|
39
77
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
78
|
+
|
|
79
|
+
/** Initiate the process of changing the email address for an account */
|
|
80
|
+
|
|
81
|
+
initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
|
|
82
|
+
|
|
83
|
+
/** Confirms the email change for an account. */
|
|
84
|
+
|
|
85
|
+
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
|
|
86
|
+
|
|
87
|
+
/** Initiate the process of changing the Phone address for an account */
|
|
88
|
+
|
|
89
|
+
initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
|
|
90
|
+
|
|
91
|
+
/** Confirms the Phone change for an account. */
|
|
92
|
+
|
|
93
|
+
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
|
|
40
94
|
}
|
|
41
95
|
|
|
42
96
|
/** Account Service */
|
|
@@ -47,11 +101,41 @@ export interface AccountServiceController {
|
|
|
47
101
|
getAccount(
|
|
48
102
|
request: GetAccountRequest,
|
|
49
103
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
104
|
+
|
|
105
|
+
/** Initiate the process of changing the email address for an account */
|
|
106
|
+
|
|
107
|
+
initEmailChange(
|
|
108
|
+
request: InitEmailChangeRequest,
|
|
109
|
+
): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
|
|
110
|
+
|
|
111
|
+
/** Confirms the email change for an account. */
|
|
112
|
+
|
|
113
|
+
confirmEmailChange(
|
|
114
|
+
request: ConfirmEmailChangeRequest,
|
|
115
|
+
): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
116
|
+
|
|
117
|
+
/** Initiate the process of changing the Phone address for an account */
|
|
118
|
+
|
|
119
|
+
initPhoneChange(
|
|
120
|
+
request: InitPhoneChangeRequest,
|
|
121
|
+
): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
|
|
122
|
+
|
|
123
|
+
/** Confirms the Phone change for an account. */
|
|
124
|
+
|
|
125
|
+
confirmPhoneChange(
|
|
126
|
+
request: ConfirmPhoneChangeRequest,
|
|
127
|
+
): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
|
|
50
128
|
}
|
|
51
129
|
|
|
52
130
|
export function AccountServiceControllerMethods() {
|
|
53
131
|
return function (constructor: Function) {
|
|
54
|
-
const grpcMethods: string[] = [
|
|
132
|
+
const grpcMethods: string[] = [
|
|
133
|
+
"getAccount",
|
|
134
|
+
"initEmailChange",
|
|
135
|
+
"confirmEmailChange",
|
|
136
|
+
"initPhoneChange",
|
|
137
|
+
"confirmPhoneChange",
|
|
138
|
+
];
|
|
55
139
|
for (const method of grpcMethods) {
|
|
56
140
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
57
141
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -6,6 +6,14 @@ package account.v1;
|
|
|
6
6
|
service AccountService {
|
|
7
7
|
//Get all account info
|
|
8
8
|
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
|
|
9
|
+
// Initiate the process of changing the email address for an account
|
|
10
|
+
rpc InitEmailChange(InitEmailChangeRequest) returns (InitEmailChangeResponse);
|
|
11
|
+
// Confirms the email change for an account.
|
|
12
|
+
rpc ConfirmEmailChange(ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
|
|
13
|
+
// Initiate the process of changing the Phone address for an account
|
|
14
|
+
rpc InitPhoneChange(InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
|
|
15
|
+
// Confirms the Phone change for an account.
|
|
16
|
+
rpc ConfirmPhoneChange(ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
message GetAccountRequest {
|
|
@@ -21,7 +29,40 @@ message GetAccountResponse {
|
|
|
21
29
|
Role role = 6;
|
|
22
30
|
}
|
|
23
31
|
|
|
32
|
+
|
|
33
|
+
message InitEmailChangeRequest {
|
|
34
|
+
string email = 1;
|
|
35
|
+
string user_id = 2;
|
|
36
|
+
}
|
|
37
|
+
message InitEmailChangeResponse {
|
|
38
|
+
bool ok = 1;
|
|
39
|
+
}
|
|
40
|
+
message ConfirmEmailChangeRequest {
|
|
41
|
+
string email = 1;
|
|
42
|
+
string code = 2;
|
|
43
|
+
string user_id = 3;
|
|
44
|
+
}
|
|
45
|
+
message ConfirmEmailChangeResponse {
|
|
46
|
+
bool ok = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message InitPhoneChangeRequest {
|
|
50
|
+
string phone = 1;
|
|
51
|
+
string user_id = 2;
|
|
52
|
+
}
|
|
53
|
+
message InitPhoneChangeResponse {
|
|
54
|
+
bool ok = 1;
|
|
55
|
+
}
|
|
56
|
+
message ConfirmPhoneChangeRequest {
|
|
57
|
+
string phone = 1;
|
|
58
|
+
string code = 2;
|
|
59
|
+
string user_id = 3;
|
|
60
|
+
}
|
|
61
|
+
message ConfirmPhoneChangeResponse {
|
|
62
|
+
bool ok = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
24
65
|
enum Role {
|
|
25
66
|
USER = 0;
|
|
26
67
|
ADMIN = 1;
|
|
27
|
-
}
|
|
68
|
+
}
|