@slack-clone-org/contracts 1.0.14 → 1.0.16
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 +47 -2
- package/generated/auth.ts +1 -1
- package/generated/google/protobuf/empty.ts +23 -0
- package/generated/telegram.ts +76 -0
- package/package.json +1 -1
- package/proto/account.proto +23 -0
- package/proto/telegram.proto +30 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
package/generated/account.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: account.proto
|
|
6
6
|
|
|
@@ -48,6 +48,25 @@ export interface ConfirmEmailChangeResponse {
|
|
|
48
48
|
success: boolean;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
export interface InitPhoneChangeRequest {
|
|
52
|
+
accountId: string;
|
|
53
|
+
newPhoneNumber: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface InitPhoneChangeResponse {
|
|
57
|
+
success: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ConfirmPhoneChangeRequest {
|
|
61
|
+
phoneNumber: string;
|
|
62
|
+
confirmationCode: string;
|
|
63
|
+
accountId: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ConfirmPhoneChangeResponse {
|
|
67
|
+
success: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
51
70
|
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
52
71
|
|
|
53
72
|
/** AccountService provides account-related operations. */
|
|
@@ -64,6 +83,14 @@ export interface AccountServiceClient {
|
|
|
64
83
|
/** Methods for confirming email changes. */
|
|
65
84
|
|
|
66
85
|
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
|
|
86
|
+
|
|
87
|
+
/** Methods for initiating phone changes. */
|
|
88
|
+
|
|
89
|
+
initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
|
|
90
|
+
|
|
91
|
+
/** Methods for confirming phone changes. */
|
|
92
|
+
|
|
93
|
+
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
|
|
67
94
|
}
|
|
68
95
|
|
|
69
96
|
/** AccountService provides account-related operations. */
|
|
@@ -86,11 +113,29 @@ export interface AccountServiceController {
|
|
|
86
113
|
confirmEmailChange(
|
|
87
114
|
request: ConfirmEmailChangeRequest,
|
|
88
115
|
): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
116
|
+
|
|
117
|
+
/** Methods for initiating phone changes. */
|
|
118
|
+
|
|
119
|
+
initPhoneChange(
|
|
120
|
+
request: InitPhoneChangeRequest,
|
|
121
|
+
): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
|
|
122
|
+
|
|
123
|
+
/** Methods for confirming phone changes. */
|
|
124
|
+
|
|
125
|
+
confirmPhoneChange(
|
|
126
|
+
request: ConfirmPhoneChangeRequest,
|
|
127
|
+
): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
|
|
89
128
|
}
|
|
90
129
|
|
|
91
130
|
export function AccountServiceControllerMethods() {
|
|
92
131
|
return function (constructor: Function) {
|
|
93
|
-
const grpcMethods: string[] = [
|
|
132
|
+
const grpcMethods: string[] = [
|
|
133
|
+
"getAccount",
|
|
134
|
+
"initEmailChange",
|
|
135
|
+
"confirmEmailChange",
|
|
136
|
+
"initPhoneChange",
|
|
137
|
+
"confirmPhoneChange",
|
|
138
|
+
];
|
|
94
139
|
for (const method of grpcMethods) {
|
|
95
140
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
96
141
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
package/generated/auth.ts
CHANGED
|
@@ -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/account.proto
CHANGED
|
@@ -11,6 +11,10 @@ service AccountService {
|
|
|
11
11
|
rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
|
|
12
12
|
// Methods for confirming email changes.
|
|
13
13
|
rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
|
|
14
|
+
// Methods for initiating phone changes.
|
|
15
|
+
rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
|
|
16
|
+
// Methods for confirming phone changes.
|
|
17
|
+
rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
message GetAccountRequest {
|
|
@@ -45,6 +49,25 @@ message ConfirmEmailChangeResponse {
|
|
|
45
49
|
bool success = 1;
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
message InitPhoneChangeRequest {
|
|
53
|
+
string account_id = 1;
|
|
54
|
+
string new_phone_number = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message InitPhoneChangeResponse {
|
|
58
|
+
bool success = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message ConfirmPhoneChangeRequest {
|
|
62
|
+
string phone_number = 1;
|
|
63
|
+
string confirmation_code = 2;
|
|
64
|
+
string account_id = 3;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message ConfirmPhoneChangeResponse {
|
|
68
|
+
bool success = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
48
71
|
enum GlobalRole {
|
|
49
72
|
USER = 0;
|
|
50
73
|
ADMIN = 1;
|
|
@@ -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
|
+
}
|