@kottvideo/contracts 1.1.2 → 1.1.3
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 +1 -1
- package/gen/auth.ts +40 -2
- package/gen/google/protobuf/empty.ts +1 -1
- package/package.json +1 -1
- package/proto/auth.proto +21 -0
package/gen/account.ts
CHANGED
package/gen/auth.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.11.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.1
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: auth.proto
|
|
6
6
|
|
|
@@ -62,6 +62,24 @@ export interface TelegramVerifyResponse {
|
|
|
62
62
|
refreshToken?: string | undefined;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
export interface TelegramCompleteRequest {
|
|
66
|
+
sessionId: string;
|
|
67
|
+
phone: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface TelegramCompleteResponse {
|
|
71
|
+
sessionId: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface TelegramConsumeRequest {
|
|
75
|
+
sessionId: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface TelegramConsumeResponse {
|
|
79
|
+
accessToken: string;
|
|
80
|
+
refreshToken: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
65
83
|
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
66
84
|
|
|
67
85
|
export interface AuthServiceClient {
|
|
@@ -80,6 +98,10 @@ export interface AuthServiceClient {
|
|
|
80
98
|
telegramInit(request: Empty): Observable<TelegramInitResponse>;
|
|
81
99
|
|
|
82
100
|
telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
|
|
101
|
+
|
|
102
|
+
telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
|
|
103
|
+
|
|
104
|
+
telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
|
|
83
105
|
}
|
|
84
106
|
|
|
85
107
|
export interface AuthServiceController {
|
|
@@ -102,11 +124,27 @@ export interface AuthServiceController {
|
|
|
102
124
|
telegramVerify(
|
|
103
125
|
request: TelegramVerifyRequest,
|
|
104
126
|
): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
|
|
127
|
+
|
|
128
|
+
telegramComplete(
|
|
129
|
+
request: TelegramCompleteRequest,
|
|
130
|
+
): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
|
|
131
|
+
|
|
132
|
+
telegramConsume(
|
|
133
|
+
request: TelegramConsumeRequest,
|
|
134
|
+
): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
|
|
105
135
|
}
|
|
106
136
|
|
|
107
137
|
export function AuthServiceControllerMethods() {
|
|
108
138
|
return function (constructor: Function) {
|
|
109
|
-
const grpcMethods: string[] = [
|
|
139
|
+
const grpcMethods: string[] = [
|
|
140
|
+
"sendOtp",
|
|
141
|
+
"verifyOtp",
|
|
142
|
+
"refreshToken",
|
|
143
|
+
"telegramInit",
|
|
144
|
+
"telegramVerify",
|
|
145
|
+
"telegramComplete",
|
|
146
|
+
"telegramConsume",
|
|
147
|
+
];
|
|
110
148
|
for (const method of grpcMethods) {
|
|
111
149
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
112
150
|
GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -15,6 +15,9 @@ service AuthService {
|
|
|
15
15
|
// Telegram authentication
|
|
16
16
|
rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
|
|
17
17
|
rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
|
|
18
|
+
|
|
19
|
+
rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
|
|
20
|
+
rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
// One-time passwords
|
|
@@ -63,4 +66,22 @@ message TelegramVerifyResponse {
|
|
|
63
66
|
string access_token = 2;
|
|
64
67
|
string refresh_token = 3;
|
|
65
68
|
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message TelegramCompleteRequest {
|
|
72
|
+
string session_id = 1;
|
|
73
|
+
string phone = 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message TelegramCompleteResponse {
|
|
77
|
+
string session_id = 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message TelegramConsumeRequest {
|
|
81
|
+
string session_id = 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
message TelegramConsumeResponse {
|
|
85
|
+
string access_token = 1;
|
|
86
|
+
string refresh_token = 2;
|
|
66
87
|
}
|