@slack-clone-org/contracts 1.0.19 → 1.0.20
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/generated/telegram.ts +39 -1
- package/package.json +1 -1
- package/proto/telegram.proto +22 -1
package/generated/telegram.ts
CHANGED
|
@@ -30,6 +30,24 @@ export interface TelegramVerifyResponse {
|
|
|
30
30
|
refreshToken?: string | undefined;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
export interface TelegramCompleteRequest {
|
|
34
|
+
sessionId: string;
|
|
35
|
+
phone: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TelegramCompleteResponse {
|
|
39
|
+
sessionId: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface TelegramConsumeRequest {
|
|
43
|
+
sessionId: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface TelegramConsumeResponse {
|
|
47
|
+
accessToken: string;
|
|
48
|
+
refreshToken: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
33
51
|
export const TELEGRAM_V1_PACKAGE_NAME = "telegram.v1";
|
|
34
52
|
|
|
35
53
|
/** TelegramService provides operations related to Telegram integration. */
|
|
@@ -42,6 +60,14 @@ export interface TelegramServiceClient {
|
|
|
42
60
|
/** TelegramVerify verifies the Telegram authentication using the provided code and account ID. */
|
|
43
61
|
|
|
44
62
|
telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
|
|
63
|
+
|
|
64
|
+
/** TelegramComplete finalizes the authentication process. */
|
|
65
|
+
|
|
66
|
+
telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
|
|
67
|
+
|
|
68
|
+
/** TelegramConsume exchanges a valid session ID for authentication tokens. */
|
|
69
|
+
|
|
70
|
+
telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
|
|
45
71
|
}
|
|
46
72
|
|
|
47
73
|
/** TelegramService provides operations related to Telegram integration. */
|
|
@@ -56,11 +82,23 @@ export interface TelegramServiceController {
|
|
|
56
82
|
telegramVerify(
|
|
57
83
|
request: TelegramVerifyRequest,
|
|
58
84
|
): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
|
|
85
|
+
|
|
86
|
+
/** TelegramComplete finalizes the authentication process. */
|
|
87
|
+
|
|
88
|
+
telegramComplete(
|
|
89
|
+
request: TelegramCompleteRequest,
|
|
90
|
+
): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
|
|
91
|
+
|
|
92
|
+
/** TelegramConsume exchanges a valid session ID for authentication tokens. */
|
|
93
|
+
|
|
94
|
+
telegramConsume(
|
|
95
|
+
request: TelegramConsumeRequest,
|
|
96
|
+
): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
|
|
59
97
|
}
|
|
60
98
|
|
|
61
99
|
export function TelegramServiceControllerMethods() {
|
|
62
100
|
return function (constructor: Function) {
|
|
63
|
-
const grpcMethods: string[] = ["telegramInit", "telegramVerify"];
|
|
101
|
+
const grpcMethods: string[] = ["telegramInit", "telegramVerify", "telegramComplete", "telegramConsume"];
|
|
64
102
|
for (const method of grpcMethods) {
|
|
65
103
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
66
104
|
GrpcMethod("TelegramService", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
package/proto/telegram.proto
CHANGED
|
@@ -10,7 +10,10 @@ service TelegramService {
|
|
|
10
10
|
rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
|
|
11
11
|
// TelegramVerify verifies the Telegram authentication using the provided code and account ID.
|
|
12
12
|
rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
|
|
13
|
-
|
|
13
|
+
// TelegramComplete finalizes the authentication process.
|
|
14
|
+
rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
|
|
15
|
+
// TelegramConsume exchanges a valid session ID for authentication tokens.
|
|
16
|
+
rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
message TelegramInitResponse {
|
|
@@ -27,4 +30,22 @@ message TelegramVerifyResponse {
|
|
|
27
30
|
string access_token = 2;
|
|
28
31
|
string refresh_token = 3;
|
|
29
32
|
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message TelegramCompleteRequest {
|
|
36
|
+
string session_id = 1;
|
|
37
|
+
string phone = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message TelegramCompleteResponse {
|
|
41
|
+
string session_id = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message TelegramConsumeRequest {
|
|
45
|
+
string session_id = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message TelegramConsumeResponse {
|
|
49
|
+
string access_token = 1;
|
|
50
|
+
string refresh_token = 2;
|
|
30
51
|
}
|