@teacinema/contracts 1.1.5 → 1.1.7
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/go/.gitkeep +0 -0
- package/gen/ts/.gitkeep +0 -0
- package/gen/{account.ts → ts/account.ts} +1 -1
- package/gen/{auth.ts → ts/auth.ts} +1 -1
- package/gen/{google → ts/google}/protobuf/empty.ts +1 -1
- package/gen/ts/media.ts +76 -0
- package/gen/{users.ts → ts/users.ts} +2 -1
- package/package.json +2 -2
- package/proto/account.proto +68 -68
- package/proto/auth.proto +78 -78
- package/proto/media.proto +42 -0
- package/proto/users.proto +44 -43
package/gen/go/.gitkeep
ADDED
|
File without changes
|
package/gen/ts/.gitkeep
ADDED
|
File without changes
|
package/gen/ts/media.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.8.3
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: media.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "media.v1";
|
|
12
|
+
|
|
13
|
+
export interface UploadRequest {
|
|
14
|
+
fileName: string;
|
|
15
|
+
folder: string;
|
|
16
|
+
contentType: string;
|
|
17
|
+
data: Uint8Array;
|
|
18
|
+
resizeWidth?: number | undefined;
|
|
19
|
+
resizeHeight?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface UploadResponse {
|
|
23
|
+
key: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface GetRequest {
|
|
27
|
+
key: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface GetResponse {
|
|
31
|
+
data: Uint8Array;
|
|
32
|
+
contentType: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DeleteRequest {
|
|
36
|
+
key: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DeleteResponse {
|
|
40
|
+
ok: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const MEDIA_V1_PACKAGE_NAME = "media.v1";
|
|
44
|
+
|
|
45
|
+
export interface MediaServiceClient {
|
|
46
|
+
upload(request: UploadRequest): Observable<UploadResponse>;
|
|
47
|
+
|
|
48
|
+
get(request: GetRequest): Observable<GetResponse>;
|
|
49
|
+
|
|
50
|
+
delete(request: DeleteRequest): Observable<DeleteResponse>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface MediaServiceController {
|
|
54
|
+
upload(request: UploadRequest): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
|
|
55
|
+
|
|
56
|
+
get(request: GetRequest): Promise<GetResponse> | Observable<GetResponse> | GetResponse;
|
|
57
|
+
|
|
58
|
+
delete(request: DeleteRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function MediaServiceControllerMethods() {
|
|
62
|
+
return function (constructor: Function) {
|
|
63
|
+
const grpcMethods: string[] = ["upload", "get", "delete"];
|
|
64
|
+
for (const method of grpcMethods) {
|
|
65
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
66
|
+
GrpcMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
|
|
67
|
+
}
|
|
68
|
+
const grpcStreamMethods: string[] = [];
|
|
69
|
+
for (const method of grpcStreamMethods) {
|
|
70
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
71
|
+
GrpcStreamMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const MEDIA_SERVICE_NAME = "MediaService";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.8.3
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v3.21.12
|
|
5
5
|
// source: users.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -29,6 +29,7 @@ export interface CreateUserResponse {
|
|
|
29
29
|
export interface PatchUserRequest {
|
|
30
30
|
userId: string;
|
|
31
31
|
name?: string | undefined;
|
|
32
|
+
avatar?: string | undefined;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export interface PatchUserResponse {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teacinema/contracts",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Protobuf definitions and generated TypeScript types",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc -p tsconfig.build.json",
|
|
9
|
-
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
9
|
+
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen/ts --ts_proto_opt=nestJs=true,package=omit"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
package/proto/account.proto
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package account.v1;
|
|
4
|
-
|
|
5
|
-
service AccountService {
|
|
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);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
message GetAccountRequest {
|
|
16
|
-
string id = 1;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
message GetAccountResponse {
|
|
20
|
-
string id = 1;
|
|
21
|
-
string phone = 2;
|
|
22
|
-
string email = 3;
|
|
23
|
-
bool is_phone_verified = 4;
|
|
24
|
-
bool is_email_verified = 5;
|
|
25
|
-
Role role = 6;
|
|
26
|
-
}
|
|
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
|
-
|
|
66
|
-
enum Role {
|
|
67
|
-
USER = 0;
|
|
68
|
-
ADMIN = 1;
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package account.v1;
|
|
4
|
+
|
|
5
|
+
service AccountService {
|
|
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);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message GetAccountRequest {
|
|
16
|
+
string id = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message GetAccountResponse {
|
|
20
|
+
string id = 1;
|
|
21
|
+
string phone = 2;
|
|
22
|
+
string email = 3;
|
|
23
|
+
bool is_phone_verified = 4;
|
|
24
|
+
bool is_email_verified = 5;
|
|
25
|
+
Role role = 6;
|
|
26
|
+
}
|
|
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
|
+
|
|
66
|
+
enum Role {
|
|
67
|
+
USER = 0;
|
|
68
|
+
ADMIN = 1;
|
|
69
69
|
}
|
package/proto/auth.proto
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package auth.v1;
|
|
4
|
-
|
|
5
|
-
import "google/protobuf/empty.proto";
|
|
6
|
-
|
|
7
|
-
service AuthService {
|
|
8
|
-
rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
|
|
9
|
-
rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
|
|
10
|
-
rpc Refresh (RefreshRequest) returns (RefreshResponse);
|
|
11
|
-
|
|
12
|
-
rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
|
|
13
|
-
rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
|
|
14
|
-
rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
|
|
15
|
-
rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
message SendOtpRequest {
|
|
19
|
-
string identifier = 1;
|
|
20
|
-
string type = 2;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
message SendOtpResponse {
|
|
24
|
-
bool ok = 1;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
message VerifyOtpRequest {
|
|
28
|
-
string identifier = 1;
|
|
29
|
-
string type = 2;
|
|
30
|
-
string code = 3;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
message VerifyOtpResponse {
|
|
34
|
-
string access_token = 1;
|
|
35
|
-
string refresh_token = 2;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message RefreshRequest {
|
|
39
|
-
string refresh_token = 1;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
message RefreshResponse {
|
|
43
|
-
string access_token = 1;
|
|
44
|
-
string refresh_token = 2;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
message TelegramInitResponse {
|
|
48
|
-
string url = 1;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
message TelegramVerifyRequest {
|
|
52
|
-
map<string, string> query = 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
message TelegramVerifyResponse {
|
|
56
|
-
oneof result {
|
|
57
|
-
string url = 1;
|
|
58
|
-
string access_token = 2;
|
|
59
|
-
string refresh_token = 3;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
message TelegramCompleteRequest {
|
|
64
|
-
string session_id = 1;
|
|
65
|
-
string phone = 2;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
message TelegramCompleteResponse {
|
|
69
|
-
string session_id = 1;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
message TelegramConsumeRequest {
|
|
73
|
-
string session_id = 1;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
message TelegramConsumeResponse {
|
|
77
|
-
string access_token = 1;
|
|
78
|
-
string refresh_token = 2;
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
service AuthService {
|
|
8
|
+
rpc SendOtp (SendOtpRequest) returns (SendOtpResponse);
|
|
9
|
+
rpc VerifyOtp (VerifyOtpRequest) returns (VerifyOtpResponse);
|
|
10
|
+
rpc Refresh (RefreshRequest) returns (RefreshResponse);
|
|
11
|
+
|
|
12
|
+
rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
|
|
13
|
+
rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
|
|
14
|
+
rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
|
|
15
|
+
rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message SendOtpRequest {
|
|
19
|
+
string identifier = 1;
|
|
20
|
+
string type = 2;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message SendOtpResponse {
|
|
24
|
+
bool ok = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message VerifyOtpRequest {
|
|
28
|
+
string identifier = 1;
|
|
29
|
+
string type = 2;
|
|
30
|
+
string code = 3;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message VerifyOtpResponse {
|
|
34
|
+
string access_token = 1;
|
|
35
|
+
string refresh_token = 2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message RefreshRequest {
|
|
39
|
+
string refresh_token = 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message RefreshResponse {
|
|
43
|
+
string access_token = 1;
|
|
44
|
+
string refresh_token = 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message TelegramInitResponse {
|
|
48
|
+
string url = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message TelegramVerifyRequest {
|
|
52
|
+
map<string, string> query = 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message TelegramVerifyResponse {
|
|
56
|
+
oneof result {
|
|
57
|
+
string url = 1;
|
|
58
|
+
string access_token = 2;
|
|
59
|
+
string refresh_token = 3;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message TelegramCompleteRequest {
|
|
64
|
+
string session_id = 1;
|
|
65
|
+
string phone = 2;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message TelegramCompleteResponse {
|
|
69
|
+
string session_id = 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message TelegramConsumeRequest {
|
|
73
|
+
string session_id = 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message TelegramConsumeResponse {
|
|
77
|
+
string access_token = 1;
|
|
78
|
+
string refresh_token = 2;
|
|
79
79
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package media.v1;
|
|
4
|
+
|
|
5
|
+
option go_package = "github.com/teacinema/contracts/media;media";
|
|
6
|
+
option java_multiple_files = true;
|
|
7
|
+
|
|
8
|
+
service MediaService {
|
|
9
|
+
rpc Upload (UploadRequest) returns (UploadResponse);
|
|
10
|
+
rpc Get (GetRequest) returns (GetResponse);
|
|
11
|
+
rpc Delete (DeleteRequest) returns (DeleteResponse);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message UploadRequest {
|
|
15
|
+
string file_name = 1;
|
|
16
|
+
string folder = 2;
|
|
17
|
+
string content_type = 3;
|
|
18
|
+
bytes data = 4;
|
|
19
|
+
optional int32 resize_width = 5;
|
|
20
|
+
optional int32 resize_height = 6;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message UploadResponse {
|
|
24
|
+
string key = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message GetRequest {
|
|
28
|
+
string key = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message GetResponse {
|
|
32
|
+
bytes data = 1;
|
|
33
|
+
string content_type = 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message DeleteRequest {
|
|
37
|
+
string key = 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message DeleteResponse {
|
|
41
|
+
bool ok = 1;
|
|
42
|
+
}
|
package/proto/users.proto
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package users.v1;
|
|
4
|
-
|
|
5
|
-
service UsersService {
|
|
6
|
-
rpc GetMe (GetMeRequest) returns (GetMeResponse);
|
|
7
|
-
|
|
8
|
-
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
|
9
|
-
rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
message GetMeRequest {
|
|
13
|
-
string id = 1;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
message GetMeResponse {
|
|
17
|
-
User user = 1;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
message CreateUserRequest {
|
|
21
|
-
string id = 1;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
message CreateUserResponse {
|
|
25
|
-
bool ok = 1;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
message PatchUserRequest {
|
|
29
|
-
string user_id = 1;
|
|
30
|
-
|
|
31
|
-
optional string name = 2;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
optional string
|
|
42
|
-
optional string
|
|
43
|
-
optional string
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package users.v1;
|
|
4
|
+
|
|
5
|
+
service UsersService {
|
|
6
|
+
rpc GetMe (GetMeRequest) returns (GetMeResponse);
|
|
7
|
+
|
|
8
|
+
rpc CreateUser (CreateUserRequest) returns (CreateUserResponse);
|
|
9
|
+
rpc PatchUser (PatchUserRequest) returns (PatchUserResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message GetMeRequest {
|
|
13
|
+
string id = 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message GetMeResponse {
|
|
17
|
+
User user = 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message CreateUserRequest {
|
|
21
|
+
string id = 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message CreateUserResponse {
|
|
25
|
+
bool ok = 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message PatchUserRequest {
|
|
29
|
+
string user_id = 1;
|
|
30
|
+
|
|
31
|
+
optional string name = 2;
|
|
32
|
+
optional string avatar = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message PatchUserResponse {
|
|
36
|
+
bool ok = 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message User {
|
|
40
|
+
string id = 1;
|
|
41
|
+
optional string name = 2;
|
|
42
|
+
optional string phone = 3;
|
|
43
|
+
optional string email = 4;
|
|
44
|
+
optional string avatar = 5;
|
|
44
45
|
}
|