@aaanton/contracts 1.0.7 → 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
@@ -10,7 +10,7 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "account.v1";
12
12
 
13
- /** */
13
+ /** Enums */
14
14
  export enum Role {
15
15
  USER = 0,
16
16
  ADMIN = 1,
@@ -32,6 +32,52 @@ export interface GetAccountResponse {
32
32
  role: Role;
33
33
  }
34
34
 
35
+ /** */
36
+ export interface InitEmailChangeRequest {
37
+ email: string;
38
+ userId: string;
39
+ }
40
+
41
+ /** */
42
+ export interface InitEmailChangeResponse {
43
+ ok: boolean;
44
+ }
45
+
46
+ /** */
47
+ export interface ConfirmEmailChangeRequest {
48
+ email: string;
49
+ code: string;
50
+ userId: string;
51
+ }
52
+
53
+ /** */
54
+ export interface ConfirmEmailChangeResponse {
55
+ ok: boolean;
56
+ }
57
+
58
+ /** */
59
+ export interface InitPhoneChangeRequest {
60
+ phone: string;
61
+ userId: string;
62
+ }
63
+
64
+ /** */
65
+ export interface InitPhoneChangeResponse {
66
+ ok: boolean;
67
+ }
68
+
69
+ /** */
70
+ export interface ConfirmPhoneChangeRequest {
71
+ phone: string;
72
+ code: string;
73
+ userId: string;
74
+ }
75
+
76
+ /** */
77
+ export interface ConfirmPhoneChangeResponse {
78
+ ok: boolean;
79
+ }
80
+
35
81
  export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
36
82
 
37
83
  /** */
@@ -40,6 +86,22 @@ export interface AccountServiceClient {
40
86
  /** */
41
87
 
42
88
  getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
89
+
90
+ /** */
91
+
92
+ initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
93
+
94
+ /** */
95
+
96
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
97
+
98
+ /** */
99
+
100
+ initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
101
+
102
+ /** */
103
+
104
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
43
105
  }
44
106
 
45
107
  /** */
@@ -50,11 +112,41 @@ export interface AccountServiceController {
50
112
  getAccount(
51
113
  request: GetAccountRequest,
52
114
  ): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
115
+
116
+ /** */
117
+
118
+ initEmailChange(
119
+ request: InitEmailChangeRequest,
120
+ ): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
121
+
122
+ /** */
123
+
124
+ confirmEmailChange(
125
+ request: ConfirmEmailChangeRequest,
126
+ ): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
127
+
128
+ /** */
129
+
130
+ initPhoneChange(
131
+ request: InitPhoneChangeRequest,
132
+ ): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
133
+
134
+ /** */
135
+
136
+ confirmPhoneChange(
137
+ request: ConfirmPhoneChangeRequest,
138
+ ): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
53
139
  }
54
140
 
55
141
  export function AccountServiceControllerMethods() {
56
142
  return function (constructor: Function) {
57
- const grpcMethods: string[] = ["getAccount"];
143
+ const grpcMethods: string[] = [
144
+ "getAccount",
145
+ "initEmailChange",
146
+ "confirmEmailChange",
147
+ "initPhoneChange",
148
+ "confirmPhoneChange",
149
+ ];
58
150
  for (const method of grpcMethods) {
59
151
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
60
152
  GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaanton/contracts",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -6,6 +6,16 @@ package account.v1;
6
6
  service AccountService {
7
7
  //
8
8
  rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
9
+
10
+ //
11
+ rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
12
+ //
13
+ rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
14
+
15
+ //
16
+ rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
17
+ //
18
+ rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
9
19
  }
10
20
 
11
21
  //
@@ -24,6 +34,46 @@ message GetAccountResponse {
24
34
  }
25
35
 
26
36
  //
37
+ message InitEmailChangeRequest {
38
+ string email = 1;
39
+ string user_id = 2;
40
+ }
41
+ //
42
+ message InitEmailChangeResponse {
43
+ bool ok = 1;
44
+ }
45
+ //
46
+ message ConfirmEmailChangeRequest {
47
+ string email = 1;
48
+ string code = 2;
49
+ string user_id = 3;
50
+ }
51
+ //
52
+ message ConfirmEmailChangeResponse {
53
+ bool ok = 1;
54
+ }
55
+
56
+ //
57
+ message InitPhoneChangeRequest {
58
+ string phone = 1;
59
+ string user_id = 2;
60
+ }
61
+ //
62
+ message InitPhoneChangeResponse {
63
+ bool ok = 1;
64
+ }
65
+ //
66
+ message ConfirmPhoneChangeRequest {
67
+ string phone = 1;
68
+ string code = 2;
69
+ string user_id = 3;
70
+ }
71
+ //
72
+ message ConfirmPhoneChangeResponse {
73
+ bool ok = 1;
74
+ }
75
+
76
+ // Enums
27
77
  enum Role {
28
78
  USER = 0;
29
79
  ADMIN = 1;