@fatehan/tsrp 1.5.6 → 1.5.9
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/dist/fatehan/activities/workshift.d.ts +140 -0
- package/dist/fatehan/activities/workshift.d.ts.map +1 -0
- package/dist/fatehan/activities/workshift.js +1244 -0
- package/dist/fatehan/apis/client.d.ts +0 -47
- package/dist/fatehan/apis/client.d.ts.map +1 -1
- package/dist/fatehan/apis/client.js +0 -567
- package/dist/fatehan/identities/identities.d.ts +16 -0
- package/dist/fatehan/identities/identities.d.ts.map +1 -1
- package/dist/fatehan/identities/identities.js +16 -0
- package/dist/fatehan/notifies/direct.d.ts +85 -0
- package/dist/fatehan/notifies/direct.d.ts.map +1 -0
- package/dist/fatehan/notifies/direct.js +669 -0
- package/dist/fatehan/notifies/notify.d.ts +5 -92
- package/dist/fatehan/notifies/notify.d.ts.map +1 -1
- package/dist/fatehan/notifies/notify.js +123 -1071
- package/dist/fatehan/packets/dataModel.d.ts +4 -0
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +44 -0
- package/dist/fatehan/services/api.d.ts +16 -2
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +163 -4
- package/dist/fatehan/trips/trip.d.ts +2 -71
- package/dist/fatehan/trips/trip.d.ts.map +1 -1
- package/dist/fatehan/trips/trip.js +25 -732
- package/package.json +2 -2
|
@@ -185,724 +185,6 @@ export var TripTask_EventType;
|
|
|
185
185
|
TripTask_EventType[TripTask_EventType["MONTHLY"] = 3] = "MONTHLY";
|
|
186
186
|
TripTask_EventType[TripTask_EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
187
187
|
})(TripTask_EventType || (TripTask_EventType = {}));
|
|
188
|
-
function createBaseMonthly() {
|
|
189
|
-
return {
|
|
190
|
-
id: Long.UZERO,
|
|
191
|
-
deviceId: Long.UZERO,
|
|
192
|
-
mileage: 0,
|
|
193
|
-
idling: 0,
|
|
194
|
-
parking: 0,
|
|
195
|
-
moving: 0,
|
|
196
|
-
towing: 0,
|
|
197
|
-
totalSpeed: 0,
|
|
198
|
-
sumSpeed: Long.UZERO,
|
|
199
|
-
maxSpeed: 0,
|
|
200
|
-
trips: 0,
|
|
201
|
-
compact: undefined,
|
|
202
|
-
startedAt: undefined,
|
|
203
|
-
finishedAt: undefined,
|
|
204
|
-
createdAt: undefined,
|
|
205
|
-
updatedAt: undefined,
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
export const Monthly = {
|
|
209
|
-
encode(message, writer = new BinaryWriter()) {
|
|
210
|
-
if (!message.id.equals(Long.UZERO)) {
|
|
211
|
-
writer.uint32(8).uint64(message.id.toString());
|
|
212
|
-
}
|
|
213
|
-
if (!message.deviceId.equals(Long.UZERO)) {
|
|
214
|
-
writer.uint32(16).uint64(message.deviceId.toString());
|
|
215
|
-
}
|
|
216
|
-
if (message.mileage !== 0) {
|
|
217
|
-
writer.uint32(24).uint32(message.mileage);
|
|
218
|
-
}
|
|
219
|
-
if (message.idling !== 0) {
|
|
220
|
-
writer.uint32(32).uint32(message.idling);
|
|
221
|
-
}
|
|
222
|
-
if (message.parking !== 0) {
|
|
223
|
-
writer.uint32(40).uint32(message.parking);
|
|
224
|
-
}
|
|
225
|
-
if (message.moving !== 0) {
|
|
226
|
-
writer.uint32(48).uint32(message.moving);
|
|
227
|
-
}
|
|
228
|
-
if (message.towing !== 0) {
|
|
229
|
-
writer.uint32(56).uint32(message.towing);
|
|
230
|
-
}
|
|
231
|
-
if (message.totalSpeed !== 0) {
|
|
232
|
-
writer.uint32(64).uint32(message.totalSpeed);
|
|
233
|
-
}
|
|
234
|
-
if (!message.sumSpeed.equals(Long.UZERO)) {
|
|
235
|
-
writer.uint32(72).uint64(message.sumSpeed.toString());
|
|
236
|
-
}
|
|
237
|
-
if (message.maxSpeed !== 0) {
|
|
238
|
-
writer.uint32(80).uint32(message.maxSpeed);
|
|
239
|
-
}
|
|
240
|
-
if (message.trips !== 0) {
|
|
241
|
-
writer.uint32(88).uint32(message.trips);
|
|
242
|
-
}
|
|
243
|
-
if (message.compact !== undefined) {
|
|
244
|
-
MonthlyCompact.encode(message.compact, writer.uint32(98).fork()).join();
|
|
245
|
-
}
|
|
246
|
-
if (message.startedAt !== undefined) {
|
|
247
|
-
Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(106).fork()).join();
|
|
248
|
-
}
|
|
249
|
-
if (message.finishedAt !== undefined) {
|
|
250
|
-
Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(114).fork()).join();
|
|
251
|
-
}
|
|
252
|
-
if (message.createdAt !== undefined) {
|
|
253
|
-
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
|
|
254
|
-
}
|
|
255
|
-
if (message.updatedAt !== undefined) {
|
|
256
|
-
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
|
|
257
|
-
}
|
|
258
|
-
return writer;
|
|
259
|
-
},
|
|
260
|
-
decode(input, length) {
|
|
261
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
262
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
263
|
-
const message = createBaseMonthly();
|
|
264
|
-
while (reader.pos < end) {
|
|
265
|
-
const tag = reader.uint32();
|
|
266
|
-
switch (tag >>> 3) {
|
|
267
|
-
case 1: {
|
|
268
|
-
if (tag !== 8) {
|
|
269
|
-
break;
|
|
270
|
-
}
|
|
271
|
-
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
case 2: {
|
|
275
|
-
if (tag !== 16) {
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
case 3: {
|
|
282
|
-
if (tag !== 24) {
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
message.mileage = reader.uint32();
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
case 4: {
|
|
289
|
-
if (tag !== 32) {
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
message.idling = reader.uint32();
|
|
293
|
-
continue;
|
|
294
|
-
}
|
|
295
|
-
case 5: {
|
|
296
|
-
if (tag !== 40) {
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
|
-
message.parking = reader.uint32();
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
case 6: {
|
|
303
|
-
if (tag !== 48) {
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
message.moving = reader.uint32();
|
|
307
|
-
continue;
|
|
308
|
-
}
|
|
309
|
-
case 7: {
|
|
310
|
-
if (tag !== 56) {
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
message.towing = reader.uint32();
|
|
314
|
-
continue;
|
|
315
|
-
}
|
|
316
|
-
case 8: {
|
|
317
|
-
if (tag !== 64) {
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
message.totalSpeed = reader.uint32();
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
case 9: {
|
|
324
|
-
if (tag !== 72) {
|
|
325
|
-
break;
|
|
326
|
-
}
|
|
327
|
-
message.sumSpeed = Long.fromString(reader.uint64().toString(), true);
|
|
328
|
-
continue;
|
|
329
|
-
}
|
|
330
|
-
case 10: {
|
|
331
|
-
if (tag !== 80) {
|
|
332
|
-
break;
|
|
333
|
-
}
|
|
334
|
-
message.maxSpeed = reader.uint32();
|
|
335
|
-
continue;
|
|
336
|
-
}
|
|
337
|
-
case 11: {
|
|
338
|
-
if (tag !== 88) {
|
|
339
|
-
break;
|
|
340
|
-
}
|
|
341
|
-
message.trips = reader.uint32();
|
|
342
|
-
continue;
|
|
343
|
-
}
|
|
344
|
-
case 12: {
|
|
345
|
-
if (tag !== 98) {
|
|
346
|
-
break;
|
|
347
|
-
}
|
|
348
|
-
message.compact = MonthlyCompact.decode(reader, reader.uint32());
|
|
349
|
-
continue;
|
|
350
|
-
}
|
|
351
|
-
case 13: {
|
|
352
|
-
if (tag !== 106) {
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
message.startedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
356
|
-
continue;
|
|
357
|
-
}
|
|
358
|
-
case 14: {
|
|
359
|
-
if (tag !== 114) {
|
|
360
|
-
break;
|
|
361
|
-
}
|
|
362
|
-
message.finishedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
363
|
-
continue;
|
|
364
|
-
}
|
|
365
|
-
case 15: {
|
|
366
|
-
if (tag !== 122) {
|
|
367
|
-
break;
|
|
368
|
-
}
|
|
369
|
-
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
370
|
-
continue;
|
|
371
|
-
}
|
|
372
|
-
case 16: {
|
|
373
|
-
if (tag !== 130) {
|
|
374
|
-
break;
|
|
375
|
-
}
|
|
376
|
-
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
381
|
-
break;
|
|
382
|
-
}
|
|
383
|
-
reader.skip(tag & 7);
|
|
384
|
-
}
|
|
385
|
-
return message;
|
|
386
|
-
},
|
|
387
|
-
create(base) {
|
|
388
|
-
return Monthly.fromPartial(base ?? {});
|
|
389
|
-
},
|
|
390
|
-
fromPartial(object) {
|
|
391
|
-
const message = createBaseMonthly();
|
|
392
|
-
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
393
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
394
|
-
? Long.fromValue(object.deviceId)
|
|
395
|
-
: Long.UZERO;
|
|
396
|
-
message.mileage = object.mileage ?? 0;
|
|
397
|
-
message.idling = object.idling ?? 0;
|
|
398
|
-
message.parking = object.parking ?? 0;
|
|
399
|
-
message.moving = object.moving ?? 0;
|
|
400
|
-
message.towing = object.towing ?? 0;
|
|
401
|
-
message.totalSpeed = object.totalSpeed ?? 0;
|
|
402
|
-
message.sumSpeed = (object.sumSpeed !== undefined && object.sumSpeed !== null)
|
|
403
|
-
? Long.fromValue(object.sumSpeed)
|
|
404
|
-
: Long.UZERO;
|
|
405
|
-
message.maxSpeed = object.maxSpeed ?? 0;
|
|
406
|
-
message.trips = object.trips ?? 0;
|
|
407
|
-
message.compact = (object.compact !== undefined && object.compact !== null)
|
|
408
|
-
? MonthlyCompact.fromPartial(object.compact)
|
|
409
|
-
: undefined;
|
|
410
|
-
message.startedAt = object.startedAt ?? undefined;
|
|
411
|
-
message.finishedAt = object.finishedAt ?? undefined;
|
|
412
|
-
message.createdAt = object.createdAt ?? undefined;
|
|
413
|
-
message.updatedAt = object.updatedAt ?? undefined;
|
|
414
|
-
return message;
|
|
415
|
-
},
|
|
416
|
-
};
|
|
417
|
-
function createBaseMonthlyCompact() {
|
|
418
|
-
return {
|
|
419
|
-
cost: 0,
|
|
420
|
-
records: 0,
|
|
421
|
-
greenDriving: {},
|
|
422
|
-
temperature: {},
|
|
423
|
-
humidity: {},
|
|
424
|
-
ignition: undefined,
|
|
425
|
-
doorOpened: undefined,
|
|
426
|
-
fuelUsed: undefined,
|
|
427
|
-
fuelRate: undefined,
|
|
428
|
-
engineRpm: undefined,
|
|
429
|
-
engineLoad: undefined,
|
|
430
|
-
crashes: {},
|
|
431
|
-
speeds: {},
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
export const MonthlyCompact = {
|
|
435
|
-
encode(message, writer = new BinaryWriter()) {
|
|
436
|
-
if (message.cost !== 0) {
|
|
437
|
-
writer.uint32(8).uint32(message.cost);
|
|
438
|
-
}
|
|
439
|
-
if (message.records !== 0) {
|
|
440
|
-
writer.uint32(16).uint32(message.records);
|
|
441
|
-
}
|
|
442
|
-
globalThis.Object.entries(message.greenDriving).forEach(([key, value]) => {
|
|
443
|
-
MonthlyCompact_GreenDrivingEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
444
|
-
});
|
|
445
|
-
globalThis.Object.entries(message.temperature).forEach(([key, value]) => {
|
|
446
|
-
MonthlyCompact_TemperatureEntry.encode({ key: key, value }, writer.uint32(34).fork()).join();
|
|
447
|
-
});
|
|
448
|
-
globalThis.Object.entries(message.humidity).forEach(([key, value]) => {
|
|
449
|
-
MonthlyCompact_HumidityEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
|
|
450
|
-
});
|
|
451
|
-
if (message.ignition !== undefined) {
|
|
452
|
-
writer.uint32(56).uint32(message.ignition);
|
|
453
|
-
}
|
|
454
|
-
if (message.doorOpened !== undefined) {
|
|
455
|
-
writer.uint32(64).uint32(message.doorOpened);
|
|
456
|
-
}
|
|
457
|
-
if (message.fuelUsed !== undefined) {
|
|
458
|
-
writer.uint32(72).uint32(message.fuelUsed);
|
|
459
|
-
}
|
|
460
|
-
if (message.fuelRate !== undefined) {
|
|
461
|
-
writer.uint32(80).uint32(message.fuelRate);
|
|
462
|
-
}
|
|
463
|
-
if (message.engineRpm !== undefined) {
|
|
464
|
-
writer.uint32(88).uint32(message.engineRpm);
|
|
465
|
-
}
|
|
466
|
-
if (message.engineLoad !== undefined) {
|
|
467
|
-
writer.uint32(96).uint32(message.engineLoad);
|
|
468
|
-
}
|
|
469
|
-
globalThis.Object.entries(message.crashes).forEach(([key, value]) => {
|
|
470
|
-
MonthlyCompact_CrashesEntry.encode({ key: key, value }, writer.uint32(106).fork()).join();
|
|
471
|
-
});
|
|
472
|
-
globalThis.Object.entries(message.speeds).forEach(([key, value]) => {
|
|
473
|
-
MonthlyCompact_SpeedsEntry.encode({ key: key, value }, writer.uint32(114).fork()).join();
|
|
474
|
-
});
|
|
475
|
-
return writer;
|
|
476
|
-
},
|
|
477
|
-
decode(input, length) {
|
|
478
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
479
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
480
|
-
const message = createBaseMonthlyCompact();
|
|
481
|
-
while (reader.pos < end) {
|
|
482
|
-
const tag = reader.uint32();
|
|
483
|
-
switch (tag >>> 3) {
|
|
484
|
-
case 1: {
|
|
485
|
-
if (tag !== 8) {
|
|
486
|
-
break;
|
|
487
|
-
}
|
|
488
|
-
message.cost = reader.uint32();
|
|
489
|
-
continue;
|
|
490
|
-
}
|
|
491
|
-
case 2: {
|
|
492
|
-
if (tag !== 16) {
|
|
493
|
-
break;
|
|
494
|
-
}
|
|
495
|
-
message.records = reader.uint32();
|
|
496
|
-
continue;
|
|
497
|
-
}
|
|
498
|
-
case 3: {
|
|
499
|
-
if (tag !== 26) {
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
const entry3 = MonthlyCompact_GreenDrivingEntry.decode(reader, reader.uint32());
|
|
503
|
-
if (entry3.value !== undefined) {
|
|
504
|
-
message.greenDriving[entry3.key] = entry3.value;
|
|
505
|
-
}
|
|
506
|
-
continue;
|
|
507
|
-
}
|
|
508
|
-
case 4: {
|
|
509
|
-
if (tag !== 34) {
|
|
510
|
-
break;
|
|
511
|
-
}
|
|
512
|
-
const entry4 = MonthlyCompact_TemperatureEntry.decode(reader, reader.uint32());
|
|
513
|
-
if (entry4.value !== undefined) {
|
|
514
|
-
message.temperature[entry4.key] = entry4.value;
|
|
515
|
-
}
|
|
516
|
-
continue;
|
|
517
|
-
}
|
|
518
|
-
case 5: {
|
|
519
|
-
if (tag !== 42) {
|
|
520
|
-
break;
|
|
521
|
-
}
|
|
522
|
-
const entry5 = MonthlyCompact_HumidityEntry.decode(reader, reader.uint32());
|
|
523
|
-
if (entry5.value !== undefined) {
|
|
524
|
-
message.humidity[entry5.key] = entry5.value;
|
|
525
|
-
}
|
|
526
|
-
continue;
|
|
527
|
-
}
|
|
528
|
-
case 7: {
|
|
529
|
-
if (tag !== 56) {
|
|
530
|
-
break;
|
|
531
|
-
}
|
|
532
|
-
message.ignition = reader.uint32();
|
|
533
|
-
continue;
|
|
534
|
-
}
|
|
535
|
-
case 8: {
|
|
536
|
-
if (tag !== 64) {
|
|
537
|
-
break;
|
|
538
|
-
}
|
|
539
|
-
message.doorOpened = reader.uint32();
|
|
540
|
-
continue;
|
|
541
|
-
}
|
|
542
|
-
case 9: {
|
|
543
|
-
if (tag !== 72) {
|
|
544
|
-
break;
|
|
545
|
-
}
|
|
546
|
-
message.fuelUsed = reader.uint32();
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
|
-
case 10: {
|
|
550
|
-
if (tag !== 80) {
|
|
551
|
-
break;
|
|
552
|
-
}
|
|
553
|
-
message.fuelRate = reader.uint32();
|
|
554
|
-
continue;
|
|
555
|
-
}
|
|
556
|
-
case 11: {
|
|
557
|
-
if (tag !== 88) {
|
|
558
|
-
break;
|
|
559
|
-
}
|
|
560
|
-
message.engineRpm = reader.uint32();
|
|
561
|
-
continue;
|
|
562
|
-
}
|
|
563
|
-
case 12: {
|
|
564
|
-
if (tag !== 96) {
|
|
565
|
-
break;
|
|
566
|
-
}
|
|
567
|
-
message.engineLoad = reader.uint32();
|
|
568
|
-
continue;
|
|
569
|
-
}
|
|
570
|
-
case 13: {
|
|
571
|
-
if (tag !== 106) {
|
|
572
|
-
break;
|
|
573
|
-
}
|
|
574
|
-
const entry13 = MonthlyCompact_CrashesEntry.decode(reader, reader.uint32());
|
|
575
|
-
if (entry13.value !== undefined) {
|
|
576
|
-
message.crashes[entry13.key] = entry13.value;
|
|
577
|
-
}
|
|
578
|
-
continue;
|
|
579
|
-
}
|
|
580
|
-
case 14: {
|
|
581
|
-
if (tag !== 114) {
|
|
582
|
-
break;
|
|
583
|
-
}
|
|
584
|
-
const entry14 = MonthlyCompact_SpeedsEntry.decode(reader, reader.uint32());
|
|
585
|
-
if (entry14.value !== undefined) {
|
|
586
|
-
message.speeds[entry14.key] = entry14.value;
|
|
587
|
-
}
|
|
588
|
-
continue;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
592
|
-
break;
|
|
593
|
-
}
|
|
594
|
-
reader.skip(tag & 7);
|
|
595
|
-
}
|
|
596
|
-
return message;
|
|
597
|
-
},
|
|
598
|
-
create(base) {
|
|
599
|
-
return MonthlyCompact.fromPartial(base ?? {});
|
|
600
|
-
},
|
|
601
|
-
fromPartial(object) {
|
|
602
|
-
const message = createBaseMonthlyCompact();
|
|
603
|
-
message.cost = object.cost ?? 0;
|
|
604
|
-
message.records = object.records ?? 0;
|
|
605
|
-
message.greenDriving = globalThis.Object.entries(object.greenDriving ?? {}).reduce((acc, [key, value]) => {
|
|
606
|
-
if (value !== undefined) {
|
|
607
|
-
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
608
|
-
}
|
|
609
|
-
return acc;
|
|
610
|
-
}, {});
|
|
611
|
-
message.temperature = globalThis.Object.entries(object.temperature ?? {}).reduce((acc, [key, value]) => {
|
|
612
|
-
if (value !== undefined) {
|
|
613
|
-
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
614
|
-
}
|
|
615
|
-
return acc;
|
|
616
|
-
}, {});
|
|
617
|
-
message.humidity = globalThis.Object.entries(object.humidity ?? {}).reduce((acc, [key, value]) => {
|
|
618
|
-
if (value !== undefined) {
|
|
619
|
-
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
620
|
-
}
|
|
621
|
-
return acc;
|
|
622
|
-
}, {});
|
|
623
|
-
message.ignition = object.ignition ?? undefined;
|
|
624
|
-
message.doorOpened = object.doorOpened ?? undefined;
|
|
625
|
-
message.fuelUsed = object.fuelUsed ?? undefined;
|
|
626
|
-
message.fuelRate = object.fuelRate ?? undefined;
|
|
627
|
-
message.engineRpm = object.engineRpm ?? undefined;
|
|
628
|
-
message.engineLoad = object.engineLoad ?? undefined;
|
|
629
|
-
message.crashes = globalThis.Object.entries(object.crashes ?? {}).reduce((acc, [key, value]) => {
|
|
630
|
-
if (value !== undefined) {
|
|
631
|
-
acc[globalThis.Number(key)] = globalThis.Number(value);
|
|
632
|
-
}
|
|
633
|
-
return acc;
|
|
634
|
-
}, {});
|
|
635
|
-
message.speeds = globalThis.Object.entries(object.speeds ?? {}).reduce((acc, [key, value]) => {
|
|
636
|
-
if (value !== undefined) {
|
|
637
|
-
acc[globalThis.Number(key)] = TripDurationStat.fromPartial(value);
|
|
638
|
-
}
|
|
639
|
-
return acc;
|
|
640
|
-
}, {});
|
|
641
|
-
return message;
|
|
642
|
-
},
|
|
643
|
-
};
|
|
644
|
-
function createBaseMonthlyCompact_GreenDrivingEntry() {
|
|
645
|
-
return { key: 0, value: 0 };
|
|
646
|
-
}
|
|
647
|
-
export const MonthlyCompact_GreenDrivingEntry = {
|
|
648
|
-
encode(message, writer = new BinaryWriter()) {
|
|
649
|
-
if (message.key !== 0) {
|
|
650
|
-
writer.uint32(8).uint32(message.key);
|
|
651
|
-
}
|
|
652
|
-
if (message.value !== 0) {
|
|
653
|
-
writer.uint32(16).uint32(message.value);
|
|
654
|
-
}
|
|
655
|
-
return writer;
|
|
656
|
-
},
|
|
657
|
-
decode(input, length) {
|
|
658
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
659
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
660
|
-
const message = createBaseMonthlyCompact_GreenDrivingEntry();
|
|
661
|
-
while (reader.pos < end) {
|
|
662
|
-
const tag = reader.uint32();
|
|
663
|
-
switch (tag >>> 3) {
|
|
664
|
-
case 1: {
|
|
665
|
-
if (tag !== 8) {
|
|
666
|
-
break;
|
|
667
|
-
}
|
|
668
|
-
message.key = reader.uint32();
|
|
669
|
-
continue;
|
|
670
|
-
}
|
|
671
|
-
case 2: {
|
|
672
|
-
if (tag !== 16) {
|
|
673
|
-
break;
|
|
674
|
-
}
|
|
675
|
-
message.value = reader.uint32();
|
|
676
|
-
continue;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
reader.skip(tag & 7);
|
|
683
|
-
}
|
|
684
|
-
return message;
|
|
685
|
-
},
|
|
686
|
-
create(base) {
|
|
687
|
-
return MonthlyCompact_GreenDrivingEntry.fromPartial(base ?? {});
|
|
688
|
-
},
|
|
689
|
-
fromPartial(object) {
|
|
690
|
-
const message = createBaseMonthlyCompact_GreenDrivingEntry();
|
|
691
|
-
message.key = object.key ?? 0;
|
|
692
|
-
message.value = object.value ?? 0;
|
|
693
|
-
return message;
|
|
694
|
-
},
|
|
695
|
-
};
|
|
696
|
-
function createBaseMonthlyCompact_TemperatureEntry() {
|
|
697
|
-
return { key: 0, value: 0 };
|
|
698
|
-
}
|
|
699
|
-
export const MonthlyCompact_TemperatureEntry = {
|
|
700
|
-
encode(message, writer = new BinaryWriter()) {
|
|
701
|
-
if (message.key !== 0) {
|
|
702
|
-
writer.uint32(8).uint32(message.key);
|
|
703
|
-
}
|
|
704
|
-
if (message.value !== 0) {
|
|
705
|
-
writer.uint32(16).sint32(message.value);
|
|
706
|
-
}
|
|
707
|
-
return writer;
|
|
708
|
-
},
|
|
709
|
-
decode(input, length) {
|
|
710
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
711
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
712
|
-
const message = createBaseMonthlyCompact_TemperatureEntry();
|
|
713
|
-
while (reader.pos < end) {
|
|
714
|
-
const tag = reader.uint32();
|
|
715
|
-
switch (tag >>> 3) {
|
|
716
|
-
case 1: {
|
|
717
|
-
if (tag !== 8) {
|
|
718
|
-
break;
|
|
719
|
-
}
|
|
720
|
-
message.key = reader.uint32();
|
|
721
|
-
continue;
|
|
722
|
-
}
|
|
723
|
-
case 2: {
|
|
724
|
-
if (tag !== 16) {
|
|
725
|
-
break;
|
|
726
|
-
}
|
|
727
|
-
message.value = reader.sint32();
|
|
728
|
-
continue;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
732
|
-
break;
|
|
733
|
-
}
|
|
734
|
-
reader.skip(tag & 7);
|
|
735
|
-
}
|
|
736
|
-
return message;
|
|
737
|
-
},
|
|
738
|
-
create(base) {
|
|
739
|
-
return MonthlyCompact_TemperatureEntry.fromPartial(base ?? {});
|
|
740
|
-
},
|
|
741
|
-
fromPartial(object) {
|
|
742
|
-
const message = createBaseMonthlyCompact_TemperatureEntry();
|
|
743
|
-
message.key = object.key ?? 0;
|
|
744
|
-
message.value = object.value ?? 0;
|
|
745
|
-
return message;
|
|
746
|
-
},
|
|
747
|
-
};
|
|
748
|
-
function createBaseMonthlyCompact_HumidityEntry() {
|
|
749
|
-
return { key: 0, value: 0 };
|
|
750
|
-
}
|
|
751
|
-
export const MonthlyCompact_HumidityEntry = {
|
|
752
|
-
encode(message, writer = new BinaryWriter()) {
|
|
753
|
-
if (message.key !== 0) {
|
|
754
|
-
writer.uint32(8).uint32(message.key);
|
|
755
|
-
}
|
|
756
|
-
if (message.value !== 0) {
|
|
757
|
-
writer.uint32(16).uint32(message.value);
|
|
758
|
-
}
|
|
759
|
-
return writer;
|
|
760
|
-
},
|
|
761
|
-
decode(input, length) {
|
|
762
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
763
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
764
|
-
const message = createBaseMonthlyCompact_HumidityEntry();
|
|
765
|
-
while (reader.pos < end) {
|
|
766
|
-
const tag = reader.uint32();
|
|
767
|
-
switch (tag >>> 3) {
|
|
768
|
-
case 1: {
|
|
769
|
-
if (tag !== 8) {
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
message.key = reader.uint32();
|
|
773
|
-
continue;
|
|
774
|
-
}
|
|
775
|
-
case 2: {
|
|
776
|
-
if (tag !== 16) {
|
|
777
|
-
break;
|
|
778
|
-
}
|
|
779
|
-
message.value = reader.uint32();
|
|
780
|
-
continue;
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
784
|
-
break;
|
|
785
|
-
}
|
|
786
|
-
reader.skip(tag & 7);
|
|
787
|
-
}
|
|
788
|
-
return message;
|
|
789
|
-
},
|
|
790
|
-
create(base) {
|
|
791
|
-
return MonthlyCompact_HumidityEntry.fromPartial(base ?? {});
|
|
792
|
-
},
|
|
793
|
-
fromPartial(object) {
|
|
794
|
-
const message = createBaseMonthlyCompact_HumidityEntry();
|
|
795
|
-
message.key = object.key ?? 0;
|
|
796
|
-
message.value = object.value ?? 0;
|
|
797
|
-
return message;
|
|
798
|
-
},
|
|
799
|
-
};
|
|
800
|
-
function createBaseMonthlyCompact_CrashesEntry() {
|
|
801
|
-
return { key: 0, value: 0 };
|
|
802
|
-
}
|
|
803
|
-
export const MonthlyCompact_CrashesEntry = {
|
|
804
|
-
encode(message, writer = new BinaryWriter()) {
|
|
805
|
-
if (message.key !== 0) {
|
|
806
|
-
writer.uint32(8).uint32(message.key);
|
|
807
|
-
}
|
|
808
|
-
if (message.value !== 0) {
|
|
809
|
-
writer.uint32(16).uint32(message.value);
|
|
810
|
-
}
|
|
811
|
-
return writer;
|
|
812
|
-
},
|
|
813
|
-
decode(input, length) {
|
|
814
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
815
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
816
|
-
const message = createBaseMonthlyCompact_CrashesEntry();
|
|
817
|
-
while (reader.pos < end) {
|
|
818
|
-
const tag = reader.uint32();
|
|
819
|
-
switch (tag >>> 3) {
|
|
820
|
-
case 1: {
|
|
821
|
-
if (tag !== 8) {
|
|
822
|
-
break;
|
|
823
|
-
}
|
|
824
|
-
message.key = reader.uint32();
|
|
825
|
-
continue;
|
|
826
|
-
}
|
|
827
|
-
case 2: {
|
|
828
|
-
if (tag !== 16) {
|
|
829
|
-
break;
|
|
830
|
-
}
|
|
831
|
-
message.value = reader.uint32();
|
|
832
|
-
continue;
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
836
|
-
break;
|
|
837
|
-
}
|
|
838
|
-
reader.skip(tag & 7);
|
|
839
|
-
}
|
|
840
|
-
return message;
|
|
841
|
-
},
|
|
842
|
-
create(base) {
|
|
843
|
-
return MonthlyCompact_CrashesEntry.fromPartial(base ?? {});
|
|
844
|
-
},
|
|
845
|
-
fromPartial(object) {
|
|
846
|
-
const message = createBaseMonthlyCompact_CrashesEntry();
|
|
847
|
-
message.key = object.key ?? 0;
|
|
848
|
-
message.value = object.value ?? 0;
|
|
849
|
-
return message;
|
|
850
|
-
},
|
|
851
|
-
};
|
|
852
|
-
function createBaseMonthlyCompact_SpeedsEntry() {
|
|
853
|
-
return { key: 0, value: undefined };
|
|
854
|
-
}
|
|
855
|
-
export const MonthlyCompact_SpeedsEntry = {
|
|
856
|
-
encode(message, writer = new BinaryWriter()) {
|
|
857
|
-
if (message.key !== 0) {
|
|
858
|
-
writer.uint32(8).uint32(message.key);
|
|
859
|
-
}
|
|
860
|
-
if (message.value !== undefined) {
|
|
861
|
-
TripDurationStat.encode(message.value, writer.uint32(18).fork()).join();
|
|
862
|
-
}
|
|
863
|
-
return writer;
|
|
864
|
-
},
|
|
865
|
-
decode(input, length) {
|
|
866
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
867
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
868
|
-
const message = createBaseMonthlyCompact_SpeedsEntry();
|
|
869
|
-
while (reader.pos < end) {
|
|
870
|
-
const tag = reader.uint32();
|
|
871
|
-
switch (tag >>> 3) {
|
|
872
|
-
case 1: {
|
|
873
|
-
if (tag !== 8) {
|
|
874
|
-
break;
|
|
875
|
-
}
|
|
876
|
-
message.key = reader.uint32();
|
|
877
|
-
continue;
|
|
878
|
-
}
|
|
879
|
-
case 2: {
|
|
880
|
-
if (tag !== 18) {
|
|
881
|
-
break;
|
|
882
|
-
}
|
|
883
|
-
message.value = TripDurationStat.decode(reader, reader.uint32());
|
|
884
|
-
continue;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
888
|
-
break;
|
|
889
|
-
}
|
|
890
|
-
reader.skip(tag & 7);
|
|
891
|
-
}
|
|
892
|
-
return message;
|
|
893
|
-
},
|
|
894
|
-
create(base) {
|
|
895
|
-
return MonthlyCompact_SpeedsEntry.fromPartial(base ?? {});
|
|
896
|
-
},
|
|
897
|
-
fromPartial(object) {
|
|
898
|
-
const message = createBaseMonthlyCompact_SpeedsEntry();
|
|
899
|
-
message.key = object.key ?? 0;
|
|
900
|
-
message.value = (object.value !== undefined && object.value !== null)
|
|
901
|
-
? TripDurationStat.fromPartial(object.value)
|
|
902
|
-
: undefined;
|
|
903
|
-
return message;
|
|
904
|
-
},
|
|
905
|
-
};
|
|
906
188
|
function createBaseTrip() {
|
|
907
189
|
return {
|
|
908
190
|
id: Long.UZERO,
|
|
@@ -1149,6 +431,8 @@ function createBaseTripCompact() {
|
|
|
1149
431
|
crashes: {},
|
|
1150
432
|
speeds: {},
|
|
1151
433
|
points: [],
|
|
434
|
+
startedAt: undefined,
|
|
435
|
+
finishedAt: undefined,
|
|
1152
436
|
};
|
|
1153
437
|
}
|
|
1154
438
|
export const TripCompact = {
|
|
@@ -1206,6 +490,12 @@ export const TripCompact = {
|
|
|
1206
490
|
writer.uint64(v.toString());
|
|
1207
491
|
}
|
|
1208
492
|
writer.join();
|
|
493
|
+
if (message.startedAt !== undefined) {
|
|
494
|
+
Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(146).fork()).join();
|
|
495
|
+
}
|
|
496
|
+
if (message.finishedAt !== undefined) {
|
|
497
|
+
Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(154).fork()).join();
|
|
498
|
+
}
|
|
1209
499
|
return writer;
|
|
1210
500
|
},
|
|
1211
501
|
decode(input, length) {
|
|
@@ -1356,6 +646,20 @@ export const TripCompact = {
|
|
|
1356
646
|
}
|
|
1357
647
|
break;
|
|
1358
648
|
}
|
|
649
|
+
case 18: {
|
|
650
|
+
if (tag !== 146) {
|
|
651
|
+
break;
|
|
652
|
+
}
|
|
653
|
+
message.startedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
case 19: {
|
|
657
|
+
if (tag !== 154) {
|
|
658
|
+
break;
|
|
659
|
+
}
|
|
660
|
+
message.finishedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
1359
663
|
}
|
|
1360
664
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1361
665
|
break;
|
|
@@ -1417,6 +721,8 @@ export const TripCompact = {
|
|
|
1417
721
|
return acc;
|
|
1418
722
|
}, {});
|
|
1419
723
|
message.points = object.points?.map((e) => Long.fromValue(e)) || [];
|
|
724
|
+
message.startedAt = object.startedAt ?? undefined;
|
|
725
|
+
message.finishedAt = object.finishedAt ?? undefined;
|
|
1420
726
|
return message;
|
|
1421
727
|
},
|
|
1422
728
|
};
|
|
@@ -2239,7 +1545,7 @@ export const FusionTrip = {
|
|
|
2239
1545
|
},
|
|
2240
1546
|
};
|
|
2241
1547
|
function createBaseTripTask() {
|
|
2242
|
-
return { eventType: 0, trip: undefined,
|
|
1548
|
+
return { eventType: 0, trip: undefined, fusion: undefined, additional: undefined };
|
|
2243
1549
|
}
|
|
2244
1550
|
export const TripTask = {
|
|
2245
1551
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -2249,9 +1555,6 @@ export const TripTask = {
|
|
|
2249
1555
|
if (message.trip !== undefined) {
|
|
2250
1556
|
Trip.encode(message.trip, writer.uint32(18).fork()).join();
|
|
2251
1557
|
}
|
|
2252
|
-
if (message.monthly !== undefined) {
|
|
2253
|
-
Monthly.encode(message.monthly, writer.uint32(26).fork()).join();
|
|
2254
|
-
}
|
|
2255
1558
|
if (message.fusion !== undefined) {
|
|
2256
1559
|
FusionTrip.encode(message.fusion, writer.uint32(42).fork()).join();
|
|
2257
1560
|
}
|
|
@@ -2281,13 +1584,6 @@ export const TripTask = {
|
|
|
2281
1584
|
message.trip = Trip.decode(reader, reader.uint32());
|
|
2282
1585
|
continue;
|
|
2283
1586
|
}
|
|
2284
|
-
case 3: {
|
|
2285
|
-
if (tag !== 26) {
|
|
2286
|
-
break;
|
|
2287
|
-
}
|
|
2288
|
-
message.monthly = Monthly.decode(reader, reader.uint32());
|
|
2289
|
-
continue;
|
|
2290
|
-
}
|
|
2291
1587
|
case 5: {
|
|
2292
1588
|
if (tag !== 42) {
|
|
2293
1589
|
break;
|
|
@@ -2317,9 +1613,6 @@ export const TripTask = {
|
|
|
2317
1613
|
const message = createBaseTripTask();
|
|
2318
1614
|
message.eventType = object.eventType ?? 0;
|
|
2319
1615
|
message.trip = (object.trip !== undefined && object.trip !== null) ? Trip.fromPartial(object.trip) : undefined;
|
|
2320
|
-
message.monthly = (object.monthly !== undefined && object.monthly !== null)
|
|
2321
|
-
? Monthly.fromPartial(object.monthly)
|
|
2322
|
-
: undefined;
|
|
2323
1616
|
message.fusion = (object.fusion !== undefined && object.fusion !== null)
|
|
2324
1617
|
? FusionTrip.fromPartial(object.fusion)
|
|
2325
1618
|
: undefined;
|