@arbiwallet/contracts 1.0.289 → 1.0.291

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.
@@ -513,6 +513,7 @@ export interface GetExchangePaymentsItem {
513
513
  /** Base amount without network fee (crypto), when stored. */
514
514
  amountBase?: number | undefined;
515
515
  uuid?: string | undefined;
516
+ realPrimeRateIsFixed?: boolean | undefined;
516
517
  }
517
518
 
518
519
  export interface GetExchangePaymentsResponse {
@@ -531,6 +532,19 @@ export interface GetExchangePaymentResponse {
531
532
  payment?: GetExchangePaymentsItem | undefined;
532
533
  }
533
534
 
535
+ export interface SetPaymentRealPrimeRateFixedRequest {
536
+ authManagerContext?: AuthManagerContext | undefined;
537
+ paymentId: string;
538
+ isFixed: boolean;
539
+ }
540
+
541
+ export interface SetPaymentRealPrimeRateFixedResponse {
542
+ ok: boolean;
543
+ error?: string | undefined;
544
+ paymentId?: string | undefined;
545
+ realPrimeRateIsFixed?: boolean | undefined;
546
+ }
547
+
534
548
  export interface SearchExchangePaymentRequest {
535
549
  search: string;
536
550
  limit: number;
@@ -655,6 +669,97 @@ export interface GetWalletsMonikaResponse {
655
669
  wallets: WalletMonikaItem[];
656
670
  }
657
671
 
672
+ export interface PaymentAgentDailyRateItem {
673
+ id: string;
674
+ paymentAgent: number;
675
+ /** YYYY-MM-DD */
676
+ rateDate: string;
677
+ actualCost: number;
678
+ isApplied: boolean;
679
+ affectedPayments: number;
680
+ createdAt: string;
681
+ createdByManagerId?: string | undefined;
682
+ }
683
+
684
+ export interface ListPaymentAgentDailyRatesRequest {
685
+ authManagerContext: AuthManagerContext | undefined;
686
+ }
687
+
688
+ export interface ListPaymentAgentDailyRatesResponse {
689
+ items: PaymentAgentDailyRateItem[];
690
+ }
691
+
692
+ export interface CreatePaymentAgentDailyRateRequest {
693
+ authManagerContext: AuthManagerContext | undefined;
694
+ paymentAgent: number;
695
+ /** YYYY-MM-DD */
696
+ rateDate: string;
697
+ actualCost: number;
698
+ }
699
+
700
+ export interface CreatePaymentAgentDailyRateResponse {
701
+ ok: boolean;
702
+ error?: string | undefined;
703
+ item?: PaymentAgentDailyRateItem | undefined;
704
+ }
705
+
706
+ export interface PreviewPaymentAgentDailyRateRequest {
707
+ authManagerContext: AuthManagerContext | undefined;
708
+ id: string;
709
+ }
710
+
711
+ export interface PaymentAgentDailyRatePaymentPreviewItem {
712
+ id: string;
713
+ currentRate?: number | undefined;
714
+ createdAt: string;
715
+ }
716
+
717
+ export interface PaymentAgentDailyRateExchangePreviewItem {
718
+ id: string;
719
+ paymentId?: string | undefined;
720
+ currentRate1Iter?: number | undefined;
721
+ currentProfit?: number | undefined;
722
+ inputCurrencyId?: string | undefined;
723
+ outputCurrencyId?: string | undefined;
724
+ }
725
+
726
+ export interface PreviewPaymentAgentDailyRateResponse {
727
+ ok: boolean;
728
+ error?: string | undefined;
729
+ item?: PaymentAgentDailyRateItem | undefined;
730
+ paymentsCount: number;
731
+ exchangesCount: number;
732
+ paymentsFirst: PaymentAgentDailyRatePaymentPreviewItem[];
733
+ paymentsLast: PaymentAgentDailyRatePaymentPreviewItem[];
734
+ exchangesFirst: PaymentAgentDailyRateExchangePreviewItem[];
735
+ exchangesLast: PaymentAgentDailyRateExchangePreviewItem[];
736
+ }
737
+
738
+ export interface ApplyPaymentAgentDailyRateRequest {
739
+ authManagerContext: AuthManagerContext | undefined;
740
+ id: string;
741
+ }
742
+
743
+ export interface ApplyPaymentAgentDailyRateResponse {
744
+ ok: boolean;
745
+ error?: string | undefined;
746
+ item?: PaymentAgentDailyRateItem | undefined;
747
+ paymentsUpdated: number;
748
+ exchangesUpdated: number;
749
+ taskId?: string | undefined;
750
+ }
751
+
752
+ export interface DeletePaymentAgentDailyRateRequest {
753
+ authManagerContext: AuthManagerContext | undefined;
754
+ id: string;
755
+ }
756
+
757
+ export interface DeletePaymentAgentDailyRateResponse {
758
+ ok: boolean;
759
+ error?: string | undefined;
760
+ deleted: boolean;
761
+ }
762
+
658
763
  export interface ListExchangePayoutsRequest {
659
764
  authManagerContext: AuthManagerContext | undefined;
660
765
  page?: number | undefined;
@@ -783,6 +888,10 @@ export interface ExchangeCoreServiceClient {
783
888
 
784
889
  getExchangePayment(request: GetExchangePaymentRequest): Observable<GetExchangePaymentResponse>;
785
890
 
891
+ setPaymentRealPrimeRateFixed(
892
+ request: SetPaymentRealPrimeRateFixedRequest,
893
+ ): Observable<SetPaymentRealPrimeRateFixedResponse>;
894
+
786
895
  getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
787
896
 
788
897
  searchExchangePayment(request: SearchExchangePaymentRequest): Observable<SearchExchangePaymentResponse>;
@@ -798,6 +907,26 @@ export interface ExchangeCoreServiceClient {
798
907
  getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
799
908
 
800
909
  getWalletsMonika(request: GetWalletsMonikaRequest): Observable<GetWalletsMonikaResponse>;
910
+
911
+ listPaymentAgentDailyRates(
912
+ request: ListPaymentAgentDailyRatesRequest,
913
+ ): Observable<ListPaymentAgentDailyRatesResponse>;
914
+
915
+ createPaymentAgentDailyRate(
916
+ request: CreatePaymentAgentDailyRateRequest,
917
+ ): Observable<CreatePaymentAgentDailyRateResponse>;
918
+
919
+ previewPaymentAgentDailyRate(
920
+ request: PreviewPaymentAgentDailyRateRequest,
921
+ ): Observable<PreviewPaymentAgentDailyRateResponse>;
922
+
923
+ applyPaymentAgentDailyRate(
924
+ request: ApplyPaymentAgentDailyRateRequest,
925
+ ): Observable<ApplyPaymentAgentDailyRateResponse>;
926
+
927
+ deletePaymentAgentDailyRate(
928
+ request: DeletePaymentAgentDailyRateRequest,
929
+ ): Observable<DeletePaymentAgentDailyRateResponse>;
801
930
  }
802
931
 
803
932
  export interface ExchangeCoreServiceController {
@@ -897,6 +1026,13 @@ export interface ExchangeCoreServiceController {
897
1026
  request: GetExchangePaymentRequest,
898
1027
  ): Promise<GetExchangePaymentResponse> | Observable<GetExchangePaymentResponse> | GetExchangePaymentResponse;
899
1028
 
1029
+ setPaymentRealPrimeRateFixed(
1030
+ request: SetPaymentRealPrimeRateFixedRequest,
1031
+ ):
1032
+ | Promise<SetPaymentRealPrimeRateFixedResponse>
1033
+ | Observable<SetPaymentRealPrimeRateFixedResponse>
1034
+ | SetPaymentRealPrimeRateFixedResponse;
1035
+
900
1036
  getPaymentsSummary(
901
1037
  request: ExchangeCalculationsFiltersRequest,
902
1038
  ): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
@@ -927,6 +1063,41 @@ export interface ExchangeCoreServiceController {
927
1063
  getWalletsMonika(
928
1064
  request: GetWalletsMonikaRequest,
929
1065
  ): Promise<GetWalletsMonikaResponse> | Observable<GetWalletsMonikaResponse> | GetWalletsMonikaResponse;
1066
+
1067
+ listPaymentAgentDailyRates(
1068
+ request: ListPaymentAgentDailyRatesRequest,
1069
+ ):
1070
+ | Promise<ListPaymentAgentDailyRatesResponse>
1071
+ | Observable<ListPaymentAgentDailyRatesResponse>
1072
+ | ListPaymentAgentDailyRatesResponse;
1073
+
1074
+ createPaymentAgentDailyRate(
1075
+ request: CreatePaymentAgentDailyRateRequest,
1076
+ ):
1077
+ | Promise<CreatePaymentAgentDailyRateResponse>
1078
+ | Observable<CreatePaymentAgentDailyRateResponse>
1079
+ | CreatePaymentAgentDailyRateResponse;
1080
+
1081
+ previewPaymentAgentDailyRate(
1082
+ request: PreviewPaymentAgentDailyRateRequest,
1083
+ ):
1084
+ | Promise<PreviewPaymentAgentDailyRateResponse>
1085
+ | Observable<PreviewPaymentAgentDailyRateResponse>
1086
+ | PreviewPaymentAgentDailyRateResponse;
1087
+
1088
+ applyPaymentAgentDailyRate(
1089
+ request: ApplyPaymentAgentDailyRateRequest,
1090
+ ):
1091
+ | Promise<ApplyPaymentAgentDailyRateResponse>
1092
+ | Observable<ApplyPaymentAgentDailyRateResponse>
1093
+ | ApplyPaymentAgentDailyRateResponse;
1094
+
1095
+ deletePaymentAgentDailyRate(
1096
+ request: DeletePaymentAgentDailyRateRequest,
1097
+ ):
1098
+ | Promise<DeletePaymentAgentDailyRateResponse>
1099
+ | Observable<DeletePaymentAgentDailyRateResponse>
1100
+ | DeletePaymentAgentDailyRateResponse;
930
1101
  }
931
1102
 
932
1103
  export function ExchangeCoreServiceControllerMethods() {
@@ -953,6 +1124,7 @@ export function ExchangeCoreServiceControllerMethods() {
953
1124
  "createExchangePayout",
954
1125
  "handleExchangePayoutWebhook",
955
1126
  "getExchangePayment",
1127
+ "setPaymentRealPrimeRateFixed",
956
1128
  "getPaymentsSummary",
957
1129
  "searchExchangePayment",
958
1130
  "prealoadExchangePaymentForSearch",
@@ -960,6 +1132,11 @@ export function ExchangeCoreServiceControllerMethods() {
960
1132
  "getExchangeStatuses",
961
1133
  "getWallets",
962
1134
  "getWalletsMonika",
1135
+ "listPaymentAgentDailyRates",
1136
+ "createPaymentAgentDailyRate",
1137
+ "previewPaymentAgentDailyRate",
1138
+ "applyPaymentAgentDailyRate",
1139
+ "deletePaymentAgentDailyRate",
963
1140
  ];
964
1141
  for (const method of grpcMethods) {
965
1142
  const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/gen/referral.ts CHANGED
@@ -297,6 +297,7 @@ export interface UpdatePayoutRequest {
297
297
  paymentMethod?: string | undefined;
298
298
  outputCurrency?: string | undefined;
299
299
  comment?: string | undefined;
300
+ walletUserId?: string | undefined;
300
301
  }
301
302
 
302
303
  export interface CancelPayoutRequest {
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.291",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -33,6 +33,7 @@ service ExchangeCoreService {
33
33
  rpc CreateExchangePayout(CreateExchangePayoutRequest) returns (CreateExchangePayoutResponse);
34
34
  rpc HandleExchangePayoutWebhook(HandleExchangePayoutWebhookRequest) returns (HandleExchangePayoutWebhookResponse);
35
35
  rpc GetExchangePayment(GetExchangePaymentRequest) returns (GetExchangePaymentResponse);
36
+ rpc SetPaymentRealPrimeRateFixed(SetPaymentRealPrimeRateFixedRequest) returns (SetPaymentRealPrimeRateFixedResponse);
36
37
  rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
37
38
  rpc SearchExchangePayment(SearchExchangePaymentRequest) returns (SearchExchangePaymentResponse);
38
39
  rpc PrealoadExchangePaymentForSearch(PrealoadExchangePaymentForSearchRequest) returns (PrealoadExchangePaymentForSearchResponse);
@@ -42,6 +43,12 @@ service ExchangeCoreService {
42
43
 
43
44
  rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
44
45
  rpc GetWalletsMonika(GetWalletsMonikaRequest) returns (GetWalletsMonikaResponse);
46
+
47
+ rpc ListPaymentAgentDailyRates(ListPaymentAgentDailyRatesRequest) returns (ListPaymentAgentDailyRatesResponse);
48
+ rpc CreatePaymentAgentDailyRate(CreatePaymentAgentDailyRateRequest) returns (CreatePaymentAgentDailyRateResponse);
49
+ rpc PreviewPaymentAgentDailyRate(PreviewPaymentAgentDailyRateRequest) returns (PreviewPaymentAgentDailyRateResponse);
50
+ rpc ApplyPaymentAgentDailyRate(ApplyPaymentAgentDailyRateRequest) returns (ApplyPaymentAgentDailyRateResponse);
51
+ rpc DeletePaymentAgentDailyRate(DeletePaymentAgentDailyRateRequest) returns (DeletePaymentAgentDailyRateResponse);
45
52
  }
46
53
 
47
54
  message AuthManagerContext {
@@ -552,6 +559,7 @@ message GetExchangePaymentsItem {
552
559
  /** Base amount without network fee (crypto), when stored. */
553
560
  optional double amount_base = 17;
554
561
  optional string uuid = 18;
562
+ optional bool real_prime_rate_is_fixed = 19;
555
563
  }
556
564
 
557
565
  message GetExchangePaymentsResponse {
@@ -570,6 +578,19 @@ message GetExchangePaymentResponse {
570
578
  optional GetExchangePaymentsItem payment = 1;
571
579
  }
572
580
 
581
+ message SetPaymentRealPrimeRateFixedRequest {
582
+ optional AuthManagerContext auth_manager_context = 1;
583
+ string payment_id = 2;
584
+ bool is_fixed = 3;
585
+ }
586
+
587
+ message SetPaymentRealPrimeRateFixedResponse {
588
+ bool ok = 1;
589
+ optional string error = 2;
590
+ optional string payment_id = 3;
591
+ optional bool real_prime_rate_is_fixed = 4;
592
+ }
593
+
573
594
  message SearchExchangePaymentRequest {
574
595
  string search = 1;
575
596
  int32 limit = 2;
@@ -694,6 +715,95 @@ message GetWalletsMonikaResponse {
694
715
  repeated WalletMonikaItem wallets = 2;
695
716
  }
696
717
 
718
+ message PaymentAgentDailyRateItem {
719
+ string id = 1;
720
+ int32 payment_agent = 2;
721
+ string rate_date = 3; // YYYY-MM-DD
722
+ double actual_cost = 4;
723
+ bool is_applied = 5;
724
+ int32 affected_payments = 6;
725
+ string created_at = 7;
726
+ optional string created_by_manager_id = 8;
727
+ }
728
+
729
+ message ListPaymentAgentDailyRatesRequest {
730
+ AuthManagerContext auth_manager_context = 1;
731
+ }
732
+
733
+ message ListPaymentAgentDailyRatesResponse {
734
+ repeated PaymentAgentDailyRateItem items = 1;
735
+ }
736
+
737
+ message CreatePaymentAgentDailyRateRequest {
738
+ AuthManagerContext auth_manager_context = 1;
739
+ int32 payment_agent = 2;
740
+ string rate_date = 3; // YYYY-MM-DD
741
+ double actual_cost = 4;
742
+ }
743
+
744
+ message CreatePaymentAgentDailyRateResponse {
745
+ bool ok = 1;
746
+ optional string error = 2;
747
+ optional PaymentAgentDailyRateItem item = 3;
748
+ }
749
+
750
+ message PreviewPaymentAgentDailyRateRequest {
751
+ AuthManagerContext auth_manager_context = 1;
752
+ string id = 2;
753
+ }
754
+
755
+ message PaymentAgentDailyRatePaymentPreviewItem {
756
+ string id = 1;
757
+ optional double current_rate = 2;
758
+ string created_at = 3;
759
+ }
760
+
761
+ message PaymentAgentDailyRateExchangePreviewItem {
762
+ string id = 1;
763
+ optional string payment_id = 2;
764
+ optional double current_rate_1_iter = 3;
765
+ optional double current_profit = 4;
766
+ optional string input_currency_id = 5;
767
+ optional string output_currency_id = 6;
768
+ }
769
+
770
+ message PreviewPaymentAgentDailyRateResponse {
771
+ bool ok = 1;
772
+ optional string error = 2;
773
+ optional PaymentAgentDailyRateItem item = 3;
774
+ int32 payments_count = 4;
775
+ int32 exchanges_count = 5;
776
+ repeated PaymentAgentDailyRatePaymentPreviewItem payments_first = 6;
777
+ repeated PaymentAgentDailyRatePaymentPreviewItem payments_last = 7;
778
+ repeated PaymentAgentDailyRateExchangePreviewItem exchanges_first = 8;
779
+ repeated PaymentAgentDailyRateExchangePreviewItem exchanges_last = 9;
780
+ }
781
+
782
+ message ApplyPaymentAgentDailyRateRequest {
783
+ AuthManagerContext auth_manager_context = 1;
784
+ string id = 2;
785
+ }
786
+
787
+ message ApplyPaymentAgentDailyRateResponse {
788
+ bool ok = 1;
789
+ optional string error = 2;
790
+ optional PaymentAgentDailyRateItem item = 3;
791
+ int32 payments_updated = 4;
792
+ int32 exchanges_updated = 5;
793
+ optional string task_id = 6;
794
+ }
795
+
796
+ message DeletePaymentAgentDailyRateRequest {
797
+ AuthManagerContext auth_manager_context = 1;
798
+ string id = 2;
799
+ }
800
+
801
+ message DeletePaymentAgentDailyRateResponse {
802
+ bool ok = 1;
803
+ optional string error = 2;
804
+ bool deleted = 3;
805
+ }
806
+
697
807
  // --- Exchange Overpay payouts (CRM «Выплаты по обменам») ---
698
808
 
699
809
  message ListExchangePayoutsRequest {
@@ -300,6 +300,7 @@ message UpdatePayoutRequest {
300
300
  optional string payment_method = 4;
301
301
  optional string output_currency = 5;
302
302
  optional string comment = 6;
303
+ optional string wallet_user_id = 7;
303
304
  }
304
305
 
305
306
  message CancelPayoutRequest {
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;