@arbiwallet/contracts 1.0.289 → 1.0.290

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
@@ -225,6 +225,19 @@ export interface ListUsersResponse {
225
225
  limit: number;
226
226
  }
227
227
 
228
+ export interface ListUserSourcesRequest {
229
+ }
230
+
231
+ export interface UserSourceItem {
232
+ id: number;
233
+ name: string;
234
+ code?: string | undefined;
235
+ }
236
+
237
+ export interface ListUserSourcesResponse {
238
+ sources: UserSourceItem[];
239
+ }
240
+
228
241
  export interface UserSearchExchangeStats {
229
242
  exchangesCount: number;
230
243
  exchangeCountLastYear: number;
@@ -598,6 +611,19 @@ export interface BatchGetUserIdsBySearchResponse {
598
611
  totalMatches: number;
599
612
  }
600
613
 
614
+ export interface BatchGetUserIdsByAdvChannelRequest {
615
+ advChannel: string;
616
+ /** Максимум возвращаемых id; сервис может дополнительно ограничить. */
617
+ limit: number;
618
+ }
619
+
620
+ export interface BatchGetUserIdsByAdvChannelResponse {
621
+ userIds: number[];
622
+ /** true, если совпадений больше, чем limit (результат был обрезан). */
623
+ tooManyMatches: boolean;
624
+ totalMatches: number;
625
+ }
626
+
601
627
  export interface SearchUserRequest {
602
628
  /** Строка поиска по полям: telegram_username, email, phone, whatsapp. */
603
629
  search: string;
@@ -685,6 +711,8 @@ export interface UserServiceClient {
685
711
 
686
712
  listUsers(request: ListUsersRequest): Observable<ListUsersResponse>;
687
713
 
714
+ listUserSources(request: ListUserSourcesRequest): Observable<ListUserSourcesResponse>;
715
+
688
716
  updateUserSearchStats(request: UpdateUserSearchStatsRequest): Observable<UpdateUserSearchStatsResponse>;
689
717
 
690
718
  /** Батч-резолв полных имен пользователей по их id (для enrichment в других сервисах). */
@@ -799,6 +827,12 @@ export interface UserServiceClient {
799
827
 
800
828
  batchGetUserIdsBySearch(request: BatchGetUserIdsBySearchRequest): Observable<BatchGetUserIdsBySearchResponse>;
801
829
 
830
+ /** Батч-поиск пользователей по adv channel (name/code/legacy string): возвращает только id. */
831
+
832
+ batchGetUserIdsByAdvChannel(
833
+ request: BatchGetUserIdsByAdvChannelRequest,
834
+ ): Observable<BatchGetUserIdsByAdvChannelResponse>;
835
+
802
836
  /** Поиск пользователей по строке (telegram_username, email, phone, whatsapp): возвращает до 50 совпадений. */
803
837
 
804
838
  searchUser(request: SearchUserRequest): Observable<SearchUserResponse>;
@@ -833,6 +867,10 @@ export interface UserServiceController {
833
867
 
834
868
  listUsers(request: ListUsersRequest): Promise<ListUsersResponse> | Observable<ListUsersResponse> | ListUsersResponse;
835
869
 
870
+ listUserSources(
871
+ request: ListUserSourcesRequest,
872
+ ): Promise<ListUserSourcesResponse> | Observable<ListUserSourcesResponse> | ListUserSourcesResponse;
873
+
836
874
  updateUserSearchStats(
837
875
  request: UpdateUserSearchStatsRequest,
838
876
  ): Promise<UpdateUserSearchStatsResponse> | Observable<UpdateUserSearchStatsResponse> | UpdateUserSearchStatsResponse;
@@ -1045,6 +1083,15 @@ export interface UserServiceController {
1045
1083
  | Observable<BatchGetUserIdsBySearchResponse>
1046
1084
  | BatchGetUserIdsBySearchResponse;
1047
1085
 
1086
+ /** Батч-поиск пользователей по adv channel (name/code/legacy string): возвращает только id. */
1087
+
1088
+ batchGetUserIdsByAdvChannel(
1089
+ request: BatchGetUserIdsByAdvChannelRequest,
1090
+ ):
1091
+ | Promise<BatchGetUserIdsByAdvChannelResponse>
1092
+ | Observable<BatchGetUserIdsByAdvChannelResponse>
1093
+ | BatchGetUserIdsByAdvChannelResponse;
1094
+
1048
1095
  /** Поиск пользователей по строке (telegram_username, email, phone, whatsapp): возвращает до 50 совпадений. */
1049
1096
 
1050
1097
  searchUser(
@@ -1073,6 +1120,7 @@ export function UserServiceControllerMethods() {
1073
1120
  "adminUpdateUserProfile",
1074
1121
  "updateUserStatus",
1075
1122
  "listUsers",
1123
+ "listUserSources",
1076
1124
  "updateUserSearchStats",
1077
1125
  "getUserFullNamesByIds",
1078
1126
  "resolveUserForTransfer",
@@ -1103,6 +1151,7 @@ export function UserServiceControllerMethods() {
1103
1151
  "requestChangePhoneCode",
1104
1152
  "verifyChangePhoneCode",
1105
1153
  "batchGetUserIdsBySearch",
1154
+ "batchGetUserIdsByAdvChannel",
1106
1155
  "searchUser",
1107
1156
  "prealoadUserForSearch",
1108
1157
  "batchGetUsersByIds",
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.289",
4
+ "version": "1.0.290",
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
@@ -10,6 +10,7 @@ service UserService {
10
10
  rpc AdminUpdateUserProfile (AdminUpdateUserProfileRequest) returns (AdminUserForUpdateResponse);
11
11
  rpc UpdateUserStatus (UpdateUserStatusRequest) returns (UserResponse);
12
12
  rpc ListUsers (ListUsersRequest) returns (ListUsersResponse);
13
+ rpc ListUserSources (ListUserSourcesRequest) returns (ListUserSourcesResponse);
13
14
  rpc UpdateUserSearchStats (UpdateUserSearchStatsRequest) returns (UpdateUserSearchStatsResponse);
14
15
  // Батч-резолв полных имен пользователей по их id (для enrichment в других сервисах).
15
16
  rpc GetUserFullNamesByIds (GetUserFullNamesByIdsRequest) returns (GetUserFullNamesByIdsResponse);
@@ -62,6 +63,8 @@ service UserService {
62
63
  rpc VerifyChangePhoneCode (VerifyChangePhoneCodeRequest) returns (UserResponse);
63
64
  // Батч-поиск пользователей по строке (telegram_username, email, phone, whatsapp): возвращает только id.
64
65
  rpc BatchGetUserIdsBySearch (BatchGetUserIdsBySearchRequest) returns (BatchGetUserIdsBySearchResponse);
66
+ // Батч-поиск пользователей по adv channel (name/code/legacy string): возвращает только id.
67
+ rpc BatchGetUserIdsByAdvChannel (BatchGetUserIdsByAdvChannelRequest) returns (BatchGetUserIdsByAdvChannelResponse);
65
68
  // Поиск пользователей по строке (telegram_username, email, phone, whatsapp): возвращает до 50 совпадений.
66
69
  rpc SearchUser (SearchUserRequest) returns (SearchUserResponse);
67
70
  // Прелоад выбранного пользователя по id для поиска пользователей: возвращает один элемент.
@@ -262,6 +265,18 @@ message ListUsersResponse {
262
265
  int32 limit = 4;
263
266
  }
264
267
 
268
+ message ListUserSourcesRequest {}
269
+
270
+ message UserSourceItem {
271
+ int32 id = 1;
272
+ string name = 2;
273
+ optional string code = 3;
274
+ }
275
+
276
+ message ListUserSourcesResponse {
277
+ repeated UserSourceItem sources = 1;
278
+ }
279
+
265
280
  message UserSearchExchangeStats {
266
281
  int32 exchanges_count = 1;
267
282
  int32 exchange_count_last_year = 2;
@@ -632,6 +647,19 @@ message BatchGetUserIdsBySearchResponse {
632
647
  int32 total_matches = 3;
633
648
  }
634
649
 
650
+ message BatchGetUserIdsByAdvChannelRequest {
651
+ string adv_channel = 1;
652
+ // Максимум возвращаемых id; сервис может дополнительно ограничить.
653
+ int32 limit = 2;
654
+ }
655
+
656
+ message BatchGetUserIdsByAdvChannelResponse {
657
+ repeated int32 user_ids = 1;
658
+ // true, если совпадений больше, чем limit (результат был обрезан).
659
+ bool too_many_matches = 2;
660
+ int32 total_matches = 3;
661
+ }
662
+
635
663
  message SearchUserRequest {
636
664
  // Строка поиска по полям: telegram_username, email, phone, whatsapp.
637
665
  string search = 1;