@arbiwallet/contracts 1.0.70 → 1.0.71

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/user.ts CHANGED
@@ -203,6 +203,23 @@ export interface ListArbiWalletChatMessagesResponse {
203
203
  bodyJson: string;
204
204
  }
205
205
 
206
+ export interface GetSupportChatLastReadRequest {
207
+ walletUserId: number;
208
+ }
209
+
210
+ export interface GetSupportChatLastReadResponse {
211
+ lastReadMessageId: number;
212
+ }
213
+
214
+ export interface SetSupportChatLastReadRequest {
215
+ walletUserId: number;
216
+ lastReadMessageId: number;
217
+ }
218
+
219
+ export interface SetSupportChatLastReadResponse {
220
+ ok: boolean;
221
+ }
222
+
206
223
  export interface UserBalance {
207
224
  asset: string;
208
225
  network: string;
@@ -270,6 +287,12 @@ export interface UserServiceClient {
270
287
  listArbiWalletChatMessages(
271
288
  request: ListArbiWalletChatMessagesRequest,
272
289
  ): Observable<ListArbiWalletChatMessagesResponse>;
290
+
291
+ /** Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt). */
292
+
293
+ getSupportChatLastRead(request: GetSupportChatLastReadRequest): Observable<GetSupportChatLastReadResponse>;
294
+
295
+ setSupportChatLastRead(request: SetSupportChatLastReadRequest): Observable<SetSupportChatLastReadResponse>;
273
296
  }
274
297
 
275
298
  export interface UserServiceController {
@@ -346,6 +369,22 @@ export interface UserServiceController {
346
369
  | Promise<ListArbiWalletChatMessagesResponse>
347
370
  | Observable<ListArbiWalletChatMessagesResponse>
348
371
  | ListArbiWalletChatMessagesResponse;
372
+
373
+ /** Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt). */
374
+
375
+ getSupportChatLastRead(
376
+ request: GetSupportChatLastReadRequest,
377
+ ):
378
+ | Promise<GetSupportChatLastReadResponse>
379
+ | Observable<GetSupportChatLastReadResponse>
380
+ | GetSupportChatLastReadResponse;
381
+
382
+ setSupportChatLastRead(
383
+ request: SetSupportChatLastReadRequest,
384
+ ):
385
+ | Promise<SetSupportChatLastReadResponse>
386
+ | Observable<SetSupportChatLastReadResponse>
387
+ | SetSupportChatLastReadResponse;
349
388
  }
350
389
 
351
390
  export function UserServiceControllerMethods() {
@@ -363,6 +402,8 @@ export function UserServiceControllerMethods() {
363
402
  "forwardManagerChatMessage",
364
403
  "postArbiWalletChatMessage",
365
404
  "listArbiWalletChatMessages",
405
+ "getSupportChatLastRead",
406
+ "setSupportChatLastRead",
366
407
  ];
367
408
  for (const method of grpcMethods) {
368
409
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
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.70",
4
+ "version": "1.0.71",
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/user.proto CHANGED
@@ -22,6 +22,9 @@ 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
+ // Локально в user-service: последний прочитанный message_id из chat-analytics (read receipt).
26
+ rpc GetSupportChatLastRead (GetSupportChatLastReadRequest) returns (GetSupportChatLastReadResponse);
27
+ rpc SetSupportChatLastRead (SetSupportChatLastReadRequest) returns (SetSupportChatLastReadResponse);
25
28
  }
26
29
 
27
30
  enum UserStatus {
@@ -211,6 +214,23 @@ message ListArbiWalletChatMessagesResponse {
211
214
  string body_json = 2;
212
215
  }
213
216
 
217
+ message GetSupportChatLastReadRequest {
218
+ int32 wallet_user_id = 1;
219
+ }
220
+
221
+ message GetSupportChatLastReadResponse {
222
+ int32 last_read_message_id = 1;
223
+ }
224
+
225
+ message SetSupportChatLastReadRequest {
226
+ int32 wallet_user_id = 1;
227
+ int32 last_read_message_id = 2;
228
+ }
229
+
230
+ message SetSupportChatLastReadResponse {
231
+ bool ok = 1;
232
+ }
233
+
214
234
  message UserBalance {
215
235
  string asset = 1;
216
236
  string network = 2;