@arbiwallet/contracts 1.0.229 → 1.0.230

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.
@@ -272,16 +272,96 @@ export interface GetPaymentsSummaryResponse {
272
272
  items: PaymentsSummaryItem[];
273
273
  }
274
274
 
275
+ export interface WalletItem {
276
+ id: string;
277
+ name: string;
278
+ sort: number;
279
+ balance: number;
280
+ status: boolean;
281
+ managerId?: string | undefined;
282
+ managerChanged?: string | undefined;
283
+ isGeneral: boolean;
284
+ showOnBalances: boolean;
285
+ cryptoAddress?: string | undefined;
286
+ cryptoNetwork?: number | undefined;
287
+ isActive: boolean;
288
+ currencyIds: string[];
289
+ }
290
+
291
+ export interface GetWalletsRequest {
292
+ authManagerContext: AuthManagerContext | undefined;
293
+ search?: string | undefined;
294
+ isActive?: boolean | undefined;
295
+ page?: number | undefined;
296
+ pageSize?: number | undefined;
297
+ }
298
+
299
+ export interface GetWalletsResponse {
300
+ count: number;
301
+ next?: string | undefined;
302
+ previous?: string | undefined;
303
+ results: WalletItem[];
304
+ }
305
+
306
+ export interface CreateWalletRequest {
307
+ authManagerContext: AuthManagerContext | undefined;
308
+ name: string;
309
+ sort?: number | undefined;
310
+ isGeneral?: boolean | undefined;
311
+ showOnBalances?: boolean | undefined;
312
+ cryptoAddress?: string | undefined;
313
+ cryptoNetwork?: number | undefined;
314
+ isActive?: boolean | undefined;
315
+ status?: boolean | undefined;
316
+ managerId?: string | undefined;
317
+ currencyIds: string[];
318
+ }
319
+
320
+ export interface CreateWalletResponse {
321
+ ok: boolean;
322
+ result?: WalletItem | undefined;
323
+ error?: string | undefined;
324
+ validationErrors?: { [key: string]: any } | undefined;
325
+ }
326
+
327
+ export interface UpdateWalletRequest {
328
+ authManagerContext: AuthManagerContext | undefined;
329
+ id: string;
330
+ name?: string | undefined;
331
+ sort?: number | undefined;
332
+ isGeneral?: boolean | undefined;
333
+ showOnBalances?: boolean | undefined;
334
+ cryptoAddress?: string | undefined;
335
+ cryptoNetwork?: number | undefined;
336
+ isActive?: boolean | undefined;
337
+ status?: boolean | undefined;
338
+ managerId?: string | undefined;
339
+ currencyIds: string[];
340
+ }
341
+
342
+ export interface UpdateWalletResponse {
343
+ ok: boolean;
344
+ result?: WalletItem | undefined;
345
+ error?: string | undefined;
346
+ validationErrors?: { [key: string]: any } | undefined;
347
+ }
348
+
349
+ export interface DeleteWalletRequest {
350
+ authManagerContext: AuthManagerContext | undefined;
351
+ id: string;
352
+ }
353
+
354
+ export interface DeleteWalletResponse {
355
+ success: boolean;
356
+ message?: string | undefined;
357
+ error?: string | undefined;
358
+ validationErrors?: { [key: string]: any } | undefined;
359
+ }
360
+
275
361
  export const EXCHANGE_CORE_PACKAGE_NAME = "exchange_core";
276
362
 
277
363
  wrappers[".google.protobuf.Struct"] = { fromObject: Struct.wrap, toObject: Struct.unwrap } as any;
278
364
 
279
- /**
280
- * rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
281
- * rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
282
- * rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
283
- */
284
-
285
365
  export interface ExchangeCoreServiceClient {
286
366
  createExchangeDeal(request: CreateExchangeDealRequest): Observable<CreateExchangeDealResponse>;
287
367
 
@@ -298,13 +378,15 @@ export interface ExchangeCoreServiceClient {
298
378
  getTransactionsSummary(request: GetTransactionsSummaryRequest): Observable<GetTransactionsSummaryResponse>;
299
379
 
300
380
  getPaymentsSummary(request: ExchangeCalculationsFiltersRequest): Observable<GetPaymentsSummaryResponse>;
301
- }
302
381
 
303
- /**
304
- * rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
305
- * rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
306
- * rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
307
- */
382
+ getWallets(request: GetWalletsRequest): Observable<GetWalletsResponse>;
383
+
384
+ createWallet(request: CreateWalletRequest): Observable<CreateWalletResponse>;
385
+
386
+ updateWallet(request: UpdateWalletRequest): Observable<UpdateWalletResponse>;
387
+
388
+ deleteWallet(request: DeleteWalletRequest): Observable<DeleteWalletResponse>;
389
+ }
308
390
 
