@arbiwallet/contracts 1.0.71 → 1.0.73

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
@@ -31,6 +31,7 @@ export interface GoogleAuthRequest {
31
31
  }
32
32
 
33
33
  export interface GoogleAuthStartRequest {
34
+ returnUrl?: string | undefined;
34
35
  }
35
36
 
36
37
  export interface GoogleAuthStartResponse {
@@ -68,6 +69,7 @@ export interface AccessTokenRequest {
68
69
  export interface AuthTokensResponse {
69
70
  accessToken: string;
70
71
  refreshToken: string;
72
+ returnUrl?: string | undefined;
71
73
  }
72
74
 
73
75
  export interface AccessTokenResponse {
package/gen/user.ts CHANGED
@@ -185,6 +185,9 @@ export interface PostArbiWalletChatMessageRequest {
185
185
  walletUserId: number;
186
186
  /** Частичное тело от клиента: text, content, reply_to, datetime (ISO UTC). */
187
187
  jsonBody: string;
188
+ mediaFile?: Uint8Array | undefined;
189
+ mediaFilename?: string | undefined;
190
+ mediaContentType?: string | undefined;
188
191
  }
189
192
 
190
193
  export interface PostArbiWalletChatMessageResponse {
@@ -203,6 +206,17 @@ export interface ListArbiWalletChatMessagesResponse {
203
206
  bodyJson: string;
204
207
  }
205
208
 
209
+ export interface ProxyArbiWalletChatMediaRequest {
210
+ walletUserId: number;
211
+ url: string;
212
+ }
213
+
214
+ export interface ProxyArbiWalletChatMediaResponse {
215
+ httpStatus: number;
216
+ body: Uint8Array;
217
+ contentType: string;
218
+ }
219
+
206
220
  export interface GetSupportChatLastReadRequest {
207
221
  walletUserId: number;
208
222
  }
@@ -288,6 +302,10 @@ export interface UserServiceClient {
288
302
  request: ListArbiWalletChatMessagesRequest,
289
303
  ): Observable<ListArbiWalletChatMessagesResponse>;
290
304
 
305
+ /** Прокси медиа по HTTPS URL (allowlist): CRM session + X-Session-ID только в user-service; тело для отдачи на gateway → FE. */
306
+
307
+ proxyArbiWalletChatMedia(request: ProxyArbiWalletChatMediaRequest): Observable<ProxyArbiWalletChatMediaResponse>;
308
+
291
309
  /** Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt). */
292
310
 
293
311
  getSupportChatLastRead(request: GetSupportChatLastReadRequest): Observable<GetSupportChatLastReadResponse>;
@@ -370,6 +388,15 @@ export interface UserServiceController {
370
388
  | Observable<ListArbiWalletChatMessagesResponse>
371
389
  | ListArbiWalletChatMessagesResponse;
372
390
 
391
+ /** Прокси медиа по HTTPS URL (allowlist): CRM session + X-Session-ID только в user-service; тело для отдачи на gateway → FE. */
392
+
393
+ proxyArbiWalletChatMedia(
394
+ request: ProxyArbiWalletChatMediaRequest,
395
+ ):
396
+ | Promise<ProxyArbiWalletChatMediaResponse>
397
+ | Observable<ProxyArbiWalletChatMediaResponse>
398
+ | ProxyArbiWalletChatMediaResponse;
399
+
373
400
  /** Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt). */
374
401
 
375
402
  getSupportChatLastRead(
@@ -402,6 +429,7 @@ export function UserServiceControllerMethods() {
402
429
  "forwardManagerChatMessage",
403
430
  "postArbiWalletChatMessage",
404
431
  "listArbiWalletChatMessages",
432
+ "proxyArbiWalletChatMedia",
405
433
  "getSupportChatLastRead",
406
434
  "setSupportChatLastRead",
407
435
  ];
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.71",
4
+ "version": "1.0.73",
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
@@ -35,7 +35,9 @@ message GoogleAuthRequest {
35
35
  string id_token = 1;
36
36
  }
37
37
 
38
- message GoogleAuthStartRequest {}
38
+ message GoogleAuthStartRequest {
39
+ optional string return_url = 1;
40
+ }
39
41
 
40
42
  message GoogleAuthStartResponse {
41
43
  string auth_url = 1;
@@ -72,6 +74,7 @@ message AccessTokenRequest {
72
74
  message AuthTokensResponse {
73
75
  string access_token = 1;
74
76
  string refresh_token = 2;
77
+ optional string return_url = 3;
75
78
  }
76
79
 
77
80
  message AccessTokenResponse {
package/proto/user.proto CHANGED
@@ -22,6 +22,8 @@ service UserService {
22
22
  rpc PostArbiWalletChatMessage (PostArbiWalletChatMessageRequest) returns (PostArbiWalletChatMessageResponse);
23
23
  // Чат AlexAI (chat-analytics): GET /api/v1/arbi-wallet/messages?wallet_client_id=… — список сообщений пользователя.
24
24
  rpc ListArbiWalletChatMessages (ListArbiWalletChatMessagesRequest) returns (ListArbiWalletChatMessagesResponse);
25
+ // Прокси медиа по HTTPS URL (allowlist): CRM session + X-Session-ID только в user-service; тело для отдачи на gateway → FE.
26
+ rpc ProxyArbiWalletChatMedia (ProxyArbiWalletChatMediaRequest) returns (ProxyArbiWalletChatMediaResponse);
25
27
  // Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt).
26
28
  rpc GetSupportChatLastRead (GetSupportChatLastReadRequest) returns (GetSupportChatLastReadResponse);
27
29
  rpc SetSupportChatLastRead (SetSupportChatLastReadRequest) returns (SetSupportChatLastReadResponse);
@@ -196,6 +198,9 @@ message PostArbiWalletChatMessageRequest {
196
198
  int32 wallet_user_id = 1;
197
199
  // Частичное тело от клиента: text, content, reply_to, datetime (ISO UTC).
198
200
  string json_body = 2;
201
+ optional bytes media_file = 3;
202
+ optional string media_filename = 4;
203
+ optional string media_content_type = 5;
199
204
  }
200
205
 
201
206
  message PostArbiWalletChatMessageResponse {
@@ -214,6 +219,17 @@ message ListArbiWalletChatMessagesResponse {
214
219
  string body_json = 2;
215
220
  }
216
221
 
222
+ message ProxyArbiWalletChatMediaRequest {
223
+ int32 wallet_user_id = 1;
224
+ string url = 2;
225
+ }
226
+
227
+ message ProxyArbiWalletChatMediaResponse {
228
+ int32 http_status = 1;
229
+ bytes body = 2;
230
+ string content_type = 3;
231
+ }
232
+
217
233
  message GetSupportChatLastReadRequest {
218
234
  int32 wallet_user_id = 1;
219
235
  }