quiver-protobuf-typescript 1.0.1692192575 → 1.0.1692196466

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.
@@ -20,7 +20,7 @@ export interface CreateCourierConsignmentRequest {
20
20
  }
21
21
 
22
22
  export interface QueryCourierConsignmentsRequest {
23
- courierId: number;
23
+ courierIds: number[];
24
24
  }
25
25
 
26
26
  export interface QueryCourierConsignmentsResponse {
@@ -256,14 +256,16 @@ export const CreateCourierConsignmentRequest = {
256
256
  };
257
257
 
258
258
  function createBaseQueryCourierConsignmentsRequest(): QueryCourierConsignmentsRequest {
259
- return { courierId: 0 };
259
+ return { courierIds: [] };
260
260
  }
261
261
 
262
262
  export const QueryCourierConsignmentsRequest = {
263
263
  encode(message: QueryCourierConsignmentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
264
- if (message.courierId !== 0) {
265
- writer.uint32(8).int32(message.courierId);
264
+ writer.uint32(10).fork();
265
+ for (const v of message.courierIds) {
266
+ writer.int32(v);
266
267
  }
268
+ writer.ldelim();
267
269
  return writer;
268
270
  },
269
271
 
@@ -275,12 +277,22 @@ export const QueryCourierConsignmentsRequest = {
275
277
  const tag = reader.uint32();
276
278
  switch (tag >>> 3) {
277
279
  case 1:
278
- if (tag !== 8) {
279
- break;
280
+ if (tag === 8) {
281
+ message.courierIds.push(reader.int32());
282
+
283
+ continue;
280
284
  }
281
285
 
282
- message.courierId = reader.int32();
283
- continue;
286
+ if (tag === 10) {
287
+ const end2 = reader.uint32() + reader.pos;
288
+ while (reader.pos < end2) {
289
+ message.courierIds.push(reader.int32());
290
+ }
291
+
292
+ continue;
293
+ }
294
+
295
+ break;
284
296
  }
285
297
  if ((tag & 7) === 4 || tag === 0) {
286
298
  break;
@@ -291,13 +303,13 @@ export const QueryCourierConsignmentsRequest = {
291
303
  },
292
304
 
293
305
  fromJSON(object: any): QueryCourierConsignmentsRequest {
294
- return { courierId: isSet(object.courierId) ? Number(object.courierId) : 0 };
306
+ return { courierIds: Array.isArray(object?.courierIds) ? object.courierIds.map((e: any) => Number(e)) : [] };
295
307
  },
296
308
 
297
309
  toJSON(message: QueryCourierConsignmentsRequest): unknown {
298
310
  const obj: any = {};
299
- if (message.courierId !== 0) {
300
- obj.courierId = Math.round(message.courierId);
311
+ if (message.courierIds?.length) {
312
+ obj.courierIds = message.courierIds.map((e) => Math.round(e));
301
313
  }
302
314
  return obj;
303
315
  },
@@ -309,7 +321,7 @@ export const QueryCourierConsignmentsRequest = {
309
321
  object: I,
310
322
  ): QueryCourierConsignmentsRequest {
311
323
  const message = createBaseQueryCourierConsignmentsRequest();
312
- message.courierId = object.courierId ?? 0;
324
+ message.courierIds = object.courierIds?.map((e) => e) || [];
313
325
  return message;
314
326
  },
315
327
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quiver-protobuf-typescript",
3
- "version": "1.0.1692192575",
3
+ "version": "1.0.1692196466",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",