protobuf-platform 1.2.502 → 1.2.504

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.502",
3
+ "version": "1.2.504",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -361,6 +361,7 @@ message AttemptDepositRequest {
361
361
  optional string ifsc = 44;
362
362
  optional string crypto_wallet = 45;
363
363
  optional string request_currency = 46;
364
+ optional string antifraud_session = 47;
364
365
  }
365
366
  message GetDepositRequest {
366
367
  int32 id = 1;
@@ -469,6 +470,8 @@ message AttemptWithdrawalRequest {
469
470
  optional string ifsc = 37;
470
471
  optional string crypto_wallet = 38;
471
472
  optional string request_currency = 39;
473
+ optional string antifraud_session = 40;
474
+ optional string user_agent = 41;
472
475
  }
473
476
  message GetWithdrawalRequest {
474
477
  int32 id = 1;
@@ -13326,7 +13326,8 @@ proto.payment.AttemptDepositRequest.toObject = function(includeInstance, msg) {
13326
13326
  bankBranch: jspb.Message.getFieldWithDefault(msg, 43, ""),
13327
13327
  ifsc: jspb.Message.getFieldWithDefault(msg, 44, ""),
13328
13328
  cryptoWallet: jspb.Message.getFieldWithDefault(msg, 45, ""),
13329
- requestCurrency: jspb.Message.getFieldWithDefault(msg, 46, "")
13329
+ requestCurrency: jspb.Message.getFieldWithDefault(msg, 46, ""),
13330
+ antifraudSession: jspb.Message.getFieldWithDefault(msg, 47, "")
13330
13331
  };
13331
13332
 
13332
13333
  if (includeInstance) {
@@ -13547,6 +13548,10 @@ proto.payment.AttemptDepositRequest.deserializeBinaryFromReader = function(msg,
13547
13548
  var value = /** @type {string} */ (reader.readString());
13548
13549
  msg.setRequestCurrency(value);
13549
13550
  break;
13551
+ case 47:
13552
+ var value = /** @type {string} */ (reader.readString());
13553
+ msg.setAntifraudSession(value);
13554
+ break;
13550
13555
  default:
13551
13556
  reader.skipField();
13552
13557
  break;
@@ -13898,6 +13903,13 @@ proto.payment.AttemptDepositRequest.serializeBinaryToWriter = function(message,
13898
13903
  f
13899
13904
  );
13900
13905
  }
13906
+ f = /** @type {string} */ (jspb.Message.getField(message, 47));
13907
+ if (f != null) {
13908
+ writer.writeString(
13909
+ 47,
13910
+ f
13911
+ );
13912
+ }
13901
13913
  };
13902
13914
 
13903
13915
 
@@ -15503,6 +15515,42 @@ proto.payment.AttemptDepositRequest.prototype.hasRequestCurrency = function() {
15503
15515
  };
15504
15516
 
15505
15517
 
15518
+ /**
15519
+ * optional string antifraud_session = 47;
15520
+ * @return {string}
15521
+ */
15522
+ proto.payment.AttemptDepositRequest.prototype.getAntifraudSession = function() {
15523
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 47, ""));
15524
+ };
15525
+
15526
+
15527
+ /**
15528
+ * @param {string} value
15529
+ * @return {!proto.payment.AttemptDepositRequest} returns this
15530
+ */
15531
+ proto.payment.AttemptDepositRequest.prototype.setAntifraudSession = function(value) {
15532
+ return jspb.Message.setField(this, 47, value);
15533
+ };
15534
+
15535
+
15536
+ /**
15537
+ * Clears the field making it undefined.
15538
+ * @return {!proto.payment.AttemptDepositRequest} returns this
15539
+ */
15540
+ proto.payment.AttemptDepositRequest.prototype.clearAntifraudSession = function() {
15541
+ return jspb.Message.setField(this, 47, undefined);
15542
+ };
15543
+
15544
+
15545
+ /**
15546
+ * Returns whether this field is set.
15547
+ * @return {boolean}
15548
+ */
15549
+ proto.payment.AttemptDepositRequest.prototype.hasAntifraudSession = function() {
15550
+ return jspb.Message.getField(this, 47) != null;
15551
+ };
15552
+
15553
+
15506
15554
 
