@nest-cinema/contracts 1.0.7 → 1.0.9
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/account.ts +71 -3
- package/package.json +1 -1
- package/proto/account.proto +44 -4
- package/gen/google/protobuf/wrappers.ts +0 -101
package/gen/account.ts
CHANGED
|
@@ -22,28 +22,96 @@ export interface GetAccountRequest {
|
|
|
22
22
|
|
|
23
23
|
export interface GetAccountResponse {
|
|
24
24
|
id: string;
|
|
25
|
-
phone
|
|
26
|
-
email
|
|
25
|
+
phone?: string | undefined;
|
|
26
|
+
email?: string | undefined;
|
|
27
27
|
isPhoneVerified: boolean;
|
|
28
28
|
isEmailVerified: boolean;
|
|
29
29
|
role: Role;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export interface InitEmailChangeRequest {
|
|
33
|
+
email: string;
|
|
34
|
+
userId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface InitEmailChangeResponse {
|
|
38
|
+
ok: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ConfirmEmailChangeRequest {
|
|
42
|
+
email: string;
|
|
43
|
+
code: string;
|
|
44
|
+
userId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ConfirmEmailChangeResponse {
|
|
48
|
+
ok: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface InitPhoneChangeRequest {
|
|
52
|
+
phone: string;
|
|
53
|
+
userId: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface InitPhoneChangeResponse {
|
|
57
|
+
ok: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ConfirmPhoneChangeRequest {
|
|
61
|
+
phone: string;
|
|
62
|
+
code: string;
|
|
63
|
+
userId: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ConfirmPhoneChangeResponse {
|
|
67
|
+
ok: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
32
70
|
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
33
71
|
|
|
34
72
|
export interface AccountServiceClient {
|
|
35
73
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
74
|
+
|
|
75
|
+
initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
|
|
76
|
+
|
|
77
|
+
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
|
|
78
|
+
|
|
79
|
+
initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
|
|
80
|
+
|
|
81
|
+
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
|
|
36
82
|
}
|
|
37
83
|
|
|
38
84
|
export interface AccountServiceController {
|
|
39
85
|
getAccount(
|
|
40
86
|
request: GetAccountRequest,
|
|
41
87
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
88
|
+
|
|
89
|
+
initEmailChange(
|
|
90
|
+
request: InitEmailChangeRequest,
|
|
91
|
+
): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
|
|
92
|
+
|
|
93
|
+
confirmEmailChange(
|
|
94
|
+
request: ConfirmEmailChangeRequest,
|
|
95
|
+
): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
96
|
+
|
|
97
|
+
initPhoneChange(
|
|
98
|
+
request: InitPhoneChangeRequest,
|
|
99
|
+
): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
|
|
100
|
+
|
|
101
|
+
confirmPhoneChange(
|
|
102
|
+
request: ConfirmPhoneChangeRequest,
|
|
103
|
+
): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
|
|
42
104
|
}
|
|
43
105
|
|
|
44
106
|
export function AccountServiceControllerMethods() {
|
|
45
107
|
return function (constructor: Function) {
|
|
46
|
-
const grpcMethods: string[] = [
|
|
108
|
+
const grpcMethods: string[] = [
|
|
109
|
+
"getAccount",
|
|
110
|
+
"initEmailChange",
|
|
111
|
+
"confirmEmailChange",
|
|
112
|
+
"initPhoneChange",
|
|
113
|
+
"confirmPhoneChange",
|
|
114
|
+
];
|
|
47
115
|
for (const method of grpcMethods) {
|
|
48
116
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
49
117
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -2,10 +2,12 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package account.v1;
|
|
4
4
|
|
|
5
|
-
import "google/protobuf/wrappers.proto";
|
|
6
|
-
|
|
7
5
|
service AccountService {
|
|
8
6
|
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
7
|
+
rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
|
|
8
|
+
rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
|
|
9
|
+
rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
|
|
10
|
+
rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
message GetAccountRequest {
|
|
@@ -14,13 +16,51 @@ message GetAccountRequest {
|
|
|
14
16
|
|
|
15
17
|
message GetAccountResponse {
|
|
16
18
|
string id = 1;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
optional string phone = 2;
|
|
20
|
+
optional string email = 3;
|
|
19
21
|
bool is_phone_verified = 4;
|
|
20
22
|
bool is_email_verified = 5;
|
|
21
23
|
Role role = 6;
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
message InitEmailChangeRequest {
|
|
27
|
+
string email = 1;
|
|
28
|
+
string user_id = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message InitEmailChangeResponse {
|
|
32
|
+
bool ok = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message ConfirmEmailChangeRequest {
|
|
36
|
+
string email = 1;
|
|
37
|
+
string code = 2;
|
|
38
|
+
string user_id = 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message ConfirmEmailChangeResponse {
|
|
42
|
+
bool ok = 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message InitPhoneChangeRequest {
|
|
46
|
+
string phone = 1;
|
|
47
|
+
string user_id = 2;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message InitPhoneChangeResponse {
|
|
51
|
+
bool ok = 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message ConfirmPhoneChangeRequest {
|
|
55
|
+
string phone = 1;
|
|
56
|
+
string code = 2;
|
|
57
|
+
string user_id = 3;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message ConfirmPhoneChangeResponse {
|
|
61
|
+
bool ok = 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
24
64
|
enum Role {
|
|
25
65
|
USER = 0;
|
|
26
66
|
ADMIN = 1;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.2
|
|
4
|
-
// protoc v3.21.12
|
|
5
|
-
// source: google/protobuf/wrappers.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
|
|
9
|
-
export const protobufPackage = "google.protobuf";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Wrapper message for `double`.
|
|
13
|
-
*
|
|
14
|
-
* The JSON representation for `DoubleValue` is JSON number.
|
|
15
|
-
*/
|
|
16
|
-
export interface DoubleValue {
|
|
17
|
-
/** The double value. */
|
|
18
|
-
value: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Wrapper message for `float`.
|
|
23
|
-
*
|
|
24
|
-
* The JSON representation for `FloatValue` is JSON number.
|
|
25
|
-
*/
|
|
26
|
-
export interface FloatValue {
|
|
27
|
-
/** The float value. */
|
|
28
|
-
value: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Wrapper message for `int64`.
|
|
33
|
-
*
|
|
34
|
-
* The JSON representation for `Int64Value` is JSON string.
|
|
35
|
-
*/
|
|
36
|
-
export interface Int64Value {
|
|
37
|
-
/** The int64 value. */
|
|
38
|
-
value: number;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Wrapper message for `uint64`.
|
|
43
|
-
*
|
|
44
|
-
* The JSON representation for `UInt64Value` is JSON string.
|
|
45
|
-
*/
|
|
46
|
-
export interface UInt64Value {
|
|
47
|
-
/** The uint64 value. */
|
|
48
|
-
value: number;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Wrapper message for `int32`.
|
|
53
|
-
*
|
|
54
|
-
* The JSON representation for `Int32Value` is JSON number.
|
|
55
|
-
*/
|
|
56
|
-
export interface Int32Value {
|
|
57
|
-
/** The int32 value. */
|
|
58
|
-
value: number;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Wrapper message for `uint32`.
|
|
63
|
-
*
|
|
64
|
-
* The JSON representation for `UInt32Value` is JSON number.
|
|
65
|
-
*/
|
|
66
|
-
export interface UInt32Value {
|
|
67
|
-
/** The uint32 value. */
|
|
68
|
-
value: number;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Wrapper message for `bool`.
|
|
73
|
-
*
|
|
74
|
-
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
75
|
-
*/
|
|
76
|
-
export interface BoolValue {
|
|
77
|
-
/** The bool value. */
|
|
78
|
-
value: boolean;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Wrapper message for `string`.
|
|
83
|
-
*
|
|
84
|
-
* The JSON representation for `StringValue` is JSON string.
|
|
85
|
-
*/
|
|
86
|
-
export interface StringValue {
|
|
87
|
-
/** The string value. */
|
|
88
|
-
value: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Wrapper message for `bytes`.
|
|
93
|
-
*
|
|
94
|
-
* The JSON representation for `BytesValue` is JSON string.
|
|
95
|
-
*/
|
|
96
|
-
export interface BytesValue {
|
|
97
|
-
/** The bytes value. */
|
|
98
|
-
value: Uint8Array;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|