@arbiwallet/contracts 1.0.134 → 1.0.136

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
@@ -43,6 +43,15 @@ export interface GoogleAuthCallbackRequest {
43
43
  state: string;
44
44
  }
45
45
 
46
+ export interface ExchangeAuthCodeRequest {
47
+ code: string;
48
+ }
49
+
50
+ export interface AuthExchangeCodeResponse {
51
+ exchangeCode: string;
52
+ returnUrl?: string | undefined;
53
+ }
54
+
46
55
  export interface AppleAuthRequest {
47
56
  identityToken: string;
48
57
  }
@@ -93,7 +102,9 @@ export interface AuthServiceClient {
93
102
 
94
103
  googleAuthStart(request: GoogleAuthStartRequest): Observable<GoogleAuthStartResponse>;
95
104
 
96
- googleAuthCallback(request: GoogleAuthCallbackRequest): Observable<AuthTokensResponse>;
105
+ googleAuthCallback(request: GoogleAuthCallbackRequest): Observable<AuthExchangeCodeResponse>;
106
+
107
+ exchangeAuthCode(request: ExchangeAuthCodeRequest): Observable<AuthTokensResponse>;
97
108
 
98
109
  googleAuth(request: GoogleAuthRequest): Observable<AuthTokensResponse>;
99
110
 
@@ -125,6 +136,10 @@ export interface AuthServiceController {
125
136
 
126
137
  googleAuthCallback(
127
138
  request: GoogleAuthCallbackRequest,
139
+ ): Promise<AuthExchangeCodeResponse> | Observable<AuthExchangeCodeResponse> | AuthExchangeCodeResponse;
140
+
141
+ exchangeAuthCode(
142
+ request: ExchangeAuthCodeRequest,
128
143
  ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
129
144
 
130
145
  googleAuth(
@@ -159,6 +174,7 @@ export function AuthServiceControllerMethods() {
159
174
  "telegramLoginWidgetAuth",
160
175
  "googleAuthStart",
161
176
  "googleAuthCallback",
177
+ "exchangeAuthCode",
162
178
  "googleAuth",
163
179
  "appleAuth",
164
180
  "requestContactCode",
package/gen/content.ts CHANGED
@@ -146,6 +146,23 @@ export interface ListMipifAutoReplyUsersResponse {
146
146
  users: MipifAutoReplyUser[];
147
147
  }
148
148
 
149
+ export interface SendMipifWinnerMessagesRequest {
150
+ telegramIds: string[];
151
+ text: string;
152
+ }
153
+
154
+ export interface MipifWinnerMessageResult {
155
+ telegramId: string;
156
+ ok: boolean;
157
+ error?: string | undefined;
158
+ }
159
+
160
+ export interface SendMipifWinnerMessagesResponse {
161
+ sentCount: number;
162
+ failedCount: number;
163
+ results: MipifWinnerMessageResult[];
164
+ }
165
+
149
166
  /** --- ABOUT --- */
150
167
  export interface GetAboutRequest {
151
168
  }
@@ -917,6 +934,8 @@ export const STORY_SERVICE_NAME = "StoryService";
917
934
 
918
935
  export interface MipifAutoReplyServiceClient {
919
936
  listMipifAutoReplyUsers(request: ListMipifAutoReplyUsersRequest): Observable<ListMipifAutoReplyUsersResponse>;
937
+
938
+ sendMipifWinnerMessages(request: SendMipifWinnerMessagesRequest): Observable<SendMipifWinnerMessagesResponse>;
920
939
  }
921
940
 
922
941
  export interface MipifAutoReplyServiceController {
@@ -926,11 +945,18 @@ export interface MipifAutoReplyServiceController {
926
945
  | Promise<ListMipifAutoReplyUsersResponse>
927
946
  | Observable<ListMipifAutoReplyUsersResponse>
928
947
  | ListMipifAutoReplyUsersResponse;
948
+
949
+ sendMipifWinnerMessages(
950
+ request: SendMipifWinnerMessagesRequest,
951
+ ):
952
+ | Promise<SendMipifWinnerMessagesResponse>
953
+ | Observable<SendMipifWinnerMessagesResponse>
954
+ | SendMipifWinnerMessagesResponse;
929
955
  }
930
956
 
931
957
  export function MipifAutoReplyServiceControllerMethods() {
932
958
  return function (constructor: Function) {
933
- const grpcMethods: string[] = ["listMipifAutoReplyUsers"];
959
+ const grpcMethods: string[] = ["listMipifAutoReplyUsers", "sendMipifWinnerMessages"];
934
960
  for (const method of grpcMethods) {
935
961
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
936
962
  GrpcMethod("MipifAutoReplyService", method)(constructor.prototype[method], method, descriptor);
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.134",
4
+ "version": "1.0.136",
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
@@ -5,7 +5,8 @@ service AuthService {
5
5
  rpc TelegramMiniAppAuth (TelegramMiniAppAuthRequest) returns (AuthTokensResponse);
6
6
  rpc TelegramLoginWidgetAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
7
7
  rpc GoogleAuthStart (GoogleAuthStartRequest) returns (GoogleAuthStartResponse);
8
- rpc GoogleAuthCallback (GoogleAuthCallbackRequest) returns (AuthTokensResponse);
8
+ rpc GoogleAuthCallback (GoogleAuthCallbackRequest) returns (AuthExchangeCodeResponse);
9
+ rpc ExchangeAuthCode (ExchangeAuthCodeRequest) returns (AuthTokensResponse);
9
10
  rpc GoogleAuth (GoogleAuthRequest) returns (AuthTokensResponse);
10
11
  rpc AppleAuth (AppleAuthRequest) returns (AuthTokensResponse);
11
12
  rpc RequestContactCode (ContactCodeRequest) returns (MessageResponse);
@@ -48,6 +49,15 @@ message GoogleAuthCallbackRequest {
48
49
  string state = 2;
49
50
  }
50
51
 
52
+ message ExchangeAuthCodeRequest {
53
+ string code = 1;
54
+ }
55
+
56
+ message AuthExchangeCodeResponse {
57
+ string exchange_code = 1;
58
+ optional string return_url = 2;
59
+ }
60
+
51
61
  message AppleAuthRequest {
52
62
  string identity_token = 1;
53
63
  }
@@ -75,6 +75,7 @@ service StoryService {
75
75
 
76
76
  service MipifAutoReplyService {
77
77
  rpc ListMipifAutoReplyUsers (ListMipifAutoReplyUsersRequest) returns (ListMipifAutoReplyUsersResponse);
78
+ rpc SendMipifWinnerMessages (SendMipifWinnerMessagesRequest) returns (SendMipifWinnerMessagesResponse);
78
79
  }
79
80
 
80
81
  // --- PUBLIC CONTENT MESSAGES ---
@@ -206,6 +207,23 @@ message ListMipifAutoReplyUsersResponse {
206
207
  repeated MipifAutoReplyUser users = 1;
207
208
  }
208
209
 
210
+ message SendMipifWinnerMessagesRequest {
211
+ repeated string telegram_ids = 1;
212
+ string text = 2;
213
+ }
214
+
215
+ message MipifWinnerMessageResult {
216
+ string telegram_id = 1;
217
+ bool ok = 2;
218
+ optional string error = 3;
219
+ }
220
+
221
+ message SendMipifWinnerMessagesResponse {
222
+ int32 sent_count = 1;
223
+ int32 failed_count = 2;
224
+ repeated MipifWinnerMessageResult results = 3;
225
+ }
226
+
209
227
  // --- ABOUT ---
210
228
  message GetAboutRequest {}
211
229