@fatehan/tsrp 1.6.43 → 1.6.46
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/logs.d.ts +65 -0
- package/dist/fatehan/activities/logs.d.ts.map +1 -0
- package/dist/fatehan/activities/logs.js +471 -0
- package/dist/fatehan/activities/workshift.d.ts +1 -0
- package/dist/fatehan/activities/workshift.d.ts.map +1 -1
- package/dist/fatehan/activities/workshift.js +12 -0
- package/dist/fatehan/devices/maintenance.d.ts +1 -1
- package/dist/fatehan/devices/maintenance.d.ts.map +1 -1
- package/dist/fatehan/devices/maintenance.js +6 -4
- package/dist/fatehan/models/models.d.ts +5 -0
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +63 -0
- package/dist/fatehan/packets/dataModel.d.ts +16 -0
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +192 -0
- package/dist/fatehan/services/api.d.ts +2 -0
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +28 -0
- package/dist/fatehan/stream/stream.d.ts +1 -0
- package/dist/fatehan/stream/stream.d.ts.map +1 -1
- package/dist/fatehan/stream/stream.js +14 -1
- package/dist/fatehan/trips/trip.d.ts +21 -0
- package/dist/fatehan/trips/trip.d.ts.map +1 -1
- package/dist/fatehan/trips/trip.js +241 -0
- package/package.json +1 -1
|
@@ -412,6 +412,247 @@ export const Trip = {
|
|
|
412
412
|
return message;
|
|
413
413
|
},
|
|
414
414
|
};
|
|
415
|
+
function createBaseShiftSummary() {
|
|
416
|
+
return {
|
|
417
|
+
id: Long.UZERO,
|
|
418
|
+
shiftId: Long.UZERO,
|
|
419
|
+
deviceId: Long.UZERO,
|
|
420
|
+
mileage: 0,
|
|
421
|
+
idling: 0,
|
|
422
|
+
parking: 0,
|
|
423
|
+
moving: 0,
|
|
424
|
+
towing: 0,
|
|
425
|
+
totalSpeed: 0,
|
|
426
|
+
sumSpeed: 0,
|
|
427
|
+
maxSpeed: 0,
|
|
428
|
+
compact: undefined,
|
|
429
|
+
startedAt: undefined,
|
|
430
|
+
finishedAt: undefined,
|
|
431
|
+
createdAt: undefined,
|
|
432
|
+
updatedAt: undefined,
|
|
433
|
+
points: [],
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
export const ShiftSummary = {
|
|
437
|
+
encode(message, writer = new BinaryWriter()) {
|
|
438
|
+
if (!message.id.equals(Long.UZERO)) {
|
|
439
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
440
|
+
}
|
|
441
|
+
if (!message.shiftId.equals(Long.UZERO)) {
|
|
442
|
+
writer.uint32(16).uint64(message.shiftId.toString());
|
|
443
|
+
}
|
|
444
|
+
if (!message.deviceId.equals(Long.UZERO)) {
|
|
445
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
446
|
+
}
|
|
447
|
+
if (message.mileage !== 0) {
|
|
448
|
+
writer.uint32(32).uint32(message.mileage);
|
|
449
|
+
}
|
|
450
|
+
if (message.idling !== 0) {
|
|
451
|
+
writer.uint32(40).uint32(message.idling);
|
|
452
|
+
}
|
|
453
|
+
if (message.parking !== 0) {
|
|
454
|
+
writer.uint32(48).uint32(message.parking);
|
|
455
|
+
}
|
|
456
|
+
if (message.moving !== 0) {
|
|
457
|
+
writer.uint32(56).uint32(message.moving);
|
|
458
|
+
}
|
|
459
|
+
if (message.towing !== 0) {
|
|
460
|
+
writer.uint32(64).uint32(message.towing);
|
|
461
|
+
}
|
|
462
|
+
if (message.totalSpeed !== 0) {
|
|
463
|
+
writer.uint32(72).uint32(message.totalSpeed);
|
|
464
|
+
}
|
|
465
|
+
if (message.sumSpeed !== 0) {
|
|
466
|
+
writer.uint32(80).uint32(message.sumSpeed);
|
|
467
|
+
}
|
|
468
|
+
if (message.maxSpeed !== 0) {
|
|
469
|
+
writer.uint32(88).uint32(message.maxSpeed);
|
|
470
|
+
}
|
|
471
|
+
if (message.compact !== undefined) {
|
|
472
|
+
TripCompact.encode(message.compact, writer.uint32(98).fork()).join();
|
|
473
|
+
}
|
|
474
|
+
if (message.startedAt !== undefined) {
|
|
475
|
+
Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(106).fork()).join();
|
|
476
|
+
}
|
|
477
|
+
if (message.finishedAt !== undefined) {
|
|
478
|
+
Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(114).fork()).join();
|
|
479
|
+
}
|
|
480
|
+
if (message.createdAt !== undefined) {
|
|
481
|
+
Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(122).fork()).join();
|
|
482
|
+
}
|
|
483
|
+
if (message.updatedAt !== undefined) {
|
|
484
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(130).fork()).join();
|
|
485
|
+
}
|
|
486
|
+
for (const v of message.points) {
|
|
487
|
+
TripPoint.encode(v, writer.uint32(138).fork()).join();
|
|
488
|
+
}
|
|
489
|
+
return writer;
|
|
490
|
+
},
|
|
491
|
+
decode(input, length) {
|
|
492
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
493
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
494
|
+
const message = createBaseShiftSummary();
|
|
495
|
+
while (reader.pos < end) {
|
|
496
|
+
const tag = reader.uint32();
|
|
497
|
+
switch (tag >>> 3) {
|
|
498
|
+
case 1: {
|
|
499
|
+
if (tag !== 8) {
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
message.id = Long.fromString(reader.uint64().toString(), true);
|
|
503
|
+
continue;
|
|
504
|
+
}
|
|
505
|
+
case 2: {
|
|
506
|
+
if (tag !== 16) {
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
message.shiftId = Long.fromString(reader.uint64().toString(), true);
|
|
510
|
+
continue;
|
|
511
|
+
}
|
|
512
|
+
case 3: {
|
|
513
|
+
if (tag !== 24) {
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
message.deviceId = Long.fromString(reader.uint64().toString(), true);
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
519
|
+
case 4: {
|
|
520
|
+
if (tag !== 32) {
|
|
521
|
+
break;
|
|
522
|
+
}
|
|
523
|
+
message.mileage = reader.uint32();
|
|
524
|
+
continue;
|
|
525
|
+
}
|
|
526
|
+
case 5: {
|
|
527
|
+
if (tag !== 40) {
|
|
528
|
+
break;
|
|
529
|
+
}
|
|
530
|
+
message.idling = reader.uint32();
|
|
531
|
+
continue;
|
|
532
|
+
}
|
|
533
|
+
case 6: {
|
|
534
|
+
if (tag !== 48) {
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
message.parking = reader.uint32();
|
|
538
|
+
continue;
|
|
539
|
+
}
|
|
540
|
+
case 7: {
|
|
541
|
+
if (tag !== 56) {
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
message.moving = reader.uint32();
|
|
545
|
+
continue;
|
|
546
|
+
}
|
|
547
|
+
case 8: {
|
|
548
|
+
if (tag !== 64) {
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
message.towing = reader.uint32();
|
|
552
|
+
continue;
|
|
553
|
+
}
|
|
554
|
+
case 9: {
|
|
555
|
+
if (tag !== 72) {
|
|
556
|
+
break;
|
|
557
|
+
}
|
|
558
|
+
message.totalSpeed = reader.uint32();
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
case 10: {
|
|
562
|
+
if (tag !== 80) {
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
message.sumSpeed = reader.uint32();
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
568
|
+
case 11: {
|
|
569
|
+
if (tag !== 88) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
message.maxSpeed = reader.uint32();
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
case 12: {
|
|
576
|
+
if (tag !== 98) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
message.compact = TripCompact.decode(reader, reader.uint32());
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
case 13: {
|
|
583
|
+
if (tag !== 106) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
message.startedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
587
|
+
continue;
|
|
588
|
+
}
|
|
589
|
+
case 14: {
|
|
590
|
+
if (tag !== 114) {
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
message.finishedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
594
|
+
continue;
|
|
595
|
+
}
|
|
596
|
+
case 15: {
|
|
597
|
+
if (tag !== 122) {
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
601
|
+
continue;
|
|
602
|
+
}
|
|
603
|
+
case 16: {
|
|
604
|
+
if (tag !== 130) {
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
608
|
+
continue;
|
|
609
|
+
}
|
|
610
|
+
case 17: {
|
|
611
|
+
if (tag !== 138) {
|
|
612
|
+
break;
|
|
613
|
+
}
|
|
614
|
+
message.points.push(TripPoint.decode(reader, reader.uint32()));
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
reader.skip(tag & 7);
|
|
622
|
+
}
|
|
623
|
+
return message;
|
|
624
|
+
},
|
|
625
|
+
create(base) {
|
|
626
|
+
return ShiftSummary.fromPartial(base ?? {});
|
|
627
|
+
},
|
|
628
|
+
fromPartial(object) {
|
|
629
|
+
const message = createBaseShiftSummary();
|
|
630
|
+
message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
|
|
631
|
+
message.shiftId = (object.shiftId !== undefined && object.shiftId !== null)
|
|
632
|
+
? Long.fromValue(object.shiftId)
|
|
633
|
+
: Long.UZERO;
|
|
634
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
635
|
+
? Long.fromValue(object.deviceId)
|
|
636
|
+
: Long.UZERO;
|
|
637
|
+
message.mileage = object.mileage ?? 0;
|
|
638
|
+
message.idling = object.idling ?? 0;
|
|
639
|
+
message.parking = object.parking ?? 0;
|
|
640
|
+
message.moving = object.moving ?? 0;
|
|
641
|
+
message.towing = object.towing ?? 0;
|
|
642
|
+
message.totalSpeed = object.totalSpeed ?? 0;
|
|
643
|
+
message.sumSpeed = object.sumSpeed ?? 0;
|
|
644
|
+
message.maxSpeed = object.maxSpeed ?? 0;
|
|
645
|
+
message.compact = (object.compact !== undefined && object.compact !== null)
|
|
646
|
+
? TripCompact.fromPartial(object.compact)
|
|
647
|
+
: undefined;
|
|
648
|
+
message.startedAt = object.startedAt ?? undefined;
|
|
649
|
+
message.finishedAt = object.finishedAt ?? undefined;
|
|
650
|
+
message.createdAt = object.createdAt ?? undefined;
|
|
651
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
652
|
+
message.points = object.points?.map((e) => TripPoint.fromPartial(e)) || [];
|
|
653
|
+
return message;
|
|
654
|
+
},
|
|
655
|
+
};
|
|
415
656
|
function createBaseTripCompact() {
|
|
416
657
|
return {
|
|
417
658
|
cost: 0,
|