protobuf-platform 1.0.287 → 1.0.289

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.
@@ -48,7 +48,8 @@ message NotificationRequest {
48
48
  optional string title = 2;
49
49
  optional string content = 3;
50
50
  optional string type = 4;
51
- optional int32 is_active = 5;
51
+ optional string trigger = 5;
52
+ optional int32 is_active = 6;
52
53
  }
53
54
  message GetNotificationRequest {
54
55
  int32 id = 1;
@@ -78,7 +79,8 @@ message NotificationItem {
78
79
  string content = 3;
79
80
  bool is_active = 4;
80
81
  string type = 5;
81
- optional string created = 6;
82
+ string trigger = 6;
83
+ optional string created = 7;
82
84
  }
83
85
  message NotificationResponse {
84
86
  NotificationItem data = 1;
@@ -1843,7 +1843,8 @@ proto.notification.NotificationRequest.toObject = function(includeInstance, msg)
1843
1843
  title: jspb.Message.getFieldWithDefault(msg, 2, ""),
1844
1844
  content: jspb.Message.getFieldWithDefault(msg, 3, ""),
1845
1845
  type: jspb.Message.getFieldWithDefault(msg, 4, ""),
1846
- isActive: jspb.Message.getFieldWithDefault(msg, 5, 0)
1846
+ trigger: jspb.Message.getFieldWithDefault(msg, 5, ""),
1847
+ isActive: jspb.Message.getFieldWithDefault(msg, 6, 0)
1847
1848
  };
1848
1849
 
1849
1850
  if (includeInstance) {
@@ -1897,6 +1898,10 @@ proto.notification.NotificationRequest.deserializeBinaryFromReader = function(ms
1897
1898
  msg.setType(value);
1898
1899
  break;
1899
1900
  case 5:
1901
+ var value = /** @type {string} */ (reader.readString());
1902
+ msg.setTrigger(value);
1903
+ break;
1904
+ case 6:
1900
1905
  var value = /** @type {number} */ (reader.readInt32());
1901
1906
  msg.setIsActive(value);
1902
1907
  break;
@@ -1957,13 +1962,20 @@ proto.notification.NotificationRequest.serializeBinaryToWriter = function(messag
1957
1962
  f
1958
1963
  );
1959
1964
  }
1960
- f = /** @type {number} */ (jspb.Message.getField(message, 5));
1965
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
1961
1966
  if (f != null) {
1962
- writer.writeInt32(
1967
+ writer.writeString(
1963
1968
  5,
1964
1969
  f
1965
1970
  );
1966
1971
  }
1972
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
1973
+ if (f != null) {
1974
+ writer.writeInt32(
1975
+ 6,
1976
+ f
1977
+ );
1978
+ }
1967
1979
  };
1968
1980
 
1969
1981
 
@@ -2112,11 +2124,47 @@ proto.notification.NotificationRequest.prototype.hasType = function() {
2112
2124
 
2113
2125
 
2114
2126
  /**
2115
- * optional int32 is_active = 5;
2127
+ * optional string trigger = 5;
2128
+ * @return {string}
2129
+ */
2130
+ proto.notification.NotificationRequest.prototype.getTrigger = function() {
2131
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2132
+ };
2133
+
2134
+
2135
+ /**
2136
+ * @param {string} value
2137
+ * @return {!proto.notification.NotificationRequest} returns this
2138
+ */
2139
+ proto.notification.NotificationRequest.prototype.setTrigger = function(value) {
2140
+ return jspb.Message.setField(this, 5, value);
2141
+ };
2142
+
2143
+
2144
+ /**
2145
+ * Clears the field making it undefined.
2146
+ * @return {!proto.notification.NotificationRequest} returns this
2147
+ */
2148
+ proto.notification.NotificationRequest.prototype.clearTrigger = function() {
2149
+ return jspb.Message.setField(this, 5, undefined);
2150
+ };
2151
+
2152
+
2153
+ /**
2154
+ * Returns whether this field is set.
2155
+ * @return {boolean}
2156
+ */
2157
+ proto.notification.NotificationRequest.prototype.hasTrigger = function() {
2158
+ return jspb.Message.getField(this, 5) != null;
2159
+ };
2160
+
2161
+
2162
+ /**
2163
+ * optional int32 is_active = 6;
2116
2164
  * @return {number}
2117
2165
  */
2118
2166
  proto.notification.NotificationRequest.prototype.getIsActive = function() {
2119
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2167
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2120
2168
  };
2121
2169
 
2122
2170
 
@@ -2125,7 +2173,7 @@ proto.notification.NotificationRequest.prototype.getIsActive = function() {
2125
2173
  * @return {!proto.notification.NotificationRequest} returns this
2126
2174
  */
2127
2175
  proto.notification.NotificationRequest.prototype.setIsActive = function(value) {
2128
- return jspb.Message.setField(this, 5, value);
2176
+ return jspb.Message.setField(this, 6, value);
2129
2177
  };
2130
2178
 
2131
2179
 
@@ -2134,7 +2182,7 @@ proto.notification.NotificationRequest.prototype.setIsActive = function(value) {
2134
2182
  * @return {!proto.notification.NotificationRequest} returns this
2135
2183
  */
2136
2184
  proto.notification.NotificationRequest.prototype.clearIsActive = function() {
2137
- return jspb.Message.setField(this, 5, undefined);
2185
+ return jspb.Message.setField(this, 6, undefined);
2138
2186
  };
2139
2187
 
2140
2188
 
@@ -2143,7 +2191,7 @@ proto.notification.NotificationRequest.prototype.clearIsActive = function() {
2143
2191
  * @return {boolean}
2144
2192
  */
2145
2193
  proto.notification.NotificationRequest.prototype.hasIsActive = function() {
2146
- return jspb.Message.getField(this, 5) != null;
2194
+ return jspb.Message.getField(this, 6) != null;
2147
2195
  };
2148
2196
 
2149
2197
 
@@ -3156,7 +3204,8 @@ proto.notification.NotificationItem.toObject = function(includeInstance, msg) {
3156
3204
  content: jspb.Message.getFieldWithDefault(msg, 3, ""),
3157
3205
  isActive: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
3158
3206
  type: jspb.Message.getFieldWithDefault(msg, 5, ""),
3159
- created: jspb.Message.getFieldWithDefault(msg, 6, "")
3207
+ trigger: jspb.Message.getFieldWithDefault(msg, 6, ""),
3208
+ created: jspb.Message.getFieldWithDefault(msg, 7, "")
3160
3209
  };
3161
3210
 
3162
3211
  if (includeInstance) {
@@ -3214,6 +3263,10 @@ proto.notification.NotificationItem.deserializeBinaryFromReader = function(msg,
3214
3263
  msg.setType(value);
3215
3264
  break;
3216
3265
  case 6:
3266
+ var value = /** @type {string} */ (reader.readString());
3267
+ msg.setTrigger(value);
3268
+ break;
3269
+ case 7:
3217
3270
  var value = /** @type {string} */ (reader.readString());
3218
3271
  msg.setCreated(value);
3219
3272
  break;
@@ -3281,13 +3334,20 @@ proto.notification.NotificationItem.serializeBinaryToWriter = function(message,
3281
3334
  f
3282
3335
  );
3283
3336
  }
3284
- f = /** @type {string} */ (jspb.Message.getField(message, 6));
3285
- if (f != null) {
3337
+ f = message.getTrigger();
3338
+ if (f.length > 0) {
3286
3339
  writer.writeString(
3287
3340
  6,
3288
3341
  f
3289
3342
  );
3290
3343
  }
3344
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
3345
+ if (f != null) {
3346
+ writer.writeString(
3347
+ 7,
3348
+ f
3349
+ );
3350
+ }
3291
3351
  };
3292
3352
 
3293
3353
 
@@ -3382,20 +3442,38 @@ proto.notification.NotificationItem.prototype.setType = function(value) {
3382
3442
 
3383
3443
 
3384
3444
  /**
3385
- * optional string created = 6;
3445
+ * optional string trigger = 6;
3386
3446
  * @return {string}
3387
3447
  */
3388
- proto.notification.NotificationItem.prototype.getCreated = function() {
3448
+ proto.notification.NotificationItem.prototype.getTrigger = function() {
3389
3449
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
3390
3450
  };
3391
3451
 
3392
3452
 
3453
+ /**
3454
+ * @param {string} value
3455
+ * @return {!proto.notification.NotificationItem} returns this
3456
+ */
3457
+ proto.notification.NotificationItem.prototype.setTrigger = function(value) {
3458
+ return jspb.Message.setProto3StringField(this, 6, value);
3459
+ };
3460
+
3461
+
3462
+ /**
3463
+ * optional string created = 7;
3464
+ * @return {string}
3465
+ */
3466
+ proto.notification.NotificationItem.prototype.getCreated = function() {
3467
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
3468
+ };
3469
+
3470
+
3393
3471
  /**
3394
3472
  * @param {string} value
3395
3473
  * @return {!proto.notification.NotificationItem} returns this
3396
3474
  */
3397
3475
  proto.notification.NotificationItem.prototype.setCreated = function(value) {
3398
- return jspb.Message.setField(this, 6, value);
3476
+ return jspb.Message.setField(this, 7, value);
3399
3477
  };
3400
3478
 
3401
3479
 
@@ -3404,7 +3482,7 @@ proto.notification.NotificationItem.prototype.setCreated = function(value) {
3404
3482
  * @return {!proto.notification.NotificationItem} returns this
3405
3483
  */
3406
3484
  proto.notification.NotificationItem.prototype.clearCreated = function() {
3407
- return jspb.Message.setField(this, 6, undefined);
3485
+ return jspb.Message.setField(this, 7, undefined);
3408
3486
  };
3409
3487
 
3410
3488
 
@@ -3413,7 +3491,7 @@ proto.notification.NotificationItem.prototype.clearCreated = function() {
3413
3491
  * @return {boolean}
3414
3492
  */
3415
3493
  proto.notification.NotificationItem.prototype.hasCreated = function() {
3416
- return jspb.Message.getField(this, 6) != null;
3494
+ return jspb.Message.getField(this, 7) != null;
3417
3495
  };
3418
3496
 
3419
3497
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.287",
3
+ "version": "1.0.289",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/user/user.proto CHANGED
@@ -39,8 +39,11 @@ service User {
39
39
  rpc updateSingleNote(NoteRequest) returns (NoteItem);
40
40
  rpc deleteSingleNote(GetNoteRequest) returns (NoteStatusResponse);
41
41
  rpc readListNotes(PaginationRequest) returns (NoteItemsResponse);
42
+ //KYC
43
+ rpc createSumSubApplicant(SumSubApplicantRequest) returns (SumSubResponse);
44
+ rpc uploadSumSubDocument(stream SumSubDocumentRequest) returns (SumSubResponse);
42
45
  }
43
-
46
+ //Technical
44
47
  message PingRequest { string ping = 1; }
45
48
  message PongResponse { string pong = 1; }
46
49
  message PaginationRequest {
@@ -50,6 +53,9 @@ message PaginationRequest {
50
53
  optional SegmentSearchParams segment_search_params = 4;
51
54
  optional NoteSearchParams note_search_params = 5;
52
55
  }
56
+ //Media
57
+ message File { bytes media = 1; optional string file_name = 2; optional string file_type = 3; }
58
+ //Searching
53
59
  message UserSearchParams {
54
60
  repeated string user_public_ids = 1;
55
61
  repeated int32 user_ids = 2;
@@ -304,4 +310,24 @@ message NoteStatusResponse {
304
310
  }
305
311
  message GetNoteRequest {
306
312
  optional int32 id = 1;
313
+ }
314
+ //KYC | SumSub
315
+ message SumSubApplicantRequest {
316
+ string user_public_id = 1;
317
+ }
318
+ message SumSubDocumentItemRequest {
319
+ string user_public_id = 1;
320
+ optional string doc_type = 2;
321
+ optional string doc_side = 3;
322
+ }
323
+ message SumSubDocumentRequest {
324
+ oneof request {
325
+ SumSubDocumentItemRequest document_data = 1;
326
+ File file = 2;
327
+ }
328
+ }
329
+ message SumSubResponse {
330
+ optional string external_user_id = 1;
331
+ optional string created_at = 2;
332
+ optional string id_doc_type = 3;
307
333
  }
@@ -279,6 +279,39 @@ function deserialize_user_SegmentStatusResponse(buffer_arg) {
279
279
  return user_pb.SegmentStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
280
280
  }
281
281
 
282
+ function serialize_user_SumSubApplicantRequest(arg) {
283
+ if (!(arg instanceof user_pb.SumSubApplicantRequest)) {
284
+ throw new Error('Expected argument of type user.SumSubApplicantRequest');
285
+ }
286
+ return Buffer.from(arg.serializeBinary());
287
+ }
288
+
289
+ function deserialize_user_SumSubApplicantRequest(buffer_arg) {
290
+ return user_pb.SumSubApplicantRequest.deserializeBinary(new Uint8Array(buffer_arg));
291
+ }
292
+
293
+ function serialize_user_SumSubDocumentRequest(arg) {
294
+ if (!(arg instanceof user_pb.SumSubDocumentRequest)) {
295
+ throw new Error('Expected argument of type user.SumSubDocumentRequest');
296
+ }
297
+ return Buffer.from(arg.serializeBinary());
298
+ }
299
+
300
+ function deserialize_user_SumSubDocumentRequest(buffer_arg) {
301
+ return user_pb.SumSubDocumentRequest.deserializeBinary(new Uint8Array(buffer_arg));
302
+ }
303
+
304
+ function serialize_user_SumSubResponse(arg) {
305
+ if (!(arg instanceof user_pb.SumSubResponse)) {
306
+ throw new Error('Expected argument of type user.SumSubResponse');
307
+ }
308
+ return Buffer.from(arg.serializeBinary());
309
+ }
310
+
311
+ function deserialize_user_SumSubResponse(buffer_arg) {
312
+ return user_pb.SumSubResponse.deserializeBinary(new Uint8Array(buffer_arg));
313
+ }
314
+
282
315
  function serialize_user_UserDataRequest(arg) {
283
316
  if (!(arg instanceof user_pb.UserDataRequest)) {
284
317
  throw new Error('Expected argument of type user.UserDataRequest');
@@ -642,6 +675,29 @@ createSingleNote: {
642
675
  responseSerialize: serialize_user_NoteItemsResponse,
643
676
  responseDeserialize: deserialize_user_NoteItemsResponse,
644
677
  },
678
+ // KYC
679
+ createSumSubApplicant: {
680
+ path: '/user.User/createSumSubApplicant',
681
+ requestStream: false,
682
+ responseStream: false,
683
+ requestType: user_pb.SumSubApplicantRequest,
684
+ responseType: user_pb.SumSubResponse,
685
+ requestSerialize: serialize_user_SumSubApplicantRequest,
686
+ requestDeserialize: deserialize_user_SumSubApplicantRequest,
687
+ responseSerialize: serialize_user_SumSubResponse,
688
+ responseDeserialize: deserialize_user_SumSubResponse,
689
+ },
690
+ uploadSumSubDocument: {
691
+ path: '/user.User/uploadSumSubDocument',
692
+ requestStream: true,
693
+ responseStream: false,
694
+ requestType: user_pb.SumSubDocumentRequest,
695
+ responseType: user_pb.SumSubResponse,
696
+ requestSerialize: serialize_user_SumSubDocumentRequest,
697
+ requestDeserialize: deserialize_user_SumSubDocumentRequest,
698
+ responseSerialize: serialize_user_SumSubResponse,
699
+ responseDeserialize: deserialize_user_SumSubResponse,
700
+ },
645
701
  };
646
702
 
647
703
  exports.UserClient = grpc.makeGenericClientConstructor(UserService);