@barumetric/contracts 1.1.1 → 1.1.3

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.
@@ -0,0 +1 @@
1
+ export * from './otp-requested.interface';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./otp-requested.interface"), exports);
@@ -0,0 +1,5 @@
1
+ export interface OtpRequestedEvent {
2
+ identifier: string;
3
+ type: string;
4
+ code: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./auth";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./auth"), exports);
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export * from './proto';
1
+ export * from "./proto";
2
+ export * from "./events";
package/dist/index.js CHANGED
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./proto"), exports);
18
+ __exportStar(require("./events"), exports);
package/gen/ts/account.ts CHANGED
@@ -35,21 +35,89 @@ export interface GetAccountResponse {
35
35
  role: Role;
36
36
  }
37
37
 
38
+ export interface InitEmailChangeRequest {
39
+ email: string;
40
+ userId: string;
41
+ }
42
+
43
+ export interface InitEmailChangeResponse {
44
+ ok: boolean;
45
+ }
46
+
47
+ export interface ConfirmEmailChangeRequest {
48
+ email: string;
49
+ code: string;
50
+ userId: string;
51
+ }
52
+
53
+ export interface ConfirmEmailChangeResponse {
54
+ ok: boolean;
55
+ }
56
+
57
+ export interface InitPhoneChangeRequest {
58
+ phone: string;
59
+ userId: string;
60
+ }
61
+
62
+ export interface InitPhoneChangeResponse {
63
+ ok: boolean;
64
+ }
65
+
66
+ export interface ConfirmPhoneChangeRequest {
67
+ phone: string;
68
+ code: string;
69
+ userId: string;
70
+ }
71
+
72
+ export interface ConfirmPhoneChangeResponse {
73
+ ok: boolean;
74
+ }
75
+
38
76
  export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
39
77
 
40
78
  export interface AccountServiceClient {
41
79
  getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
80
+
81
+ initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
82
+
83
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
84
+
85
+ initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
86
+
87
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
42
88
  }
43
89
 
44
90
  export interface AccountServiceController {
45
91
  getAccount(
46
92
  request: GetAccountRequest,
47
93
  ): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
94
+
95
+ initEmailChange(
96
+ request: InitEmailChangeRequest,
97
+ ): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
98
+
99
+ confirmEmailChange(
100
+ request: ConfirmEmailChangeRequest,
101
+ ): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
102
+
103
+ initPhoneChange(
104
+ request: InitPhoneChangeRequest,
105
+ ): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
106
+
107
+ confirmPhoneChange(
108
+ request: ConfirmPhoneChangeRequest,
109
+ ): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
48
110
  }
49
111
 
50
112
  export function AccountServiceControllerMethods() {
51
113
  return function (constructor: Function) {
52
- const grpcMethods: string[] = ["getAccount"];
114
+ const grpcMethods: string[] = [
115
+ "getAccount",
116
+ "initEmailChange",
117
+ "confirmEmailChange",
118
+ "initPhoneChange",
119
+ "confirmPhoneChange",
120
+ ];
53
121
  for (const method of grpcMethods) {
54
122
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
55
123
  GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -4,6 +4,12 @@ package account.v1;
4
4
 
5
5
  service AccountService {
6
6
  rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
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 GetAccountRequest {
@@ -19,6 +25,44 @@ message GetAccountResponse {
19
25
  Role 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 ConfirmEmailChangeRequest {
38
+ string email = 1;
39
+ string code = 2;
40
+ string user_id = 3;
41
+ }
42
+
43
+ message ConfirmEmailChangeResponse {
44
+ bool ok = 1;
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 Role {
23
67
  GUEST = 0;
24
68
  USER = 1;