@tcinema-pro/contracts 1.0.8 → 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/auth.ts +39 -1
- package/package.json +4 -1
- package/proto/auth.proto +21 -0
package/gen/auth.ts
CHANGED
|
@@ -11,6 +11,24 @@ import { Empty } from "./google/protobuf/empty";
|
|
|
11
11
|
|
|
12
12
|
export const protobufPackage = "auth.v1";
|
|
13
13
|
|
|
14
|
+
export interface TelegramConsumeResponse {
|
|
15
|
+
accessToken: string;
|
|
16
|
+
refreshToken: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface TelegramConsumeRequest {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface TelegramCompleteRequest {
|
|
24
|
+
sessionId: string;
|
|
25
|
+
phone: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface TelegramCompleteResponse {
|
|
29
|
+
sessionId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
14
32
|
export interface TelegramVerifyRequest {
|
|
15
33
|
query: { [key: string]: string };
|
|
16
34
|
}
|
|
@@ -72,6 +90,10 @@ export interface AuthServiceClient {
|
|
|
72
90
|
telegramInit(request: Empty): Observable<TelegramInitResponse>;
|
|
73
91
|
|
|
74
92
|
telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
|
|
93
|
+
|
|
94
|
+
telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
|
|
95
|
+
|
|
96
|
+
telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
|
|
75
97
|
}
|
|
76
98
|
|
|
77
99
|
export interface AuthServiceController {
|
|
@@ -86,11 +108,27 @@ export interface AuthServiceController {
|
|
|
86
108
|
telegramVerify(
|
|
87
109
|
request: TelegramVerifyRequest,
|
|
88
110
|
): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
|
|
111
|
+
|
|
112
|
+
telegramComplete(
|
|
113
|
+
request: TelegramCompleteRequest,
|
|
114
|
+
): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
|
|
115
|
+
|
|
116
|
+
telegramConsume(
|
|
117
|
+
request: TelegramConsumeRequest,
|
|
118
|
+
): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
|
|
89
119
|
}
|
|
90
120
|
|
|
91
121
|
export function AuthServiceControllerMethods() {
|
|
92
122
|
return function (constructor: Function) {
|
|
93
|
-
const grpcMethods: string[] = [
|
|
123
|
+
const grpcMethods: string[] = [
|
|
124
|
+
"sendOtp",
|
|
125
|
+
"verifyOtp",
|
|
126
|
+
"refresh",
|
|
127
|
+
"telegramInit",
|
|
128
|
+
"telegramVerify",
|
|
129
|
+
"telegramComplete",
|
|
130
|
+
"telegramConsume",
|
|
131
|
+
];
|
|
94
132
|
for (const method of grpcMethods) {
|
|
95
133
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
96
134
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tcinema-pro/contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Protobuf defs",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,8 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@nestjs/microservices": "^11.1.13",
|
|
25
|
+
"@tcinema-pro/core": "^1.0.3",
|
|
25
26
|
"@types/node": "^25.3.0",
|
|
27
|
+
"prettier": "^3.8.1",
|
|
26
28
|
"rxjs": "^7.8.2",
|
|
29
|
+
"tsconfig-paths": "^4.2.0",
|
|
27
30
|
"typescript": "^5.9.3"
|
|
28
31
|
}
|
|
29
32
|
}
|
package/proto/auth.proto
CHANGED
|
@@ -11,10 +11,31 @@ service AuthService {
|
|
|
11
11
|
|
|
12
12
|
rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
|
|
13
13
|
rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
|
|
14
|
+
rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
|
|
15
|
+
rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
|
|
16
|
+
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
// TELEGRAM
|
|
17
20
|
|
|
21
|
+
message TelegramConsumeResponse {
|
|
22
|
+
string access_token = 1;
|
|
23
|
+
string refresh_token = 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message TelegramConsumeRequest {
|
|
27
|
+
string session_id = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message TelegramCompleteRequest {
|
|
31
|
+
string session_id = 1;
|
|
32
|
+
string phone = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message TelegramCompleteResponse {
|
|
36
|
+
string session_id = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
18
39
|
message TelegramVerifyRequest {
|
|
19
40
|
map<string, string> query = 1;
|
|
20
41
|
}
|