@arbiwallet/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/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 TelegramAuthRequest {
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,9 @@ export interface MeResponse {
67
73
  export const AUTH_PACKAGE_NAME = "auth";
68
74
 
69
75
  export interface AuthServiceClient {
70
- telegramAuth(request: TelegramAuthRequest): Observable<AuthTokensResponse>;
76
+ telegramMiniAppAuth(request: TelegramMiniAppAuthRequest): Observable<AuthTokensResponse>;
77
+
78
+ telegramLoginWidgetAuth(request: TelegramLoginWidgetAuthRequest): Observable<AuthTokensResponse>;
71
79
 
72
80
  googleAuth(request: GoogleAuthRequest): Observable<AuthTokensResponse>;
73
81
 
@@ -85,8 +93,12 @@ export interface AuthServiceClient {
85
93
  }
86
94
 
87
95
  export interface AuthServiceController {
88
- telegramAuth(
89
- request: TelegramAuthRequest,
96
+ telegramMiniAppAuth(
97
+ request: TelegramMiniAppAuthRequest,
98
+ ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
99
+
100
+ telegramLoginWidgetAuth(
101
+ request: TelegramLoginWidgetAuthRequest,
90
102
  ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
91
103
 
92
104
  googleAuth(
@@ -117,7 +129,8 @@ export interface AuthServiceController {
117
129
  export function AuthServiceControllerMethods() {
118
130
  return function (constructor: Function) {
119
131
  const grpcMethods: string[] = [
120
- "telegramAuth",
132
+ "telegramMiniAppAuth",
133
+ "telegramLoginWidgetAuth",
121
134
  "googleAuth",
122
135
  "appleAuth",
123
136
  "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.14",
4
+ "version": "1.0.16",
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,8 @@ syntax = "proto3";
2
2
  package auth;
3
3
 
4
4
  service AuthService {
5
- rpc TelegramAuth (TelegramAuthRequest) returns (AuthTokensResponse);
5
+ rpc TelegramMiniAppAuth (TelegramMiniAppAuthRequest) returns (AuthTokensResponse);
6
+ rpc TelegramLoginWidgetAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
6
7
  rpc GoogleAuth (GoogleAuthRequest) returns (AuthTokensResponse);
7
8
  rpc AppleAuth (AppleAuthRequest) returns (AuthTokensResponse);
8
9
  rpc RequestContactCode (ContactCodeRequest) returns (MessageResponse);
@@ -12,7 +13,11 @@ service AuthService {
12
13
  rpc GetMe (AccessTokenRequest) returns (MeResponse);
13
14
  }
14
15
 
15
- message TelegramAuthRequest {
16
+ message TelegramMiniAppAuthRequest {
17
+ string init_data = 1;
18
+ }
19
+
20
+ message TelegramLoginWidgetAuthRequest {
16
21
  string id = 1;
17
22
  string hash = 2;
18
23
  string username = 3;
@@ -20,6 +25,8 @@ message TelegramAuthRequest {
20
25
  string last_name = 5;
21
26
  string auth_date = 6;
22
27
  string photo_url = 7;
28
+ string language_code = 8;
29
+ bool allows_write_to_pm = 9;
23
30
  }
24
31
 
25
32
  message GoogleAuthRequest {