@requ1emz/contracts 1.0.12 → 1.0.13
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/user.ts +15 -1
- package/package.json +1 -1
- package/proto/user.proto +9 -0
package/gen/user.ts
CHANGED
|
@@ -10,6 +10,14 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "user.v1";
|
|
12
12
|
|
|
13
|
+
export interface SendCheckUserExistsRequest {
|
|
14
|
+
email: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SendCheckUserExistsResponse {
|
|
18
|
+
exists: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
export interface SendCreateUserRequest {
|
|
14
22
|
email: string;
|
|
15
23
|
passwordHash: string;
|
|
@@ -52,6 +60,8 @@ export interface SendDeleteUserResponse {
|
|
|
52
60
|
export const USER_V1_PACKAGE_NAME = "user.v1";
|
|
53
61
|
|
|
54
62
|
export interface UserServiceClient {
|
|
63
|
+
checkUserExists(request: SendCheckUserExistsRequest): Observable<SendCheckUserExistsResponse>;
|
|
64
|
+
|
|
55
65
|
createUser(request: SendCreateUserRequest): Observable<SendCreateUserResponse>;
|
|
56
66
|
|
|
57
67
|
getUser(request: SendGetUserRequest): Observable<SendGetUserResponse>;
|
|
@@ -62,6 +72,10 @@ export interface UserServiceClient {
|
|
|
62
72
|
}
|
|
63
73
|
|
|
64
74
|
export interface UserServiceController {
|
|
75
|
+
checkUserExists(
|
|
76
|
+
request: SendCheckUserExistsRequest,
|
|
77
|
+
): Promise<SendCheckUserExistsResponse> | Observable<SendCheckUserExistsResponse> | SendCheckUserExistsResponse;
|
|
78
|
+
|
|
65
79
|
createUser(
|
|
66
80
|
request: SendCreateUserRequest,
|
|
67
81
|
): Promise<SendCreateUserResponse> | Observable<SendCreateUserResponse> | SendCreateUserResponse;
|
|
@@ -81,7 +95,7 @@ export interface UserServiceController {
|
|
|
81
95
|
|
|
82
96
|
export function UserServiceControllerMethods() {
|
|
83
97
|
return function (constructor: Function) {
|
|
84
|
-
const grpcMethods: string[] = ["createUser", "getUser", "updateUser", "deleteUser"];
|
|
98
|
+
const grpcMethods: string[] = ["checkUserExists", "createUser", "getUser", "updateUser", "deleteUser"];
|
|
85
99
|
for (const method of grpcMethods) {
|
|
86
100
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
87
101
|
GrpcMethod("UserService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/user.proto
CHANGED
|
@@ -3,12 +3,21 @@ syntax = "proto3";
|
|
|
3
3
|
package user.v1;
|
|
4
4
|
|
|
5
5
|
service UserService {
|
|
6
|
+
rpc CheckUserExists (SendCheckUserExistsRequest) returns (SendCheckUserExistsResponse);
|
|
6
7
|
rpc CreateUser (SendCreateUserRequest) returns (SendCreateUserResponse);
|
|
7
8
|
rpc GetUser (SendGetUserRequest) returns (SendGetUserResponse);
|
|
8
9
|
rpc UpdateUser (SendUpdateUserRequest) returns (SendUpdateUserResponse);
|
|
9
10
|
rpc DeleteUser (SendDeleteUserRequest) returns (SendDeleteUserResponse);
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
message SendCheckUserExistsRequest {
|
|
14
|
+
string email = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message SendCheckUserExistsResponse {
|
|
18
|
+
bool exists = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
12
21
|
message SendCreateUserRequest {
|
|
13
22
|
string email = 1;
|
|
14
23
|
string password_hash = 2;
|