@arbiwallet/contracts 1.0.14 → 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/gen/auth.ts +23 -3
- package/package.json +1 -1
- package/proto/auth.proto +10 -2
package/gen/auth.ts
CHANGED
|
@@ -10,7 +10,11 @@ import { Observable } from "rxjs";
|
|
|
10
10
|
|
|
11
11
|
export const protobufPackage = "auth";
|
|
12
12
|
|
|
13
|
-
export interface
|
|
13
|
+
export interface TelegramMiniAppAuthRequest {
|
|
14
|
+
initData: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface TelegramLoginWidgetAuthRequest {
|
|
14
18
|
id: string;
|
|
15
19
|
hash: string;
|
|
16
20
|
username: string;
|
|
@@ -18,6 +22,8 @@ export interface TelegramAuthRequest {
|
|
|
18
22
|
lastName: string;
|
|
19
23
|
authDate: string;
|
|
20
24
|
photoUrl: string;
|
|
25
|
+
languageCode: string;
|
|
26
|
+
allowsWriteToPm: boolean;
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
export interface GoogleAuthRequest {
|
|
@@ -67,7 +73,11 @@ export interface MeResponse {
|
|
|
67
73
|
export const AUTH_PACKAGE_NAME = "auth";
|
|
68
74
|
|
|
69
75
|
export interface AuthServiceClient {
|
|
70
|
-
telegramAuth(request:
|
|
76
|
+
telegramAuth(request: TelegramLoginWidgetAuthRequest): Observable<AuthTokensResponse>;
|
|
77
|
+
|
|
78
|
+
telegramMiniAppAuth(request: TelegramMiniAppAuthRequest): Observable<AuthTokensResponse>;
|
|
79
|
+
|
|
80
|
+
telegramLoginWidgetAuth(request: TelegramLoginWidgetAuthRequest): Observable<AuthTokensResponse>;
|
|
71
81
|
|
|
72
82
|
googleAuth(request: GoogleAuthRequest): Observable<AuthTokensResponse>;
|
|
73
83
|
|
|
@@ -86,7 +96,15 @@ export interface AuthServiceClient {
|
|
|
86
96
|
|
|
87
97
|
export interface AuthServiceController {
|
|
88
98
|
telegramAuth(
|
|
89
|
-
request:
|
|
99
|
+
request: TelegramLoginWidgetAuthRequest,
|
|
100
|
+
): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
|
|
101
|
+
|
|
102
|
+
telegramMiniAppAuth(
|
|
103
|
+
request: TelegramMiniAppAuthRequest,
|
|
104
|
+
): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
|
|
105
|
+
|
|
106
|
+
telegramLoginWidgetAuth(
|
|
107
|
+
request: TelegramLoginWidgetAuthRequest,
|
|
90
108
|
): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
|
|
91
109
|
|
|
92
110
|
googleAuth(
|
|
@@ -118,6 +136,8 @@ export function AuthServiceControllerMethods() {
|
|
|
118
136
|
return function (constructor: Function) {
|
|
119
137
|
const grpcMethods: string[] = [
|
|
120
138
|
"telegramAuth",
|
|
139
|
+
"telegramMiniAppAuth",
|
|
140
|
+
"telegramLoginWidgetAuth",
|
|
121
141
|
"googleAuth",
|
|
122
142
|
"appleAuth",
|
|
123
143
|
"requestContactCode",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbiwallet/contracts",
|
|
3
3
|
"descriptions": "Generate and manage smart contracts for ArbiWallet",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.15",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
|
7
7
|
},
|
package/proto/auth.proto
CHANGED
|
@@ -2,7 +2,9 @@ syntax = "proto3";
|
|
|
2
2
|
package auth;
|
|
3
3
|
|
|
4
4
|
service AuthService {
|
|
5
|
-
rpc TelegramAuth (
|
|
5
|
+
rpc TelegramAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
|
|
6
|
+
rpc TelegramMiniAppAuth (TelegramMiniAppAuthRequest) returns (AuthTokensResponse);
|
|
7
|
+
rpc TelegramLoginWidgetAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
|
|
6
8
|
rpc GoogleAuth (GoogleAuthRequest) returns (AuthTokensResponse);
|
|
7
9
|
rpc AppleAuth (AppleAuthRequest) returns (AuthTokensResponse);
|
|
8
10
|
rpc RequestContactCode (ContactCodeRequest) returns (MessageResponse);
|
|
@@ -12,7 +14,11 @@ service AuthService {
|
|
|
12
14
|
rpc GetMe (AccessTokenRequest) returns (MeResponse);
|
|
13
15
|
}
|
|
14
16
|
|
|
15
|
-
message
|
|
17
|
+
message TelegramMiniAppAuthRequest {
|
|
18
|
+
string init_data = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message TelegramLoginWidgetAuthRequest {
|
|
16
22
|
string id = 1;
|
|
17
23
|
string hash = 2;
|
|
18
24
|
string username = 3;
|
|
@@ -20,6 +26,8 @@ message TelegramAuthRequest {
|
|
|
20
26
|
string last_name = 5;
|
|
21
27
|
string auth_date = 6;
|
|
22
28
|
string photo_url = 7;
|
|
29
|
+
string language_code = 8;
|
|
30
|
+
bool allows_write_to_pm = 9;
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
message GoogleAuthRequest {
|