@mamindom/contracts 1.0.38 → 1.0.40

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.
@@ -51,6 +51,39 @@ export interface ConfirmPhoneChangeRequest {
51
51
  export interface ConfirmPhoneChangeResponse {
52
52
  ok: boolean;
53
53
  }
54
+ export interface AdminGetAccountRequest {
55
+ id: string;
56
+ }
57
+ export interface AdminGetAccountResponse {
58
+ id: string;
59
+ phone: string;
60
+ email: string;
61
+ firstName: string;
62
+ lastName: string;
63
+ isEmailVerified: boolean;
64
+ isPhoneVerified: boolean;
65
+ role: Role;
66
+ isBlocked: boolean;
67
+ createdAt: string;
68
+ }
69
+ export interface AdminBlockAccountRequest {
70
+ id: string;
71
+ block: boolean;
72
+ }
73
+ export interface AdminBlockAccountResponse {
74
+ ok: boolean;
75
+ }
76
+ export interface AdminCreateAccountRequest {
77
+ email?: string | undefined;
78
+ phone?: string | undefined;
79
+ password: string;
80
+ firstName: string;
81
+ lastName: string;
82
+ role: Role;
83
+ }
84
+ export interface AdminCreateAccountResponse {
85
+ id: string;
86
+ }
54
87
  export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
55
88
  export interface AccountServiceClient {
56
89
  getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
@@ -58,6 +91,9 @@ export interface AccountServiceClient {
58
91
  confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
59
92
  initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
60
93
  confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
94
+ adminGetAccount(request: AdminGetAccountRequest): Observable<AdminGetAccountResponse>;
95
+ adminBlockAccount(request: AdminBlockAccountRequest): Observable<AdminBlockAccountResponse>;
96
+ adminCreateAccount(request: AdminCreateAccountRequest): Observable<AdminCreateAccountResponse>;
61
97
  }
62
98
  export interface AccountServiceController {
63
99
  getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
@@ -65,6 +101,9 @@ export interface AccountServiceController {
65
101
  confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
66
102
  initPhoneChange(request: InitPhoneChangeRequest): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
67
103
  confirmPhoneChange(request: ConfirmPhoneChangeRequest): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
104
+ adminGetAccount(request: AdminGetAccountRequest): Promise<AdminGetAccountResponse> | Observable<AdminGetAccountResponse> | AdminGetAccountResponse;
105
+ adminBlockAccount(request: AdminBlockAccountRequest): Promise<AdminBlockAccountResponse> | Observable<AdminBlockAccountResponse> | AdminBlockAccountResponse;
106
+ adminCreateAccount(request: AdminCreateAccountRequest): Promise<AdminCreateAccountResponse> | Observable<AdminCreateAccountResponse> | AdminCreateAccountResponse;
68
107
  }
69
108
  export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
70
109
  export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -28,6 +28,9 @@ function AccountServiceControllerMethods() {
28
28
  "confirmEmailChange",
29
29
  "initPhoneChange",
30
30
  "confirmPhoneChange",
31
+ "adminGetAccount",
32
+ "adminBlockAccount",
33
+ "adminCreateAccount",
31
34
  ];
32
35
  for (const method of grpcMethods) {
33
36
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
@@ -10,6 +10,10 @@ service AccountService {
10
10
 
11
11
  rpc InitPhoneChange(InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
12
  rpc ConfirmPhoneChange(ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
13
+
14
+ rpc AdminGetAccount(AdminGetAccountRequest) returns (AdminGetAccountResponse);
15
+ rpc AdminBlockAccount(AdminBlockAccountRequest) returns (AdminBlockAccountResponse);
16
+ rpc AdminCreateAccount(AdminCreateAccountRequest) returns (AdminCreateAccountResponse);
13
17
  }
14
18
 
15
19
  message GetAccountRequest {
@@ -71,6 +75,45 @@ message ConfirmPhoneChangeResponse {
71
75
  bool ok = 1;
72
76
  }
73
77
 
78
+ message AdminGetAccountRequest {
79
+ string id = 1;
80
+ }
81
+
82
+ message AdminGetAccountResponse {
83
+ string id = 1;
84
+ string phone = 2;
85
+ string email = 3;
86
+ string first_name = 4;
87
+ string last_name = 5;
88
+ bool is_email_verified = 6;
89
+ bool is_phone_verified = 7;
90
+ Role role = 8;
91
+ bool is_blocked = 9;
92
+ string created_at = 10;
93
+ }
94
+
95
+ message AdminBlockAccountRequest {
96
+ string id = 1;
97
+ bool block = 2;
98
+ }
99
+
100
+ message AdminBlockAccountResponse {
101
+ bool ok = 1;
102
+ }
103
+
104
+ message AdminCreateAccountRequest {
105
+ optional string email = 1;
106
+ optional string phone = 2;
107
+ string password = 3;
108
+ string first_name = 4;
109
+ string last_name = 5;
110
+ Role role = 6;
111
+ }
112
+
113
+ message AdminCreateAccountResponse {
114
+ string id = 1;
115
+ }
116
+
74
117
 
75
118
 
76
119
 
package/gen/account.ts CHANGED
@@ -72,6 +72,45 @@ export interface ConfirmPhoneChangeResponse {
72
72
  ok: boolean;
73
73
  }
74
74
 
75
+ export interface AdminGetAccountRequest {
76
+ id: string;
77
+ }
78
+
79
+ export interface AdminGetAccountResponse {
80
+ id: string;
81
+ phone: string;
82
+ email: string;
83
+ firstName: string;
84
+ lastName: string;
85
+ isEmailVerified: boolean;
86
+ isPhoneVerified: boolean;
87
+ role: Role;
88
+ isBlocked: boolean;
89
+ createdAt: string;
90
+ }
91
+
92
+ export interface AdminBlockAccountRequest {
93
+ id: string;
94
+ block: boolean;
95
+ }
96
+
97
+ export interface AdminBlockAccountResponse {
98
+ ok: boolean;
99
+ }
100
+
101
+ export interface AdminCreateAccountRequest {
102
+ email?: string | undefined;
103
+ phone?: string | undefined;
104
+ password: string;
105
+ firstName: string;
106
+ lastName: string;
107
+ role: Role;
108
+ }
109
+
110
+ export interface AdminCreateAccountResponse {
111
+ id: string;
112
+ }
113
+
75
114
  export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
76
115
 
77
116
  export interface AccountServiceClient {
@@ -84,6 +123,12 @@ export interface AccountServiceClient {
84
123
  initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
85
124
 
86
125
  confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
126
+
127
+ adminGetAccount(request: AdminGetAccountRequest): Observable<AdminGetAccountResponse>;
128
+
129
+ adminBlockAccount(request: AdminBlockAccountRequest): Observable<AdminBlockAccountResponse>;
130
+
131
+ adminCreateAccount(request: AdminCreateAccountRequest): Observable<AdminCreateAccountResponse>;
87
132
  }
88
133
 
89
134
  export interface AccountServiceController {
@@ -106,6 +151,18 @@ export interface AccountServiceController {
106
151
  confirmPhoneChange(
107
152
  request: ConfirmPhoneChangeRequest,
108
153
  ): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
154
+
155
+ adminGetAccount(
156
+ request: AdminGetAccountRequest,
157
+ ): Promise<AdminGetAccountResponse> | Observable<AdminGetAccountResponse> | AdminGetAccountResponse;
158
+
159
+ adminBlockAccount(
160
+ request: AdminBlockAccountRequest,
161
+ ): Promise<AdminBlockAccountResponse> | Observable<AdminBlockAccountResponse> | AdminBlockAccountResponse;
162
+
163
+ adminCreateAccount(
164
+ request: AdminCreateAccountRequest,
165
+ ): Promise<AdminCreateAccountResponse> | Observable<AdminCreateAccountResponse> | AdminCreateAccountResponse;
109
166
  }
110
167
 
111
168
  export function AccountServiceControllerMethods() {
@@ -116,6 +173,9 @@ export function AccountServiceControllerMethods() {
116
173
  "confirmEmailChange",
117
174
  "initPhoneChange",
118
175
  "confirmPhoneChange",
176
+ "adminGetAccount",
177
+ "adminBlockAccount",
178
+ "adminCreateAccount",
119
179
  ];
120
180
  for (const method of grpcMethods) {
121
181
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.38",
4
+ "version": "1.0.40",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -10,6 +10,10 @@ service AccountService {
10
10
 
11
11
  rpc InitPhoneChange(InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
12
12
  rpc ConfirmPhoneChange(ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
13
+
14
+ rpc AdminGetAccount(AdminGetAccountRequest) returns (AdminGetAccountResponse);
15
+ rpc AdminBlockAccount(AdminBlockAccountRequest) returns (AdminBlockAccountResponse);
16
+ rpc AdminCreateAccount(AdminCreateAccountRequest) returns (AdminCreateAccountResponse);
13
17
  }
14
18
 
15
19
  message GetAccountRequest {
@@ -71,6 +75,45 @@ message ConfirmPhoneChangeResponse {
71
75
  bool ok = 1;
72
76
  }
73
77
 
78
+ message AdminGetAccountRequest {
79
+ string id = 1;
80
+ }
81
+
82
+ message AdminGetAccountResponse {
83
+ string id = 1;
84
+ string phone = 2;
85
+ string email = 3;
86
+ string first_name = 4;
87
+ string last_name = 5;
88
+ bool is_email_verified = 6;
89
+ bool is_phone_verified = 7;
90
+ Role role = 8;
91
+ bool is_blocked = 9;
92
+ string created_at = 10;
93
+ }
94
+
95
+ message AdminBlockAccountRequest {
96
+ string id = 1;
97
+ bool block = 2;
98
+ }
99
+
100
+ message AdminBlockAccountResponse {
101
+ bool ok = 1;
102
+ }
103
+
104
+ message AdminCreateAccountRequest {
105
+ optional string email = 1;
106
+ optional string phone = 2;
107
+ string password = 3;
108
+ string first_name = 4;
109
+ string last_name = 5;
110
+ Role role = 6;
111
+ }
112
+
113
+ message AdminCreateAccountResponse {
114
+ string id = 1;
115
+ }
116
+
74
117
 
75
118
 
76
119