15507
15555
 
15508
15556
 
@@ -18540,7 +18588,9 @@ proto.payment.AttemptWithdrawalRequest.toObject = function(includeInstance, msg)
18540
18588
  bankBranch: jspb.Message.getFieldWithDefault(msg, 36, ""),
18541
18589
  ifsc: jspb.Message.getFieldWithDefault(msg, 37, ""),
18542
18590
  cryptoWallet: jspb.Message.getFieldWithDefault(msg, 38, ""),
18543
- requestCurrency: jspb.Message.getFieldWithDefault(msg, 39, "")
18591
+ requestCurrency: jspb.Message.getFieldWithDefault(msg, 39, ""),
18592
+ antifraudSession: jspb.Message.getFieldWithDefault(msg, 40, ""),
18593
+ userAgent: jspb.Message.getFieldWithDefault(msg, 41, "")
18544
18594
  };
18545
18595
 
18546
18596
  if (includeInstance) {
@@ -18733,6 +18783,14 @@ proto.payment.AttemptWithdrawalRequest.deserializeBinaryFromReader = function(ms
18733
18783
  var value = /** @type {string} */ (reader.readString());
18734
18784
  msg.setRequestCurrency(value);
18735
18785
  break;
18786
+ case 40:
18787
+ var value = /** @type {string} */ (reader.readString());
18788
+ msg.setAntifraudSession(value);
18789
+ break;
18790
+ case 41:
18791
+ var value = /** @type {string} */ (reader.readString());
18792
+ msg.setUserAgent(value);
18793
+ break;
18736
18794
  default:
18737
18795
  reader.skipField();
18738
18796
  break;
@@ -19035,6 +19093,20 @@ proto.payment.AttemptWithdrawalRequest.serializeBinaryToWriter = function(messag
19035
19093
  f
19036
19094
  );
19037
19095
  }
19096
+ f = /** @type {string} */ (jspb.Message.getField(message, 40));
19097
+ if (f != null) {
19098
+ writer.writeString(
19099
+ 40,
19100
+ f
19101
+ );
19102
+ }
19103
+ f = /** @type {string} */ (jspb.Message.getField(message, 41));
19104
+ if (f != null) {
19105
+ writer.writeString(
19106
+ 41,
19107
+ f
19108
+ );
19109
+ }
19038
19110
  };
19039
19111
 
19040
19112
 
@@ -20388,6 +20460,78 @@ proto.payment.AttemptWithdrawalRequest.prototype.hasRequestCurrency = function()
20388
20460
  };
20389
20461
 
20390
20462
 
