@slack-clone-org/contracts 1.0.13 → 1.0.15
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/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +1 -0
- package/generated/account.ts +1 -1
- package/generated/auth.ts +2 -2
- package/generated/google/protobuf/empty.ts +23 -0
- package/generated/telegram.ts +76 -0
- package/package.json +1 -1
- package/proto/auth.proto +1 -1
- package/proto/telegram.proto +30 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
package/generated/account.ts
CHANGED
package/generated/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.
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: auth.proto
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ export interface SendOtpRequest {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface SendOtpResponse {
|
|
19
|
-
|
|
19
|
+
success: boolean;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface VerifyOtpRequest {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: google/protobuf/empty.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
|
|
9
|
+
export const protobufPackage = "google.protobuf";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A generic empty message that you can re-use to avoid defining duplicated
|
|
13
|
+
* empty messages in your APIs. A typical example is to use it as the request
|
|
14
|
+
* or the response type of an API method. For instance:
|
|
15
|
+
*
|
|
16
|
+
* service Foo {
|
|
17
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
18
|
+
* }
|
|
19
|
+
*/
|
|
20
|
+
export interface Empty {
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const GOOGLE_PROTOBUF_PACKAGE_NAME = "google.protobuf";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: telegram.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { Empty } from "./google/protobuf/empty";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "telegram.v1";
|
|
13
|
+
|
|
14
|
+
export interface TelegramInitResponse {
|
|
15
|
+
authUrl: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TelegramVerifyRequest {
|
|
19
|
+
query: { [key: string]: string };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TelegramVerifyRequest_QueryEntry {
|
|
23
|
+
key: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface TelegramVerifyResponse {
|
|
28
|
+
url?: string | undefined;
|
|
29
|
+
accessToken?: string | undefined;
|
|
30
|
+
refreshToken?: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const TELEGRAM_V1_PACKAGE_NAME = "telegram.v1";
|
|
34
|
+
|
|
35
|
+
/** TelegramService provides operations related to Telegram integration. */
|
|
36
|
+
|
|
37
|
+
export interface TelegramServiceClient {
|
|
38
|
+
/** TelegramInit initiates the Telegram authentication process and returns the authentication URL. */
|
|
39
|
+
|
|
40
|
+
telegramInit(request: Empty): Observable<TelegramInitResponse>;
|
|
41
|
+
|
|
42
|
+
/** TelegramVerify verifies the Telegram authentication using the provided code and account ID. */
|
|
43
|
+
|
|
44
|
+
telegramVerify(request: TelegramVerifyRequest): Observable<TelegramVerifyResponse>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** TelegramService provides operations related to Telegram integration. */
|
|
48
|
+
|
|
49
|
+
export interface TelegramServiceController {
|
|
50
|
+
/** TelegramInit initiates the Telegram authentication process and returns the authentication URL. */
|
|
51
|
+
|
|
52
|
+
telegramInit(request: Empty): Promise<TelegramInitResponse> | Observable<TelegramInitResponse> | TelegramInitResponse;
|
|
53
|
+
|
|
54
|
+
/** TelegramVerify verifies the Telegram authentication using the provided code and account ID. */
|
|
55
|
+
|
|
56
|
+
telegramVerify(
|
|
57
|
+
request: TelegramVerifyRequest,
|
|
58
|
+
): Promise<TelegramVerifyResponse> | Observable<TelegramVerifyResponse> | TelegramVerifyResponse;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function TelegramServiceControllerMethods() {
|
|
62
|
+
return function (constructor: Function) {
|
|
63
|
+
const grpcMethods: string[] = ["telegramInit", "telegramVerify"];
|
|
64
|
+
for (const method of grpcMethods) {
|
|
65
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
66
|
+
GrpcMethod("TelegramService", method)(constructor.prototype[method], method, descriptor);
|
|
67
|
+
}
|
|
68
|
+
const grpcStreamMethods: string[] = [];
|
|
69
|
+
for (const method of grpcStreamMethods) {
|
|
70
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
71
|
+
GrpcStreamMethod("TelegramService", method)(constructor.prototype[method], method, descriptor);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const TELEGRAM_SERVICE_NAME = "TelegramService";
|
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package telegram.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
|
|
7
|
+
// TelegramService provides operations related to Telegram integration.
|
|
8
|
+
service TelegramService {
|
|
9
|
+
// TelegramInit initiates the Telegram authentication process and returns the authentication URL.
|
|
10
|
+
rpc TelegramInit (google.protobuf.Empty) returns (TelegramInitResponse);
|
|
11
|
+
// TelegramVerify verifies the Telegram authentication using the provided code and account ID.
|
|
12
|
+
rpc TelegramVerify (TelegramVerifyRequest) returns (TelegramVerifyResponse);
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message TelegramInitResponse {
|
|
17
|
+
string auth_url = 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message TelegramVerifyRequest {
|
|
21
|
+
map<string, string> query = 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message TelegramVerifyResponse {
|
|
25
|
+
oneof result {
|
|
26
|
+
string url = 1;
|
|
27
|
+
string access_token = 2;
|
|
28
|
+
string refresh_token = 3;
|
|
29
|
+
}
|
|
30
|
+
}
|