@just-education-org/rpc-contracts 1.5.0 → 1.5.1

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.
@@ -17,12 +17,50 @@ export interface GetAccountResponse {
17
17
  isEmailVerified: boolean;
18
18
  role: Role;
19
19
  }
20
+ export interface InitEmailChangeRequest {
21
+ email: string;
22
+ userId: string;
23
+ }
24
+ export interface InitEmailChangeResponse {
25
+ ok: boolean;
26
+ }
27
+ export interface ConfirmEmailChangeRequest {
28
+ email: string;
29
+ code: string;
30
+ userId: string;
31
+ }
32
+ export interface ConfirmEmailChangeResponse {
33
+ ok: boolean;
34
+ }
35
+ export interface InitPhoneChangeRequest {
36
+ phone: string;
37
+ userId: string;
38
+ }
39
+ export interface InitPhoneChangeResponse {
40
+ ok: boolean;
41
+ }
42
+ export interface ConfirmPhoneChangeRequest {
43
+ phone: string;
44
+ code: string;
45
+ userId: string;
46
+ }
47
+ export interface ConfirmPhoneChangeResponse {
48
+ ok: boolean;
49
+ }
20
50
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
21
51
  export interface AccountServiceClient {
22
52
  getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
53
+ initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
54
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
55
+ initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
56
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
23
57
  }
24
58
  export interface AccountServiceController {
25
59
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
60
+ initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
61
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
62
+ initPhoneChange(request: InitPhoneChangeRequest): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
63
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
26
64
  }
27
65
  export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
28
66
  export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -20,7 +20,13 @@ var Role;
20
20
  exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
21
21
  function AccountServiceControllerMethods() {
22
22
  return function (constructor) {
23
- const grpcMethods = ["getAccount"];
23
+ const grpcMethods = [
24
+ "getAccount",
25
+ "initEmailChange",
26
+ "confirmEmailChange",
27
+ "initPhoneChange",
28
+ "confirmPhoneChange",
29
+ ];
24
30
  for (const method of grpcMethods) {
25
31
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
32
  (0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@just-education-org/rpc-contracts",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Protobuf definitions and generated TS types",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",