@candesk/contracts 3.2.0 → 3.3.0
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/gen/auth.d.ts +12 -3
- package/dist/nest/auth.d.ts +13 -3
- package/dist/nest/auth.js +1 -0
- package/package.json +1 -1
- package/proto/auth.proto +14 -5
package/dist/gen/auth.d.ts
CHANGED
|
@@ -40,9 +40,10 @@ export interface TelegramVerifyRequest_QueryEntry {
|
|
|
40
40
|
value: string;
|
|
41
41
|
}
|
|
42
42
|
export interface TelegramVerifyResponse {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
/** bot link when the phone number is still needed, the tokens are empty then */
|
|
44
|
+
url: string;
|
|
45
|
+
accessToken: string;
|
|
46
|
+
refreshToken: string;
|
|
46
47
|
/** secret for the browser that started the login, set only together with url */
|
|
47
48
|
pollToken: string;
|
|
48
49
|
}
|
|
@@ -71,6 +72,13 @@ export interface TelegramPollResponse {
|
|
|
71
72
|
accessToken: string;
|
|
72
73
|
refreshToken: string;
|
|
73
74
|
}
|
|
75
|
+
export interface TelegramStatusRequest {
|
|
76
|
+
telegramId: string;
|
|
77
|
+
}
|
|
78
|
+
export interface TelegramStatusResponse {
|
|
79
|
+
/** true when Telegram login lets this user in right away */
|
|
80
|
+
linked: boolean;
|
|
81
|
+
}
|
|
74
82
|
export interface AuthService {
|
|
75
83
|
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse>;
|
|
76
84
|
verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse>;
|
|
@@ -81,4 +89,5 @@ export interface AuthService {
|
|
|
81
89
|
telegramComplete(request: TelegramCompleteRequest): Promise<TelegramCompleteResponse>;
|
|
82
90
|
telegramConsume(request: TelegramConsumeRequest): Promise<TelegramConsumeResponse>;
|
|
83
91
|
telegramPoll(request: TelegramPollRequest): Promise<TelegramPollResponse>;
|
|
92
|
+
telegramStatus(request: TelegramStatusRequest): Promise<TelegramStatusResponse>;
|
|
84
93
|
}
|
package/dist/nest/auth.d.ts
CHANGED
|
@@ -41,9 +41,10 @@ export interface TelegramVerifyRequest_QueryEntry {
|
|
|
41
41
|
value: string;
|
|
42
42
|
}
|
|
43
43
|
export interface TelegramVerifyResponse {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
/** bot link when the phone number is still needed, the tokens are empty then */
|
|
45
|
+
url: string;
|
|
46
|
+
accessToken: string;
|
|
47
|
+
refreshToken: string;
|
|
47
48
|
/** secret for the browser that started the login, set only together with url */
|
|
48
49
|
pollToken: string;
|
|
49
50
|
}
|
|
@@ -72,6 +73,13 @@ export interface TelegramPollResponse {
|
|
|
72
73
|
accessToken: string;
|
|
73
74
|
refreshToken: string;
|
|
74
75
|
}
|
|
76
|
+
export interface TelegramStatusRequest {
|
|
77
|
+
telegramId: string;
|
|
78
|
+
}
|
|
79
|
+
export interface TelegramStatusResponse {
|
|
80
|
+
/** true when Telegram login lets this user in right away */
|
|
81
|
+
linked: boolean;
|
|
82
|
+
}
|
|
75
83
|
export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
76
84
|
export interface AuthServiceClient {
|
|
77
85
|
sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
|
|
@@ -83,6 +91,7 @@ export interface AuthServiceClient {
|
|
|
83
91
|
telegramComplete(request: TelegramCompleteRequest): Observable<TelegramCompleteResponse>;
|
|
84
92
|
telegramConsume(request: TelegramConsumeRequest): Observable<TelegramConsumeResponse>;
|
|
85
93
|
telegramPoll(request: TelegramPollRequest): Observable<TelegramPollResponse>;
|
|
94
|
+
telegramStatus(request: TelegramStatusRequest): Observable<TelegramStatusResponse>;
|
|
86
95
|
}
|
|
87
96
|
export interface AuthServiceController {
|
|
88
97
|
sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
|
|
@@ -94,6 +103,7 @@ export interface AuthServiceController {
|
|
|
94
103
|
telegramComplete(request: TelegramCompleteRequest): Promise<TelegramCompleteResponse> | Observable<TelegramCompleteResponse> | TelegramCompleteResponse;
|
|
95
104
|
telegramConsume(request: TelegramConsumeRequest): Promise<TelegramConsumeResponse> | Observable<TelegramConsumeResponse> | TelegramConsumeResponse;
|
|
96
105
|
telegramPoll(request: TelegramPollRequest): Promise<TelegramPollResponse> | Observable<TelegramPollResponse> | TelegramPollResponse;
|
|
106
|
+
telegramStatus(request: TelegramStatusRequest): Promise<TelegramStatusResponse> | Observable<TelegramStatusResponse> | TelegramStatusResponse;
|
|
97
107
|
}
|
|
98
108
|
export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
|
|
99
109
|
export declare const AUTH_SERVICE_NAME = "AuthService";
|
package/dist/nest/auth.js
CHANGED
package/package.json
CHANGED
package/proto/auth.proto
CHANGED
|
@@ -15,6 +15,7 @@ service AuthService {
|
|
|
15
15
|
rpc TelegramComplete (TelegramCompleteRequest) returns (TelegramCompleteResponse);
|
|
16
16
|
rpc TelegramConsume (TelegramConsumeRequest) returns (TelegramConsumeResponse);
|
|
17
17
|
rpc TelegramPoll (TelegramPollRequest) returns (TelegramPollResponse);
|
|
18
|
+
rpc TelegramStatus (TelegramStatusRequest) returns (TelegramStatusResponse);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
message SendOtpRequest {
|
|
@@ -65,11 +66,10 @@ message TelegramVerifyRequest {
|
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
message TelegramVerifyResponse {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
69
|
+
// bot link when the phone number is still needed, the tokens are empty then
|
|
70
|
+
string url = 1;
|
|
71
|
+
string access_token = 2;
|
|
72
|
+
string refresh_token = 3;
|
|
73
73
|
// secret for the browser that started the login, set only together with url
|
|
74
74
|
string poll_token = 4;
|
|
75
75
|
}
|
|
@@ -103,4 +103,13 @@ message TelegramPollResponse {
|
|
|
103
103
|
bool ready = 1;
|
|
104
104
|
string access_token = 2;
|
|
105
105
|
string refresh_token = 3;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message TelegramStatusRequest {
|
|
109
|
+
string telegram_id = 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
message TelegramStatusResponse {
|
|
113
|
+
// true when Telegram login lets this user in right away
|
|
114
|
+
bool linked = 1;
|
|
106
115
|
}
|