Compare commits
2 Commits
86231bad44
...
a27e931bf3
| Author | SHA1 | Date | |
|---|---|---|---|
| a27e931bf3 | |||
| b5715eef99 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@teacinema/contracts",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Protocol Buffers contracts for microservices",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
|
||||
24
proto/account.proto
Normal file
24
proto/account.proto
Normal file
@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package account.v1;
|
||||
|
||||
service AccountService {
|
||||
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse);
|
||||
}
|
||||
|
||||
message GetAccountRequest {
|
||||
string id = 1;
|
||||
}
|
||||
message GetAccountResponse {
|
||||
string id = 1;
|
||||
string phone = 2;
|
||||
string email = 3;
|
||||
bool is_phone_verified = 4;
|
||||
bool is_email_verified = 5;
|
||||
Role role = 6;
|
||||
}
|
||||
|
||||
enum Role {
|
||||
USER = 0;
|
||||
ADMIN = 1;
|
||||
}
|
||||
@ -2,4 +2,5 @@ import { join } from 'node:path';
|
||||
|
||||
export const PROTO_PATHS = {
|
||||
AUTH: join(__dirname, '../../proto/auth.proto'),
|
||||
ACCOUNT: join(__dirname, '../../proto/account.proto'),
|
||||
} as const
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user