protobuf-platform 1.1.73 → 1.1.75

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.
@@ -23,8 +23,9 @@ message PongResponse { string pong = 1; }
23
23
  message PaginationRequest {
24
24
  int32 limit = 1;
25
25
  int32 offset = 2;
26
- optional NotificationSearchRequest notification_search_params = 3;
27
- optional UserSearchRequest user_search_params = 4;
26
+ optional string order = 3;
27
+ optional NotificationSearchRequest notification_search_params = 4;
28
+ optional UserSearchRequest user_search_params = 5;
28
29
  }
29
30
  message NotificationSearchRequest {
30
31
  optional int32 notification_id = 1;
@@ -689,6 +689,7 @@ proto.notification.PaginationRequest.toObject = function(includeInstance, msg) {
689
689
  var f, obj = {
690
690
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
691
691
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
692
+ order: jspb.Message.getFieldWithDefault(msg, 3, ""),
692
693
  notificationSearchParams: (f = msg.getNotificationSearchParams()) && proto.notification.NotificationSearchRequest.toObject(includeInstance, f),
693
694
  userSearchParams: (f = msg.getUserSearchParams()) && proto.notification.UserSearchRequest.toObject(includeInstance, f)
694
695
  };
@@ -736,11 +737,15 @@ proto.notification.PaginationRequest.deserializeBinaryFromReader = function(msg,
736
737
  msg.setOffset(value);
737
738
  break;
738
739
  case 3:
740
+ var value = /** @type {string} */ (reader.readString());
741
+ msg.setOrder(value);
742
+ break;
743
+ case 4:
739
744
  var value = new proto.notification.NotificationSearchRequest;
740
745
  reader.readMessage(value,proto.notification.NotificationSearchRequest.deserializeBinaryFromReader);
741
746
  msg.setNotificationSearchParams(value);
742
747
  break;
743
- case 4:
748
+ case 5:
744
749
  var value = new proto.notification.UserSearchRequest;
745
750
  reader.readMessage(value,proto.notification.UserSearchRequest.deserializeBinaryFromReader);
746
751
  msg.setUserSearchParams(value);
@@ -788,10 +793,17 @@ proto.notification.PaginationRequest.serializeBinaryToWriter = function(message,
788
793
  f
789
794
  );
790
795
  }
796
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
797
+ if (f != null) {
798
+ writer.writeString(
799
+ 3,
800
+ f
801
+ );
802
+ }
791
803
  f = message.getNotificationSearchParams();
792
804
  if (f != null) {
793
805
  writer.writeMessage(
794
- 3,
806
+ 4,
795
807
  f,
796
808
  proto.notification.NotificationSearchRequest.serializeBinaryToWriter
797
809
  );
@@ -799,7 +811,7 @@ proto.notification.PaginationRequest.serializeBinaryToWriter = function(message,
799
811
  f = message.getUserSearchParams();
800
812
  if (f != null) {
801
813
  writer.writeMessage(
802
- 4,
814
+ 5,
803
815
  f,
804
816
  proto.notification.UserSearchRequest.serializeBinaryToWriter
805
817
  );
@@ -844,12 +856,48 @@ proto.notification.PaginationRequest.prototype.setOffset = function(value) {
844
856
 
845
857
 
846
858
  /**
847
- * optional NotificationSearchRequest notification_search_params = 3;
859
+ * optional string order = 3;
860
+ * @return {string}
861
+ */
862
+ proto.notification.PaginationRequest.prototype.getOrder = function() {
863
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
864
+ };
865
+
866
+
867
+ /**
868
+ * @param {string} value
869
+ * @return {!proto.notification.PaginationRequest} returns this
870
+ */
871
+ proto.notification.PaginationRequest.prototype.setOrder = function(value) {
872
+ return jspb.Message.setField(this, 3, value);
873
+ };
874
+
875
+
876
+ /**
877
+ * Clears the field making it undefined.
878
+ * @return {!proto.notification.PaginationRequest} returns this
879
+ */
880
+ proto.notification.PaginationRequest.prototype.clearOrder = function() {
881
+ return jspb.Message.setField(this, 3, undefined);
882
+ };
883
+
884
+
885
+ /**
886
+ * Returns whether this field is set.
887
+ * @return {boolean}
888
+ */
889
+ proto.notification.PaginationRequest.prototype.hasOrder = function() {
890
+ return jspb.Message.getField(this, 3) != null;
891
+ };
892
+
893
+
894
+ /**
895
+ * optional NotificationSearchRequest notification_search_params = 4;
848
896
  * @return {?proto.notification.NotificationSearchRequest}
849
897
  */
850
898
  proto.notification.PaginationRequest.prototype.getNotificationSearchParams = function() {
851
899
  return /** @type{?proto.notification.NotificationSearchRequest} */ (
852
- jspb.Message.getWrapperField(this, proto.notification.NotificationSearchRequest, 3));
900
+ jspb.Message.getWrapperField(this, proto.notification.NotificationSearchRequest, 4));
853
901
  };
854
902
 
855
903
 
@@ -858,7 +906,7 @@ proto.notification.PaginationRequest.prototype.getNotificationSearchParams = fun
858
906
  * @return {!proto.notification.PaginationRequest} returns this
859
907
  */
860
908
  proto.notification.PaginationRequest.prototype.setNotificationSearchParams = function(value) {
861
- return jspb.Message.setWrapperField(this, 3, value);
909
+ return jspb.Message.setWrapperField(this, 4, value);
862
910
  };
863
911
 
864
912
 
@@ -876,17 +924,17 @@ proto.notification.PaginationRequest.prototype.clearNotificationSearchParams = f
876
924
  * @return {boolean}
877
925
  */
878
926
  proto.notification.PaginationRequest.prototype.hasNotificationSearchParams = function() {
879
- return jspb.Message.getField(this, 3) != null;
927
+ return jspb.Message.getField(this, 4) != null;
880
928
  };
881
929
 
882
930
 
883
931
  /**
884
- * optional UserSearchRequest user_search_params = 4;
932
+ * optional UserSearchRequest user_search_params = 5;
885
933
  * @return {?proto.notification.UserSearchRequest}
886
934
  */
887
935
  proto.notification.PaginationRequest.prototype.getUserSearchParams = function() {
888
936
  return /** @type{?proto.notification.UserSearchRequest} */ (
889
- jspb.Message.getWrapperField(this, proto.notification.UserSearchRequest, 4));
937
+ jspb.Message.getWrapperField(this, proto.notification.UserSearchRequest, 5));
890
938
  };
891
939
 
892
940
 
@@ -895,7 +943,7 @@ proto.notification.PaginationRequest.prototype.getUserSearchParams = function()
895
943
  * @return {!proto.notification.PaginationRequest} returns this
896
944
  */
897
945
  proto.notification.PaginationRequest.prototype.setUserSearchParams = function(value) {
898
- return jspb.Message.setWrapperField(this, 4, value);
946
+ return jspb.Message.setWrapperField(this, 5, value);
899
947
  };
900
948
 
901
949
 
@@ -913,7 +961,7 @@ proto.notification.PaginationRequest.prototype.clearUserSearchParams = function(
913
961
  * @return {boolean}
914
962
  */
915
963
  proto.notification.PaginationRequest.prototype.hasUserSearchParams = function() {
916
- return jspb.Message.getField(this, 4) != null;
964
+ return jspb.Message.getField(this, 5) != null;
917
965
  };
918
966
 
919
967
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.1.73",
3
+ "version": "1.1.75",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -38,7 +38,12 @@ message PongResponse { string pong = 1; }
38
38
  message File { bytes media = 1; optional string file_name = 2; optional string file_type = 3; }
39
39
  message GetFileRequest { string file_name = 1; string instance_type = 2; }
40
40
 
41
- message PaginationRequest { int32 limit = 1; int32 offset = 2; optional PaymentSearchRequest payment_search_params = 3; }
41
+ message PaginationRequest {
42
+ int32 limit = 1;
43
+ int32 offset = 2;
44
+ optional string order = 3;
45
+ optional PaymentSearchRequest payment_search_params = 4;
46
+ }
42
47
  message PaymentSearchRequest {
43
48
  optional int32 deposit_id = 1;
44
49
  optional int32 withdrawal_id = 2;
@@ -1497,6 +1497,7 @@ proto.payment.PaginationRequest.toObject = function(includeInstance, msg) {
1497
1497
  var f, obj = {
1498
1498
  limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
1499
1499
  offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
1500
+ order: jspb.Message.getFieldWithDefault(msg, 3, ""),
1500
1501
  paymentSearchParams: (f = msg.getPaymentSearchParams()) && proto.payment.PaymentSearchRequest.toObject(includeInstance, f)
1501
1502
  };
1502
1503
 
@@ -1543,6 +1544,10 @@ proto.payment.PaginationRequest.deserializeBinaryFromReader = function(msg, read
1543
1544
  msg.setOffset(value);
1544
1545
  break;
1545
1546
  case 3:
1547
+ var value = /** @type {string} */ (reader.readString());
1548
+ msg.setOrder(value);
1549
+ break;
1550
+ case 4:
1546
1551
  var value = new proto.payment.PaymentSearchRequest;
1547
1552
  reader.readMessage(value,proto.payment.PaymentSearchRequest.deserializeBinaryFromReader);
1548
1553
  msg.setPaymentSearchParams(value);
@@ -1590,10 +1595,17 @@ proto.payment.PaginationRequest.serializeBinaryToWriter = function(message, writ
1590
1595
  f
1591
1596
  );
1592
1597
  }
1598
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1599
+ if (f != null) {
1600
+ writer.writeString(
1601
+ 3,
1602
+ f
1603
+ );
1604
+ }
1593
1605
  f = message.getPaymentSearchParams();
1594
1606
  if (f != null) {
1595
1607
  writer.writeMessage(
1596
- 3,
1608
+ 4,
1597
1609
  f,
1598
1610
  proto.payment.PaymentSearchRequest.serializeBinaryToWriter
1599
1611
  );
@@ -1638,12 +1650,48 @@ proto.payment.PaginationRequest.prototype.setOffset = function(value) {
1638
1650
 
1639
1651
 
1640
1652
  /**
1641
- * optional PaymentSearchRequest payment_search_params = 3;
1653
+ * optional string order = 3;
1654
+ * @return {string}
1655
+ */
1656
+ proto.payment.PaginationRequest.prototype.getOrder = function() {
1657
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1658
+ };
1659
+
1660
+
1661
+ /**
1662
+ * @param {string} value
1663
+ * @return {!proto.payment.PaginationRequest} returns this
1664
+ */
1665
+ proto.payment.PaginationRequest.prototype.setOrder = function(value) {
1666
+ return jspb.Message.setField(this, 3, value);
1667
+ };
1668
+
1669
+
1670
+ /**
1671
+ * Clears the field making it undefined.
1672
+ * @return {!proto.payment.PaginationRequest} returns this
1673
+ */
1674
+ proto.payment.PaginationRequest.prototype.clearOrder = function() {
1675
+ return jspb.Message.setField(this, 3, undefined);
1676
+ };
1677
+
1678
+
1679
+ /**
1680
+ * Returns whether this field is set.
1681
+ * @return {boolean}
1682
+ */
1683
+ proto.payment.PaginationRequest.prototype.hasOrder = function() {
1684
+ return jspb.Message.getField(this, 3) != null;
1685
+ };
1686
+
1687
+
1688
+ /**
1689
+ * optional PaymentSearchRequest payment_search_params = 4;
1642
1690
  * @return {?proto.payment.PaymentSearchRequest}
1643
1691
  */
1644
1692
  proto.payment.PaginationRequest.prototype.getPaymentSearchParams = function() {
1645
1693
  return /** @type{?proto.payment.PaymentSearchRequest} */ (
1646
- jspb.Message.getWrapperField(this, proto.payment.PaymentSearchRequest, 3));
1694
+ jspb.Message.getWrapperField(this, proto.payment.PaymentSearchRequest, 4));
1647
1695
  };
1648
1696
 
1649
1697
 
@@ -1652,7 +1700,7 @@ proto.payment.PaginationRequest.prototype.getPaymentSearchParams = function() {
1652
1700
  * @return {!proto.payment.PaginationRequest} returns this
1653
1701
  */
1654
1702
  proto.payment.PaginationRequest.prototype.setPaymentSearchParams = function(value) {
1655
- return jspb.Message.setWrapperField(this, 3, value);
1703
+ return jspb.Message.setWrapperField(this, 4, value);
1656
1704
  };
1657
1705
 
1658
1706
 
@@ -1670,7 +1718,7 @@ proto.payment.PaginationRequest.prototype.clearPaymentSearchParams = function()
1670
1718
  * @return {boolean}
1671
1719
  */
1672
1720
  proto.payment.PaginationRequest.prototype.hasPaymentSearchParams = function() {
1673
- return jspb.Message.getField(this, 3) != null;
1721
+ return jspb.Message.getField(this, 4) != null;
1674
1722
  };
1675
1723
 
1676
1724
 
@@ -4,7 +4,53 @@ package scheduler;
4
4
 
5
5
  service Scheduler {
6
6
  rpc checkConnection(PingRequest) returns (PongResponse);
7
+ //Tasks
8
+ rpc createSingleTask(TaskRequest) returns (TaskResponse);
9
+ rpc readSingleTask(GetTaskRequest) returns (TaskResponse);
10
+ rpc updateSingleTask(TaskRequest) returns (TaskResponse);
11
+ rpc deleteSingleTask(GetTaskRequest) returns (TaskStatusResponse);
12
+ rpc readListTasks(PaginationRequest) returns (TaskItemsResponse);
7
13
  }
8
-
14
+ //Technical
9
15
  message PingRequest { string ping = 1; }
10
- message PongResponse { string pong = 1; }
16
+ message PongResponse { string pong = 1; }
17
+ //Global
18
+ message PaginationRequest {
19
+ int32 limit = 1;
20
+ int32 offset = 2;
21
+ optional string order = 3;
22
+ }
23
+ //Tasks CRUD
24
+ message TaskRequest {
25
+ optional int32 id = 1;
26
+ optional string title = 2;
27
+ optional string service = 3;
28
+ optional string type = 4;
29
+ optional string schedule_type = 5;
30
+ optional int32 interval_minutes = 6;
31
+ repeated string specific_times = 7;
32
+ repeated int32 days = 8;
33
+ optional int32 is_active = 9;
34
+ }
35
+ message TaskItem {
36
+ optional int32 id = 1;
37
+ optional string title = 2;
38
+ optional string service = 3;
39
+ optional string type = 4;
40
+ optional string schedule_config = 5;
41
+ optional int32 is_active = 6;
42
+ }
43
+ message TaskResponse {
44
+ TaskItem data = 1;
45
+ }
46
+ message GetTaskRequest {
47
+ optional int32 id = 1;
48
+ }
49
+ message TaskStatusResponse {
50
+ string status = 1;
51
+ }
52
+ message TaskItemsResponse {
53
+ repeated TaskItem items = 1;
54
+ optional int32 total_pages = 2;
55
+ optional int32 total_items = 3;
56
+ }
@@ -4,6 +4,28 @@
4
4
  var grpc = require('@grpc/grpc-js');
5
5
  var scheduler_pb = require('./scheduler_pb.js');
6
6
 
7
+ function serialize_scheduler_GetTaskRequest(arg) {
8
+ if (!(arg instanceof scheduler_pb.GetTaskRequest)) {
9
+ throw new Error('Expected argument of type scheduler.GetTaskRequest');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_scheduler_GetTaskRequest(buffer_arg) {
15
+ return scheduler_pb.GetTaskRequest.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_scheduler_PaginationRequest(arg) {
19
+ if (!(arg instanceof scheduler_pb.PaginationRequest)) {
20
+ throw new Error('Expected argument of type scheduler.PaginationRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_scheduler_PaginationRequest(buffer_arg) {
26
+ return scheduler_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
7
29
  function serialize_scheduler_PingRequest(arg) {
8
30
  if (!(arg instanceof scheduler_pb.PingRequest)) {
9
31
  throw new Error('Expected argument of type scheduler.PingRequest');
@@ -26,6 +48,50 @@ function deserialize_scheduler_PongResponse(buffer_arg) {
26
48
  return scheduler_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
27
49
  }
28
50
 
51
+ function serialize_scheduler_TaskItemsResponse(arg) {
52
+ if (!(arg instanceof scheduler_pb.TaskItemsResponse)) {
53
+ throw new Error('Expected argument of type scheduler.TaskItemsResponse');
54
+ }
55
+ return Buffer.from(arg.serializeBinary());
56
+ }
57
+
58
+ function deserialize_scheduler_TaskItemsResponse(buffer_arg) {
59
+ return scheduler_pb.TaskItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
60
+ }
61
+
62
+ function serialize_scheduler_TaskRequest(arg) {
63
+ if (!(arg instanceof scheduler_pb.TaskRequest)) {
64
+ throw new Error('Expected argument of type scheduler.TaskRequest');
65
+ }
66
+ return Buffer.from(arg.serializeBinary());
67
+ }
68
+
69
+ function deserialize_scheduler_TaskRequest(buffer_arg) {
70
+ return scheduler_pb.TaskRequest.deserializeBinary(new Uint8Array(buffer_arg));
71
+ }
72
+
73
+ function serialize_scheduler_TaskResponse(arg) {
74
+ if (!(arg instanceof scheduler_pb.TaskResponse)) {
75
+ throw new Error('Expected argument of type scheduler.TaskResponse');
76
+ }
77
+ return Buffer.from(arg.serializeBinary());
78
+ }
79
+
80
+ function deserialize_scheduler_TaskResponse(buffer_arg) {
81
+ return scheduler_pb.TaskResponse.deserializeBinary(new Uint8Array(buffer_arg));
82
+ }
83
+
84
+ function serialize_scheduler_TaskStatusResponse(arg) {
85
+ if (!(arg instanceof scheduler_pb.TaskStatusResponse)) {
86
+ throw new Error('Expected argument of type scheduler.TaskStatusResponse');
87
+ }
88
+ return Buffer.from(arg.serializeBinary());
89
+ }
90
+
91
+ function deserialize_scheduler_TaskStatusResponse(buffer_arg) {
92
+ return scheduler_pb.TaskStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
93
+ }
94
+
29
95
 
30
96
  var SchedulerService = exports.SchedulerService = {
31
97
  checkConnection: {
@@ -39,6 +105,62 @@ var SchedulerService = exports.SchedulerService = {
39
105
  responseSerialize: serialize_scheduler_PongResponse,
40
106
  responseDeserialize: deserialize_scheduler_PongResponse,
41
107
  },
108
+ // Tasks
109
+ createSingleTask: {
110
+ path: '/scheduler.Scheduler/createSingleTask',
111
+ requestStream: false,
112
+ responseStream: false,
113
+ requestType: scheduler_pb.TaskRequest,
114
+ responseType: scheduler_pb.TaskResponse,
115
+ requestSerialize: serialize_scheduler_TaskRequest,
116
+ requestDeserialize: deserialize_scheduler_TaskRequest,
117
+ responseSerialize: serialize_scheduler_TaskResponse,
118
+ responseDeserialize: deserialize_scheduler_TaskResponse,
119
+ },
120
+ readSingleTask: {
121
+ path: '/scheduler.Scheduler/readSingleTask',
122
+ requestStream: false,
123
+ responseStream: false,
124
+ requestType: scheduler_pb.GetTaskRequest,
125
+ responseType: scheduler_pb.TaskResponse,
126
+ requestSerialize: serialize_scheduler_GetTaskRequest,
127
+ requestDeserialize: deserialize_scheduler_GetTaskRequest,
128
+ responseSerialize: serialize_scheduler_TaskResponse,
129
+ responseDeserialize: deserialize_scheduler_TaskResponse,
130
+ },
131
+ updateSingleTask: {
132
+ path: '/scheduler.Scheduler/updateSingleTask',
133
+ requestStream: false,
134
+ responseStream: false,
135
+ requestType: scheduler_pb.TaskRequest,
136
+ responseType: scheduler_pb.TaskResponse,
137
+ requestSerialize: serialize_scheduler_TaskRequest,
138
+ requestDeserialize: deserialize_scheduler_TaskRequest,
139
+ responseSerialize: serialize_scheduler_TaskResponse,
140
+ responseDeserialize: deserialize_scheduler_TaskResponse,
141
+ },
142
+ deleteSingleTask: {
143
+ path: '/scheduler.Scheduler/deleteSingleTask',
144
+ requestStream: false,
145
+ responseStream: false,
146
+ requestType: scheduler_pb.GetTaskRequest,
147
+ responseType: scheduler_pb.TaskStatusResponse,
148
+ requestSerialize: serialize_scheduler_GetTaskRequest,
149
+ requestDeserialize: deserialize_scheduler_GetTaskRequest,
150
+ responseSerialize: serialize_scheduler_TaskStatusResponse,
151
+ responseDeserialize: deserialize_scheduler_TaskStatusResponse,
152
+ },
153
+ readListTasks: {
154
+ path: '/scheduler.Scheduler/readListTasks',
155
+ requestStream: false,
156
+ responseStream: false,
157
+ requestType: scheduler_pb.PaginationRequest,
158
+ responseType: scheduler_pb.TaskItemsResponse,
159
+ requestSerialize: serialize_scheduler_PaginationRequest,
160
+ requestDeserialize: deserialize_scheduler_PaginationRequest,
161
+ responseSerialize: serialize_scheduler_TaskItemsResponse,
162
+ responseDeserialize: deserialize_scheduler_TaskItemsResponse,
163
+ },
42
164
  };
43
165
 
44
166
  exports.SchedulerClient = grpc.makeGenericClientConstructor(SchedulerService);