20463
+ /**
20464
+ * optional string antifraud_session = 40;
20465
+ * @return {string}
20466
+ */
20467
+ proto.payment.AttemptWithdrawalRequest.prototype.getAntifraudSession = function() {
20468
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 40, ""));
20469
+ };
20470
+
20471
+
20472
+ /**
20473
+ * @param {string} value
20474
+ * @return {!proto.payment.AttemptWithdrawalRequest} returns this
20475
+ */
20476
+ proto.payment.AttemptWithdrawalRequest.prototype.setAntifraudSession = function(value) {
20477
+ return jspb.Message.setField(this, 40, value);
20478
+ };
20479
+
20480
+
20481
+ /**
20482
+ * Clears the field making it undefined.
20483
+ * @return {!proto.payment.AttemptWithdrawalRequest} returns this
20484
+ */
20485
+ proto.payment.AttemptWithdrawalRequest.prototype.clearAntifraudSession = function() {
20486
+ return jspb.Message.setField(this, 40, undefined);
20487
+ };
20488
+
20489
+
20490
+ /**
20491
+ * Returns whether this field is set.
20492
+ * @return {boolean}
20493
+ */
20494
+ proto.payment.AttemptWithdrawalRequest.prototype.hasAntifraudSession = function() {
20495
+ return jspb.Message.getField(this, 40) != null;
20496
+ };
20497
+
20498
+
20499
+ /**
20500
+ * optional string user_agent = 41;
20501
+ * @return {string}
20502
+ */
20503
+ proto.payment.AttemptWithdrawalRequest.prototype.getUserAgent = function() {
20504
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, ""));
20505
+ };
20506
+
20507
+
20508
+ /**
20509
+ * @param {string} value
20510
+ * @return {!proto.payment.AttemptWithdrawalRequest} returns this
20511
+ */
20512
+ proto.payment.AttemptWithdrawalRequest.prototype.setUserAgent = function(value) {
20513
+ return jspb.Message.setField(this, 41, value);
20514
+ };
20515
+
20516
+
20517
+ /**
20518
+ * Clears the field making it undefined.
20519
+ * @return {!proto.payment.AttemptWithdrawalRequest} returns this
20520
+ */
20521
+ proto.payment.AttemptWithdrawalRequest.prototype.clearUserAgent = function() {
20522
+ return jspb.Message.setField(this, 41, undefined);
20523
+ };
20524
+
20525
+
20526
+ /**
20527
+ * Returns whether this field is set.
20528
+ * @return {boolean}
20529
+ */
20530
+ proto.payment.AttemptWithdrawalRequest.prototype.hasUserAgent = function() {
20531
+ return jspb.Message.getField(this, 41) != null;
20532
+ };
20533
+
20534
+
20391
20535
 
20392
20536
 
20393
20537
 
