@fatehan/tsrp 1.0.4 → 1.0.6
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/areas/area.d.ts +33 -7
- package/dist/fatehan/areas/area.d.ts.map +1 -1
- package/dist/fatehan/areas/area.js +444 -35
- package/dist/fatehan/models/fusion.d.ts +14 -1
- package/dist/fatehan/models/fusion.d.ts.map +1 -1
- package/dist/fatehan/models/fusion.js +186 -2
- package/dist/fatehan/models/models.d.ts +2 -1
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +18 -2
- package/dist/fatehan/models/operation.d.ts +1 -1
- package/dist/fatehan/models/operation.d.ts.map +1 -1
- package/dist/fatehan/models/operation.js +1 -1
- package/dist/fatehan/notifies/notify.d.ts +1 -1
- package/dist/fatehan/notifies/notify.d.ts.map +1 -1
- package/dist/fatehan/notifies/notify.js +1 -1
- package/dist/fatehan/packets/dataModel.d.ts +77 -8
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +568 -42
- package/dist/fatehan/packets/messages.d.ts +1 -1
- package/dist/fatehan/packets/messages.d.ts.map +1 -1
- package/dist/fatehan/packets/messages.js +1 -1
- package/dist/fatehan/reports/report.d.ts +24 -7
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +408 -162
- package/dist/fatehan/trips/trip.d.ts +1 -1
- package/dist/fatehan/trips/trip.d.ts.map +1 -1
- package/dist/fatehan/trips/trip.js +87 -87
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.test.js +12 -1
- package/package.json +6 -3
- package/readme.md +29 -2
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: reports/report.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.TripsSummaryResponse = exports.TripsSummaryRequest = exports.TripsResponse = exports.TripsRequest = exports.AttendanceResponse_Attendance = exports.AttendanceResponse_Event = exports.AttendanceResponse = exports.AttendanceXRequest = exports.AttendanceRequest = exports.TrafficResponse_Traffic = exports.TrafficResponse = exports.TrafficRequest = exports.DeviceLogResponse_Log = exports.DeviceLogResponse = exports.DeviceLogRequest = exports.DeviceDataResponse = exports.DeviceDataRequest = exports.AreaReviewResponse_AreaReview = exports.AreaReviewResponse = exports.AreaReviewRequest = exports.RouteReviewResponse_Stop = exports.RouteReviewResponse = exports.RouteReviewRequest = exports.DailyTrafficRequest = exports.DailyTrafficResponse_DailyTraffic = exports.DailyTrafficResponse_Traffic = exports.DailyTrafficResponse = exports.DeviceDataCountResponse_DeviceDataCount = exports.DeviceDataCountResponse = exports.DeviceDataCountRequest = exports.ShiftSummaryRequest = exports.ShiftResponse_Shift = exports.ShiftResponse = exports.ShiftRequest = exports.ShiftSummaryResponse_Summary = exports.ShiftSummaryResponse = exports.AreaSummaryReviewResponse_AreasDetailEntry = exports.AreaSummaryReviewResponse_DevicesDetailEntry = exports.AreaSummaryReviewResponse_Detail = exports.AreaSummaryReviewResponse_Area = exports.AreaSummaryReviewResponse_Review = exports.AreaSummaryReviewResponse = exports.AreaSummaryReviewRequest = exports.TripReportResponse = exports.EnvironmentalRequest = exports.EnvironmentalResponse_EnvironmentalField = exports.EnvironmentalResponse = void 0;
|
|
8
|
+
exports.Traffix_Event = exports.Traffix = exports.TraffixResponse = exports.DashboardIndividualRequest = exports.DashboardIndividualResponse_SpeedsEntry = exports.DashboardIndividualResponse_GreenDrivingEntry = exports.DashboardIndividualResponse_Environmental_HumidityEntry = exports.DashboardIndividualResponse_Environmental_TemperatureEntry = exports.DashboardIndividualResponse_Environmental = exports.DashboardIndividualResponse = exports.LatestDataModelRequest = exports.TripPerformance_SpeedsEntry = exports.TripPerformance_CrashesEntry = exports.TripPerformance_HumidityEntry = exports.TripPerformance_TemperatureEntry = exports.TripPerformance_DrivingEntry = exports.TripPerformance_Average = exports.TripPerformance = exports.TripPerformanceResponse = exports.TripPerformanceRequest = exports.MaintenanceResponse_Device = exports.MaintenanceResponse_Service = exports.MaintenanceResponse_Group = exports.MaintenanceResponse_List = exports.MaintenanceResponse_Cost = exports.MaintenanceResponse = exports.MaintenanceRequest = exports.AreaSplitterResponse_Record = exports.AreaSplitterResponse_Area = exports.AreaSplitterResponse = exports.AreaSplitterRequest = exports.TripReportRequest = exports.WorkCycleResponse = exports.WorkCycleRequest = exports.TripsSummaryRequest_GroupBy = exports.AttendanceResponse_EventType = exports.TrafficResponse_Traffic_EventType = exports.AreaReviewResponse_AreaReview_AreaEventType = exports.RouteReviewResponse_StopType = exports.RouteReviewRequest_StopType = exports.AreaSummaryReviewResponse_trafficType = exports.AreaSummaryReviewRequest_AreaSourceEnum = exports.AreaSummaryReviewRequest_ScopeEnum = exports.AreaSummaryReviewRequest_GroupEnum = exports.EnvironmentalRequest_EnvironmentalFieldEnum = exports.Traffix_Event_Type = exports.TripPerformanceRequest_GroupBy = exports.MaintenanceRequest_GroupBy = exports.Source = exports.protobufPackage = void 0;
|
|
9
|
+
exports.TripsSummaryResponse = exports.TripsSummaryRequest = exports.TripsResponse = exports.TripsRequest = exports.AttendanceResponse_Attendance = exports.AttendanceResponse_Event = exports.AttendanceResponse = exports.AttendanceXRequest = exports.AttendanceRequest = exports.TrafficResponse_Traffic = exports.TrafficResponse = exports.TrafficRequest = exports.DeviceLogResponse_Log = exports.DeviceLogResponse = exports.DeviceLogRequest = exports.DeviceDataResponse = exports.DeviceDataRequest = exports.AreaReviewResponse_AreaReview = exports.AreaReviewResponse = exports.AreaReviewRequest = exports.RouteReviewResponse_Stop = exports.RouteReviewResponse = exports.RouteReviewRequest = exports.DailyTrafficRequest = exports.DailyTrafficResponse_DailyTraffic = exports.DailyTrafficResponse_Traffic = exports.DailyTrafficResponse = exports.DeviceDataCountResponse_DeviceDataCount = exports.DeviceDataCountResponse = exports.DeviceDataCountRequest = exports.ShiftSummaryRequest = exports.ShiftResponse_Shift = exports.ShiftResponse = exports.ShiftRequest = exports.ShiftSummaryResponse_Summary = exports.ShiftSummaryResponse = exports.AreaSummaryReviewResponse_AreasDetailEntry = exports.AreaSummaryReviewResponse_DevicesDetailEntry = exports.AreaSummaryReviewResponse_Detail = exports.AreaSummaryReviewResponse_Area = exports.AreaSummaryReviewResponse_Review = exports.AreaSummaryReviewResponse = exports.AreaSummaryReviewRequest = exports.TripReportResponse = exports.EnvironmentalRequest = exports.EnvironmentalResponse_EnvironmentalField = exports.EnvironmentalResponse = exports.TraffixRequest = exports.Traffix_STOP = void 0;
|
|
10
10
|
exports.sourceFromJSON = sourceFromJSON;
|
|
11
11
|
exports.sourceToJSON = sourceToJSON;
|
|
12
12
|
exports.maintenanceRequest_GroupByFromJSON = maintenanceRequest_GroupByFromJSON;
|
|
@@ -39,10 +39,11 @@ exports.tripsSummaryRequest_GroupByFromJSON = tripsSummaryRequest_GroupByFromJSO
|
|
|
39
39
|
exports.tripsSummaryRequest_GroupByToJSON = tripsSummaryRequest_GroupByToJSON;
|
|
40
40
|
/* eslint-disable */
|
|
41
41
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
42
|
+
const area_1 = require("../areas/area");
|
|
42
43
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
43
44
|
const dataModel_1 = require("../packets/dataModel");
|
|
44
45
|
const trip_1 = require("../trips/trip");
|
|
45
|
-
exports.protobufPackage = "fatehan";
|
|
46
|
+
exports.protobufPackage = "com.fatehan.reports";
|
|
46
47
|
var Source;
|
|
47
48
|
(function (Source) {
|
|
48
49
|
Source[Source["MYSQL"] = 0] = "MYSQL";
|
|
@@ -808,6 +809,234 @@ function tripsSummaryRequest_GroupByToJSON(object) {
|
|
|
808
809
|
return "UNRECOGNIZED";
|
|
809
810
|
}
|
|
810
811
|
}
|
|
812
|
+
function createBaseWorkCycleRequest() {
|
|
813
|
+
return { deviceId: [], startedAt: undefined, finishedAt: undefined, shovelStopSeconds: 0, areaStopSeconds: 0 };
|
|
814
|
+
}
|
|
815
|
+
exports.WorkCycleRequest = {
|
|
816
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
817
|
+
writer.uint32(10).fork();
|
|
818
|
+
for (const v of message.deviceId) {
|
|
819
|
+
writer.uint64(v);
|
|
820
|
+
}
|
|
821
|
+
writer.join();
|
|
822
|
+
if (message.startedAt !== undefined) {
|
|
823
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(26).fork()).join();
|
|
824
|
+
}
|
|
825
|
+
if (message.finishedAt !== undefined) {
|
|
826
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(34).fork()).join();
|
|
827
|
+
}
|
|
828
|
+
if (message.shovelStopSeconds !== 0) {
|
|
829
|
+
writer.uint32(41).double(message.shovelStopSeconds);
|
|
830
|
+
}
|
|
831
|
+
if (message.areaStopSeconds !== 0) {
|
|
832
|
+
writer.uint32(49).double(message.areaStopSeconds);
|
|
833
|
+
}
|
|
834
|
+
return writer;
|
|
835
|
+
},
|
|
836
|
+
decode(input, length) {
|
|
837
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
838
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
839
|
+
const message = createBaseWorkCycleRequest();
|
|
840
|
+
while (reader.pos < end) {
|
|
841
|
+
const tag = reader.uint32();
|
|
842
|
+
switch (tag >>> 3) {
|
|
843
|
+
case 1: {
|
|
844
|
+
if (tag === 8) {
|
|
845
|
+
message.deviceId.push(longToNumber(reader.uint64()));
|
|
846
|
+
continue;
|
|
847
|
+
}
|
|
848
|
+
if (tag === 10) {
|
|
849
|
+
const end2 = reader.uint32() + reader.pos;
|
|
850
|
+
while (reader.pos < end2) {
|
|
851
|
+
message.deviceId.push(longToNumber(reader.uint64()));
|
|
852
|
+
}
|
|
853
|
+
continue;
|
|
854
|
+
}
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
case 3: {
|
|
858
|
+
if (tag !== 26) {
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
862
|
+
continue;
|
|
863
|
+
}
|
|
864
|
+
case 4: {
|
|
865
|
+
if (tag !== 34) {
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
869
|
+
continue;
|
|
870
|
+
}
|
|
871
|
+
case 5: {
|
|
872
|
+
if (tag !== 41) {
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
message.shovelStopSeconds = reader.double();
|
|
876
|
+
continue;
|
|
877
|
+
}
|
|
878
|
+
case 6: {
|
|
879
|
+
if (tag !== 49) {
|
|
880
|
+
break;
|
|
881
|
+
}
|
|
882
|
+
message.areaStopSeconds = reader.double();
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
887
|
+
break;
|
|
888
|
+
}
|
|
889
|
+
reader.skip(tag & 7);
|
|
890
|
+
}
|
|
891
|
+
return message;
|
|
892
|
+
},
|
|
893
|
+
fromJSON(object) {
|
|
894
|
+
return {
|
|
895
|
+
deviceId: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_id)
|
|
896
|
+
? object.device_id.map((e) => globalThis.Number(e))
|
|
897
|
+
: [],
|
|
898
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
899
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
900
|
+
shovelStopSeconds: isSet(object.shovel_stop_seconds) ? globalThis.Number(object.shovel_stop_seconds) : 0,
|
|
901
|
+
areaStopSeconds: isSet(object.area_stop_seconds) ? globalThis.Number(object.area_stop_seconds) : 0,
|
|
902
|
+
};
|
|
903
|
+
},
|
|
904
|
+
toJSON(message) {
|
|
905
|
+
var _a;
|
|
906
|
+
const obj = {};
|
|
907
|
+
if ((_a = message.deviceId) === null || _a === void 0 ? void 0 : _a.length) {
|
|
908
|
+
obj.device_id = message.deviceId.map((e) => Math.round(e));
|
|
909
|
+
}
|
|
910
|
+
if (message.startedAt !== undefined) {
|
|
911
|
+
obj.started_at = message.startedAt.toISOString();
|
|
912
|
+
}
|
|
913
|
+
if (message.finishedAt !== undefined) {
|
|
914
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
915
|
+
}
|
|
916
|
+
if (message.shovelStopSeconds !== 0) {
|
|
917
|
+
obj.shovel_stop_seconds = message.shovelStopSeconds;
|
|
918
|
+
}
|
|
919
|
+
if (message.areaStopSeconds !== 0) {
|
|
920
|
+
obj.area_stop_seconds = message.areaStopSeconds;
|
|
921
|
+
}
|
|
922
|
+
return obj;
|
|
923
|
+
},
|
|
924
|
+
create(base) {
|
|
925
|
+
return exports.WorkCycleRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
926
|
+
},
|
|
927
|
+
fromPartial(object) {
|
|
928
|
+
var _a, _b, _c, _d, _e;
|
|
929
|
+
const message = createBaseWorkCycleRequest();
|
|
930
|
+
message.deviceId = ((_a = object.deviceId) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
|
|
931
|
+
message.startedAt = (_b = object.startedAt) !== null && _b !== void 0 ? _b : undefined;
|
|
932
|
+
message.finishedAt = (_c = object.finishedAt) !== null && _c !== void 0 ? _c : undefined;
|
|
933
|
+
message.shovelStopSeconds = (_d = object.shovelStopSeconds) !== null && _d !== void 0 ? _d : 0;
|
|
934
|
+
message.areaStopSeconds = (_e = object.areaStopSeconds) !== null && _e !== void 0 ? _e : 0;
|
|
935
|
+
return message;
|
|
936
|
+
},
|
|
937
|
+
};
|
|
938
|
+
function createBaseWorkCycleResponse() {
|
|
939
|
+
return { workCycles: [], cost: 0, threads: 0, records: 0 };
|
|
940
|
+
}
|
|
941
|
+
exports.WorkCycleResponse = {
|
|
942
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
943
|
+
for (const v of message.workCycles) {
|
|
944
|
+
area_1.WorkCycle.encode(v, writer.uint32(10).fork()).join();
|
|
945
|
+
}
|
|
946
|
+
if (message.cost !== 0) {
|
|
947
|
+
writer.uint32(16).uint32(message.cost);
|
|
948
|
+
}
|
|
949
|
+
if (message.threads !== 0) {
|
|
950
|
+
writer.uint32(24).uint32(message.threads);
|
|
951
|
+
}
|
|
952
|
+
if (message.records !== 0) {
|
|
953
|
+
writer.uint32(32).uint32(message.records);
|
|
954
|
+
}
|
|
955
|
+
return writer;
|
|
956
|
+
},
|
|
957
|
+
decode(input, length) {
|
|
958
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
959
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
960
|
+
const message = createBaseWorkCycleResponse();
|
|
961
|
+
while (reader.pos < end) {
|
|
962
|
+
const tag = reader.uint32();
|
|
963
|
+
switch (tag >>> 3) {
|
|
964
|
+
case 1: {
|
|
965
|
+
if (tag !== 10) {
|
|
966
|
+
break;
|
|
967
|
+
}
|
|
968
|
+
message.workCycles.push(area_1.WorkCycle.decode(reader, reader.uint32()));
|
|
969
|
+
continue;
|
|
970
|
+
}
|
|
971
|
+
case 2: {
|
|
972
|
+
if (tag !== 16) {
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
message.cost = reader.uint32();
|
|
976
|
+
continue;
|
|
977
|
+
}
|
|
978
|
+
case 3: {
|
|
979
|
+
if (tag !== 24) {
|
|
980
|
+
break;
|
|
981
|
+
}
|
|
982
|
+
message.threads = reader.uint32();
|
|
983
|
+
continue;
|
|
984
|
+
}
|
|
985
|
+
case 4: {
|
|
986
|
+
if (tag !== 32) {
|
|
987
|
+
break;
|
|
988
|
+
}
|
|
989
|
+
message.records = reader.uint32();
|
|
990
|
+
continue;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
994
|
+
break;
|
|
995
|
+
}
|
|
996
|
+
reader.skip(tag & 7);
|
|
997
|
+
}
|
|
998
|
+
return message;
|
|
999
|
+
},
|
|
1000
|
+
fromJSON(object) {
|
|
1001
|
+
return {
|
|
1002
|
+
workCycles: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.work_cycles)
|
|
1003
|
+
? object.work_cycles.map((e) => area_1.WorkCycle.fromJSON(e))
|
|
1004
|
+
: [],
|
|
1005
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
1006
|
+
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
1007
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
1008
|
+
};
|
|
1009
|
+
},
|
|
1010
|
+
toJSON(message) {
|
|
1011
|
+
var _a;
|
|
1012
|
+
const obj = {};
|
|
1013
|
+
if ((_a = message.workCycles) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1014
|
+
obj.work_cycles = message.workCycles.map((e) => area_1.WorkCycle.toJSON(e));
|
|
1015
|
+
}
|
|
1016
|
+
if (message.cost !== 0) {
|
|
1017
|
+
obj.cost = Math.round(message.cost);
|
|
1018
|
+
}
|
|
1019
|
+
if (message.threads !== 0) {
|
|
1020
|
+
obj.threads = Math.round(message.threads);
|
|
1021
|
+
}
|
|
1022
|
+
if (message.records !== 0) {
|
|
1023
|
+
obj.records = Math.round(message.records);
|
|
1024
|
+
}
|
|
1025
|
+
return obj;
|
|
1026
|
+
},
|
|
1027
|
+
create(base) {
|
|
1028
|
+
return exports.WorkCycleResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1029
|
+
},
|
|
1030
|
+
fromPartial(object) {
|
|
1031
|
+
var _a, _b, _c, _d;
|
|
1032
|
+
const message = createBaseWorkCycleResponse();
|
|
1033
|
+
message.workCycles = ((_a = object.workCycles) === null || _a === void 0 ? void 0 : _a.map((e) => area_1.WorkCycle.fromPartial(e))) || [];
|
|
1034
|
+
message.cost = (_b = object.cost) !== null && _b !== void 0 ? _b : 0;
|
|
1035
|
+
message.threads = (_c = object.threads) !== null && _c !== void 0 ? _c : 0;
|
|
1036
|
+
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
1037
|
+
return message;
|
|
1038
|
+
},
|
|
1039
|
+
};
|
|
811
1040
|
function createBaseTripReportRequest() {
|
|
812
1041
|
return { deviceIds: [], startedAt: undefined, finishedAt: undefined };
|
|
813
1042
|
}
|
|
@@ -986,28 +1215,28 @@ exports.AreaSplitterRequest = {
|
|
|
986
1215
|
},
|
|
987
1216
|
fromJSON(object) {
|
|
988
1217
|
return {
|
|
989
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
990
|
-
? object.
|
|
1218
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
1219
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
991
1220
|
: [],
|
|
992
|
-
areaIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
993
|
-
startedAt: isSet(object.
|
|
994
|
-
finishedAt: isSet(object.
|
|
1221
|
+
areaIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.area_ids) ? object.area_ids.map((e) => globalThis.Number(e)) : [],
|
|
1222
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1223
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
995
1224
|
};
|
|
996
1225
|
},
|
|
997
1226
|
toJSON(message) {
|
|
998
1227
|
var _a, _b;
|
|
999
1228
|
const obj = {};
|
|
1000
1229
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1001
|
-
obj.
|
|
1230
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
1002
1231
|
}
|
|
1003
1232
|
if ((_b = message.areaIds) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1004
|
-
obj.
|
|
1233
|
+
obj.area_ids = message.areaIds.map((e) => Math.round(e));
|
|
1005
1234
|
}
|
|
1006
1235
|
if (message.startedAt !== undefined) {
|
|
1007
|
-
obj.
|
|
1236
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1008
1237
|
}
|
|
1009
1238
|
if (message.finishedAt !== undefined) {
|
|
1010
|
-
obj.
|
|
1239
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1011
1240
|
}
|
|
1012
1241
|
return obj;
|
|
1013
1242
|
},
|
|
@@ -1081,8 +1310,8 @@ exports.AreaSplitterResponse = {
|
|
|
1081
1310
|
reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports)
|
|
1082
1311
|
? object.reports.map((e) => exports.AreaSplitterResponse_Record.fromJSON(e))
|
|
1083
1312
|
: [],
|
|
1084
|
-
startedAt: isSet(object.
|
|
1085
|
-
finishedAt: isSet(object.
|
|
1313
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1314
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1086
1315
|
};
|
|
1087
1316
|
},
|
|
1088
1317
|
toJSON(message) {
|
|
@@ -1092,10 +1321,10 @@ exports.AreaSplitterResponse = {
|
|
|
1092
1321
|
obj.reports = message.reports.map((e) => exports.AreaSplitterResponse_Record.toJSON(e));
|
|
1093
1322
|
}
|
|
1094
1323
|
if (message.startedAt !== undefined) {
|
|
1095
|
-
obj.
|
|
1324
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1096
1325
|
}
|
|
1097
1326
|
if (message.finishedAt !== undefined) {
|
|
1098
|
-
obj.
|
|
1327
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1099
1328
|
}
|
|
1100
1329
|
return obj;
|
|
1101
1330
|
},
|
|
@@ -1326,23 +1555,23 @@ exports.AreaSplitterResponse_Record = {
|
|
|
1326
1555
|
},
|
|
1327
1556
|
fromJSON(object) {
|
|
1328
1557
|
return {
|
|
1329
|
-
deviceId: isSet(object.
|
|
1558
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
1330
1559
|
start: isSet(object.start) ? exports.AreaSplitterResponse_Area.fromJSON(object.start) : undefined,
|
|
1331
1560
|
finish: isSet(object.finish) ? exports.AreaSplitterResponse_Area.fromJSON(object.finish) : undefined,
|
|
1332
|
-
startedAt: isSet(object.
|
|
1333
|
-
finishedAt: isSet(object.
|
|
1334
|
-
durationOrigin: isSet(object.
|
|
1335
|
-
durationTrip: isSet(object.
|
|
1336
|
-
durationDestination: isSet(object.
|
|
1561
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1562
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1563
|
+
durationOrigin: isSet(object.duration_origin) ? globalThis.Number(object.duration_origin) : 0,
|
|
1564
|
+
durationTrip: isSet(object.duration_trip) ? globalThis.Number(object.duration_trip) : 0,
|
|
1565
|
+
durationDestination: isSet(object.duration_destination) ? globalThis.Number(object.duration_destination) : 0,
|
|
1337
1566
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : undefined,
|
|
1338
|
-
speedMax: isSet(object.
|
|
1339
|
-
speedAvg: isSet(object.
|
|
1567
|
+
speedMax: isSet(object.speed_max) ? globalThis.Number(object.speed_max) : 0,
|
|
1568
|
+
speedAvg: isSet(object.speed_avg) ? globalThis.Number(object.speed_avg) : 0,
|
|
1340
1569
|
};
|
|
1341
1570
|
},
|
|
1342
1571
|
toJSON(message) {
|
|
1343
1572
|
const obj = {};
|
|
1344
1573
|
if (message.deviceId !== 0) {
|
|
1345
|
-
obj.
|
|
1574
|
+
obj.device_id = Math.round(message.deviceId);
|
|
1346
1575
|
}
|
|
1347
1576
|
if (message.start !== undefined) {
|
|
1348
1577
|
obj.start = exports.AreaSplitterResponse_Area.toJSON(message.start);
|
|
@@ -1351,28 +1580,28 @@ exports.AreaSplitterResponse_Record = {
|
|
|
1351
1580
|
obj.finish = exports.AreaSplitterResponse_Area.toJSON(message.finish);
|
|
1352
1581
|
}
|
|
1353
1582
|
if (message.startedAt !== undefined) {
|
|
1354
|
-
obj.
|
|
1583
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1355
1584
|
}
|
|
1356
1585
|
if (message.finishedAt !== undefined) {
|
|
1357
|
-
obj.
|
|
1586
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1358
1587
|
}
|
|
1359
1588
|
if (message.durationOrigin !== 0) {
|
|
1360
|
-
obj.
|
|
1589
|
+
obj.duration_origin = Math.round(message.durationOrigin);
|
|
1361
1590
|
}
|
|
1362
1591
|
if (message.durationTrip !== 0) {
|
|
1363
|
-
obj.
|
|
1592
|
+
obj.duration_trip = Math.round(message.durationTrip);
|
|
1364
1593
|
}
|
|
1365
1594
|
if (message.durationDestination !== 0) {
|
|
1366
|
-
obj.
|
|
1595
|
+
obj.duration_destination = Math.round(message.durationDestination);
|
|
1367
1596
|
}
|
|
1368
1597
|
if (message.mileage !== undefined) {
|
|
1369
1598
|
obj.mileage = Math.round(message.mileage);
|
|
1370
1599
|
}
|
|
1371
1600
|
if (message.speedMax !== 0) {
|
|
1372
|
-
obj.
|
|
1601
|
+
obj.speed_max = Math.round(message.speedMax);
|
|
1373
1602
|
}
|
|
1374
1603
|
if (message.speedAvg !== 0) {
|
|
1375
|
-
obj.
|
|
1604
|
+
obj.speed_avg = Math.round(message.speedAvg);
|
|
1376
1605
|
}
|
|
1377
1606
|
return obj;
|
|
1378
1607
|
},
|
|
@@ -9059,8 +9288,8 @@ exports.DailyTrafficResponse = {
|
|
|
9059
9288
|
},
|
|
9060
9289
|
fromJSON(object) {
|
|
9061
9290
|
return {
|
|
9062
|
-
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
9063
|
-
? object.
|
|
9291
|
+
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports)
|
|
9292
|
+
? object.reports.map((e) => exports.DailyTrafficResponse_DailyTraffic.fromJSON(e))
|
|
9064
9293
|
: [],
|
|
9065
9294
|
};
|
|
9066
9295
|
},
|
|
@@ -9068,7 +9297,7 @@ exports.DailyTrafficResponse = {
|
|
|
9068
9297
|
var _a;
|
|
9069
9298
|
const obj = {};
|
|
9070
9299
|
if ((_a = message.Reports) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9071
|
-
obj.
|
|
9300
|
+
obj.reports = message.Reports.map((e) => exports.DailyTrafficResponse_DailyTraffic.toJSON(e));
|
|
9072
9301
|
}
|
|
9073
9302
|
return obj;
|
|
9074
9303
|
},
|
|
@@ -9156,29 +9385,29 @@ exports.DailyTrafficResponse_Traffic = {
|
|
|
9156
9385
|
},
|
|
9157
9386
|
fromJSON(object) {
|
|
9158
9387
|
return {
|
|
9159
|
-
enteredAt: isSet(object.
|
|
9160
|
-
exitedAt: isSet(object.
|
|
9388
|
+
enteredAt: isSet(object.entered_at) ? fromJsonTimestamp(object.entered_at) : undefined,
|
|
9389
|
+
exitedAt: isSet(object.exited_at) ? fromJsonTimestamp(object.exited_at) : undefined,
|
|
9161
9390
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
9162
|
-
geoId: isSet(object.
|
|
9163
|
-
geoName: isSet(object.
|
|
9391
|
+
geoId: isSet(object.geo_id) ? globalThis.Number(object.geo_id) : 0,
|
|
9392
|
+
geoName: isSet(object.geo_name) ? globalThis.String(object.geo_name) : undefined,
|
|
9164
9393
|
};
|
|
9165
9394
|
},
|
|
9166
9395
|
toJSON(message) {
|
|
9167
9396
|
const obj = {};
|
|
9168
9397
|
if (message.enteredAt !== undefined) {
|
|
9169
|
-
obj.
|
|
9398
|
+
obj.entered_at = message.enteredAt.toISOString();
|
|
9170
9399
|
}
|
|
9171
9400
|
if (message.exitedAt !== undefined) {
|
|
9172
|
-
obj.
|
|
9401
|
+
obj.exited_at = message.exitedAt.toISOString();
|
|
9173
9402
|
}
|
|
9174
9403
|
if (message.mileage !== 0) {
|
|
9175
9404
|
obj.mileage = Math.round(message.mileage);
|
|
9176
9405
|
}
|
|
9177
9406
|
if (message.geoId !== 0) {
|
|
9178
|
-
obj.
|
|
9407
|
+
obj.geo_id = Math.round(message.geoId);
|
|
9179
9408
|
}
|
|
9180
9409
|
if (message.geoName !== undefined) {
|
|
9181
|
-
obj.
|
|
9410
|
+
obj.geo_name = message.geoName;
|
|
9182
9411
|
}
|
|
9183
9412
|
return obj;
|
|
9184
9413
|
},
|
|
@@ -9250,7 +9479,7 @@ exports.DailyTrafficResponse_DailyTraffic = {
|
|
|
9250
9479
|
},
|
|
9251
9480
|
fromJSON(object) {
|
|
9252
9481
|
return {
|
|
9253
|
-
deviceId: isSet(object.
|
|
9482
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
9254
9483
|
date: isSet(object.date) ? fromJsonTimestamp(object.date) : undefined,
|
|
9255
9484
|
traffics: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.traffics)
|
|
9256
9485
|
? object.traffics.map((e) => exports.DailyTrafficResponse_Traffic.fromJSON(e))
|
|
@@ -9261,7 +9490,7 @@ exports.DailyTrafficResponse_DailyTraffic = {
|
|
|
9261
9490
|
var _a;
|
|
9262
9491
|
const obj = {};
|
|
9263
9492
|
if (message.deviceId !== 0) {
|
|
9264
|
-
obj.
|
|
9493
|
+
obj.device_id = Math.round(message.deviceId);
|
|
9265
9494
|
}
|
|
9266
9495
|
if (message.date !== undefined) {
|
|
9267
9496
|
obj.date = message.date.toISOString();
|
|
@@ -9356,11 +9585,11 @@ exports.DailyTrafficRequest = {
|
|
|
9356
9585
|
},
|
|
9357
9586
|
fromJSON(object) {
|
|
9358
9587
|
return {
|
|
9359
|
-
startedAt: isSet(object.
|
|
9360
|
-
finishedAt: isSet(object.
|
|
9588
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
9589
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
9361
9590
|
between: isSet(object.between) ? globalThis.Boolean(object.between) : false,
|
|
9362
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
9363
|
-
? object.
|
|
9591
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
9592
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
9364
9593
|
: [],
|
|
9365
9594
|
};
|
|
9366
9595
|
},
|
|
@@ -9368,16 +9597,16 @@ exports.DailyTrafficRequest = {
|
|
|
9368
9597
|
var _a;
|
|
9369
9598
|
const obj = {};
|
|
9370
9599
|
if (message.startedAt !== undefined) {
|
|
9371
|
-
obj.
|
|
9600
|
+
obj.started_at = message.startedAt.toISOString();
|
|
9372
9601
|
}
|
|
9373
9602
|
if (message.finishedAt !== undefined) {
|
|
9374
|
-
obj.
|
|
9603
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
9375
9604
|
}
|
|
9376
9605
|
if (message.between !== false) {
|
|
9377
9606
|
obj.between = message.between;
|
|
9378
9607
|
}
|
|
9379
9608
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9380
|
-
obj.
|
|
9609
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
9381
9610
|
}
|
|
9382
9611
|
return obj;
|
|
9383
9612
|
},
|
|
@@ -9524,7 +9753,7 @@ exports.RouteReviewRequest = {
|
|
|
9524
9753
|
},
|
|
9525
9754
|
};
|
|
9526
9755
|
function createBaseRouteReviewResponse() {
|
|
9527
|
-
return { routeList: [], stopList: [], tripList: [],
|
|
9756
|
+
return { routeList: [], stopList: [], tripList: [], records: 0, cost: 0, threads: 0 };
|
|
9528
9757
|
}
|
|
9529
9758
|
exports.RouteReviewResponse = {
|
|
9530
9759
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -9537,11 +9766,14 @@ exports.RouteReviewResponse = {
|
|
|
9537
9766
|
for (const v of message.tripList) {
|
|
9538
9767
|
trip_1.Trip.encode(v, writer.uint32(26).fork()).join();
|
|
9539
9768
|
}
|
|
9540
|
-
if (message.
|
|
9541
|
-
writer.uint32(
|
|
9769
|
+
if (message.records !== 0) {
|
|
9770
|
+
writer.uint32(32).uint32(message.records);
|
|
9542
9771
|
}
|
|
9543
|
-
if (message.
|
|
9544
|
-
|
|
9772
|
+
if (message.cost !== 0) {
|
|
9773
|
+
writer.uint32(40).uint32(message.cost);
|
|
9774
|
+
}
|
|
9775
|
+
if (message.threads !== 0) {
|
|
9776
|
+
writer.uint32(48).uint32(message.threads);
|
|
9545
9777
|
}
|
|
9546
9778
|
return writer;
|
|
9547
9779
|
},
|
|
@@ -9574,17 +9806,24 @@ exports.RouteReviewResponse = {
|
|
|
9574
9806
|
continue;
|
|
9575
9807
|
}
|
|
9576
9808
|
case 4: {
|
|
9577
|
-
if (tag !==
|
|
9809
|
+
if (tag !== 32) {
|
|
9578
9810
|
break;
|
|
9579
9811
|
}
|
|
9580
|
-
message.
|
|
9812
|
+
message.records = reader.uint32();
|
|
9581
9813
|
continue;
|
|
9582
9814
|
}
|
|
9583
9815
|
case 5: {
|
|
9584
|
-
if (tag !==
|
|
9816
|
+
if (tag !== 40) {
|
|
9585
9817
|
break;
|
|
9586
9818
|
}
|
|
9587
|
-
message.
|
|
9819
|
+
message.cost = reader.uint32();
|
|
9820
|
+
continue;
|
|
9821
|
+
}
|
|
9822
|
+
case 6: {
|
|
9823
|
+
if (tag !== 48) {
|
|
9824
|
+
break;
|
|
9825
|
+
}
|
|
9826
|
+
message.threads = reader.uint32();
|
|
9588
9827
|
continue;
|
|
9589
9828
|
}
|
|
9590
9829
|
}
|
|
@@ -9597,32 +9836,38 @@ exports.RouteReviewResponse = {
|
|
|
9597
9836
|
},
|
|
9598
9837
|
fromJSON(object) {
|
|
9599
9838
|
return {
|
|
9600
|
-
routeList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
9601
|
-
|
|
9602
|
-
? object.stopList.map((e) => exports.RouteReviewResponse_Stop.fromJSON(e))
|
|
9839
|
+
routeList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.route_list)
|
|
9840
|
+
? object.route_list.map((e) => dataModel_1.Data.fromJSON(e))
|
|
9603
9841
|
: [],
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9842
|
+
stopList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.stop_list)
|
|
9843
|
+
? object.stop_list.map((e) => exports.RouteReviewResponse_Stop.fromJSON(e))
|
|
9844
|
+
: [],
|
|
9845
|
+
tripList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.trip_list) ? object.trip_list.map((e) => trip_1.Trip.fromJSON(e)) : [],
|
|
9846
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
9847
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
9848
|
+
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
9607
9849
|
};
|
|
9608
9850
|
},
|
|
9609
9851
|
toJSON(message) {
|
|
9610
9852
|
var _a, _b, _c;
|
|
9611
9853
|
const obj = {};
|
|
9612
9854
|
if ((_a = message.routeList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9613
|
-
obj.
|
|
9855
|
+
obj.route_list = message.routeList.map((e) => dataModel_1.Data.toJSON(e));
|
|
9614
9856
|
}
|
|
9615
9857
|
if ((_b = message.stopList) === null || _b === void 0 ? void 0 : _b.length) {
|
|
9616
|
-
obj.
|
|
9858
|
+
obj.stop_list = message.stopList.map((e) => exports.RouteReviewResponse_Stop.toJSON(e));
|
|
9617
9859
|
}
|
|
9618
9860
|
if ((_c = message.tripList) === null || _c === void 0 ? void 0 : _c.length) {
|
|
9619
|
-
obj.
|
|
9861
|
+
obj.trip_list = message.tripList.map((e) => trip_1.Trip.toJSON(e));
|
|
9620
9862
|
}
|
|
9621
|
-
if (message.
|
|
9622
|
-
obj.
|
|
9863
|
+
if (message.records !== 0) {
|
|
9864
|
+
obj.records = Math.round(message.records);
|
|
9623
9865
|
}
|
|
9624
|
-
if (message.
|
|
9625
|
-
obj.
|
|
9866
|
+
if (message.cost !== 0) {
|
|
9867
|
+
obj.cost = Math.round(message.cost);
|
|
9868
|
+
}
|
|
9869
|
+
if (message.threads !== 0) {
|
|
9870
|
+
obj.threads = Math.round(message.threads);
|
|
9626
9871
|
}
|
|
9627
9872
|
return obj;
|
|
9628
9873
|
},
|
|
@@ -9630,13 +9875,14 @@ exports.RouteReviewResponse = {
|
|
|
9630
9875
|
return exports.RouteReviewResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
9631
9876
|
},
|
|
9632
9877
|
fromPartial(object) {
|
|
9633
|
-
var _a, _b, _c, _d, _e;
|
|
9878
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9634
9879
|
const message = createBaseRouteReviewResponse();
|
|
9635
9880
|
message.routeList = ((_a = object.routeList) === null || _a === void 0 ? void 0 : _a.map((e) => dataModel_1.Data.fromPartial(e))) || [];
|
|
9636
9881
|
message.stopList = ((_b = object.stopList) === null || _b === void 0 ? void 0 : _b.map((e) => exports.RouteReviewResponse_Stop.fromPartial(e))) || [];
|
|
9637
9882
|
message.tripList = ((_c = object.tripList) === null || _c === void 0 ? void 0 : _c.map((e) => trip_1.Trip.fromPartial(e))) || [];
|
|
9638
|
-
message.
|
|
9639
|
-
message.
|
|
9883
|
+
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
9884
|
+
message.cost = (_e = object.cost) !== null && _e !== void 0 ? _e : 0;
|
|
9885
|
+
message.threads = (_f = object.threads) !== null && _f !== void 0 ? _f : 0;
|
|
9640
9886
|
return message;
|
|
9641
9887
|
},
|
|
9642
9888
|
};
|
|
@@ -9705,8 +9951,8 @@ exports.RouteReviewResponse_Stop = {
|
|
|
9705
9951
|
fromJSON(object) {
|
|
9706
9952
|
return {
|
|
9707
9953
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
9708
|
-
startedAt: isSet(object.
|
|
9709
|
-
finishedAt: isSet(object.
|
|
9954
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
9955
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
9710
9956
|
type: isSet(object.type) ? routeReviewResponse_StopTypeFromJSON(object.type) : 0,
|
|
9711
9957
|
};
|
|
9712
9958
|
},
|
|
@@ -9716,10 +9962,10 @@ exports.RouteReviewResponse_Stop = {
|
|
|
9716
9962
|
obj.duration = Math.round(message.duration);
|
|
9717
9963
|
}
|
|
9718
9964
|
if (message.startedAt !== undefined) {
|
|
9719
|
-
obj.
|
|
9965
|
+
obj.started_at = message.startedAt.toISOString();
|
|
9720
9966
|
}
|
|
9721
9967
|
if (message.finishedAt !== undefined) {
|
|
9722
|
-
obj.
|
|
9968
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
9723
9969
|
}
|
|
9724
9970
|
if (message.type !== 0) {
|
|
9725
9971
|
obj.type = routeReviewResponse_StopTypeToJSON(message.type);
|
|
@@ -11088,12 +11334,12 @@ exports.AttendanceXRequest = {
|
|
|
11088
11334
|
},
|
|
11089
11335
|
fromJSON(object) {
|
|
11090
11336
|
return {
|
|
11091
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
11092
|
-
? object.
|
|
11337
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
11338
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
11093
11339
|
: [],
|
|
11094
|
-
startedAt: isSet(object.
|
|
11095
|
-
finishedAt: isSet(object.
|
|
11096
|
-
excludeLeaves: isSet(object.
|
|
11340
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
11341
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
11342
|
+
excludeLeaves: isSet(object.exclude_leaves) ? globalThis.Boolean(object.exclude_leaves) : false,
|
|
11097
11343
|
source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
|
|
11098
11344
|
};
|
|
11099
11345
|
},
|
|
@@ -11101,16 +11347,16 @@ exports.AttendanceXRequest = {
|
|
|
11101
11347
|
var _a;
|
|
11102
11348
|
const obj = {};
|
|
11103
11349
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11104
|
-
obj.
|
|
11350
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
11105
11351
|
}
|
|
11106
11352
|
if (message.startedAt !== undefined) {
|
|
11107
|
-
obj.
|
|
11353
|
+
obj.started_at = message.startedAt.toISOString();
|
|
11108
11354
|
}
|
|
11109
11355
|
if (message.finishedAt !== undefined) {
|
|
11110
|
-
obj.
|
|
11356
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
11111
11357
|
}
|
|
11112
11358
|
if (message.excludeLeaves !== false) {
|
|
11113
|
-
obj.
|
|
11359
|
+
obj.exclude_leaves = message.excludeLeaves;
|
|
11114
11360
|
}
|
|
11115
11361
|
if (message.source !== 0) {
|
|
11116
11362
|
obj.source = sourceToJSON(message.source);
|
|
@@ -11252,7 +11498,7 @@ exports.AttendanceResponse_Event = {
|
|
|
11252
11498
|
},
|
|
11253
11499
|
fromJSON(object) {
|
|
11254
11500
|
return {
|
|
11255
|
-
dateTime: isSet(object.
|
|
11501
|
+
dateTime: isSet(object.date_time) ? fromJsonTimestamp(object.date_time) : undefined,
|
|
11256
11502
|
type: isSet(object.type) ? attendanceResponse_EventTypeFromJSON(object.type) : 0,
|
|
11257
11503
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
11258
11504
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
@@ -11261,7 +11507,7 @@ exports.AttendanceResponse_Event = {
|
|
|
11261
11507
|
toJSON(message) {
|
|
11262
11508
|
const obj = {};
|
|
11263
11509
|
if (message.dateTime !== undefined) {
|
|
11264
|
-
obj.
|
|
11510
|
+
obj.date_time = message.dateTime.toISOString();
|
|
11265
11511
|
}
|
|
11266
11512
|
if (message.type !== 0) {
|
|
11267
11513
|
obj.type = attendanceResponse_EventTypeToJSON(message.type);
|
|
@@ -11521,24 +11767,24 @@ exports.AttendanceResponse_Attendance = {
|
|
|
11521
11767
|
},
|
|
11522
11768
|
fromJSON(object) {
|
|
11523
11769
|
return {
|
|
11524
|
-
enteredAt: isSet(object.
|
|
11525
|
-
exitedAt: isSet(object.
|
|
11526
|
-
deviceId: isSet(object.
|
|
11527
|
-
areaId: isSet(object.
|
|
11528
|
-
areaName: isSet(object.
|
|
11529
|
-
geoName: isSet(object.
|
|
11770
|
+
enteredAt: isSet(object.entered_at) ? fromJsonTimestamp(object.entered_at) : undefined,
|
|
11771
|
+
exitedAt: isSet(object.exited_at) ? fromJsonTimestamp(object.exited_at) : undefined,
|
|
11772
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
11773
|
+
areaId: isSet(object.area_id) ? globalThis.Number(object.area_id) : 0,
|
|
11774
|
+
areaName: isSet(object.area_name) ? globalThis.String(object.area_name) : "",
|
|
11775
|
+
geoName: isSet(object.geo_name) ? globalThis.String(object.geo_name) : undefined,
|
|
11530
11776
|
overtime: isSet(object.overtime) ? globalThis.Number(object.overtime) : 0,
|
|
11531
11777
|
shortage: isSet(object.shortage) ? globalThis.Number(object.shortage) : 0,
|
|
11532
|
-
workTime: isSet(object.
|
|
11533
|
-
pricePerHour: isSet(object.
|
|
11534
|
-
overtimePrice: isSet(object.
|
|
11535
|
-
shortagePrice: isSet(object.
|
|
11536
|
-
workTimePrice: isSet(object.
|
|
11537
|
-
shiftStartsAt: isSet(object.
|
|
11538
|
-
shiftEndsAt: isSet(object.
|
|
11778
|
+
workTime: isSet(object.work_time) ? globalThis.Number(object.work_time) : 0,
|
|
11779
|
+
pricePerHour: isSet(object.price_per_hour) ? globalThis.Number(object.price_per_hour) : 0,
|
|
11780
|
+
overtimePrice: isSet(object.overtime_price) ? globalThis.Number(object.overtime_price) : 0,
|
|
11781
|
+
shortagePrice: isSet(object.shortage_price) ? globalThis.Number(object.shortage_price) : 0,
|
|
11782
|
+
workTimePrice: isSet(object.work_time_price) ? globalThis.Number(object.work_time_price) : 0,
|
|
11783
|
+
shiftStartsAt: isSet(object.shift_starts_at) ? globalThis.String(object.shift_starts_at) : "",
|
|
11784
|
+
shiftEndsAt: isSet(object.shift_ends_at) ? globalThis.String(object.shift_ends_at) : "",
|
|
11539
11785
|
subtotal: isSet(object.subtotal) ? globalThis.Number(object.subtotal) : 0,
|
|
11540
|
-
mileageInside: isSet(object.
|
|
11541
|
-
mileageOutside: isSet(object.
|
|
11786
|
+
mileageInside: isSet(object.mileage_inside) ? globalThis.Number(object.mileage_inside) : 0,
|
|
11787
|
+
mileageOutside: isSet(object.mileage_outside) ? globalThis.Number(object.mileage_outside) : 0,
|
|
11542
11788
|
events: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.events)
|
|
11543
11789
|
? object.events.map((e) => exports.AttendanceResponse_Event.fromJSON(e))
|
|
11544
11790
|
: [],
|
|
@@ -11548,22 +11794,22 @@ exports.AttendanceResponse_Attendance = {
|
|
|
11548
11794
|
var _a;
|
|
11549
11795
|
const obj = {};
|
|
11550
11796
|
if (message.enteredAt !== undefined) {
|
|
11551
|
-
obj.
|
|
11797
|
+
obj.entered_at = message.enteredAt.toISOString();
|
|
11552
11798
|
}
|
|
11553
11799
|
if (message.exitedAt !== undefined) {
|
|
11554
|
-
obj.
|
|
11800
|
+
obj.exited_at = message.exitedAt.toISOString();
|
|
11555
11801
|
}
|
|
11556
11802
|
if (message.deviceId !== 0) {
|
|
11557
|
-
obj.
|
|
11803
|
+
obj.device_id = Math.round(message.deviceId);
|
|
11558
11804
|
}
|
|
11559
11805
|
if (message.areaId !== 0) {
|
|
11560
|
-
obj.
|
|
11806
|
+
obj.area_id = Math.round(message.areaId);
|
|
11561
11807
|
}
|
|
11562
11808
|
if (message.areaName !== "") {
|
|
11563
|
-
obj.
|
|
11809
|
+
obj.area_name = message.areaName;
|
|
11564
11810
|
}
|
|
11565
11811
|
if (message.geoName !== undefined) {
|
|
11566
|
-
obj.
|
|
11812
|
+
obj.geo_name = message.geoName;
|
|
11567
11813
|
}
|
|
11568
11814
|
if (message.overtime !== 0) {
|
|
11569
11815
|
obj.overtime = Math.round(message.overtime);
|
|
@@ -11572,34 +11818,34 @@ exports.AttendanceResponse_Attendance = {
|
|
|
11572
11818
|
obj.shortage = Math.round(message.shortage);
|
|
11573
11819
|
}
|
|
11574
11820
|
if (message.workTime !== 0) {
|
|
11575
|
-
obj.
|
|
11821
|
+
obj.work_time = Math.round(message.workTime);
|
|
11576
11822
|
}
|
|
11577
11823
|
if (message.pricePerHour !== 0) {
|
|
11578
|
-
obj.
|
|
11824
|
+
obj.price_per_hour = Math.round(message.pricePerHour);
|
|
11579
11825
|
}
|
|
11580
11826
|
if (message.overtimePrice !== 0) {
|
|
11581
|
-
obj.
|
|
11827
|
+
obj.overtime_price = Math.round(message.overtimePrice);
|
|
11582
11828
|
}
|
|
11583
11829
|
if (message.shortagePrice !== 0) {
|
|
11584
|
-
obj.
|
|
11830
|
+
obj.shortage_price = Math.round(message.shortagePrice);
|
|
11585
11831
|
}
|
|
11586
11832
|
if (message.workTimePrice !== 0) {
|
|
11587
|
-
obj.
|
|
11833
|
+
obj.work_time_price = Math.round(message.workTimePrice);
|
|
11588
11834
|
}
|
|
11589
11835
|
if (message.shiftStartsAt !== "") {
|
|
11590
|
-
obj.
|
|
11836
|
+
obj.shift_starts_at = message.shiftStartsAt;
|
|
11591
11837
|
}
|
|
11592
11838
|
if (message.shiftEndsAt !== "") {
|
|
11593
|
-
obj.
|
|
11839
|
+
obj.shift_ends_at = message.shiftEndsAt;
|
|
11594
11840
|
}
|
|
11595
11841
|
if (message.subtotal !== 0) {
|
|
11596
11842
|
obj.subtotal = Math.round(message.subtotal);
|
|
11597
11843
|
}
|
|
11598
11844
|
if (message.mileageInside !== 0) {
|
|
11599
|
-
obj.
|
|
11845
|
+
obj.mileage_inside = Math.round(message.mileageInside);
|
|
11600
11846
|
}
|
|
11601
11847
|
if (message.mileageOutside !== 0) {
|
|
11602
|
-
obj.
|
|
11848
|
+
obj.mileage_outside = Math.round(message.mileageOutside);
|
|
11603
11849
|
}
|
|
11604
11850
|
if ((_a = message.events) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11605
11851
|
obj.events = message.events.map((e) => exports.AttendanceResponse_Event.toJSON(e));
|
|
@@ -11858,28 +12104,28 @@ exports.TripsSummaryRequest = {
|
|
|
11858
12104
|
},
|
|
11859
12105
|
fromJSON(object) {
|
|
11860
12106
|
return {
|
|
11861
|
-
startedAt: isSet(object.
|
|
11862
|
-
finishedAt: isSet(object.
|
|
11863
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
11864
|
-
? object.
|
|
12107
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
12108
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
12109
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
12110
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
11865
12111
|
: [],
|
|
11866
|
-
groupBy: isSet(object.
|
|
12112
|
+
groupBy: isSet(object.group_by) ? tripsSummaryRequest_GroupByFromJSON(object.group_by) : 0,
|
|
11867
12113
|
};
|
|
11868
12114
|
},
|
|
11869
12115
|
toJSON(message) {
|
|
11870
12116
|
var _a;
|
|
11871
12117
|
const obj = {};
|
|
11872
12118
|
if (message.startedAt !== undefined) {
|
|
11873
|
-
obj.
|
|
12119
|
+
obj.started_at = message.startedAt.toISOString();
|
|
11874
12120
|
}
|
|
11875
12121
|
if (message.finishedAt !== undefined) {
|
|
11876
|
-
obj.
|
|
12122
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
11877
12123
|
}
|
|
11878
12124
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11879
|
-
obj.
|
|
12125
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
11880
12126
|
}
|
|
11881
12127
|
if (message.groupBy !== 0) {
|
|
11882
|
-
obj.
|
|
12128
|
+
obj.group_by = tripsSummaryRequest_GroupByToJSON(message.groupBy);
|
|
11883
12129
|
}
|
|
11884
12130
|
return obj;
|
|
11885
12131
|
},
|
|
@@ -11897,24 +12143,24 @@ exports.TripsSummaryRequest = {
|
|
|
11897
12143
|
},
|
|
11898
12144
|
};
|
|
11899
12145
|
function createBaseTripsSummaryResponse() {
|
|
11900
|
-
return { Reports: [],
|
|
12146
|
+
return { Reports: [], records: 0, cost: 0, startedAt: undefined, finishedAt: undefined };
|
|
11901
12147
|
}
|
|
11902
12148
|
exports.TripsSummaryResponse = {
|
|
11903
12149
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
11904
12150
|
for (const v of message.Reports) {
|
|
11905
12151
|
trip_1.FusionTrip.encode(v, writer.uint32(10).fork()).join();
|
|
11906
12152
|
}
|
|
11907
|
-
if (message.
|
|
11908
|
-
writer.uint32(16).uint64(message.
|
|
12153
|
+
if (message.records !== 0) {
|
|
12154
|
+
writer.uint32(16).uint64(message.records);
|
|
11909
12155
|
}
|
|
11910
|
-
if (message.
|
|
11911
|
-
writer.uint32(24).sint64(message.
|
|
12156
|
+
if (message.cost !== 0) {
|
|
12157
|
+
writer.uint32(24).sint64(message.cost);
|
|
11912
12158
|
}
|
|
11913
|
-
if (message.startedAt !==
|
|
11914
|
-
writer.uint32(34).
|
|
12159
|
+
if (message.startedAt !== undefined) {
|
|
12160
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(34).fork()).join();
|
|
11915
12161
|
}
|
|
11916
|
-
if (message.finishedAt !==
|
|
11917
|
-
writer.uint32(42).
|
|
12162
|
+
if (message.finishedAt !== undefined) {
|
|
12163
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(42).fork()).join();
|
|
11918
12164
|
}
|
|
11919
12165
|
return writer;
|
|
11920
12166
|
},
|
|
@@ -11936,28 +12182,28 @@ exports.TripsSummaryResponse = {
|
|
|
11936
12182
|
if (tag !== 16) {
|
|
11937
12183
|
break;
|
|
11938
12184
|
}
|
|
11939
|
-
message.
|
|
12185
|
+
message.records = longToNumber(reader.uint64());
|
|
11940
12186
|
continue;
|
|
11941
12187
|
}
|
|
11942
12188
|
case 3: {
|
|
11943
12189
|
if (tag !== 24) {
|
|
11944
12190
|
break;
|
|
11945
12191
|
}
|
|
11946
|
-
message.
|
|
12192
|
+
message.cost = longToNumber(reader.sint64());
|
|
11947
12193
|
continue;
|
|
11948
12194
|
}
|
|
11949
12195
|
case 4: {
|
|
11950
12196
|
if (tag !== 34) {
|
|
11951
12197
|
break;
|
|
11952
12198
|
}
|
|
11953
|
-
message.startedAt = reader.
|
|
12199
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
11954
12200
|
continue;
|
|
11955
12201
|
}
|
|
11956
12202
|
case 5: {
|
|
11957
12203
|
if (tag !== 42) {
|
|
11958
12204
|
break;
|
|
11959
12205
|
}
|
|
11960
|
-
message.finishedAt = reader.
|
|
12206
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
11961
12207
|
continue;
|
|
11962
12208
|
}
|
|
11963
12209
|
}
|
|
@@ -11970,30 +12216,30 @@ exports.TripsSummaryResponse = {
|
|
|
11970
12216
|
},
|
|
11971
12217
|
fromJSON(object) {
|
|
11972
12218
|
return {
|
|
11973
|
-
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
startedAt: isSet(object.
|
|
11977
|
-
finishedAt: isSet(object.
|
|
12219
|
+
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports) ? object.reports.map((e) => trip_1.FusionTrip.fromJSON(e)) : [],
|
|
12220
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
12221
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
12222
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
12223
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
11978
12224
|
};
|
|
11979
12225
|
},
|
|
11980
12226
|
toJSON(message) {
|
|
11981
12227
|
var _a;
|
|
11982
12228
|
const obj = {};
|
|
11983
12229
|
if ((_a = message.Reports) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11984
|
-
obj.
|
|
12230
|
+
obj.reports = message.Reports.map((e) => trip_1.FusionTrip.toJSON(e));
|
|
11985
12231
|
}
|
|
11986
|
-
if (message.
|
|
11987
|
-
obj.
|
|
12232
|
+
if (message.records !== 0) {
|
|
12233
|
+
obj.records = Math.round(message.records);
|
|
11988
12234
|
}
|
|
11989
|
-
if (message.
|
|
11990
|
-
obj.
|
|
12235
|
+
if (message.cost !== 0) {
|
|
12236
|
+
obj.cost = Math.round(message.cost);
|
|
11991
12237
|
}
|
|
11992
|
-
if (message.startedAt !==
|
|
11993
|
-
obj.
|
|
12238
|
+
if (message.startedAt !== undefined) {
|
|
12239
|
+
obj.started_at = message.startedAt.toISOString();
|
|
11994
12240
|
}
|
|
11995
|
-
if (message.finishedAt !==
|
|
11996
|
-
obj.
|
|
12241
|
+
if (message.finishedAt !== undefined) {
|
|
12242
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
11997
12243
|
}
|
|
11998
12244
|
return obj;
|
|
11999
12245
|
},
|
|
@@ -12004,10 +12250,10 @@ exports.TripsSummaryResponse = {
|
|
|
12004
12250
|
var _a, _b, _c, _d, _e;
|
|
12005
12251
|
const message = createBaseTripsSummaryResponse();
|
|
12006
12252
|
message.Reports = ((_a = object.Reports) === null || _a === void 0 ? void 0 : _a.map((e) => trip_1.FusionTrip.fromPartial(e))) || [];
|
|
12007
|
-
message.
|
|
12008
|
-
message.
|
|
12009
|
-
message.startedAt = (_d = object.startedAt) !== null && _d !== void 0 ? _d :
|
|
12010
|
-
message.finishedAt = (_e = object.finishedAt) !== null && _e !== void 0 ? _e :
|
|
12253
|
+
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
12254
|
+
message.cost = (_c = object.cost) !== null && _c !== void 0 ? _c : 0;
|
|
12255
|
+
message.startedAt = (_d = object.startedAt) !== null && _d !== void 0 ? _d : undefined;
|
|
12256
|
+
message.finishedAt = (_e = object.finishedAt) !== null && _e !== void 0 ? _e : undefined;
|
|
12011
12257
|
return message;
|
|
12012
12258
|
},
|
|
12013
12259
|
};
|