309
391
  export interface ExchangeCoreServiceController {
310
392
  createExchangeDeal(
@@ -341,6 +423,22 @@ export interface ExchangeCoreServiceController {
341
423
  getPaymentsSummary(
342
424
  request: ExchangeCalculationsFiltersRequest,
343
425
  ): Promise<GetPaymentsSummaryResponse> | Observable<GetPaymentsSummaryResponse> | GetPaymentsSummaryResponse;
426
+
427
+ getWallets(
428
+ request: GetWalletsRequest,
429
+ ): Promise<GetWalletsResponse> | Observable<GetWalletsResponse> | GetWalletsResponse;
430
+
431
+ createWallet(
432
+ request: CreateWalletRequest,
433
+ ): Promise<CreateWalletResponse> | Observable<CreateWalletResponse> | CreateWalletResponse;
434
+
435
+ updateWallet(
436
+ request: UpdateWalletRequest,
437
+ ): Promise<UpdateWalletResponse> | Observable<UpdateWalletResponse> | UpdateWalletResponse;
438
+
439
+ deleteWallet(
440
+ request: DeleteWalletRequest,
441
+ ): Promise<DeleteWalletResponse> | Observable<DeleteWalletResponse> | DeleteWalletResponse;
344
442
  }
345
443
 
346
444
  export function ExchangeCoreServiceControllerMethods() {
@@ -354,6 +452,10 @@ export function ExchangeCoreServiceControllerMethods() {
354
452
  "getTransactions",
355
453
  "getTransactionsSummary",
356
454
  "getPaymentsSummary",
455
+ "getWallets",
456
+ "createWallet",
457
+ "updateWallet",
458
+ "deleteWallet",
357
459
  ];
358
460
  for (const method of grpcMethods) {
359
461
  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.229",
4
+ "version": "1.0.230",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
@@ -9,10 +9,6 @@ option java_multiple_files = true;
9
9
  option java_package = "com.arbiwallet.exchange.core";
10
10
 
11
11
  service ExchangeCoreService {
12
- // rpc CreateExchangePayment(CreateExchangePaymentRequest) returns (CreateExchangePaymentResponse);
13
- // rpc HandlePaymentWebhook(HandlePaymentWebhookRequest) returns (HandlePaymentWebhookResponse);
14
- // rpc GetExchangePayments(GetExchangePaymentsRequest) returns (GetExchangePaymentsResponse);
15
-
16
12
  rpc CreateExchangeDeal(CreateExchangeDealRequest) returns (CreateExchangeDealResponse);
17
13
  rpc GetExchangeDeals(GetExchangeDealsRequest) returns (GetExchangeDealsResponse);
18
14
  rpc UpdateExchangeDeal(UpdateExchangeDealRequest) returns (UpdateExchangeDealResponse);
@@ -23,74 +19,13 @@ service ExchangeCoreService {
23
19
  rpc GetTransactionsSummary(GetTransactionsSummaryRequest) returns (GetTransactionsSummaryResponse);
24
20
 
25
21
  rpc GetPaymentsSummary(ExchangeCalculationsFiltersRequest) returns (GetPaymentsSummaryResponse);
22
+
23
+ rpc GetWallets(GetWalletsRequest) returns (GetWalletsResponse);
24
+ rpc CreateWallet(CreateWalletRequest) returns (CreateWalletResponse);
25
+ rpc UpdateWallet(UpdateWalletRequest) returns (UpdateWalletResponse);
26
+ rpc DeleteWallet(DeleteWalletRequest) returns (DeleteWalletResponse);
26
27
  }
27
28
 
28
- // message CreateExchangePaymentRequest {
29
- // optional string manager_user_id = 1;
30
- // optional string manager_id = 2;
31
-
32
- // optional string calculation_id = 3;
33
- // int32 agent_id = 4;
34
- // optional double amount = 5;
35
- // optional string user_id = 6;
36
- // optional string crypto_network = 7;
37
- // optional string customer_source = 8;
38
- // optional string customer_referrer = 9;
39
- // }
40
-
41
- // message CreateExchangePaymentResult {
42
- // string payment_id = 1;
43
- // string payment_uuid = 2;
44
- // double amount = 3;
45
- // int32 status = 4;
46
- // string agent = 5;
47
- // optional string wallet_id = 6;
48
- // optional string crypto_network = 7;
49
- // optional string crypto_address = 8;
50
- // optional string arbi_link = 9;
51
- // optional string payment_link = 10;
52
- // }
53
-
54
- // message CreateExchangePaymentResponse {
55
- // bool ok = 1;
56
- // optional CreateExchangePaymentResult result = 2;
57
- // optional string error = 3;
58
- // optional google.protobuf.Struct validationErrors = 4;
59
- // }
60
-
61
- // message HandlePaymentWebhookRequest {
62
- // string json_payload = 1;
63
- // }
64
-
65
- // message HandlePaymentWebhookResponse {
66
- // bool ok = 1;
67
- // string status = 2;
68
- // }
69
-
70
- // message GetExchangePaymentsRequest {
71
- // optional int32 page = 1;
72
- // optional int32 limit = 2;
73
- // }
74
-
75
- // message GetExchangePaymentsItem {
76
- // string payment_id = 1;
77
- // string payment_uuid = 2;
78
- // double amount = 3;
79
- // int32 status = 4;
80
- // optional string payment_agent_status = 5;
81
- // optional string payment_link = 6;
82
- // optional string qr_link = 7;
83
- // optional string crypto_address = 8;
84
- // }
85
-
86
- // message GetExchangePaymentsResponse {
87
- // repeated GetExchangePaymentsItem payments = 1;
88
- // int32 page = 2;
89
- // int32 limit = 3;
90
- // int32 total = 4;
91
- // int32 total_pages = 5;
92
- // }
93
-
94
29
  message AuthManagerContext {
95
30
  string manager_id = 1;
96
31
  repeated string office_ids = 2;
@@ -358,3 +293,89 @@ message GetPaymentsSummaryResponse {
358
293
  int32 with_payment_count = 1;
359
294
  repeated PaymentsSummaryItem items = 2;
360
295
  }
296
+
297
+ message WalletItem {
298
+ string id = 1;
299
+ string name = 2;
300
+ int32 sort = 3;
301
+ double balance = 4;
302
+ bool status = 5;
303
+ optional string manager_id = 6;
304
+ optional string manager_changed = 7;
305
+ bool is_general = 8;
306
+ bool show_on_balances = 9;
307
+ optional string crypto_address = 10;
308
+ optional int32 crypto_network = 11;
309
+ bool is_active = 12;
310
+ repeated string currency_ids = 13;
311
+ }
312
+
313
+ message GetWalletsRequest {
314
+ AuthManagerContext auth_manager_context = 1;
315
+ optional string search = 2;
316
+ optional bool is_active = 3;
317
+ optional int32 page = 4;
318
+ optional int32 page_size = 5;
319
+ }
320
+
321
+ message GetWalletsResponse {
322
+ int32 count = 1;
323
+ optional string next = 2;
324
+ optional string previous = 3;
325
+ repeated WalletItem results = 4;
326
+ }
327
+
328
+ message CreateWalletRequest {
329
+ AuthManagerContext auth_manager_context = 1;
330
+ string name = 2;
331
+ optional int32 sort = 3;
332
+ optional bool is_general = 4;
333
+ optional bool show_on_balances = 5;
334
+ optional string crypto_address = 6;
335
+ optional int32 crypto_network = 7;
336
+ optional bool is_active = 8;
337
+ optional bool status = 9;
338
+ optional string manager_id = 10;
339
+ repeated string currency_ids = 11;
340
+ }
341
+
342
+ message CreateWalletResponse {
343
+ bool ok = 1;
344
+ optional WalletItem result = 2;
345
+ optional string error = 3;
346
+ optional google.protobuf.Struct validationErrors = 4;
347
+ }
348
+
349
+ message UpdateWalletRequest {
350
+ AuthManagerContext auth_manager_context = 1;
351
+ string id = 2;
352
+ optional string name = 3;
353
+ optional int32 sort = 4;
354
+ optional bool is_general = 5;
355
+ optional bool show_on_balances = 6;
356
+ optional string crypto_address = 7;
357
+ optional int32 crypto_network = 8;
358
+ optional bool is_active = 9;
359
+ optional bool status = 10;
360
+ optional string manager_id = 11;
361
+ repeated string currency_ids = 12;
362
+ }
363
+
364
+ message UpdateWalletResponse {
365
+ bool ok = 1;
366
+ optional WalletItem result = 2;
367
+ optional string error = 3;
368
+ optional google.protobuf.Struct validationErrors = 4;
369
+ }
370
+
371
+ message DeleteWalletRequest {
372
+ AuthManagerContext auth_manager_context = 1;
373
+ string id = 2;
374
+ }
375
+
376
+ message DeleteWalletResponse {
377
+ bool success = 1;
378
+ optional string message = 2;
379
+ optional string error = 3;
380
+ optional google.protobuf.Struct validationErrors = 4;
381
+ }