@arbiwallet/contracts 1.0.249 → 1.0.250

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.
@@ -211,6 +211,30 @@ export interface DeactivateOfficeResponse {
211
211
  success: boolean;
212
212
  }
213
213
 
214
+ export interface SearchManagerRequest {
215
+ search: string;
216
+ /** По умолчанию 50, максимум 50. */
217
+ limit: number;
218
+ }
219
+
220
+ export interface SearchManagerItem {
221
+ id: string;
222
+ username: string;
223
+ email: string;
224
+ }
225
+
226
+ export interface SearchManagerResponse {
227
+ items: SearchManagerItem[];
228
+ }
229
+
230
+ export interface PrealoadManagerForSearchRequest {
231
+ managerId: string;
232
+ }
233
+
234
+ export interface PrealoadManagerForSearchResponse {
235
+ item?: SearchManagerItem | undefined;
236
+ }
237
+
214
238
  export interface GetManagerForServiceRequest {
215
239
  managerId: string;
216
240
  }
@@ -260,6 +284,14 @@ export interface CrmManagerAdminServiceClient {
260
284
  updateOffice(request: UpdateOfficeRequest): Observable<UpdateOfficeResponse>;
261
285
 
262
286
  deactivateOffice(request: DeactivateOfficeRequest): Observable<DeactivateOfficeResponse>;
287
+
288
+ /** Поиск менеджеров по username/email: возвращает до limit совпадений. */
289
+
290
+ searchManager(request: SearchManagerRequest): Observable<SearchManagerResponse>;
291
+
292
+ /** Прелоад выбранного менеджера по id для поиска: возвращает один элемент. */
293
+
294
+ prealoadManagerForSearch(request: PrealoadManagerForSearchRequest): Observable<PrealoadManagerForSearchResponse>;
263
295
  }
264
296
 
265
297
  export interface CrmManagerAdminServiceController {
@@ -304,6 +336,21 @@ export interface CrmManagerAdminServiceController {
304
336
  deactivateOffice(
305
337
  request: DeactivateOfficeRequest,
306
338
  ): Promise<DeactivateOfficeResponse> | Observable<DeactivateOfficeResponse> | DeactivateOfficeResponse;
339
+
340
+ /** Поиск менеджеров по username/email: возвращает до limit совпадений. */
341
+
342
+ searchManager(
343
+ request: SearchManagerRequest,
344
+ ): Promise<SearchManagerResponse> | Observable<SearchManagerResponse> | SearchManagerResponse;
345
+
346
+ /** Прелоад выбранного менеджера по id для поиска: возвращает один элемент. */
347
+
348
+ prealoadManagerForSearch(
349
+ request: PrealoadManagerForSearchRequest,
350
+ ):
351
+ | Promise<PrealoadManagerForSearchResponse>
352
+ | Observable<PrealoadManagerForSearchResponse>
353
+ | PrealoadManagerForSearchResponse;
307
354
  }
308
355
 
309
356
  export function CrmManagerAdminServiceControllerMethods() {
@@ -320,6 +367,8 @@ export function CrmManagerAdminServiceControllerMethods() {
320
367
  "createOffice",
321
368
  "updateOffice",
322
369
  "deactivateOffice",
370
+ "searchManager",
371
+ "prealoadManagerForSearch",
323
372
  ];
324
373
  for (const method of grpcMethods) {
325
374
  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.249",
4
+ "version": "1.0.250",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -13,6 +13,10 @@ service CrmManagerAdminService {
13
13
  rpc CreateOffice (CreateOfficeRequest) returns (CreateOfficeResponse);
14
14
  rpc UpdateOffice (UpdateOfficeRequest) returns (UpdateOfficeResponse);
15
15
  rpc DeactivateOffice (DeactivateOfficeRequest) returns (DeactivateOfficeResponse);
16
+ // Поиск менеджеров по username/email: возвращает до limit совпадений.
17
+ rpc SearchManager (SearchManagerRequest) returns (SearchManagerResponse);
18
+ // Прелоад выбранного менеджера по id для поиска: возвращает один элемент.
19
+ rpc PrealoadManagerForSearch (PrealoadManagerForSearchRequest) returns (PrealoadManagerForSearchResponse);
16
20
  }
17
21
 
18
22
  enum CrmManagerRecordStatus {
@@ -214,6 +218,30 @@ message DeactivateOfficeResponse {
214
218
  bool success = 1;
215
219
  }
216
220
 
221
+ message SearchManagerRequest {
222
+ string search = 1;
223
+ // По умолчанию 50, максимум 50.
224
+ int32 limit = 2;
225
+ }
226
+
227
+ message SearchManagerItem {
228
+ string id = 1;
229
+ string username = 2;
230
+ string email = 3;
231
+ }
232
+
233
+ message SearchManagerResponse {
234
+ repeated SearchManagerItem items = 1;
235
+ }
236
+
237
+ message PrealoadManagerForSearchRequest {
238
+ string manager_id = 1;
239
+ }
240
+
241
+ message PrealoadManagerForSearchResponse {
242
+ optional SearchManagerItem item = 1;
243
+ }
244
+
217
245
  message GetManagerForServiceRequest {
218
246
  string manager_id = 1;
219
247
  }