protobuf-platform 1.2.301 → 1.2.303

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.301",
3
+ "version": "1.2.303",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -33,11 +33,17 @@ service Payment {
33
33
  rpc readListDeposits(PaginationRequest) returns (DepositItemsResponse);
34
34
  rpc processingDepositWebHook(DepositWebHookRequest) returns (ProcessedDepositResponse);
35
35
  rpc getRedirectPaymentForm(DepositRedirectFormRequest) returns (DepositRedirectFormResponse);
36
+ //Withdrawal
37
+ rpc attemptWithdrawal(AttemptWithdrawalRequest) returns (WithdrawalResponse);
38
+ rpc changeWithdrawalStatus(GetWithdrawalRequest) returns (WithdrawalResponse);
39
+ rpc readListWithdrawals(PaginationRequest) returns (WithdrawalItemsResponse);
40
+ rpc processingWithdrawalWebHook(WithdrawalWebHookRequest) returns (ProcessedWithdrawalResponse);
36
41
  //Deposit Statuses
37
42
  rpc readListDepositStatuses(PaginationRequest) returns (DepositStatusItemsResponse);
38
43
  //User
39
44
  rpc userPaymentsInfo(GetUserPaymentsInfoRequest) returns (UserPaymentsInfoResponse);
40
45
  rpc userDepositHistory(GetUserPaymentsInfoRequest) returns (UserDepositItemsResponse);
46
+ rpc userWithdrawalHistory(GetUserPaymentsInfoRequest) returns (UserWithdrawalItemsResponse);
41
47
  rpc getPaymentMethodsForUser(GetUserPaymentsInfoRequest) returns (UserPaymentMethodsResponse);
42
48
  //Segmentation
43
49
  rpc getSegmentedUsers(SegmentedUserRequest) returns (SegmentedUserResponse);
@@ -79,6 +85,7 @@ message PaymentSearchRequest {
79
85
  repeated string operation_type = 15;
80
86
  repeated string operation_reason_code = 16;
81
87
  repeated string operation_status_code = 17;
88
+ repeated string withdrawal_status_code = 18;
82
89
  }
83
90
  message ItemsBunchRequest {
84
91
  repeated int32 ids = 1;
@@ -343,6 +350,74 @@ message DepositRedirectFormRequest {
343
350
  message DepositRedirectFormResponse {
344
351
  string content = 1;
345
352
  }
353
+ //Withdrawal
354
+ message AttemptWithdrawalRequest {
355
+ int32 payment_method_id = 1;
356
+ int32 user_id = 2;
357
+ float amount = 3;
358
+ optional string user_currency = 4;
359
+ optional string user_country = 5;
360
+ optional string origin_country = 6;
361
+ optional string user_ip = 7;
362
+ optional string user_locale = 8;
363
+ optional string user_first_name = 9;
364
+ optional string user_last_name = 10;
365
+ optional string user_email = 11;
366
+ optional string user_public_id = 12;
367
+ optional string destination = 13;
368
+ optional string destination_type = 14;
369
+ optional string destination_details = 15;
370
+ optional string token_id = 16;
371
+ }
372
+ message GetWithdrawalRequest {
373
+ int32 id = 1;
374
+ optional string status_code = 2;
375
+ optional int32 maker_id = 3;
376
+ optional string reason = 4;
377
+ }
378
+ message WithdrawalResponse {
379
+ int32 id = 1;
380
+ optional int32 user_id = 2;
381
+ optional string status = 3;
382
+ optional float amount = 4;
383
+ optional float fee = 5;
384
+ optional string currency = 6;
385
+ optional string payment_method_title = 7;
386
+ optional string payment_provider_image = 8;
387
+ optional string created = 9;
388
+ optional string destination = 10;
389
+ optional string destination_type = 11;
390
+ optional string external_ref = 12;
391
+ optional string country = 13;
392
+ }
393
+ message WithdrawalItem {
394
+ int32 id = 1;
395
+ int32 user_id = 2;
396
+ string status = 3;
397
+ float amount = 4;
398
+ float fee = 5;
399
+ string currency = 6;
400
+ optional string payment_method_title = 7;
401
+ optional string payment_provider_image = 8;
402
+ optional string created = 9;
403
+ optional string destination = 10;
404
+ optional string destination_type = 11;
405
+ optional string external_ref = 12;
406
+ optional string country = 13;
407
+ }
408
+ message WithdrawalItemsResponse {
409
+ repeated WithdrawalItem items = 1;
410
+ optional int32 total_pages = 2;
411
+ optional int32 total_items = 3;
412
+ }
413
+ message WithdrawalWebHookRequest {
414
+ string method = 1;
415
+ string data = 2;
416
+ optional string headers = 3;
417
+ }
418
+ message ProcessedWithdrawalResponse {
419
+ string status = 1;
420
+ }
346
421
  //Deposit Status
347
422
  message DepositStatus {
348
423
  int32 id = 1;
@@ -400,6 +475,26 @@ message UserDepositItemsResponse {
400
475
  optional int32 total_pages = 2;
401
476
  optional int32 total_items = 3;
402
477
  }
478
+ message UserWithdrawalItem {
479
+ int32 withdrawal_id = 1;
480
+ float amount = 2;
481
+ float fee = 3;
482
+ string currency = 4;
483
+ optional string payment_method_title = 5;
484
+ optional string payment_provider_image = 6;
485
+ optional string payment_provider_image_cdn = 7;
486
+ optional string payment_provider_title = 8;
487
+ optional string created = 9;
488
+ optional string status = 10;
489
+ optional string destination = 11;
490
+ optional string destination_type = 12;
491
+ optional string external_ref = 13;
492
+ }
493
+ message UserWithdrawalItemsResponse {
494
+ repeated UserWithdrawalItem items = 1;
495
+ optional int32 total_pages = 2;
496
+ optional int32 total_items = 3;
497
+ }
403
498
  //Users
404
499
  message UserPaymentMethodItem {
405
500
  int32 method_id = 1;
@@ -15,6 +15,17 @@ function deserialize_payment_AttemptDepositRequest(buffer_arg) {
15
15
  return payment_pb.AttemptDepositRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
16
  }
17
17
 
18
+ function serialize_payment_AttemptWithdrawalRequest(arg) {
19
+ if (!(arg instanceof payment_pb.AttemptWithdrawalRequest)) {
20
+ throw new Error('Expected argument of type payment.AttemptWithdrawalRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_payment_AttemptWithdrawalRequest(buffer_arg) {
26
+ return payment_pb.AttemptWithdrawalRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
18
29
  function serialize_payment_CurrencyItemsResponse(arg) {
19
30
  if (!(arg instanceof payment_pb.CurrencyItemsResponse)) {
20
31
  throw new Error('Expected argument of type payment.CurrencyItemsResponse');
@@ -224,6 +235,17 @@ function deserialize_payment_GetUserPaymentsInfoRequest(buffer_arg) {
224
235
  return payment_pb.GetUserPaymentsInfoRequest.deserializeBinary(new Uint8Array(buffer_arg));
225
236
  }
226
237
 
238
+ function serialize_payment_GetWithdrawalRequest(arg) {
239
+ if (!(arg instanceof payment_pb.GetWithdrawalRequest)) {
240
+ throw new Error('Expected argument of type payment.GetWithdrawalRequest');
241
+ }
242
+ return Buffer.from(arg.serializeBinary());
243
+ }
244
+
245
+ function deserialize_payment_GetWithdrawalRequest(buffer_arg) {
246
+ return payment_pb.GetWithdrawalRequest.deserializeBinary(new Uint8Array(buffer_arg));
247
+ }
248
+
227
249
  function serialize_payment_ItemsBunchRequest(arg) {
228
250
  if (!(arg instanceof payment_pb.ItemsBunchRequest)) {
229
251
  throw new Error('Expected argument of type payment.ItemsBunchRequest');
@@ -378,6 +400,17 @@ function deserialize_payment_ProcessedDepositResponse(buffer_arg) {
378
400
  return payment_pb.ProcessedDepositResponse.deserializeBinary(new Uint8Array(buffer_arg));
379
401
  }
380
402
 
403
+ function serialize_payment_ProcessedWithdrawalResponse(arg) {
404
+ if (!(arg instanceof payment_pb.ProcessedWithdrawalResponse)) {
405
+ throw new Error('Expected argument of type payment.ProcessedWithdrawalResponse');
406
+ }
407
+ return Buffer.from(arg.serializeBinary());
408
+ }
409
+
410
+ function deserialize_payment_ProcessedWithdrawalResponse(buffer_arg) {
411
+ return payment_pb.ProcessedWithdrawalResponse.deserializeBinary(new Uint8Array(buffer_arg));
412
+ }
413
+
381
414
  function serialize_payment_ProviderItemsResponse(arg) {
382
415
  if (!(arg instanceof payment_pb.ProviderItemsResponse)) {
383
416
  throw new Error('Expected argument of type payment.ProviderItemsResponse');
@@ -499,6 +532,50 @@ function deserialize_payment_UserPaymentsInfoResponse(buffer_arg) {
499
532
  return payment_pb.UserPaymentsInfoResponse.deserializeBinary(new Uint8Array(buffer_arg));
500
533
  }
501
534
 
535
+ function serialize_payment_UserWithdrawalItemsResponse(arg) {
536
+ if (!(arg instanceof payment_pb.UserWithdrawalItemsResponse)) {
537
+ throw new Error('Expected argument of type payment.UserWithdrawalItemsResponse');
538
+ }
539
+ return Buffer.from(arg.serializeBinary());
540
+ }
541
+
542
+ function deserialize_payment_UserWithdrawalItemsResponse(buffer_arg) {
543
+ return payment_pb.UserWithdrawalItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
544
+ }
545
+
546
+ function serialize_payment_WithdrawalItemsResponse(arg) {
547
+ if (!(arg instanceof payment_pb.WithdrawalItemsResponse)) {
548
+ throw new Error('Expected argument of type payment.WithdrawalItemsResponse');
549
+ }
550
+ return Buffer.from(arg.serializeBinary());
551
+ }
552
+
553
+ function deserialize_payment_WithdrawalItemsResponse(buffer_arg) {
554
+ return payment_pb.WithdrawalItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
555
+ }
556
+
557
+ function serialize_payment_WithdrawalResponse(arg) {
558
+ if (!(arg instanceof payment_pb.WithdrawalResponse)) {
559
+ throw new Error('Expected argument of type payment.WithdrawalResponse');
560
+ }
561
+ return Buffer.from(arg.serializeBinary());
562
+ }
563
+
564
+ function deserialize_payment_WithdrawalResponse(buffer_arg) {
565
+ return payment_pb.WithdrawalResponse.deserializeBinary(new Uint8Array(buffer_arg));
566
+ }
567
+
568
+ function serialize_payment_WithdrawalWebHookRequest(arg) {
569
+ if (!(arg instanceof payment_pb.WithdrawalWebHookRequest)) {
570
+ throw new Error('Expected argument of type payment.WithdrawalWebHookRequest');
571
+ }
572
+ return Buffer.from(arg.serializeBinary());
573
+ }
574
+
575
+ function deserialize_payment_WithdrawalWebHookRequest(buffer_arg) {
576
+ return payment_pb.WithdrawalWebHookRequest.deserializeBinary(new Uint8Array(buffer_arg));
577
+ }
578
+
502
579
 
503
580
  var PaymentService = exports.PaymentService = {
504
581
  checkConnection: {
@@ -791,6 +868,51 @@ attemptDeposit: {
791
868
  responseSerialize: serialize_payment_DepositRedirectFormResponse,
792
869
  responseDeserialize: deserialize_payment_DepositRedirectFormResponse,
793
870
  },
871
+ // Withdrawal
872
+ attemptWithdrawal: {
873
+ path: '/payment.Payment/attemptWithdrawal',
874
+ requestStream: false,
875
+ responseStream: false,
876
+ requestType: payment_pb.AttemptWithdrawalRequest,
877
+ responseType: payment_pb.WithdrawalResponse,
878
+ requestSerialize: serialize_payment_AttemptWithdrawalRequest,
879
+ requestDeserialize: deserialize_payment_AttemptWithdrawalRequest,
880
+ responseSerialize: serialize_payment_WithdrawalResponse,
881
+ responseDeserialize: deserialize_payment_WithdrawalResponse,
882
+ },
883
+ changeWithdrawalStatus: {
884
+ path: '/payment.Payment/changeWithdrawalStatus',
885
+ requestStream: false,
886
+ responseStream: false,
887
+ requestType: payment_pb.GetWithdrawalRequest,
888
+ responseType: payment_pb.WithdrawalResponse,
889
+ requestSerialize: serialize_payment_GetWithdrawalRequest,
890
+ requestDeserialize: deserialize_payment_GetWithdrawalRequest,
891
+ responseSerialize: serialize_payment_WithdrawalResponse,
892
+ responseDeserialize: deserialize_payment_WithdrawalResponse,
893
+ },
894
+ readListWithdrawals: {
895
+ path: '/payment.Payment/readListWithdrawals',
896
+ requestStream: false,
897
+ responseStream: false,
898
+ requestType: payment_pb.PaginationRequest,
899
+ responseType: payment_pb.WithdrawalItemsResponse,
900
+ requestSerialize: serialize_payment_PaginationRequest,
901
+ requestDeserialize: deserialize_payment_PaginationRequest,
902
+ responseSerialize: serialize_payment_WithdrawalItemsResponse,
903
+ responseDeserialize: deserialize_payment_WithdrawalItemsResponse,
904
+ },
905
+ processingWithdrawalWebHook: {
906
+ path: '/payment.Payment/processingWithdrawalWebHook',
907
+ requestStream: false,
908
+ responseStream: false,
909
+ requestType: payment_pb.WithdrawalWebHookRequest,
910
+ responseType: payment_pb.ProcessedWithdrawalResponse,
911
+ requestSerialize: serialize_payment_WithdrawalWebHookRequest,
912
+ requestDeserialize: deserialize_payment_WithdrawalWebHookRequest,
913
+ responseSerialize: serialize_payment_ProcessedWithdrawalResponse,
914
+ responseDeserialize: deserialize_payment_ProcessedWithdrawalResponse,
915
+ },
794
916
  // Deposit Statuses
795
917
  readListDepositStatuses: {
796
918
  path: '/payment.Payment/readListDepositStatuses',
@@ -826,6 +948,17 @@ userPaymentsInfo: {
826
948
  responseSerialize: serialize_payment_UserDepositItemsResponse,
827
949
  responseDeserialize: deserialize_payment_UserDepositItemsResponse,
828
950
  },
951
+ userWithdrawalHistory: {
952
+ path: '/payment.Payment/userWithdrawalHistory',
953
+ requestStream: false,
954
+ responseStream: false,
955
+ requestType: payment_pb.GetUserPaymentsInfoRequest,
956
+ responseType: payment_pb.UserWithdrawalItemsResponse,
957
+ requestSerialize: serialize_payment_GetUserPaymentsInfoRequest,
958
+ requestDeserialize: deserialize_payment_GetUserPaymentsInfoRequest,
959
+ responseSerialize: serialize_payment_UserWithdrawalItemsResponse,
960
+ responseDeserialize: deserialize_payment_UserWithdrawalItemsResponse,
961
+ },
829
962
  getPaymentMethodsForUser: {
830
963
  path: '/payment.Payment/getPaymentMethodsForUser',
831
964
  requestStream: false,