protobuf-platform 1.0.53 → 1.0.54

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/game/game.proto CHANGED
@@ -10,11 +10,12 @@ service Game {
10
10
  rpc readSingleCategory(GetCategoryRequest) returns (CategoryResponse);
11
11
  rpc updateSingleCategory(stream CategoryRequest) returns (CategoryResponse);
12
12
  rpc deleteSingleCategory(GetCategoryRequest) returns (CategoryStatusResponse);
13
- rpc readListCategories(GetListCategoryRequest) returns (CategoryListResponse);
13
+ rpc readListCategories(PaginationRequest) returns (CategoryListResponse);
14
14
  }
15
15
 
16
16
  message PingRequest { string ping = 1; }
17
17
  message PongResponse { string pong = 1; }
18
+ message PaginationRequest { int32 limit = 1; int32 offset = 2; }
18
19
  //Media
19
20
  message File { bytes media = 1; }
20
21
  message GetFileRequest { string file_name = 1; string instance_type = 2; }
@@ -46,10 +47,6 @@ message CategoryItemRequest {
46
47
  message GetCategoryRequest {
47
48
  int32 id = 1;
48
49
  }
49
- message GetListCategoryRequest {
50
- int32 limit = 1;
51
- int32 offset = 2;
52
- }
53
50
  //Category CRUD | Responses
54
51
  message CategoryResponse {
55
52
  CategoryItem data = 1;
@@ -81,15 +81,15 @@ function deserialize_game_GetFileRequest(buffer_arg) {
81
81
  return game_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
82
82
  }
83
83
 
84
- function serialize_game_GetListCategoryRequest(arg) {
85
- if (!(arg instanceof game_pb.GetListCategoryRequest)) {
86
- throw new Error('Expected argument of type game.GetListCategoryRequest');
84
+ function serialize_game_PaginationRequest(arg) {
85
+ if (!(arg instanceof game_pb.PaginationRequest)) {
86
+ throw new Error('Expected argument of type game.PaginationRequest');
87
87
  }
88
88
  return Buffer.from(arg.serializeBinary());
89
89
  }
90
90
 
91
- function deserialize_game_GetListCategoryRequest(buffer_arg) {
92
- return game_pb.GetListCategoryRequest.deserializeBinary(new Uint8Array(buffer_arg));
91
+ function deserialize_game_PaginationRequest(buffer_arg) {
92
+ return game_pb.PaginationRequest.deserializeBinary(new Uint8Array(buffer_arg));
93
93
  }
94
94
 
95
95
  function serialize_game_PingRequest(arg) {
@@ -187,10 +187,10 @@ createSingleCategory: {
187
187
  path: '/game.Game/readListCategories',
188
188
  requestStream: false,
189
189
  responseStream: false,
190
- requestType: game_pb.GetListCategoryRequest,
190
+ requestType: game_pb.PaginationRequest,
191
191
  responseType: game_pb.CategoryListResponse,
192
- requestSerialize: serialize_game_GetListCategoryRequest,
193
- requestDeserialize: deserialize_game_GetListCategoryRequest,
192
+ requestSerialize: serialize_game_PaginationRequest,
193
+ requestDeserialize: deserialize_game_PaginationRequest,
194
194
  responseSerialize: serialize_game_CategoryListResponse,
195
195
  responseDeserialize: deserialize_game_CategoryListResponse,
196
196
  },
package/game/game_pb.js CHANGED
@@ -31,7 +31,7 @@ goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
31
31
  goog.exportSymbol('proto.game.File', null, global);
32
32
  goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
33
33
  goog.exportSymbol('proto.game.GetFileRequest', null, global);
34
- goog.exportSymbol('proto.game.GetListCategoryRequest', null, global);
34
+ goog.exportSymbol('proto.game.PaginationRequest', null, global);
35
35
  goog.exportSymbol('proto.game.PingRequest', null, global);
36
36
  goog.exportSymbol('proto.game.PongResponse', null, global);
37
37
  /**
@@ -76,6 +76,27 @@ if (goog.DEBUG && !COMPILED) {
76
76
  */
77
77
  proto.game.PongResponse.displayName = 'proto.game.PongResponse';
78
78
  }
79
+ /**
80
+ * Generated by JsPbCodeGenerator.
81
+ * @param {Array=} opt_data Optional initial data array, typically from a
82
+ * server response, or constructed directly in Javascript. The array is used
83
+ * in place and becomes part of the constructed object. It is not cloned.
84
+ * If no data is provided, the constructed object will be empty, but still
85
+ * valid.
86
+ * @extends {jspb.Message}
87
+ * @constructor
88
+ */
89
+ proto.game.PaginationRequest = function(opt_data) {
90
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
91
+ };
92
+ goog.inherits(proto.game.PaginationRequest, jspb.Message);
93
+ if (goog.DEBUG && !COMPILED) {
94
+ /**
95
+ * @public
96
+ * @override
97
+ */
98
+ proto.game.PaginationRequest.displayName = 'proto.game.PaginationRequest';
99
+ }
79
100
  /**
80
101
  * Generated by JsPbCodeGenerator.
81
102
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -202,27 +223,6 @@ if (goog.DEBUG && !COMPILED) {
202
223
  */
203
224
  proto.game.GetCategoryRequest.displayName = 'proto.game.GetCategoryRequest';
204
225
  }
205
- /**
206
- * Generated by JsPbCodeGenerator.
207
- * @param {Array=} opt_data Optional initial data array, typically from a
208
- * server response, or constructed directly in Javascript. The array is used
209
- * in place and becomes part of the constructed object. It is not cloned.
210
- * If no data is provided, the constructed object will be empty, but still
211
- * valid.
212
- * @extends {jspb.Message}
213
- * @constructor
214
- */
215
- proto.game.GetListCategoryRequest = function(opt_data) {
216
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
217
- };
218
- goog.inherits(proto.game.GetListCategoryRequest, jspb.Message);
219
- if (goog.DEBUG && !COMPILED) {
220
- /**
221
- * @public
222
- * @override
223
- */
224
- proto.game.GetListCategoryRequest.displayName = 'proto.game.GetListCategoryRequest';
225
- }
226
226
  /**
227
227
  * Generated by JsPbCodeGenerator.
228
228
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -549,6 +549,166 @@ proto.game.PongResponse.prototype.setPong = function(value) {
549
549
 
550
550
 
551
551
 
552
+ if (jspb.Message.GENERATE_TO_OBJECT) {
553
+ /**
554
+ * Creates an object representation of this proto.
555
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
556
+ * Optional fields that are not set will be set to undefined.
557
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
558
+ * For the list of reserved names please see:
559
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
560
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
561
+ * JSPB instance for transitional soy proto support:
562
+ * http://goto/soy-param-migration
563
+ * @return {!Object}
564
+ */
565
+ proto.game.PaginationRequest.prototype.toObject = function(opt_includeInstance) {
566
+ return proto.game.PaginationRequest.toObject(opt_includeInstance, this);
567
+ };
568
+
569
+
570
+ /**
571
+ * Static version of the {@see toObject} method.
572
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
573
+ * the JSPB instance for transitional soy proto support:
574
+ * http://goto/soy-param-migration
575
+ * @param {!proto.game.PaginationRequest} msg The msg instance to transform.
576
+ * @return {!Object}
577
+ * @suppress {unusedLocalVariables} f is only used for nested messages
578
+ */
579
+ proto.game.PaginationRequest.toObject = function(includeInstance, msg) {
580
+ var f, obj = {
581
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
582
+ offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
583
+ };
584
+
585
+ if (includeInstance) {
586
+ obj.$jspbMessageInstance = msg;
587
+ }
588
+ return obj;
589
+ };
590
+ }
591
+
592
+
593
+ /**
594
+ * Deserializes binary data (in protobuf wire format).
595
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
596
+ * @return {!proto.game.PaginationRequest}
597
+ */
598
+ proto.game.PaginationRequest.deserializeBinary = function(bytes) {
599
+ var reader = new jspb.BinaryReader(bytes);
600
+ var msg = new proto.game.PaginationRequest;
601
+ return proto.game.PaginationRequest.deserializeBinaryFromReader(msg, reader);
602
+ };
603
+
604
+
605
+ /**
606
+ * Deserializes binary data (in protobuf wire format) from the
607
+ * given reader into the given message object.
608
+ * @param {!proto.game.PaginationRequest} msg The message object to deserialize into.
609
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
610
+ * @return {!proto.game.PaginationRequest}
611
+ */
612
+ proto.game.PaginationRequest.deserializeBinaryFromReader = function(msg, reader) {
613
+ while (reader.nextField()) {
614
+ if (reader.isEndGroup()) {
615
+ break;
616
+ }
617
+ var field = reader.getFieldNumber();
618
+ switch (field) {
619
+ case 1:
620
+ var value = /** @type {number} */ (reader.readInt32());
621
+ msg.setLimit(value);
622
+ break;
623
+ case 2:
624
+ var value = /** @type {number} */ (reader.readInt32());
625
+ msg.setOffset(value);
626
+ break;
627
+ default:
628
+ reader.skipField();
629
+ break;
630
+ }
631
+ }
632
+ return msg;
633
+ };
634
+
635
+
636
+ /**
637
+ * Serializes the message to binary data (in protobuf wire format).
638
+ * @return {!Uint8Array}
639
+ */
640
+ proto.game.PaginationRequest.prototype.serializeBinary = function() {
641
+ var writer = new jspb.BinaryWriter();
642
+ proto.game.PaginationRequest.serializeBinaryToWriter(this, writer);
643
+ return writer.getResultBuffer();
644
+ };
645
+
646
+
647
+ /**
648
+ * Serializes the given message to binary data (in protobuf wire
649
+ * format), writing to the given BinaryWriter.
650
+ * @param {!proto.game.PaginationRequest} message
651
+ * @param {!jspb.BinaryWriter} writer
652
+ * @suppress {unusedLocalVariables} f is only used for nested messages
653
+ */
654
+ proto.game.PaginationRequest.serializeBinaryToWriter = function(message, writer) {
655
+ var f = undefined;
656
+ f = message.getLimit();
657
+ if (f !== 0) {
658
+ writer.writeInt32(
659
+ 1,
660
+ f
661
+ );
662
+ }
663
+ f = message.getOffset();
664
+ if (f !== 0) {
665
+ writer.writeInt32(
666
+ 2,
667
+ f
668
+ );
669
+ }
670
+ };
671
+
672
+
673
+ /**
674
+ * optional int32 limit = 1;
675
+ * @return {number}
676
+ */
677
+ proto.game.PaginationRequest.prototype.getLimit = function() {
678
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
679
+ };
680
+
681
+
682
+ /**
683
+ * @param {number} value
684
+ * @return {!proto.game.PaginationRequest} returns this
685
+ */
686
+ proto.game.PaginationRequest.prototype.setLimit = function(value) {
687
+ return jspb.Message.setProto3IntField(this, 1, value);
688
+ };
689
+
690
+
691
+ /**
692
+ * optional int32 offset = 2;
693
+ * @return {number}
694
+ */
695
+ proto.game.PaginationRequest.prototype.getOffset = function() {
696
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
697
+ };
698
+
699
+
700
+ /**
701
+ * @param {number} value
702
+ * @return {!proto.game.PaginationRequest} returns this
703
+ */
704
+ proto.game.PaginationRequest.prototype.setOffset = function(value) {
705
+ return jspb.Message.setProto3IntField(this, 2, value);
706
+ };
707
+
708
+
709
+
710
+
711
+
552
712
  if (jspb.Message.GENERATE_TO_OBJECT) {
553
713
  /**
554
714
  * Creates an object representation of this proto.
@@ -2045,166 +2205,6 @@ proto.game.GetCategoryRequest.prototype.setId = function(value) {
2045
2205
 
2046
2206
 
2047
2207
 
2048
- if (jspb.Message.GENERATE_TO_OBJECT) {
2049
- /**
2050
- * Creates an object representation of this proto.
2051
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2052
- * Optional fields that are not set will be set to undefined.
2053
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2054
- * For the list of reserved names please see:
2055
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2056
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2057
- * JSPB instance for transitional soy proto support:
2058
- * http://goto/soy-param-migration
2059
- * @return {!Object}
2060
- */
2061
- proto.game.GetListCategoryRequest.prototype.toObject = function(opt_includeInstance) {
2062
- return proto.game.GetListCategoryRequest.toObject(opt_includeInstance, this);
2063
- };
2064
-
2065
-
2066
- /**
2067
- * Static version of the {@see toObject} method.
2068
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2069
- * the JSPB instance for transitional soy proto support:
2070
- * http://goto/soy-param-migration
2071
- * @param {!proto.game.GetListCategoryRequest} msg The msg instance to transform.
2072
- * @return {!Object}
2073
- * @suppress {unusedLocalVariables} f is only used for nested messages
2074
- */
2075
- proto.game.GetListCategoryRequest.toObject = function(includeInstance, msg) {
2076
- var f, obj = {
2077
- limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
2078
- offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
2079
- };
2080
-
2081
- if (includeInstance) {
2082
- obj.$jspbMessageInstance = msg;
2083
- }
2084
- return obj;
2085
- };
2086
- }
2087
-
2088
-
2089
- /**
2090
- * Deserializes binary data (in protobuf wire format).
2091
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2092
- * @return {!proto.game.GetListCategoryRequest}
2093
- */
2094
- proto.game.GetListCategoryRequest.deserializeBinary = function(bytes) {
2095
- var reader = new jspb.BinaryReader(bytes);
2096
- var msg = new proto.game.GetListCategoryRequest;
2097
- return proto.game.GetListCategoryRequest.deserializeBinaryFromReader(msg, reader);
2098
- };
2099
-
2100
-
2101
- /**
2102
- * Deserializes binary data (in protobuf wire format) from the
2103
- * given reader into the given message object.
2104
- * @param {!proto.game.GetListCategoryRequest} msg The message object to deserialize into.
2105
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2106
- * @return {!proto.game.GetListCategoryRequest}
2107
- */
2108
- proto.game.GetListCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
2109
- while (reader.nextField()) {
2110
- if (reader.isEndGroup()) {
2111
- break;
2112
- }
2113
- var field = reader.getFieldNumber();
2114
- switch (field) {
2115
- case 1:
2116
- var value = /** @type {number} */ (reader.readInt32());
2117
- msg.setLimit(value);
2118
- break;
2119
- case 2:
2120
- var value = /** @type {number} */ (reader.readInt32());
2121
- msg.setOffset(value);
2122
- break;
2123
- default:
2124
- reader.skipField();
2125
- break;
2126
- }
2127
- }
2128
- return msg;
2129
- };
2130
-
2131
-
2132
- /**
2133
- * Serializes the message to binary data (in protobuf wire format).
2134
- * @return {!Uint8Array}
2135
- */
2136
- proto.game.GetListCategoryRequest.prototype.serializeBinary = function() {
2137
- var writer = new jspb.BinaryWriter();
2138
- proto.game.GetListCategoryRequest.serializeBinaryToWriter(this, writer);
2139
- return writer.getResultBuffer();
2140
- };
2141
-
2142
-
2143
- /**
2144
- * Serializes the given message to binary data (in protobuf wire
2145
- * format), writing to the given BinaryWriter.
2146
- * @param {!proto.game.GetListCategoryRequest} message
2147
- * @param {!jspb.BinaryWriter} writer
2148
- * @suppress {unusedLocalVariables} f is only used for nested messages
2149
- */
2150
- proto.game.GetListCategoryRequest.serializeBinaryToWriter = function(message, writer) {
2151
- var f = undefined;
2152
- f = message.getLimit();
2153
- if (f !== 0) {
2154
- writer.writeInt32(
2155
- 1,
2156
- f
2157
- );
2158
- }
2159
- f = message.getOffset();
2160
- if (f !== 0) {
2161
- writer.writeInt32(
2162
- 2,
2163
- f
2164
- );
2165
- }
2166
- };
2167
-
2168
-
2169
- /**
2170
- * optional int32 limit = 1;
2171
- * @return {number}
2172
- */
2173
- proto.game.GetListCategoryRequest.prototype.getLimit = function() {
2174
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2175
- };
2176
-
2177
-
2178
- /**
2179
- * @param {number} value
2180
- * @return {!proto.game.GetListCategoryRequest} returns this
2181
- */
2182
- proto.game.GetListCategoryRequest.prototype.setLimit = function(value) {
2183
- return jspb.Message.setProto3IntField(this, 1, value);
2184
- };
2185
-
2186
-
2187
- /**
2188
- * optional int32 offset = 2;
2189
- * @return {number}
2190
- */
2191
- proto.game.GetListCategoryRequest.prototype.getOffset = function() {
2192
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2193
- };
2194
-
2195
-
2196
- /**
2197
- * @param {number} value
2198
- * @return {!proto.game.GetListCategoryRequest} returns this
2199
- */
2200
- proto.game.GetListCategoryRequest.prototype.setOffset = function(value) {
2201
- return jspb.Message.setProto3IntField(this, 2, value);
2202
- };
2203
-
2204
-
2205
-
2206
-
2207
-
2208
2208
  if (jspb.Message.GENERATE_TO_OBJECT) {
2209
2209
  /**
2210
2210
  * Creates an object representation of this proto.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {