@eternalvisionshining/contracts 1.0.6 → 1.0.8

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 CHANGED
@@ -29,19 +29,87 @@ export interface AccountResponse {
29
29
  role: EnumRole;
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 ConfirmEmailChangeResponse {
42
+ ok: boolean;
43
+ }
44
+
45
+ export interface ConfirmEmailChangeRequest {
46
+ email: string;
47
+ code: string;
48
+ userId: string;
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
  export interface AccountServiceClient {
35
73
  getAccount(request: AccountRequest): Observable<AccountResponse>;
74
+
75
+ initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
76
+
77
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
78
+
79
+ initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
80
+
81
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
36
82
  }
37
83
 
38
84
  export interface AccountServiceController {
39
85
  getAccount(request: AccountRequest): Promise<AccountResponse> | Observable<AccountResponse> | AccountResponse;
86
+
87
+ initEmailChange(
88
+ request: InitEmailChangeRequest,
89
+ ): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
90
+
91
+ confirmEmailChange(
92
+ request: ConfirmEmailChangeRequest,
93
+ ): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
94
+
95
+ initPhoneChange(
96
+ request: InitPhoneChangeRequest,
97
+ ): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
98
+
99
+ confirmPhoneChange(
100
+ request: ConfirmPhoneChangeRequest,
101
+ ): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
40
102
  }
41
103
 
42
104
  export function AccountServiceControllerMethods() {
43
105
  return function (constructor: Function) {
44
- const grpcMethods: string[] = ["getAccount"];
106
+ const grpcMethods: string[] = [
107
+ "getAccount",
108
+ "initEmailChange",
109
+ "confirmEmailChange",
110
+ "initPhoneChange",
111
+ "confirmPhoneChange",
112
+ ];
45
113
  for (const method of grpcMethods) {
46
114
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
47
115
  GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eternalvisionshining/contracts",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "protocol buffers definitions and generating TypeScript types",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -4,6 +4,12 @@ package account.v1;
4
4
 
5
5
  service AccountService {
6
6
  rpc GetAccount (AccountRequest) returns (AccountResponse);
7
+
8
+ rpc InitEmailChange(InitEmailChangeRequest) returns (InitEmailChangeResponse);
9
+ rpc ConfirmEmailChange(ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
10
+
11
+ rpc InitPhoneChange(InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
+ rpc ConfirmPhoneChange(ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
7
13
  }
8
14
 
9
15
  message AccountRequest {
@@ -19,6 +25,44 @@ message AccountResponse {
19
25
  EnumRole role = 6;
20
26
  }
21
27
 
28
+ message InitEmailChangeRequest {
29
+ string email = 1;
30
+ string user_id = 2;
31
+ }
32
+
33
+ message InitEmailChangeResponse {
34
+ bool ok = 1;
35
+ }
36
+
37
+ message ConfirmEmailChangeResponse {
38
+ bool ok = 1;
39
+ }
40
+
41
+ message ConfirmEmailChangeRequest {
42
+ string email = 1;
43
+ string code = 2;
44
+ string user_id = 3;
45
+ }
46
+
47
+ message InitPhoneChangeRequest {
48
+ string phone = 1;
49
+ string user_id = 2;
50
+ }
51
+
52
+ message InitPhoneChangeResponse {
53
+ bool ok = 1;
54
+ }
55
+
56
+ message ConfirmPhoneChangeRequest {
57
+ string phone = 1;
58
+ string code = 2;
59
+ string user_id = 3;
60
+ }
61
+
62
+ message ConfirmPhoneChangeResponse {
63
+ bool ok = 1;
64
+ }
65
+
22
66
  enum EnumRole {
23
67
  USER = 0;
24
68
  ADMIN = 1;