Compare commits

...

2 Commits

Author SHA1 Message Date
18327d19d3 1.0.8
All checks were successful
Publish / Publish npm package action (push) Successful in 21s
2026-02-11 06:03:43 +03:00
1faa14c32f feat: add telegram methods 2026-02-11 06:03:34 +03:00
2 changed files with 20 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@teacinema/contracts",
"version": "1.0.7",
"version": "1.0.8",
"description": "Protocol Buffers contracts for microservices",
"scripts": {
"build": "tsc -p tsconfig.build.json",

View File

@ -2,10 +2,15 @@ syntax = "proto3";
package auth.v1;
import "google/protobuf/empty.proto";
service AuthService {
rpc SendOtp(SendOtpRequest) returns (SendOtpResponse);
rpc VerifyOtp(VerifyOtpRequest) returns (VerifyOtpResponse);
rpc Refresh(RefreshRequest) returns (RefreshResponse);
rpc TelegramInit(google.protobuf.Empty) returns (TelegramInitResponse);
rpc TelegramVerify(TelegramVerifyRequest) returns (TelegramVerifyResponse);
}
message SendOtpRequest {
@ -36,3 +41,17 @@ message RefreshResponse {
string access_token = 1;
string refresh_token = 2;
}
message TelegramInitResponse {
string url = 1;
}
message TelegramVerifyRequest {
map<string, string> query = 1;
}
message TelegramVerifyResponse {
oneof result {
string url = 1;
string access_token = 2;
string refresh_token = 3;
}
}