package/user/user.proto CHANGED
@@ -105,6 +105,7 @@ service User {
105
105
  rpc processUserKycProviderWebhook(ProcessUserKycProviderWebhookRequest) returns (ProcessUserKycProviderWebhookResponse);
106
106
  // Single internal entrypoint for antifraud provider webhook processing (`raw_body` / `headers` are internal-only).
107
107
  rpc processAntifraudProviderWebhook(ProcessAntifraudProviderWebhookRequest) returns (ProcessAntifraudProviderWebhookResponse);
108
+ rpc scoreAntifraudPaymentEvent(ScoreAntifraudPaymentEventRequest) returns (ScoreAntifraudPaymentEventResponse);
108
109
  // Optional operational support: refresh or poll provider verification status where the provider supports it.
109
110
  rpc syncUserKycProviderStatus(SyncUserKycProviderStatusRequest) returns (UserKycProfileResponse);
110
111
  // KYC requirement matrix: configured trigger rules and presets (separate from provider KYC flow).
@@ -1239,6 +1240,40 @@ message ProcessAntifraudProviderWebhookResponse {
1239
1240
  string risk_level = 10;
1240
1241
  string reason_code = 11;
1241
1242
  }
1243
+ message ScoreAntifraudPaymentEventRequest {
1244
+ string event_type = 1;
1245
+ int32 user_id = 2;
1246
+ optional string user_public_id = 3;
1247
+ int64 payment_operation_id = 4;
1248
+ string payment_operation_public_id = 5;
1249
+ int64 amount_minor = 6;
1250
+ string currency = 7;
1251
+ int32 currency_scale = 8;
1252
+ optional string payment_method = 9;
1253
+ optional string payment_channel = 10;
1254
+ optional string external_id = 11;
1255
+ optional string antifraud_session = 12;
1256
+ optional string ip = 13;
1257
+ optional string user_agent = 14;
1258
+ string occurred_at = 15;
1259
+ optional string correlation_id = 16;
1260
+ string idempotency_key = 17;
1261
+ }
1262
+ message ScoreAntifraudPaymentEventResponse {
1263
+ bool processed = 1;
1264
+ bool success = 2;
1265
+ bool skipped = 3;
1266
+ bool duplicate = 4;
1267
+ bool fail_open = 5;
1268
+ string decision = 6;
1269
+ optional int64 assessment_id = 7;
1270
+ optional string request_id = 8;
1271
+ optional string provider_event_id = 9;
1272
+ optional int32 score = 10;
1273
+ optional string risk_type = 11;
1274
+ optional string error_code = 12;
1275
+ optional string error_message = 13;
1276
+ }
1242
1277
  message SyncUserKycProviderStatusRequest {
1243
1278
  int32 user_id = 1;
1244
1279
  optional string user_public_id = 2;
@@ -1137,6 +1137,28 @@ function deserialize_user_RolesItemsResponse(buffer_arg) {
1137
1137
  return user_pb.RolesItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
1138
1138
  }
1139
1139
 
1140
+ function serialize_user_ScoreAntifraudPaymentEventRequest(arg) {
1141
+ if (!(arg instanceof user_pb.ScoreAntifraudPaymentEventRequest)) {
1142
+ throw new Error('Expected argument of type user.ScoreAntifraudPaymentEventRequest');
1143
+ }
1144
+ return Buffer.from(arg.serializeBinary());
1145
+ }
1146
+
1147
+ function deserialize_user_ScoreAntifraudPaymentEventRequest(buffer_arg) {
1148
+ return user_pb.ScoreAntifraudPaymentEventRequest.deserializeBinary(new Uint8Array(buffer_arg));
1149
+ }
1150
+
1151
+ function serialize_user_ScoreAntifraudPaymentEventResponse(arg) {
1152
+ if (!(arg instanceof user_pb.ScoreAntifraudPaymentEventResponse)) {
1153
+ throw new Error('Expected argument of type user.ScoreAntifraudPaymentEventResponse');
1154
+ }
1155
+ return Buffer.from(arg.serializeBinary());
1156
+ }
1157
+
1158
+ function deserialize_user_ScoreAntifraudPaymentEventResponse(buffer_arg) {
1159
+ return user_pb.ScoreAntifraudPaymentEventResponse.deserializeBinary(new Uint8Array(buffer_arg));
1160
+ }
1161
+
1140
1162
  function serialize_user_SegmentItemsResponse(arg) {
1141
1163
  if (!(arg instanceof user_pb.SegmentItemsResponse)) {
1142
1164
  throw new Error('Expected argument of type user.SegmentItemsResponse');
@@ -2809,6 +2831,17 @@ processAntifraudProviderWebhook: {
2809
2831
  responseSerialize: serialize_user_ProcessAntifraudProviderWebhookResponse,
2810
2832
  responseDeserialize: deserialize_user_ProcessAntifraudProviderWebhookResponse,
2811
2833
  },
2834
+ scoreAntifraudPaymentEvent: {
2835
+ path: '/user.User/scoreAntifraudPaymentEvent',
2836
+ requestStream: false,
2837
+ responseStream: false,
2838
+ requestType: user_pb.ScoreAntifraudPaymentEventRequest,
2839
+ responseType: user_pb.ScoreAntifraudPaymentEventResponse,
2840
+ requestSerialize: serialize_user_ScoreAntifraudPaymentEventRequest,
2841
+ requestDeserialize: deserialize_user_ScoreAntifraudPaymentEventRequest,
2842
+ responseSerialize: serialize_user_ScoreAntifraudPaymentEventResponse,
2843
+ responseDeserialize: deserialize_user_ScoreAntifraudPaymentEventResponse,
2844
+ },
2812
2845
  // Optional operational support: refresh or poll provider verification status where the provider supports it.
2813
2846
  syncUserKycProviderStatus: {
2814
2847
  path: '/user.User/syncUserKycProviderStatus',