@fatehan/tsrp 1.0.3 → 1.0.5
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/reports/report.d.ts +7 -6
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +176 -159
- package/dist/fatehan/trips/trip.js +86 -86
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/package.json +15 -7
- package/readme.md +25 -1
|
@@ -986,28 +986,28 @@ exports.AreaSplitterRequest = {
|
|
|
986
986
|
},
|
|
987
987
|
fromJSON(object) {
|
|
988
988
|
return {
|
|
989
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
990
|
-
? object.
|
|
989
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
990
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
991
991
|
: [],
|
|
992
|
-
areaIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
993
|
-
startedAt: isSet(object.
|
|
994
|
-
finishedAt: isSet(object.
|
|
992
|
+
areaIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.area_ids) ? object.area_ids.map((e) => globalThis.Number(e)) : [],
|
|
993
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
994
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
995
995
|
};
|
|
996
996
|
},
|
|
997
997
|
toJSON(message) {
|
|
998
998
|
var _a, _b;
|
|
999
999
|
const obj = {};
|
|
1000
1000
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1001
|
-
obj.
|
|
1001
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
1002
1002
|
}
|
|
1003
1003
|
if ((_b = message.areaIds) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1004
|
-
obj.
|
|
1004
|
+
obj.area_ids = message.areaIds.map((e) => Math.round(e));
|
|
1005
1005
|
}
|
|
1006
1006
|
if (message.startedAt !== undefined) {
|
|
1007
|
-
obj.
|
|
1007
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1008
1008
|
}
|
|
1009
1009
|
if (message.finishedAt !== undefined) {
|
|
1010
|
-
obj.
|
|
1010
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1011
1011
|
}
|
|
1012
1012
|
return obj;
|
|
1013
1013
|
},
|
|
@@ -1081,8 +1081,8 @@ exports.AreaSplitterResponse = {
|
|
|
1081
1081
|
reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports)
|
|
1082
1082
|
? object.reports.map((e) => exports.AreaSplitterResponse_Record.fromJSON(e))
|
|
1083
1083
|
: [],
|
|
1084
|
-
startedAt: isSet(object.
|
|
1085
|
-
finishedAt: isSet(object.
|
|
1084
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1085
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1086
1086
|
};
|
|
1087
1087
|
},
|
|
1088
1088
|
toJSON(message) {
|
|
@@ -1092,10 +1092,10 @@ exports.AreaSplitterResponse = {
|
|
|
1092
1092
|
obj.reports = message.reports.map((e) => exports.AreaSplitterResponse_Record.toJSON(e));
|
|
1093
1093
|
}
|
|
1094
1094
|
if (message.startedAt !== undefined) {
|
|
1095
|
-
obj.
|
|
1095
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1096
1096
|
}
|
|
1097
1097
|
if (message.finishedAt !== undefined) {
|
|
1098
|
-
obj.
|
|
1098
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1099
1099
|
}
|
|
1100
1100
|
return obj;
|
|
1101
1101
|
},
|
|
@@ -1326,23 +1326,23 @@ exports.AreaSplitterResponse_Record = {
|
|
|
1326
1326
|
},
|
|
1327
1327
|
fromJSON(object) {
|
|
1328
1328
|
return {
|
|
1329
|
-
deviceId: isSet(object.
|
|
1329
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
1330
1330
|
start: isSet(object.start) ? exports.AreaSplitterResponse_Area.fromJSON(object.start) : undefined,
|
|
1331
1331
|
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.
|
|
1332
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
1333
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
1334
|
+
durationOrigin: isSet(object.duration_origin) ? globalThis.Number(object.duration_origin) : 0,
|
|
1335
|
+
durationTrip: isSet(object.duration_trip) ? globalThis.Number(object.duration_trip) : 0,
|
|
1336
|
+
durationDestination: isSet(object.duration_destination) ? globalThis.Number(object.duration_destination) : 0,
|
|
1337
1337
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : undefined,
|
|
1338
|
-
speedMax: isSet(object.
|
|
1339
|
-
speedAvg: isSet(object.
|
|
1338
|
+
speedMax: isSet(object.speed_max) ? globalThis.Number(object.speed_max) : 0,
|
|
1339
|
+
speedAvg: isSet(object.speed_avg) ? globalThis.Number(object.speed_avg) : 0,
|
|
1340
1340
|
};
|
|
1341
1341
|
},
|
|
1342
1342
|
toJSON(message) {
|
|
1343
1343
|
const obj = {};
|
|
1344
1344
|
if (message.deviceId !== 0) {
|
|
1345
|
-
obj.
|
|
1345
|
+
obj.device_id = Math.round(message.deviceId);
|
|
1346
1346
|
}
|
|
1347
1347
|
if (message.start !== undefined) {
|
|
1348
1348
|
obj.start = exports.AreaSplitterResponse_Area.toJSON(message.start);
|
|
@@ -1351,28 +1351,28 @@ exports.AreaSplitterResponse_Record = {
|
|
|
1351
1351
|
obj.finish = exports.AreaSplitterResponse_Area.toJSON(message.finish);
|
|
1352
1352
|
}
|
|
1353
1353
|
if (message.startedAt !== undefined) {
|
|
1354
|
-
obj.
|
|
1354
|
+
obj.started_at = message.startedAt.toISOString();
|
|
1355
1355
|
}
|
|
1356
1356
|
if (message.finishedAt !== undefined) {
|
|
1357
|
-
obj.
|
|
1357
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
1358
1358
|
}
|
|
1359
1359
|
if (message.durationOrigin !== 0) {
|
|
1360
|
-
obj.
|
|
1360
|
+
obj.duration_origin = Math.round(message.durationOrigin);
|
|
1361
1361
|
}
|
|
1362
1362
|
if (message.durationTrip !== 0) {
|
|
1363
|
-
obj.
|
|
1363
|
+
obj.duration_trip = Math.round(message.durationTrip);
|
|
1364
1364
|
}
|
|
1365
1365
|
if (message.durationDestination !== 0) {
|
|
1366
|
-
obj.
|
|
1366
|
+
obj.duration_destination = Math.round(message.durationDestination);
|
|
1367
1367
|
}
|
|
1368
1368
|
if (message.mileage !== undefined) {
|
|
1369
1369
|
obj.mileage = Math.round(message.mileage);
|
|
1370
1370
|
}
|
|
1371
1371
|
if (message.speedMax !== 0) {
|
|
1372
|
-
obj.
|
|
1372
|
+
obj.speed_max = Math.round(message.speedMax);
|
|
1373
1373
|
}
|
|
1374
1374
|
if (message.speedAvg !== 0) {
|
|
1375
|
-
obj.
|
|
1375
|
+
obj.speed_avg = Math.round(message.speedAvg);
|
|
1376
1376
|
}
|
|
1377
1377
|
return obj;
|
|
1378
1378
|
},
|
|
@@ -9059,8 +9059,8 @@ exports.DailyTrafficResponse = {
|
|
|
9059
9059
|
},
|
|
9060
9060
|
fromJSON(object) {
|
|
9061
9061
|
return {
|
|
9062
|
-
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
9063
|
-
? object.
|
|
9062
|
+
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports)
|
|
9063
|
+
? object.reports.map((e) => exports.DailyTrafficResponse_DailyTraffic.fromJSON(e))
|
|
9064
9064
|
: [],
|
|
9065
9065
|
};
|
|
9066
9066
|
},
|
|
@@ -9068,7 +9068,7 @@ exports.DailyTrafficResponse = {
|
|
|
9068
9068
|
var _a;
|
|
9069
9069
|
const obj = {};
|
|
9070
9070
|
if ((_a = message.Reports) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9071
|
-
obj.
|
|
9071
|
+
obj.reports = message.Reports.map((e) => exports.DailyTrafficResponse_DailyTraffic.toJSON(e));
|
|
9072
9072
|
}
|
|
9073
9073
|
return obj;
|
|
9074
9074
|
},
|
|
@@ -9156,29 +9156,29 @@ exports.DailyTrafficResponse_Traffic = {
|
|
|
9156
9156
|
},
|
|
9157
9157
|
fromJSON(object) {
|
|
9158
9158
|
return {
|
|
9159
|
-
enteredAt: isSet(object.
|
|
9160
|
-
exitedAt: isSet(object.
|
|
9159
|
+
enteredAt: isSet(object.entered_at) ? fromJsonTimestamp(object.entered_at) : undefined,
|
|
9160
|
+
exitedAt: isSet(object.exited_at) ? fromJsonTimestamp(object.exited_at) : undefined,
|
|
9161
9161
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
9162
|
-
geoId: isSet(object.
|
|
9163
|
-
geoName: isSet(object.
|
|
9162
|
+
geoId: isSet(object.geo_id) ? globalThis.Number(object.geo_id) : 0,
|
|
9163
|
+
geoName: isSet(object.geo_name) ? globalThis.String(object.geo_name) : undefined,
|
|
9164
9164
|
};
|
|
9165
9165
|
},
|
|
9166
9166
|
toJSON(message) {
|
|
9167
9167
|
const obj = {};
|
|
9168
9168
|
if (message.enteredAt !== undefined) {
|
|
9169
|
-
obj.
|
|
9169
|
+
obj.entered_at = message.enteredAt.toISOString();
|
|
9170
9170
|
}
|
|
9171
9171
|
if (message.exitedAt !== undefined) {
|
|
9172
|
-
obj.
|
|
9172
|
+
obj.exited_at = message.exitedAt.toISOString();
|
|
9173
9173
|
}
|
|
9174
9174
|
if (message.mileage !== 0) {
|
|
9175
9175
|
obj.mileage = Math.round(message.mileage);
|
|
9176
9176
|
}
|
|
9177
9177
|
if (message.geoId !== 0) {
|
|
9178
|
-
obj.
|
|
9178
|
+
obj.geo_id = Math.round(message.geoId);
|
|
9179
9179
|
}
|
|
9180
9180
|
if (message.geoName !== undefined) {
|
|
9181
|
-
obj.
|
|
9181
|
+
obj.geo_name = message.geoName;
|
|
9182
9182
|
}
|
|
9183
9183
|
return obj;
|
|
9184
9184
|
},
|
|
@@ -9250,7 +9250,7 @@ exports.DailyTrafficResponse_DailyTraffic = {
|
|
|
9250
9250
|
},
|
|
9251
9251
|
fromJSON(object) {
|
|
9252
9252
|
return {
|
|
9253
|
-
deviceId: isSet(object.
|
|
9253
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
9254
9254
|
date: isSet(object.date) ? fromJsonTimestamp(object.date) : undefined,
|
|
9255
9255
|
traffics: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.traffics)
|
|
9256
9256
|
? object.traffics.map((e) => exports.DailyTrafficResponse_Traffic.fromJSON(e))
|
|
@@ -9261,7 +9261,7 @@ exports.DailyTrafficResponse_DailyTraffic = {
|
|
|
9261
9261
|
var _a;
|
|
9262
9262
|
const obj = {};
|
|
9263
9263
|
if (message.deviceId !== 0) {
|
|
9264
|
-
obj.
|
|
9264
|
+
obj.device_id = Math.round(message.deviceId);
|
|
9265
9265
|
}
|
|
9266
9266
|
if (message.date !== undefined) {
|
|
9267
9267
|
obj.date = message.date.toISOString();
|
|
@@ -9356,11 +9356,11 @@ exports.DailyTrafficRequest = {
|
|
|
9356
9356
|
},
|
|
9357
9357
|
fromJSON(object) {
|
|
9358
9358
|
return {
|
|
9359
|
-
startedAt: isSet(object.
|
|
9360
|
-
finishedAt: isSet(object.
|
|
9359
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
9360
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
9361
9361
|
between: isSet(object.between) ? globalThis.Boolean(object.between) : false,
|
|
9362
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
9363
|
-
? object.
|
|
9362
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
9363
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
9364
9364
|
: [],
|
|
9365
9365
|
};
|
|
9366
9366
|
},
|
|
@@ -9368,16 +9368,16 @@ exports.DailyTrafficRequest = {
|
|
|
9368
9368
|
var _a;
|
|
9369
9369
|
const obj = {};
|
|
9370
9370
|
if (message.startedAt !== undefined) {
|
|
9371
|
-
obj.
|
|
9371
|
+
obj.started_at = message.startedAt.toISOString();
|
|
9372
9372
|
}
|
|
9373
9373
|
if (message.finishedAt !== undefined) {
|
|
9374
|
-
obj.
|
|
9374
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
9375
9375
|
}
|
|
9376
9376
|
if (message.between !== false) {
|
|
9377
9377
|
obj.between = message.between;
|
|
9378
9378
|
}
|
|
9379
9379
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9380
|
-
obj.
|
|
9380
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
9381
9381
|
}
|
|
9382
9382
|
return obj;
|
|
9383
9383
|
},
|
|
@@ -9524,7 +9524,7 @@ exports.RouteReviewRequest = {
|
|
|
9524
9524
|
},
|
|
9525
9525
|
};
|
|
9526
9526
|
function createBaseRouteReviewResponse() {
|
|
9527
|
-
return { routeList: [], stopList: [], tripList: [],
|
|
9527
|
+
return { routeList: [], stopList: [], tripList: [], records: 0, cost: 0, threads: 0 };
|
|
9528
9528
|
}
|
|
9529
9529
|
exports.RouteReviewResponse = {
|
|
9530
9530
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
@@ -9537,11 +9537,14 @@ exports.RouteReviewResponse = {
|
|
|
9537
9537
|
for (const v of message.tripList) {
|
|
9538
9538
|
trip_1.Trip.encode(v, writer.uint32(26).fork()).join();
|
|
9539
9539
|
}
|
|
9540
|
-
if (message.
|
|
9541
|
-
writer.uint32(
|
|
9540
|
+
if (message.records !== 0) {
|
|
9541
|
+
writer.uint32(32).uint32(message.records);
|
|
9542
9542
|
}
|
|
9543
|
-
if (message.
|
|
9544
|
-
|
|
9543
|
+
if (message.cost !== 0) {
|
|
9544
|
+
writer.uint32(40).uint32(message.cost);
|
|
9545
|
+
}
|
|
9546
|
+
if (message.threads !== 0) {
|
|
9547
|
+
writer.uint32(48).uint32(message.threads);
|
|
9545
9548
|
}
|
|
9546
9549
|
return writer;
|
|
9547
9550
|
},
|
|
@@ -9574,17 +9577,24 @@ exports.RouteReviewResponse = {
|
|
|
9574
9577
|
continue;
|
|
9575
9578
|
}
|
|
9576
9579
|
case 4: {
|
|
9577
|
-
if (tag !==
|
|
9580
|
+
if (tag !== 32) {
|
|
9578
9581
|
break;
|
|
9579
9582
|
}
|
|
9580
|
-
message.
|
|
9583
|
+
message.records = reader.uint32();
|
|
9581
9584
|
continue;
|
|
9582
9585
|
}
|
|
9583
9586
|
case 5: {
|
|
9584
|
-
if (tag !==
|
|
9587
|
+
if (tag !== 40) {
|
|
9585
9588
|
break;
|
|
9586
9589
|
}
|
|
9587
|
-
message.
|
|
9590
|
+
message.cost = reader.uint32();
|
|
9591
|
+
continue;
|
|
9592
|
+
}
|
|
9593
|
+
case 6: {
|
|
9594
|
+
if (tag !== 48) {
|
|
9595
|
+
break;
|
|
9596
|
+
}
|
|
9597
|
+
message.threads = reader.uint32();
|
|
9588
9598
|
continue;
|
|
9589
9599
|
}
|
|
9590
9600
|
}
|
|
@@ -9597,32 +9607,38 @@ exports.RouteReviewResponse = {
|
|
|
9597
9607
|
},
|
|
9598
9608
|
fromJSON(object) {
|
|
9599
9609
|
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))
|
|
9610
|
+
routeList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.route_list)
|
|
9611
|
+
? object.route_list.map((e) => dataModel_1.Data.fromJSON(e))
|
|
9603
9612
|
: [],
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9613
|
+
stopList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.stop_list)
|
|
9614
|
+
? object.stop_list.map((e) => exports.RouteReviewResponse_Stop.fromJSON(e))
|
|
9615
|
+
: [],
|
|
9616
|
+
tripList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.trip_list) ? object.trip_list.map((e) => trip_1.Trip.fromJSON(e)) : [],
|
|
9617
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
9618
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
9619
|
+
threads: isSet(object.threads) ? globalThis.Number(object.threads) : 0,
|
|
9607
9620
|
};
|
|
9608
9621
|
},
|
|
9609
9622
|
toJSON(message) {
|
|
9610
9623
|
var _a, _b, _c;
|
|
9611
9624
|
const obj = {};
|
|
9612
9625
|
if ((_a = message.routeList) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9613
|
-
obj.
|
|
9626
|
+
obj.route_list = message.routeList.map((e) => dataModel_1.Data.toJSON(e));
|
|
9614
9627
|
}
|
|
9615
9628
|
if ((_b = message.stopList) === null || _b === void 0 ? void 0 : _b.length) {
|
|
9616
|
-
obj.
|
|
9629
|
+
obj.stop_list = message.stopList.map((e) => exports.RouteReviewResponse_Stop.toJSON(e));
|
|
9617
9630
|
}
|
|
9618
9631
|
if ((_c = message.tripList) === null || _c === void 0 ? void 0 : _c.length) {
|
|
9619
|
-
obj.
|
|
9632
|
+
obj.trip_list = message.tripList.map((e) => trip_1.Trip.toJSON(e));
|
|
9620
9633
|
}
|
|
9621
|
-
if (message.
|
|
9622
|
-
obj.
|
|
9634
|
+
if (message.records !== 0) {
|
|
9635
|
+
obj.records = Math.round(message.records);
|
|
9623
9636
|
}
|
|
9624
|
-
if (message.
|
|
9625
|
-
obj.
|
|
9637
|
+
if (message.cost !== 0) {
|
|
9638
|
+
obj.cost = Math.round(message.cost);
|
|
9639
|
+
}
|
|
9640
|
+
if (message.threads !== 0) {
|
|
9641
|
+
obj.threads = Math.round(message.threads);
|
|
9626
9642
|
}
|
|
9627
9643
|
return obj;
|
|
9628
9644
|
},
|
|
@@ -9630,13 +9646,14 @@ exports.RouteReviewResponse = {
|
|
|
9630
9646
|
return exports.RouteReviewResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
9631
9647
|
},
|
|
9632
9648
|
fromPartial(object) {
|
|
9633
|
-
var _a, _b, _c, _d, _e;
|
|
9649
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9634
9650
|
const message = createBaseRouteReviewResponse();
|
|
9635
9651
|
message.routeList = ((_a = object.routeList) === null || _a === void 0 ? void 0 : _a.map((e) => dataModel_1.Data.fromPartial(e))) || [];
|
|
9636
9652
|
message.stopList = ((_b = object.stopList) === null || _b === void 0 ? void 0 : _b.map((e) => exports.RouteReviewResponse_Stop.fromPartial(e))) || [];
|
|
9637
9653
|
message.tripList = ((_c = object.tripList) === null || _c === void 0 ? void 0 : _c.map((e) => trip_1.Trip.fromPartial(e))) || [];
|
|
9638
|
-
message.
|
|
9639
|
-
message.
|
|
9654
|
+
message.records = (_d = object.records) !== null && _d !== void 0 ? _d : 0;
|
|
9655
|
+
message.cost = (_e = object.cost) !== null && _e !== void 0 ? _e : 0;
|
|
9656
|
+
message.threads = (_f = object.threads) !== null && _f !== void 0 ? _f : 0;
|
|
9640
9657
|
return message;
|
|
9641
9658
|
},
|
|
9642
9659
|
};
|
|
@@ -9705,8 +9722,8 @@ exports.RouteReviewResponse_Stop = {
|
|
|
9705
9722
|
fromJSON(object) {
|
|
9706
9723
|
return {
|
|
9707
9724
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
9708
|
-
startedAt: isSet(object.
|
|
9709
|
-
finishedAt: isSet(object.
|
|
9725
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
9726
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
9710
9727
|
type: isSet(object.type) ? routeReviewResponse_StopTypeFromJSON(object.type) : 0,
|
|
9711
9728
|
};
|
|
9712
9729
|
},
|
|
@@ -9716,10 +9733,10 @@ exports.RouteReviewResponse_Stop = {
|
|
|
9716
9733
|
obj.duration = Math.round(message.duration);
|
|
9717
9734
|
}
|
|
9718
9735
|
if (message.startedAt !== undefined) {
|
|
9719
|
-
obj.
|
|
9736
|
+
obj.started_at = message.startedAt.toISOString();
|
|
9720
9737
|
}
|
|
9721
9738
|
if (message.finishedAt !== undefined) {
|
|
9722
|
-
obj.
|
|
9739
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
9723
9740
|
}
|
|
9724
9741
|
if (message.type !== 0) {
|
|
9725
9742
|
obj.type = routeReviewResponse_StopTypeToJSON(message.type);
|
|
@@ -11088,12 +11105,12 @@ exports.AttendanceXRequest = {
|
|
|
11088
11105
|
},
|
|
11089
11106
|
fromJSON(object) {
|
|
11090
11107
|
return {
|
|
11091
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
11092
|
-
? object.
|
|
11108
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
11109
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
11093
11110
|
: [],
|
|
11094
|
-
startedAt: isSet(object.
|
|
11095
|
-
finishedAt: isSet(object.
|
|
11096
|
-
excludeLeaves: isSet(object.
|
|
11111
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
11112
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
11113
|
+
excludeLeaves: isSet(object.exclude_leaves) ? globalThis.Boolean(object.exclude_leaves) : false,
|
|
11097
11114
|
source: isSet(object.source) ? sourceFromJSON(object.source) : 0,
|
|
11098
11115
|
};
|
|
11099
11116
|
},
|
|
@@ -11101,16 +11118,16 @@ exports.AttendanceXRequest = {
|
|
|
11101
11118
|
var _a;
|
|
11102
11119
|
const obj = {};
|
|
11103
11120
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11104
|
-
obj.
|
|
11121
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
11105
11122
|
}
|
|
11106
11123
|
if (message.startedAt !== undefined) {
|
|
11107
|
-
obj.
|
|
11124
|
+
obj.started_at = message.startedAt.toISOString();
|
|
11108
11125
|
}
|
|
11109
11126
|
if (message.finishedAt !== undefined) {
|
|
11110
|
-
obj.
|
|
11127
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
11111
11128
|
}
|
|
11112
11129
|
if (message.excludeLeaves !== false) {
|
|
11113
|
-
obj.
|
|
11130
|
+
obj.exclude_leaves = message.excludeLeaves;
|
|
11114
11131
|
}
|
|
11115
11132
|
if (message.source !== 0) {
|
|
11116
11133
|
obj.source = sourceToJSON(message.source);
|
|
@@ -11252,7 +11269,7 @@ exports.AttendanceResponse_Event = {
|
|
|
11252
11269
|
},
|
|
11253
11270
|
fromJSON(object) {
|
|
11254
11271
|
return {
|
|
11255
|
-
dateTime: isSet(object.
|
|
11272
|
+
dateTime: isSet(object.date_time) ? fromJsonTimestamp(object.date_time) : undefined,
|
|
11256
11273
|
type: isSet(object.type) ? attendanceResponse_EventTypeFromJSON(object.type) : 0,
|
|
11257
11274
|
duration: isSet(object.duration) ? globalThis.Number(object.duration) : 0,
|
|
11258
11275
|
mileage: isSet(object.mileage) ? globalThis.Number(object.mileage) : 0,
|
|
@@ -11261,7 +11278,7 @@ exports.AttendanceResponse_Event = {
|
|
|
11261
11278
|
toJSON(message) {
|
|
11262
11279
|
const obj = {};
|
|
11263
11280
|
if (message.dateTime !== undefined) {
|
|
11264
|
-
obj.
|
|
11281
|
+
obj.date_time = message.dateTime.toISOString();
|
|
11265
11282
|
}
|
|
11266
11283
|
if (message.type !== 0) {
|
|
11267
11284
|
obj.type = attendanceResponse_EventTypeToJSON(message.type);
|
|
@@ -11521,24 +11538,24 @@ exports.AttendanceResponse_Attendance = {
|
|
|
11521
11538
|
},
|
|
11522
11539
|
fromJSON(object) {
|
|
11523
11540
|
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.
|
|
11541
|
+
enteredAt: isSet(object.entered_at) ? fromJsonTimestamp(object.entered_at) : undefined,
|
|
11542
|
+
exitedAt: isSet(object.exited_at) ? fromJsonTimestamp(object.exited_at) : undefined,
|
|
11543
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
11544
|
+
areaId: isSet(object.area_id) ? globalThis.Number(object.area_id) : 0,
|
|
11545
|
+
areaName: isSet(object.area_name) ? globalThis.String(object.area_name) : "",
|
|
11546
|
+
geoName: isSet(object.geo_name) ? globalThis.String(object.geo_name) : undefined,
|
|
11530
11547
|
overtime: isSet(object.overtime) ? globalThis.Number(object.overtime) : 0,
|
|
11531
11548
|
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.
|
|
11549
|
+
workTime: isSet(object.work_time) ? globalThis.Number(object.work_time) : 0,
|
|
11550
|
+
pricePerHour: isSet(object.price_per_hour) ? globalThis.Number(object.price_per_hour) : 0,
|
|
11551
|
+
overtimePrice: isSet(object.overtime_price) ? globalThis.Number(object.overtime_price) : 0,
|
|
11552
|
+
shortagePrice: isSet(object.shortage_price) ? globalThis.Number(object.shortage_price) : 0,
|
|
11553
|
+
workTimePrice: isSet(object.work_time_price) ? globalThis.Number(object.work_time_price) : 0,
|
|
11554
|
+
shiftStartsAt: isSet(object.shift_starts_at) ? globalThis.String(object.shift_starts_at) : "",
|
|
11555
|
+
shiftEndsAt: isSet(object.shift_ends_at) ? globalThis.String(object.shift_ends_at) : "",
|
|
11539
11556
|
subtotal: isSet(object.subtotal) ? globalThis.Number(object.subtotal) : 0,
|
|
11540
|
-
mileageInside: isSet(object.
|
|
11541
|
-
mileageOutside: isSet(object.
|
|
11557
|
+
mileageInside: isSet(object.mileage_inside) ? globalThis.Number(object.mileage_inside) : 0,
|
|
11558
|
+
mileageOutside: isSet(object.mileage_outside) ? globalThis.Number(object.mileage_outside) : 0,
|
|
11542
11559
|
events: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.events)
|
|
11543
11560
|
? object.events.map((e) => exports.AttendanceResponse_Event.fromJSON(e))
|
|
11544
11561
|
: [],
|
|
@@ -11548,22 +11565,22 @@ exports.AttendanceResponse_Attendance = {
|
|
|
11548
11565
|
var _a;
|
|
11549
11566
|
const obj = {};
|
|
11550
11567
|
if (message.enteredAt !== undefined) {
|
|
11551
|
-
obj.
|
|
11568
|
+
obj.entered_at = message.enteredAt.toISOString();
|
|
11552
11569
|
}
|
|
11553
11570
|
if (message.exitedAt !== undefined) {
|
|
11554
|
-
obj.
|
|
11571
|
+
obj.exited_at = message.exitedAt.toISOString();
|
|
11555
11572
|
}
|
|
11556
11573
|
if (message.deviceId !== 0) {
|
|
11557
|
-
obj.
|
|
11574
|
+
obj.device_id = Math.round(message.deviceId);
|
|
11558
11575
|
}
|
|
11559
11576
|
if (message.areaId !== 0) {
|
|
11560
|
-
obj.
|
|
11577
|
+
obj.area_id = Math.round(message.areaId);
|
|
11561
11578
|
}
|
|
11562
11579
|
if (message.areaName !== "") {
|
|
11563
|
-
obj.
|
|
11580
|
+
obj.area_name = message.areaName;
|
|
11564
11581
|
}
|
|
11565
11582
|
if (message.geoName !== undefined) {
|
|
11566
|
-
obj.
|
|
11583
|
+
obj.geo_name = message.geoName;
|
|
11567
11584
|
}
|
|
11568
11585
|
if (message.overtime !== 0) {
|
|
11569
11586
|
obj.overtime = Math.round(message.overtime);
|
|
@@ -11572,34 +11589,34 @@ exports.AttendanceResponse_Attendance = {
|
|
|
11572
11589
|
obj.shortage = Math.round(message.shortage);
|
|
11573
11590
|
}
|
|
11574
11591
|
if (message.workTime !== 0) {
|
|
11575
|
-
obj.
|
|
11592
|
+
obj.work_time = Math.round(message.workTime);
|
|
11576
11593
|
}
|
|
11577
11594
|
if (message.pricePerHour !== 0) {
|
|
11578
|
-
obj.
|
|
11595
|
+
obj.price_per_hour = Math.round(message.pricePerHour);
|
|
11579
11596
|
}
|
|
11580
11597
|
if (message.overtimePrice !== 0) {
|
|
11581
|
-
obj.
|
|
11598
|
+
obj.overtime_price = Math.round(message.overtimePrice);
|
|
11582
11599
|
}
|
|
11583
11600
|
if (message.shortagePrice !== 0) {
|
|
11584
|
-
obj.
|
|
11601
|
+
obj.shortage_price = Math.round(message.shortagePrice);
|
|
11585
11602
|
}
|
|
11586
11603
|
if (message.workTimePrice !== 0) {
|
|
11587
|
-
obj.
|
|
11604
|
+
obj.work_time_price = Math.round(message.workTimePrice);
|
|
11588
11605
|
}
|
|
11589
11606
|
if (message.shiftStartsAt !== "") {
|
|
11590
|
-
obj.
|
|
11607
|
+
obj.shift_starts_at = message.shiftStartsAt;
|
|
11591
11608
|
}
|
|
11592
11609
|
if (message.shiftEndsAt !== "") {
|
|
11593
|
-
obj.
|
|
11610
|
+
obj.shift_ends_at = message.shiftEndsAt;
|
|
11594
11611
|
}
|
|
11595
11612
|
if (message.subtotal !== 0) {
|
|
11596
11613
|
obj.subtotal = Math.round(message.subtotal);
|
|
11597
11614
|
}
|
|
11598
11615
|
if (message.mileageInside !== 0) {
|
|
11599
|
-
obj.
|
|
11616
|
+
obj.mileage_inside = Math.round(message.mileageInside);
|
|
11600
11617
|
}
|
|
11601
11618
|
if (message.mileageOutside !== 0) {
|
|
11602
|
-
obj.
|
|
11619
|
+
obj.mileage_outside = Math.round(message.mileageOutside);
|
|
11603
11620
|
}
|
|
11604
11621
|
if ((_a = message.events) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11605
11622
|
obj.events = message.events.map((e) => exports.AttendanceResponse_Event.toJSON(e));
|
|
@@ -11858,28 +11875,28 @@ exports.TripsSummaryRequest = {
|
|
|
11858
11875
|
},
|
|
11859
11876
|
fromJSON(object) {
|
|
11860
11877
|
return {
|
|
11861
|
-
startedAt: isSet(object.
|
|
11862
|
-
finishedAt: isSet(object.
|
|
11863
|
-
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
11864
|
-
? object.
|
|
11878
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
11879
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
11880
|
+
deviceIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.device_ids)
|
|
11881
|
+
? object.device_ids.map((e) => globalThis.Number(e))
|
|
11865
11882
|
: [],
|
|
11866
|
-
groupBy: isSet(object.
|
|
11883
|
+
groupBy: isSet(object.group_by) ? tripsSummaryRequest_GroupByFromJSON(object.group_by) : 0,
|
|
11867
11884
|
};
|
|
11868
11885
|
},
|
|
11869
11886
|
toJSON(message) {
|
|
11870
11887
|
var _a;
|
|
11871
11888
|
const obj = {};
|
|
11872
11889
|
if (message.startedAt !== undefined) {
|
|
11873
|
-
obj.
|
|
11890
|
+
obj.started_at = message.startedAt.toISOString();
|
|
11874
11891
|
}
|
|
11875
11892
|
if (message.finishedAt !== undefined) {
|
|
11876
|
-
obj.
|
|
11893
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
11877
11894
|
}
|
|
11878
11895
|
if ((_a = message.deviceIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11879
|
-
obj.
|
|
11896
|
+
obj.device_ids = message.deviceIds.map((e) => Math.round(e));
|
|
11880
11897
|
}
|
|
11881
11898
|
if (message.groupBy !== 0) {
|
|
11882
|
-
obj.
|
|
11899
|
+
obj.group_by = tripsSummaryRequest_GroupByToJSON(message.groupBy);
|
|
11883
11900
|
}
|
|
11884
11901
|
return obj;
|
|
11885
11902
|
},
|
|
@@ -11897,24 +11914,24 @@ exports.TripsSummaryRequest = {
|
|
|
11897
11914
|
},
|
|
11898
11915
|
};
|
|
11899
11916
|
function createBaseTripsSummaryResponse() {
|
|
11900
|
-
return { Reports: [],
|
|
11917
|
+
return { Reports: [], records: 0, cost: 0, startedAt: undefined, finishedAt: undefined };
|
|
11901
11918
|
}
|
|
11902
11919
|
exports.TripsSummaryResponse = {
|
|
11903
11920
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
11904
11921
|
for (const v of message.Reports) {
|
|
11905
11922
|
trip_1.FusionTrip.encode(v, writer.uint32(10).fork()).join();
|
|
11906
11923
|
}
|
|
11907
|
-
if (message.
|
|
11908
|
-
writer.uint32(16).uint64(message.
|
|
11924
|
+
if (message.records !== 0) {
|
|
11925
|
+
writer.uint32(16).uint64(message.records);
|
|
11909
11926
|
}
|
|
11910
|
-
if (message.
|
|
11911
|
-
writer.uint32(24).sint64(message.
|
|
11927
|
+
if (message.cost !== 0) {
|
|
11928
|
+
writer.uint32(24).sint64(message.cost);
|
|
11912
11929
|
}
|
|
11913
|
-
if (message.startedAt !==
|
|
11914
|
-
writer.uint32(34).
|
|
11930
|
+
if (message.startedAt !== undefined) {
|
|
11931
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.startedAt), writer.uint32(34).fork()).join();
|
|
11915
11932
|
}
|
|
11916
|
-
if (message.finishedAt !==
|
|
11917
|
-
writer.uint32(42).
|
|
11933
|
+
if (message.finishedAt !== undefined) {
|
|
11934
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.finishedAt), writer.uint32(42).fork()).join();
|
|
11918
11935
|
}
|
|
11919
11936
|
return writer;
|
|
11920
11937
|
},
|
|
@@ -11936,28 +11953,28 @@ exports.TripsSummaryResponse = {
|
|
|
11936
11953
|
if (tag !== 16) {
|
|
11937
11954
|
break;
|
|
11938
11955
|
}
|
|
11939
|
-
message.
|
|
11956
|
+
message.records = longToNumber(reader.uint64());
|
|
11940
11957
|
continue;
|
|
11941
11958
|
}
|
|
11942
11959
|
case 3: {
|
|
11943
11960
|
if (tag !== 24) {
|
|
11944
11961
|
break;
|
|
11945
11962
|
}
|
|
11946
|
-
message.
|
|
11963
|
+
message.cost = longToNumber(reader.sint64());
|
|
11947
11964
|
continue;
|
|
11948
11965
|
}
|
|
11949
11966
|
case 4: {
|
|
11950
11967
|
if (tag !== 34) {
|
|
11951
11968
|
break;
|
|
11952
11969
|
}
|
|
11953
|
-
message.startedAt = reader.
|
|
11970
|
+
message.startedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
11954
11971
|
continue;
|
|
11955
11972
|
}
|
|
11956
11973
|
case 5: {
|
|
11957
11974
|
if (tag !== 42) {
|
|
11958
11975
|
break;
|
|
11959
11976
|
}
|
|
11960
|
-
message.finishedAt = reader.
|
|
11977
|
+
message.finishedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
11961
11978
|
continue;
|
|
11962
11979
|
}
|
|
11963
11980
|
}
|
|
@@ -11970,30 +11987,30 @@ exports.TripsSummaryResponse = {
|
|
|
11970
11987
|
},
|
|
11971
11988
|
fromJSON(object) {
|
|
11972
11989
|
return {
|
|
11973
|
-
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
startedAt: isSet(object.
|
|
11977
|
-
finishedAt: isSet(object.
|
|
11990
|
+
Reports: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.reports) ? object.reports.map((e) => trip_1.FusionTrip.fromJSON(e)) : [],
|
|
11991
|
+
records: isSet(object.records) ? globalThis.Number(object.records) : 0,
|
|
11992
|
+
cost: isSet(object.cost) ? globalThis.Number(object.cost) : 0,
|
|
11993
|
+
startedAt: isSet(object.started_at) ? fromJsonTimestamp(object.started_at) : undefined,
|
|
11994
|
+
finishedAt: isSet(object.finished_at) ? fromJsonTimestamp(object.finished_at) : undefined,
|
|
11978
11995
|
};
|
|
11979
11996
|
},
|
|
11980
11997
|
toJSON(message) {
|
|
11981
11998
|
var _a;
|
|
11982
11999
|
const obj = {};
|
|
11983
12000
|
if ((_a = message.Reports) === null || _a === void 0 ? void 0 : _a.length) {
|
|
11984
|
-
obj.
|
|
12001
|
+
obj.reports = message.Reports.map((e) => trip_1.FusionTrip.toJSON(e));
|
|
11985
12002
|
}
|
|
11986
|
-
if (message.
|
|
11987
|
-
obj.
|
|
12003
|
+
if (message.records !== 0) {
|
|
12004
|
+
obj.records = Math.round(message.records);
|
|
11988
12005
|
}
|
|
11989
|
-
if (message.
|
|
11990
|
-
obj.
|
|
12006
|
+
if (message.cost !== 0) {
|
|
12007
|
+
obj.cost = Math.round(message.cost);
|
|
11991
12008
|
}
|
|
11992
|
-
if (message.startedAt !==
|
|
11993
|
-
obj.
|
|
12009
|
+
if (message.startedAt !== undefined) {
|
|
12010
|
+
obj.started_at = message.startedAt.toISOString();
|
|
11994
12011
|
}
|
|
11995
|
-
if (message.finishedAt !==
|
|
11996
|
-
obj.
|
|
12012
|
+
if (message.finishedAt !== undefined) {
|
|
12013
|
+
obj.finished_at = message.finishedAt.toISOString();
|
|
11997
12014
|
}
|
|
11998
12015
|
return obj;
|
|
11999
12016
|
},
|
|
@@ -12004,10 +12021,10 @@ exports.TripsSummaryResponse = {
|
|
|
12004
12021
|
var _a, _b, _c, _d, _e;
|
|
12005
12022
|
const message = createBaseTripsSummaryResponse();
|
|
12006
12023
|
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 :
|
|
12024
|
+
message.records = (_b = object.records) !== null && _b !== void 0 ? _b : 0;
|
|
12025
|
+
message.cost = (_c = object.cost) !== null && _c !== void 0 ? _c : 0;
|
|
12026
|
+
message.startedAt = (_d = object.startedAt) !== null && _d !== void 0 ? _d : undefined;
|
|
12027
|
+
message.finishedAt = (_e = object.finishedAt) !== null && _e !== void 0 ? _e : undefined;
|
|
12011
12028
|
return message;
|
|
12012
12029
|
},
|
|
12013
12030
|
};
|