@microservsforsell/contracts 1.0.13 → 1.0.15
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/dist/gen/account.d.ts +38 -0
- package/dist/gen/account.js +8 -2
- package/dist/gen/auth.js +1 -1
- package/package.json +5 -1
- package/proto/account.proto +42 -4
package/dist/gen/account.d.ts
CHANGED
|
@@ -16,12 +16,50 @@ export interface GetAccountResponse {
|
|
|
16
16
|
isEmailVerified: boolean;
|
|
17
17
|
role: Role;
|
|
18
18
|
}
|
|
19
|
+
export interface InitEmailChangesRequest {
|
|
20
|
+
email: string;
|
|
21
|
+
userId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface InitEmailChangeResponse {
|
|
24
|
+
ok: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ConfirmEmailChangesRequest {
|
|
27
|
+
email: string;
|
|
28
|
+
userId: string;
|
|
29
|
+
code: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ConfirmEmailChangeResponse {
|
|
32
|
+
ok: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface InitPhoneChangesRequest {
|
|
35
|
+
phone: string;
|
|
36
|
+
userId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface InitPhoneChangeResponse {
|
|
39
|
+
ok: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface ConfirmPhoneChangesRequest {
|
|
42
|
+
phone: string;
|
|
43
|
+
userId: string;
|
|
44
|
+
code: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ConfirmPhoneChangeResponse {
|
|
47
|
+
ok: boolean;
|
|
48
|
+
}
|
|
19
49
|
export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
20
50
|
export interface AccountServiceClient {
|
|
21
51
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
52
|
+
initEmailChange(request: InitEmailChangesRequest): Observable<InitEmailChangeResponse>;
|
|
53
|
+
confirmEmailChange(request: ConfirmEmailChangesRequest): Observable<ConfirmEmailChangeResponse>;
|
|
54
|
+
initPhoneChange(request: InitPhoneChangesRequest): Observable<InitPhoneChangeResponse>;
|
|
55
|
+
confirmPhoneChange(request: ConfirmPhoneChangesRequest): Observable<ConfirmPhoneChangeResponse>;
|
|
22
56
|
}
|
|
23
57
|
export interface AccountServiceController {
|
|
24
58
|
getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
59
|
+
initEmailChange(request: InitEmailChangesRequest): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
|
|
60
|
+
confirmEmailChange(request: ConfirmEmailChangesRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
61
|
+
initPhoneChange(request: InitPhoneChangesRequest): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
|
|
62
|
+
confirmPhoneChange(request: ConfirmPhoneChangesRequest): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
|
|
25
63
|
}
|
|
26
64
|
export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
|
|
27
65
|
export declare const ACCOUNT_SERVICE_NAME = "AccountService";
|
package/dist/gen/account.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.11.0
|
|
5
|
-
// protoc
|
|
5
|
+
// protoc v3.21.12
|
|
6
6
|
// source: account.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role = exports.protobufPackage = void 0;
|
|
@@ -19,7 +19,13 @@ var Role;
|
|
|
19
19
|
exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
20
20
|
function AccountServiceControllerMethods() {
|
|
21
21
|
return function (constructor) {
|
|
22
|
-
const grpcMethods = [
|
|
22
|
+
const grpcMethods = [
|
|
23
|
+
"getAccount",
|
|
24
|
+
"initEmailChange",
|
|
25
|
+
"confirmEmailChange",
|
|
26
|
+
"initPhoneChange",
|
|
27
|
+
"confirmPhoneChange",
|
|
28
|
+
];
|
|
23
29
|
for (const method of grpcMethods) {
|
|
24
30
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
25
31
|
(0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
|
package/dist/gen/auth.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.11.0
|
|
5
|
-
// protoc
|
|
5
|
+
// protoc v3.21.12
|
|
6
6
|
// source: auth.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microservsforsell/contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Protobuf definitions and generated Typecript types",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.js",
|
|
9
|
+
"./gen/*": "./dist/gen/*.js"
|
|
10
|
+
},
|
|
7
11
|
"scripts": {
|
|
8
12
|
"build": "tsc -p tsconfig.build.json",
|
|
9
13
|
"generate": "mkdir -p src/gen && protoc -I ./proto ./proto/*.proto --ts_proto_out=./src/gen --ts_proto_opt=nestJs=true,package=omit"
|
package/proto/account.proto
CHANGED
|
@@ -4,12 +4,22 @@ package account.v1;
|
|
|
4
4
|
|
|
5
5
|
service AccountService {
|
|
6
6
|
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
7
|
+
|
|
8
|
+
rpc InitEmailChange (InitEmailChangesRequest) returns (InitEmailChangeResponse);
|
|
9
|
+
rpc ConfirmEmailChange (ConfirmEmailChangesRequest) returns (ConfirmEmailChangeResponse);
|
|
10
|
+
|
|
11
|
+
rpc InitPhoneChange (InitPhoneChangesRequest) returns (InitPhoneChangeResponse);
|
|
12
|
+
rpc ConfirmPhoneChange (ConfirmPhoneChangesRequest) returns (ConfirmPhoneChangeResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
enum Role {
|
|
16
|
+
USER = 0;
|
|
17
|
+
ADMIN = 1;
|
|
7
18
|
}
|
|
8
19
|
|
|
9
20
|
message GetAccountRequest {
|
|
10
21
|
string id = 1;
|
|
11
22
|
}
|
|
12
|
-
|
|
13
23
|
message GetAccountResponse {
|
|
14
24
|
string id = 1;
|
|
15
25
|
string phone= 2;
|
|
@@ -19,8 +29,36 @@ message GetAccountResponse {
|
|
|
19
29
|
Role role = 7;
|
|
20
30
|
}
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
|
|
33
|
+
message InitEmailChangesRequest {
|
|
34
|
+
string email = 1;
|
|
35
|
+
string user_id = 2;
|
|
36
|
+
}
|
|
37
|
+
message InitEmailChangeResponse {
|
|
38
|
+
bool ok = 1;
|
|
39
|
+
}
|
|
40
|
+
message ConfirmEmailChangesRequest {
|
|
41
|
+
string email = 1;
|
|
42
|
+
string user_id = 2;
|
|
43
|
+
string code = 3;
|
|
44
|
+
}
|
|
45
|
+
message ConfirmEmailChangeResponse {
|
|
46
|
+
bool ok = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message InitPhoneChangesRequest {
|
|
50
|
+
string phone = 1;
|
|
51
|
+
string user_id = 2;
|
|
52
|
+
}
|
|
53
|
+
message InitPhoneChangeResponse {
|
|
54
|
+
bool ok = 1;
|
|
55
|
+
}
|
|
56
|
+
message ConfirmPhoneChangesRequest {
|
|
57
|
+
string phone = 1;
|
|
58
|
+
string user_id = 2;
|
|
59
|
+
string code = 3;
|
|
60
|
+
}
|
|
61
|
+
message ConfirmPhoneChangeResponse {
|
|
62
|
+
bool ok = 1;
|
|
25
63
|
}
|
|
26
64
|
|