@fatehan/tsrp 1.1.9 → 1.1.11
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/api.d.ts.map +1 -1
- package/dist/api.js +4 -3
- package/dist/api.test.js +4 -1
- package/dist/fatehan/activities/workflow.d.ts +25 -4
- package/dist/fatehan/activities/workflow.d.ts.map +1 -1
- package/dist/fatehan/activities/workflow.js +387 -52
- package/dist/fatehan/apis/client.d.ts +34 -0
- package/dist/fatehan/apis/client.d.ts.map +1 -1
- package/dist/fatehan/apis/client.js +537 -1
- package/dist/fatehan/devices/devices.d.ts +1 -1
- package/dist/fatehan/devices/devices.d.ts.map +1 -1
- package/dist/fatehan/devices/devices.js +8 -8
- package/dist/fatehan/identities/identities.d.ts +689 -7
- package/dist/fatehan/identities/identities.d.ts.map +1 -1
- package/dist/fatehan/identities/identities.js +3876 -37
- package/dist/fatehan/models/fusion.d.ts +2 -1
- package/dist/fatehan/models/fusion.d.ts.map +1 -1
- package/dist/fatehan/models/fusion.js +30 -5
- package/dist/fatehan/packets/dataModel.d.ts +21 -1
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +328 -31
- package/dist/fatehan/services/api.d.ts +1 -0
- package/dist/fatehan/services/api.d.ts.map +1 -1
- package/dist/fatehan/services/api.js +17 -1
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +2 -2
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.NotificationTrigger = exports.DefaultReport = exports.DeviceModule = exports.AreaModule = exports.FlowModule = exports.FlowEvent = exports.Flow = exports.WorkflowTask = exports.Workflow = exports.NotificationTrigger_Via = exports.FlowEvent_TriggerEvent = exports.AreaEvent = exports.WorkflowStat = exports.protobufPackage = void 0;
|
|
11
|
+
exports.NotificationTrigger = exports.PayambarReport = exports.DefaultReport = exports.DeviceModule = exports.AreaModule = exports.FlowModule = exports.FlowEvent = exports.Flow = exports.WorkflowTask = exports.Workflow = exports.NotificationTrigger_Via = exports.FlowEvent_TriggerEvent = exports.AreaEvent = exports.WorkflowStat = exports.protobufPackage = void 0;
|
|
12
12
|
exports.workflowStatFromJSON = workflowStatFromJSON;
|
|
13
13
|
exports.workflowStatToJSON = workflowStatToJSON;
|
|
14
14
|
exports.areaEventFromJSON = areaEventFromJSON;
|
|
@@ -353,6 +353,7 @@ function createBaseWorkflowTask() {
|
|
|
353
353
|
id: long_1.default.UZERO,
|
|
354
354
|
organizationId: long_1.default.UZERO,
|
|
355
355
|
workflowId: long_1.default.UZERO,
|
|
356
|
+
workflowDetailId: long_1.default.UZERO,
|
|
356
357
|
deviceId: long_1.default.UZERO,
|
|
357
358
|
flow: undefined,
|
|
358
359
|
pointer: 0,
|
|
@@ -374,6 +375,9 @@ exports.WorkflowTask = {
|
|
|
374
375
|
if (!message.workflowId.equals(long_1.default.UZERO)) {
|
|
375
376
|
writer.uint32(24).uint64(message.workflowId.toString());
|
|
376
377
|
}
|
|
378
|
+
if (!message.workflowDetailId.equals(long_1.default.UZERO)) {
|
|
379
|
+
writer.uint32(96).uint64(message.workflowDetailId.toString());
|
|
380
|
+
}
|
|
377
381
|
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
378
382
|
writer.uint32(32).uint64(message.deviceId.toString());
|
|
379
383
|
}
|
|
@@ -428,6 +432,13 @@ exports.WorkflowTask = {
|
|
|
428
432
|
message.workflowId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
429
433
|
continue;
|
|
430
434
|
}
|
|
435
|
+
case 12: {
|
|
436
|
+
if (tag !== 96) {
|
|
437
|
+
break;
|
|
438
|
+
}
|
|
439
|
+
message.workflowDetailId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
431
442
|
case 4: {
|
|
432
443
|
if (tag !== 32) {
|
|
433
444
|
break;
|
|
@@ -497,6 +508,7 @@ exports.WorkflowTask = {
|
|
|
497
508
|
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
498
509
|
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
|
|
499
510
|
workflowId: isSet(object.workflow_id) ? long_1.default.fromValue(object.workflow_id) : long_1.default.UZERO,
|
|
511
|
+
workflowDetailId: isSet(object.workflow_detail_id) ? long_1.default.fromValue(object.workflow_detail_id) : long_1.default.UZERO,
|
|
500
512
|
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
501
513
|
flow: isSet(object.flow) ? exports.Flow.fromJSON(object.flow) : undefined,
|
|
502
514
|
pointer: isSet(object.pointer) ? globalThis.Number(object.pointer) : 0,
|
|
@@ -518,6 +530,9 @@ exports.WorkflowTask = {
|
|
|
518
530
|
if (!message.workflowId.equals(long_1.default.UZERO)) {
|
|
519
531
|
obj.workflow_id = (message.workflowId || long_1.default.UZERO).toString();
|
|
520
532
|
}
|
|
533
|
+
if (!message.workflowDetailId.equals(long_1.default.UZERO)) {
|
|
534
|
+
obj.workflow_detail_id = (message.workflowDetailId || long_1.default.UZERO).toString();
|
|
535
|
+
}
|
|
521
536
|
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
522
537
|
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
523
538
|
}
|
|
@@ -557,6 +572,9 @@ exports.WorkflowTask = {
|
|
|
557
572
|
message.workflowId = (object.workflowId !== undefined && object.workflowId !== null)
|
|
558
573
|
? long_1.default.fromValue(object.workflowId)
|
|
559
574
|
: long_1.default.UZERO;
|
|
575
|
+
message.workflowDetailId = (object.workflowDetailId !== undefined && object.workflowDetailId !== null)
|
|
576
|
+
? long_1.default.fromValue(object.workflowDetailId)
|
|
577
|
+
: long_1.default.UZERO;
|
|
560
578
|
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
561
579
|
? long_1.default.fromValue(object.deviceId)
|
|
562
580
|
: long_1.default.UZERO;
|
|
@@ -571,7 +589,7 @@ exports.WorkflowTask = {
|
|
|
571
589
|
},
|
|
572
590
|
};
|
|
573
591
|
function createBaseFlow() {
|
|
574
|
-
return { continuous: false, events: [], modules: [], defaultReport: undefined };
|
|
592
|
+
return { continuous: false, events: [], modules: [], defaultReport: undefined, payambarReport: undefined };
|
|
575
593
|
}
|
|
576
594
|
exports.Flow = {
|
|
577
595
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -587,6 +605,9 @@ exports.Flow = {
|
|
|
587
605
|
if (message.defaultReport !== undefined) {
|
|
588
606
|
exports.DefaultReport.encode(message.defaultReport, writer.uint32(34).fork()).join();
|
|
589
607
|
}
|
|
608
|
+
if (message.payambarReport !== undefined) {
|
|
609
|
+
exports.PayambarReport.encode(message.payambarReport, writer.uint32(42).fork()).join();
|
|
610
|
+
}
|
|
590
611
|
return writer;
|
|
591
612
|
},
|
|
592
613
|
decode(input, length) {
|
|
@@ -624,6 +645,13 @@ exports.Flow = {
|
|
|
624
645
|
message.defaultReport = exports.DefaultReport.decode(reader, reader.uint32());
|
|
625
646
|
continue;
|
|
626
647
|
}
|
|
648
|
+
case 5: {
|
|
649
|
+
if (tag !== 42) {
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
message.payambarReport = exports.PayambarReport.decode(reader, reader.uint32());
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
627
655
|
}
|
|
628
656
|
if ((tag & 7) === 4 || tag === 0) {
|
|
629
657
|
break;
|
|
@@ -638,6 +666,7 @@ exports.Flow = {
|
|
|
638
666
|
events: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.events) ? object.events.map((e) => exports.FlowEvent.fromJSON(e)) : [],
|
|
639
667
|
modules: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.modules) ? object.modules.map((e) => exports.FlowModule.fromJSON(e)) : [],
|
|
640
668
|
defaultReport: isSet(object.default_report) ? exports.DefaultReport.fromJSON(object.default_report) : undefined,
|
|
669
|
+
payambarReport: isSet(object.payambar_report) ? exports.PayambarReport.fromJSON(object.payambar_report) : undefined,
|
|
641
670
|
};
|
|
642
671
|
},
|
|
643
672
|
toJSON(message) {
|
|
@@ -655,6 +684,9 @@ exports.Flow = {
|
|
|
655
684
|
if (message.defaultReport !== undefined) {
|
|
656
685
|
obj.default_report = exports.DefaultReport.toJSON(message.defaultReport);
|
|
657
686
|
}
|
|
687
|
+
if (message.payambarReport !== undefined) {
|
|
688
|
+
obj.payambar_report = exports.PayambarReport.toJSON(message.payambarReport);
|
|
689
|
+
}
|
|
658
690
|
return obj;
|
|
659
691
|
},
|
|
660
692
|
create(base) {
|
|
@@ -669,6 +701,9 @@ exports.Flow = {
|
|
|
669
701
|
message.defaultReport = (object.defaultReport !== undefined && object.defaultReport !== null)
|
|
670
702
|
? exports.DefaultReport.fromPartial(object.defaultReport)
|
|
671
703
|
: undefined;
|
|
704
|
+
message.payambarReport = (object.payambarReport !== undefined && object.payambarReport !== null)
|
|
705
|
+
? exports.PayambarReport.fromPartial(object.payambarReport)
|
|
706
|
+
: undefined;
|
|
672
707
|
return message;
|
|
673
708
|
},
|
|
674
709
|
};
|
|
@@ -840,12 +875,19 @@ function createBaseAreaModule() {
|
|
|
840
875
|
running: false,
|
|
841
876
|
startedAt: undefined,
|
|
842
877
|
finishedAt: undefined,
|
|
843
|
-
|
|
844
|
-
|
|
878
|
+
lastGpsTime: undefined,
|
|
879
|
+
totalMileageAtStart: undefined,
|
|
880
|
+
totalMileageAtFinish: undefined,
|
|
881
|
+
fuelConsumedAtStart: undefined,
|
|
882
|
+
fuelConsumedAtFinish: undefined,
|
|
845
883
|
maxSpeed: 0,
|
|
846
884
|
totalSpeed: 0,
|
|
847
885
|
countSpeed: 0,
|
|
848
886
|
duration: 0,
|
|
887
|
+
movingDuration: 0,
|
|
888
|
+
idlingDuration: 0,
|
|
889
|
+
parkingDuration: 0,
|
|
890
|
+
towingDuration: 0,
|
|
849
891
|
minimumAcceptedDuration: undefined,
|
|
850
892
|
};
|
|
851
893
|
}
|
|
@@ -869,11 +911,20 @@ exports.AreaModule = {
|
|
|
869
911
|
if (message.finishedAt !== undefined) {
|
|
870
912
|
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(50).fork()).join();
|
|
871
913
|
}
|
|
872
|
-
if (message.
|
|
873
|
-
writer.uint32(
|
|
914
|
+
if (message.lastGpsTime !== undefined) {
|
|
915
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.lastGpsTime), writer.uint32(170).fork()).join();
|
|
916
|
+
}
|
|
917
|
+
if (message.totalMileageAtStart !== undefined) {
|
|
918
|
+
writer.uint32(56).uint64(message.totalMileageAtStart.toString());
|
|
874
919
|
}
|
|
875
|
-
if (message.
|
|
876
|
-
writer.uint32(64).uint64(message.
|
|
920
|
+
if (message.totalMileageAtFinish !== undefined) {
|
|
921
|
+
writer.uint32(64).uint64(message.totalMileageAtFinish.toString());
|
|
922
|
+
}
|
|
923
|
+
if (message.fuelConsumedAtStart !== undefined) {
|
|
924
|
+
writer.uint32(120).uint32(message.fuelConsumedAtStart);
|
|
925
|
+
}
|
|
926
|
+
if (message.fuelConsumedAtFinish !== undefined) {
|
|
927
|
+
writer.uint32(128).uint32(message.fuelConsumedAtFinish);
|
|
877
928
|
}
|
|
878
929
|
if (message.maxSpeed !== 0) {
|
|
879
930
|
writer.uint32(72).uint32(message.maxSpeed);
|
|
@@ -887,6 +938,18 @@ exports.AreaModule = {
|
|
|
887
938
|
if (message.duration !== 0) {
|
|
888
939
|
writer.uint32(96).uint32(message.duration);
|
|
889
940
|
}
|
|
941
|
+
if (message.movingDuration !== 0) {
|
|
942
|
+
writer.uint32(152).uint32(message.movingDuration);
|
|
943
|
+
}
|
|
944
|
+
if (message.idlingDuration !== 0) {
|
|
945
|
+
writer.uint32(160).uint32(message.idlingDuration);
|
|
946
|
+
}
|
|
947
|
+
if (message.parkingDuration !== 0) {
|
|
948
|
+
writer.uint32(136).uint32(message.parkingDuration);
|
|
949
|
+
}
|
|
950
|
+
if (message.towingDuration !== 0) {
|
|
951
|
+
writer.uint32(144).uint32(message.towingDuration);
|
|
952
|
+
}
|
|
890
953
|
if (message.minimumAcceptedDuration !== undefined) {
|
|
891
954
|
writer.uint32(104).uint32(message.minimumAcceptedDuration);
|
|
892
955
|
}
|
|
@@ -941,18 +1004,39 @@ exports.AreaModule = {
|
|
|
941
1004
|
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
942
1005
|
continue;
|
|
943
1006
|
}
|
|
1007
|
+
case 21: {
|
|
1008
|
+
if (tag !== 170) {
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
message.lastGpsTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1012
|
+
continue;
|
|
1013
|
+
}
|
|
944
1014
|
case 7: {
|
|
945
1015
|
if (tag !== 56) {
|
|
946
1016
|
break;
|
|
947
1017
|
}
|
|
948
|
-
message.
|
|
1018
|
+
message.totalMileageAtStart = long_1.default.fromString(reader.uint64().toString(), true);
|
|
949
1019
|
continue;
|
|
950
1020
|
}
|
|
951
1021
|
case 8: {
|
|
952
1022
|
if (tag !== 64) {
|
|
953
1023
|
break;
|
|
954
1024
|
}
|
|
955
|
-
message.
|
|
1025
|
+
message.totalMileageAtFinish = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1026
|
+
continue;
|
|
1027
|
+
}
|
|
1028
|
+
case 15: {
|
|
1029
|
+
if (tag !== 120) {
|
|
1030
|
+
break;
|
|
1031
|
+
}
|
|
1032
|
+
message.fuelConsumedAtStart = reader.uint32();
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
case 16: {
|
|
1036
|
+
if (tag !== 128) {
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
message.fuelConsumedAtFinish = reader.uint32();
|
|
956
1040
|
continue;
|
|
957
1041
|
}
|
|
958
1042
|
case 9: {
|
|
@@ -983,6 +1067,34 @@ exports.AreaModule = {
|
|
|
983
1067
|
message.duration = reader.uint32();
|
|
984
1068
|
continue;
|
|
985
1069
|
}
|
|
1070
|
+
case 19: {
|
|
1071
|
+
if (tag !== 152) {
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
message.movingDuration = reader.uint32();
|
|
1075
|
+
continue;
|
|
1076
|
+
}
|
|
1077
|
+
case 20: {
|
|
1078
|
+
if (tag !== 160) {
|
|
1079
|
+
break;
|
|
1080
|
+
}
|
|
1081
|
+
message.idlingDuration = reader.uint32();
|
|
1082
|
+
continue;
|
|
1083
|
+
}
|
|
1084
|
+
case 17: {
|
|
1085
|
+
if (tag !== 136) {
|
|
1086
|
+
break;
|
|
1087
|
+
}
|
|
1088
|
+
message.parkingDuration = reader.uint32();
|
|
1089
|
+
continue;
|
|
1090
|
+
}
|
|
1091
|
+
case 18: {
|
|
1092
|
+
if (tag !== 144) {
|
|
1093
|
+
break;
|
|
1094
|
+
}
|
|
1095
|
+
message.towingDuration = reader.uint32();
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
986
1098
|
case 13: {
|
|
987
1099
|
if (tag !== 104) {
|
|
988
1100
|
break;
|
|
@@ -1006,16 +1118,27 @@ exports.AreaModule = {
|
|
|
1006
1118
|
running: isSet(object.running) ? globalThis.Boolean(object.running) : false,
|
|
1007
1119
|
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1008
1120
|
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1009
|
-
|
|
1010
|
-
|
|
1121
|
+
lastGpsTime: isSet(object.last_gps_time) ? fromJsonTimestamp(object.last_gps_time) : undefined,
|
|
1122
|
+
totalMileageAtStart: isSet(object.total_mileage_at_start)
|
|
1123
|
+
? long_1.default.fromValue(object.total_mileage_at_start)
|
|
1124
|
+
: undefined,
|
|
1125
|
+
totalMileageAtFinish: isSet(object.total_mileage_at_finish)
|
|
1126
|
+
? long_1.default.fromValue(object.total_mileage_at_finish)
|
|
1127
|
+
: undefined,
|
|
1128
|
+
fuelConsumedAtStart: isSet(object.fuel_consumed_at_start)
|
|
1129
|
+
? globalThis.Number(object.fuel_consumed_at_start)
|
|
1011
1130
|
: undefined,
|
|
1012
|
-
|
|
1013
|
-
?
|
|
1131
|
+
fuelConsumedAtFinish: isSet(object.fuel_consumed_at_finish)
|
|
1132
|
+
? globalThis.Number(object.fuel_consumed_at_finish)
|
|
1014
1133
|
: undefined,
|
|
1015
1134
|
maxSpeed: isSet(object.max_speed) ? globalThis.Number(object.max_speed) : 0,
|
|
1016
1135
|
totalSpeed: isSet(object.total_speed) ? globalThis.Number(object.total_speed) : 0,
|
|
1017
1136
|
countSpeed: isSet(object.count_speed) ? globalThis.Number(object.count_speed) : 0,
|
|
1018
1137
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
1138
|
+
movingDuration: isSet(object.moving_duration) ? globalThis.Number(object.moving_duration) : 0,
|
|
1139
|
+
idlingDuration: isSet(object.idling_duration) ? globalThis.Number(object.idling_duration) : 0,
|
|
1140
|
+
parkingDuration: isSet(object.parking_duration) ? globalThis.Number(object.parking_duration) : 0,
|
|
1141
|
+
towingDuration: isSet(object.towing_duration) ? globalThis.Number(object.towing_duration) : 0,
|
|
1019
1142
|
minimumAcceptedDuration: isSet(object.minimum_accepted_duration)
|
|
1020
1143
|
? globalThis.Number(object.minimum_accepted_duration)
|
|
1021
1144
|
: undefined,
|
|
@@ -1041,11 +1164,20 @@ exports.AreaModule = {
|
|
|
1041
1164
|
if (message.finishedAt !== undefined) {
|
|
1042
1165
|
obj.finished_at = message.finishedAt.toISOString();
|
|
1043
1166
|
}
|
|
1044
|
-
if (message.
|
|
1045
|
-
obj.
|
|
1167
|
+
if (message.lastGpsTime !== undefined) {
|
|
1168
|
+
obj.last_gps_time = message.lastGpsTime.toISOString();
|
|
1046
1169
|
}
|
|
1047
|
-
if (message.
|
|
1048
|
-
obj.
|
|
1170
|
+
if (message.totalMileageAtStart !== undefined) {
|
|
1171
|
+
obj.total_mileage_at_start = (message.totalMileageAtStart || long_1.default.UZERO).toString();
|
|
1172
|
+
}
|
|
1173
|
+
if (message.totalMileageAtFinish !== undefined) {
|
|
1174
|
+
obj.total_mileage_at_finish = (message.totalMileageAtFinish || long_1.default.UZERO).toString();
|
|
1175
|
+
}
|
|
1176
|
+
if (message.fuelConsumedAtStart !== undefined) {
|
|
1177
|
+
obj.fuel_consumed_at_start = Math.round(message.fuelConsumedAtStart);
|
|
1178
|
+
}
|
|
1179
|
+
if (message.fuelConsumedAtFinish !== undefined) {
|
|
1180
|
+
obj.fuel_consumed_at_finish = Math.round(message.fuelConsumedAtFinish);
|
|
1049
1181
|
}
|
|
1050
1182
|
if (message.maxSpeed !== 0) {
|
|
1051
1183
|
obj.max_speed = Math.round(message.maxSpeed);
|
|
@@ -1059,6 +1191,18 @@ exports.AreaModule = {
|
|
|
1059
1191
|
if (message.duration !== 0) {
|
|
1060
1192
|
obj.duration = Math.round(message.duration);
|
|
1061
1193
|
}
|
|
1194
|
+
if (message.movingDuration !== 0) {
|
|
1195
|
+
obj.moving_duration = Math.round(message.movingDuration);
|
|
1196
|
+
}
|
|
1197
|
+
if (message.idlingDuration !== 0) {
|
|
1198
|
+
obj.idling_duration = Math.round(message.idlingDuration);
|
|
1199
|
+
}
|
|
1200
|
+
if (message.parkingDuration !== 0) {
|
|
1201
|
+
obj.parking_duration = Math.round(message.parkingDuration);
|
|
1202
|
+
}
|
|
1203
|
+
if (message.towingDuration !== 0) {
|
|
1204
|
+
obj.towing_duration = Math.round(message.towingDuration);
|
|
1205
|
+
}
|
|
1062
1206
|
if (message.minimumAcceptedDuration !== undefined) {
|
|
1063
1207
|
obj.minimum_accepted_duration = Math.round(message.minimumAcceptedDuration);
|
|
1064
1208
|
}
|
|
@@ -1068,7 +1212,7 @@ exports.AreaModule = {
|
|
|
1068
1212
|
return exports.AreaModule.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1069
1213
|
},
|
|
1070
1214
|
fromPartial(object) {
|
|
1071
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1215
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
1072
1216
|
const message = createBaseAreaModule();
|
|
1073
1217
|
message.starts = (_a = object.starts) !== null && _a !== void 0 ? _a : 0;
|
|
1074
1218
|
message.finishes = (_b = object.finishes) !== null && _b !== void 0 ? _b : 0;
|
|
@@ -1078,17 +1222,24 @@ exports.AreaModule = {
|
|
|
1078
1222
|
message.running = (_c = object.running) !== null && _c !== void 0 ? _c : false;
|
|
1079
1223
|
message.startedAt = (_d = object.startedAt) !== null && _d !== void 0 ? _d : undefined;
|
|
1080
1224
|
message.finishedAt = (_e = object.finishedAt) !== null && _e !== void 0 ? _e : undefined;
|
|
1081
|
-
message.
|
|
1082
|
-
|
|
1225
|
+
message.lastGpsTime = (_f = object.lastGpsTime) !== null && _f !== void 0 ? _f : undefined;
|
|
1226
|
+
message.totalMileageAtStart = (object.totalMileageAtStart !== undefined && object.totalMileageAtStart !== null)
|
|
1227
|
+
? long_1.default.fromValue(object.totalMileageAtStart)
|
|
1083
1228
|
: undefined;
|
|
1084
|
-
message.
|
|
1085
|
-
? long_1.default.fromValue(object.
|
|
1229
|
+
message.totalMileageAtFinish = (object.totalMileageAtFinish !== undefined && object.totalMileageAtFinish !== null)
|
|
1230
|
+
? long_1.default.fromValue(object.totalMileageAtFinish)
|
|
1086
1231
|
: undefined;
|
|
1087
|
-
message.
|
|
1088
|
-
message.
|
|
1089
|
-
message.
|
|
1090
|
-
message.
|
|
1091
|
-
message.
|
|
1232
|
+
message.fuelConsumedAtStart = (_g = object.fuelConsumedAtStart) !== null && _g !== void 0 ? _g : undefined;
|
|
1233
|
+
message.fuelConsumedAtFinish = (_h = object.fuelConsumedAtFinish) !== null && _h !== void 0 ? _h : undefined;
|
|
1234
|
+
message.maxSpeed = (_j = object.maxSpeed) !== null && _j !== void 0 ? _j : 0;
|
|
1235
|
+
message.totalSpeed = (_k = object.totalSpeed) !== null && _k !== void 0 ? _k : 0;
|
|
1236
|
+
message.countSpeed = (_l = object.countSpeed) !== null && _l !== void 0 ? _l : 0;
|
|
1237
|
+
message.duration = (_m = object.duration) !== null && _m !== void 0 ? _m : 0;
|
|
1238
|
+
message.movingDuration = (_o = object.movingDuration) !== null && _o !== void 0 ? _o : 0;
|
|
1239
|
+
message.idlingDuration = (_p = object.idlingDuration) !== null && _p !== void 0 ? _p : 0;
|
|
1240
|
+
message.parkingDuration = (_q = object.parkingDuration) !== null && _q !== void 0 ? _q : 0;
|
|
1241
|
+
message.towingDuration = (_r = object.towingDuration) !== null && _r !== void 0 ? _r : 0;
|
|
1242
|
+
message.minimumAcceptedDuration = (_s = object.minimumAcceptedDuration) !== null && _s !== void 0 ? _s : undefined;
|
|
1092
1243
|
return message;
|
|
1093
1244
|
},
|
|
1094
1245
|
};
|
|
@@ -1101,8 +1252,8 @@ function createBaseDeviceModule() {
|
|
|
1101
1252
|
running: false,
|
|
1102
1253
|
startedAt: undefined,
|
|
1103
1254
|
finishedAt: undefined,
|
|
1104
|
-
|
|
1105
|
-
|
|
1255
|
+
totalMileageAtStart: undefined,
|
|
1256
|
+
totalMileageAtFinish: undefined,
|
|
1106
1257
|
maxSpeed: 0,
|
|
1107
1258
|
totalSpeed: 0,
|
|
1108
1259
|
countSpeed: 0,
|
|
@@ -1133,11 +1284,11 @@ exports.DeviceModule = {
|
|
|
1133
1284
|
if (message.finishedAt !== undefined) {
|
|
1134
1285
|
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(50).fork()).join();
|
|
1135
1286
|
}
|
|
1136
|
-
if (message.
|
|
1137
|
-
writer.uint32(56).uint64(message.
|
|
1287
|
+
if (message.totalMileageAtStart !== undefined) {
|
|
1288
|
+
writer.uint32(56).uint64(message.totalMileageAtStart.toString());
|
|
1138
1289
|
}
|
|
1139
|
-
if (message.
|
|
1140
|
-
writer.uint32(64).uint64(message.
|
|
1290
|
+
if (message.totalMileageAtFinish !== undefined) {
|
|
1291
|
+
writer.uint32(64).uint64(message.totalMileageAtFinish.toString());
|
|
1141
1292
|
}
|
|
1142
1293
|
if (message.maxSpeed !== 0) {
|
|
1143
1294
|
writer.uint32(72).uint32(message.maxSpeed);
|
|
@@ -1216,14 +1367,14 @@ exports.DeviceModule = {
|
|
|
1216
1367
|
if (tag !== 56) {
|
|
1217
1368
|
break;
|
|
1218
1369
|
}
|
|
1219
|
-
message.
|
|
1370
|
+
message.totalMileageAtStart = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1220
1371
|
continue;
|
|
1221
1372
|
}
|
|
1222
1373
|
case 8: {
|
|
1223
1374
|
if (tag !== 64) {
|
|
1224
1375
|
break;
|
|
1225
1376
|
}
|
|
1226
|
-
message.
|
|
1377
|
+
message.totalMileageAtFinish = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1227
1378
|
continue;
|
|
1228
1379
|
}
|
|
1229
1380
|
case 9: {
|
|
@@ -1278,11 +1429,11 @@ exports.DeviceModule = {
|
|
|
1278
1429
|
running: isSet(object.running) ? globalThis.Boolean(object.running) : false,
|
|
1279
1430
|
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1280
1431
|
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1281
|
-
|
|
1282
|
-
? long_1.default.fromValue(object.
|
|
1432
|
+
totalMileageAtStart: isSet(object.total_mileage_at_start)
|
|
1433
|
+
? long_1.default.fromValue(object.total_mileage_at_start)
|
|
1283
1434
|
: undefined,
|
|
1284
|
-
|
|
1285
|
-
? long_1.default.fromValue(object.
|
|
1435
|
+
totalMileageAtFinish: isSet(object.total_mileage_at_finish)
|
|
1436
|
+
? long_1.default.fromValue(object.total_mileage_at_finish)
|
|
1286
1437
|
: undefined,
|
|
1287
1438
|
maxSpeed: isSet(object.max_speed) ? globalThis.Number(object.max_speed) : 0,
|
|
1288
1439
|
totalSpeed: isSet(object.total_speed) ? globalThis.Number(object.total_speed) : 0,
|
|
@@ -1316,11 +1467,11 @@ exports.DeviceModule = {
|
|
|
1316
1467
|
if (message.finishedAt !== undefined) {
|
|
1317
1468
|
obj.finished_at = message.finishedAt.toISOString();
|
|
1318
1469
|
}
|
|
1319
|
-
if (message.
|
|
1320
|
-
obj.
|
|
1470
|
+
if (message.totalMileageAtStart !== undefined) {
|
|
1471
|
+
obj.total_mileage_at_start = (message.totalMileageAtStart || long_1.default.UZERO).toString();
|
|
1321
1472
|
}
|
|
1322
|
-
if (message.
|
|
1323
|
-
obj.
|
|
1473
|
+
if (message.totalMileageAtFinish !== undefined) {
|
|
1474
|
+
obj.total_mileage_at_finish = (message.totalMileageAtFinish || long_1.default.UZERO).toString();
|
|
1324
1475
|
}
|
|
1325
1476
|
if (message.maxSpeed !== 0) {
|
|
1326
1477
|
obj.max_speed = Math.round(message.maxSpeed);
|
|
@@ -1354,11 +1505,11 @@ exports.DeviceModule = {
|
|
|
1354
1505
|
message.running = (_d = object.running) !== null && _d !== void 0 ? _d : false;
|
|
1355
1506
|
message.startedAt = (_e = object.startedAt) !== null && _e !== void 0 ? _e : undefined;
|
|
1356
1507
|
message.finishedAt = (_f = object.finishedAt) !== null && _f !== void 0 ? _f : undefined;
|
|
1357
|
-
message.
|
|
1358
|
-
? long_1.default.fromValue(object.
|
|
1508
|
+
message.totalMileageAtStart = (object.totalMileageAtStart !== undefined && object.totalMileageAtStart !== null)
|
|
1509
|
+
? long_1.default.fromValue(object.totalMileageAtStart)
|
|
1359
1510
|
: undefined;
|
|
1360
|
-
message.
|
|
1361
|
-
? long_1.default.fromValue(object.
|
|
1511
|
+
message.totalMileageAtFinish = (object.totalMileageAtFinish !== undefined && object.totalMileageAtFinish !== null)
|
|
1512
|
+
? long_1.default.fromValue(object.totalMileageAtFinish)
|
|
1362
1513
|
: undefined;
|
|
1363
1514
|
message.maxSpeed = (_g = object.maxSpeed) !== null && _g !== void 0 ? _g : 0;
|
|
1364
1515
|
message.totalSpeed = (_h = object.totalSpeed) !== null && _h !== void 0 ? _h : 0;
|
|
@@ -1434,8 +1585,8 @@ exports.DefaultReport = {
|
|
|
1434
1585
|
return {
|
|
1435
1586
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
1436
1587
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
1437
|
-
startedAt: isSet(object.
|
|
1438
|
-
finishedAt: isSet(object.
|
|
1588
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1589
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1439
1590
|
};
|
|
1440
1591
|
},
|
|
1441
1592
|
toJSON(message) {
|
|
@@ -1447,10 +1598,10 @@ exports.DefaultReport = {
|
|
|
1447
1598
|
obj.mileage = Math.round(message.mileage);
|
|
1448
1599
|
}
|
|
1449
1600
|
if (message.startedAt !== undefined) {
|
|
1450
|
-
obj.
|
|
1601
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1451
1602
|
}
|
|
1452
1603
|
if (message.finishedAt !== undefined) {
|
|
1453
|
-
obj.
|
|
1604
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1454
1605
|
}
|
|
1455
1606
|
return obj;
|
|
1456
1607
|
},
|
|
@@ -1467,6 +1618,190 @@ exports.DefaultReport = {
|
|
|
1467
1618
|
return message;
|
|
1468
1619
|
},
|
|
1469
1620
|
};
|
|
1621
|
+
function createBasePayambarReport() {
|
|
1622
|
+
return {
|
|
1623
|
+
startedAt: undefined,
|
|
1624
|
+
finishedAt: undefined,
|
|
1625
|
+
mileage: 0,
|
|
1626
|
+
duration: 0,
|
|
1627
|
+
movingDuration: 0,
|
|
1628
|
+
idlingDuration: 0,
|
|
1629
|
+
parkingDuration: 0,
|
|
1630
|
+
towingDuration: 0,
|
|
1631
|
+
fuelUsage: 0,
|
|
1632
|
+
};
|
|
1633
|
+
}
|
|
1634
|
+
exports.PayambarReport = {
|
|
1635
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1636
|
+
if (message.startedAt !== undefined) {
|
|
1637
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(10).fork()).join();
|
|
1638
|
+
}
|
|
1639
|
+
if (message.finishedAt !== undefined) {
|
|
1640
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(18).fork()).join();
|
|
1641
|
+
}
|
|
1642
|
+
if (message.mileage !== 0) {
|
|
1643
|
+
writer.uint32(24).uint32(message.mileage);
|
|
1644
|
+
}
|
|
1645
|
+
if (message.duration !== 0) {
|
|
1646
|
+
writer.uint32(64).uint32(message.duration);
|
|
1647
|
+
}
|
|
1648
|
+
if (message.movingDuration !== 0) {
|
|
1649
|
+
writer.uint32(32).uint32(message.movingDuration);
|
|
1650
|
+
}
|
|
1651
|
+
if (message.idlingDuration !== 0) {
|
|
1652
|
+
writer.uint32(40).uint32(message.idlingDuration);
|
|
1653
|
+
}
|
|
1654
|
+
if (message.parkingDuration !== 0) {
|
|
1655
|
+
writer.uint32(48).uint32(message.parkingDuration);
|
|
1656
|
+
}
|
|
1657
|
+
if (message.towingDuration !== 0) {
|
|
1658
|
+
writer.uint32(72).uint32(message.towingDuration);
|
|
1659
|
+
}
|
|
1660
|
+
if (message.fuelUsage !== 0) {
|
|
1661
|
+
writer.uint32(56).uint32(message.fuelUsage);
|
|
1662
|
+
}
|
|
1663
|
+
return writer;
|
|
1664
|
+
},
|
|
1665
|
+
decode(input, length) {
|
|
1666
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1667
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1668
|
+
const message = createBasePayambarReport();
|
|
1669
|
+
while (reader.pos < end) {
|
|
1670
|
+
const tag = reader.uint32();
|
|
1671
|
+
switch (tag >>> 3) {
|
|
1672
|
+
case 1: {
|
|
1673
|
+
if (tag !== 10) {
|
|
1674
|
+
break;
|
|
1675
|
+
}
|
|
1676
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1677
|
+
continue;
|
|
1678
|
+
}
|
|
1679
|
+
case 2: {
|
|
1680
|
+
if (tag !== 18) {
|
|
1681
|
+
break;
|
|
1682
|
+
}
|
|
1683
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1684
|
+
continue;
|
|
1685
|
+
}
|
|
1686
|
+
case 3: {
|
|
1687
|
+
if (tag !== 24) {
|
|
1688
|
+
break;
|
|
1689
|
+
}
|
|
1690
|
+
message.mileage = reader.uint32();
|
|
1691
|
+
continue;
|
|
1692
|
+
}
|
|
1693
|
+
case 8: {
|
|
1694
|
+
if (tag !== 64) {
|
|
1695
|
+
break;
|
|
1696
|
+
}
|
|
1697
|
+
message.duration = reader.uint32();
|
|
1698
|
+
continue;
|
|
1699
|
+
}
|
|
1700
|
+
case 4: {
|
|
1701
|
+
if (tag !== 32) {
|
|
1702
|
+
break;
|
|
1703
|
+
}
|
|
1704
|
+
message.movingDuration = reader.uint32();
|
|
1705
|
+
continue;
|
|
1706
|
+
}
|
|
1707
|
+
case 5: {
|
|
1708
|
+
if (tag !== 40) {
|
|
1709
|
+
break;
|
|
1710
|
+
}
|
|
1711
|
+
message.idlingDuration = reader.uint32();
|
|
1712
|
+
continue;
|
|
1713
|
+
}
|
|
1714
|
+
case 6: {
|
|
1715
|
+
if (tag !== 48) {
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
message.parkingDuration = reader.uint32();
|
|
1719
|
+
continue;
|
|
1720
|
+
}
|
|
1721
|
+
case 9: {
|
|
1722
|
+
if (tag !== 72) {
|
|
1723
|
+
break;
|
|
1724
|
+
}
|
|
1725
|
+
message.towingDuration = reader.uint32();
|
|
1726
|
+
continue;
|
|
1727
|
+
}
|
|
1728
|
+
case 7: {
|
|
1729
|
+
if (tag !== 56) {
|
|
1730
|
+
break;
|
|
1731
|
+
}
|
|
1732
|
+
message.fuelUsage = reader.uint32();
|
|
1733
|
+
continue;
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1737
|
+
break;
|
|
1738
|
+
}
|
|
1739
|
+
reader.skip(tag & 7);
|
|
1740
|
+
}
|
|
1741
|
+
return message;
|
|
1742
|
+
},
|
|
1743
|
+
fromJSON(object) {
|
|
1744
|
+
return {
|
|
1745
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1746
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1747
|
+
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
1748
|
+
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
1749
|
+
movingDuration: isSet(object.moving_duration) ? globalThis.Number(object.moving_duration) : 0,
|
|
1750
|
+
idlingDuration: isSet(object.idling_duration) ? globalThis.Number(object.idling_duration) : 0,
|
|
1751
|
+
parkingDuration: isSet(object.parking_duration) ? globalThis.Number(object.parking_duration) : 0,
|
|
1752
|
+
towingDuration: isSet(object.towing_duration) ? globalThis.Number(object.towing_duration) : 0,
|
|
1753
|
+
fuelUsage: isSet(object.fuel_usage) ? globalThis.Number(object.fuel_usage) : 0,
|
|
1754
|
+
};
|
|
1755
|
+
},
|
|
1756
|
+
toJSON(message) {
|
|
1757
|
+
const obj = {};
|
|
1758
|
+
if (message.startedAt !== undefined) {
|
|
1759
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1760
|
+
}
|
|
1761
|
+
if (message.finishedAt !== undefined) {
|
|
1762
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1763
|
+
}
|
|
1764
|
+
if (message.mileage !== 0) {
|
|
1765
|
+
obj.mileage = Math.round(message.mileage);
|
|
1766
|
+
}
|
|
1767
|
+
if (message.duration !== 0) {
|
|
1768
|
+
obj.duration = Math.round(message.duration);
|
|
1769
|
+
}
|
|
1770
|
+
if (message.movingDuration !== 0) {
|
|
1771
|
+
obj.moving_duration = Math.round(message.movingDuration);
|
|
1772
|
+
}
|
|
1773
|
+
if (message.idlingDuration !== 0) {
|
|
1774
|
+
obj.idling_duration = Math.round(message.idlingDuration);
|
|
1775
|
+
}
|
|
1776
|
+
if (message.parkingDuration !== 0) {
|
|
1777
|
+
obj.parking_duration = Math.round(message.parkingDuration);
|
|
1778
|
+
}
|
|
1779
|
+
if (message.towingDuration !== 0) {
|
|
1780
|
+
obj.towing_duration = Math.round(message.towingDuration);
|
|
1781
|
+
}
|
|
1782
|
+
if (message.fuelUsage !== 0) {
|
|
1783
|
+
obj.fuel_usage = Math.round(message.fuelUsage);
|
|
1784
|
+
}
|
|
1785
|
+
return obj;
|
|
1786
|
+
},
|
|
1787
|
+
create(base) {
|
|
1788
|
+
return exports.PayambarReport.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1789
|
+
},
|
|
1790
|
+
fromPartial(object) {
|
|
1791
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1792
|
+
const message = createBasePayambarReport();
|
|
1793
|
+
message.startedAt = (_a = object.startedAt) !== null && _a !== void 0 ? _a : undefined;
|
|
1794
|
+
message.finishedAt = (_b = object.finishedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
1795
|
+
message.mileage = (_c = object.mileage) !== null && _c !== void 0 ? _c : 0;
|
|
1796
|
+
message.duration = (_d = object.duration) !== null && _d !== void 0 ? _d : 0;
|
|
1797
|
+
message.movingDuration = (_e = object.movingDuration) !== null && _e !== void 0 ? _e : 0;
|
|
1798
|
+
message.idlingDuration = (_f = object.idlingDuration) !== null && _f !== void 0 ? _f : 0;
|
|
1799
|
+
message.parkingDuration = (_g = object.parkingDuration) !== null && _g !== void 0 ? _g : 0;
|
|
1800
|
+
message.towingDuration = (_h = object.towingDuration) !== null && _h !== void 0 ? _h : 0;
|
|
1801
|
+
message.fuelUsage = (_j = object.fuelUsage) !== null && _j !== void 0 ? _j : 0;
|
|
1802
|
+
return message;
|
|
1803
|
+
},
|
|
1804
|
+
};
|
|
1470
1805
|
function createBaseNotificationTrigger() {
|
|
1471
1806
|
return { userId: long_1.default.UZERO, title: "", body: undefined };
|
|
1472
1807
|
}
|