@fatehan/tsrp 1.0.21 → 1.0.23
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.js +6 -6
- package/dist/fatehan/google/protobuf/timestamp.js +2 -2
- package/dist/fatehan/models/fusion.js +8 -8
- package/dist/fatehan/models/models.js +10 -10
- package/dist/fatehan/models/operation.js +6 -6
- package/dist/fatehan/notifies/notify.js +12 -12
- package/dist/fatehan/packets/dataModel.js +51 -51
- package/dist/fatehan/packets/messages.js +7 -7
- package/dist/fatehan/reports/report.d.ts +2 -2
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +115 -111
- package/dist/fatehan/trips/trip.js +19 -19
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -1
- package/dist/index.test.js +37 -14
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.7.
|
|
4
|
+
// protoc-gen-ts_proto v2.7.5
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: trips/trip.proto
|
|
7
7
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
@@ -871,7 +871,7 @@ exports.Monthly = {
|
|
|
871
871
|
},
|
|
872
872
|
decode(input, length) {
|
|
873
873
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
874
|
-
|
|
874
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
875
875
|
const message = createBaseMonthly();
|
|
876
876
|
while (reader.pos < end) {
|
|
877
877
|
const tag = reader.uint32();
|
|
@@ -1161,7 +1161,7 @@ exports.MonthlyCompact = {
|
|
|
1161
1161
|
},
|
|
1162
1162
|
decode(input, length) {
|
|
1163
1163
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1164
|
-
|
|
1164
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1165
1165
|
const message = createBaseMonthlyCompact();
|
|
1166
1166
|
while (reader.pos < end) {
|
|
1167
1167
|
const tag = reader.uint32();
|
|
@@ -1457,7 +1457,7 @@ exports.MonthlyCompact_GreenDrivingEntry = {
|
|
|
1457
1457
|
},
|
|
1458
1458
|
decode(input, length) {
|
|
1459
1459
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1460
|
-
|
|
1460
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1461
1461
|
const message = createBaseMonthlyCompact_GreenDrivingEntry();
|
|
1462
1462
|
while (reader.pos < end) {
|
|
1463
1463
|
const tag = reader.uint32();
|
|
@@ -1526,7 +1526,7 @@ exports.MonthlyCompact_TemperatureEntry = {
|
|
|
1526
1526
|
},
|
|
1527
1527
|
decode(input, length) {
|
|
1528
1528
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1529
|
-
|
|
1529
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1530
1530
|
const message = createBaseMonthlyCompact_TemperatureEntry();
|
|
1531
1531
|
while (reader.pos < end) {
|
|
1532
1532
|
const tag = reader.uint32();
|
|
@@ -1595,7 +1595,7 @@ exports.MonthlyCompact_HumidityEntry = {
|
|
|
1595
1595
|
},
|
|
1596
1596
|
decode(input, length) {
|
|
1597
1597
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1598
|
-
|
|
1598
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1599
1599
|
const message = createBaseMonthlyCompact_HumidityEntry();
|
|
1600
1600
|
while (reader.pos < end) {
|
|
1601
1601
|
const tag = reader.uint32();
|
|
@@ -1664,7 +1664,7 @@ exports.MonthlyCompact_CrashesEntry = {
|
|
|
1664
1664
|
},
|
|
1665
1665
|
decode(input, length) {
|
|
1666
1666
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1667
|
-
|
|
1667
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1668
1668
|
const message = createBaseMonthlyCompact_CrashesEntry();
|
|
1669
1669
|
while (reader.pos < end) {
|
|
1670
1670
|
const tag = reader.uint32();
|
|
@@ -1733,7 +1733,7 @@ exports.MonthlyCompact_SpeedsEntry = {
|
|
|
1733
1733
|
},
|
|
1734
1734
|
decode(input, length) {
|
|
1735
1735
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1736
|
-
|
|
1736
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1737
1737
|
const message = createBaseMonthlyCompact_SpeedsEntry();
|
|
1738
1738
|
while (reader.pos < end) {
|
|
1739
1739
|
const tag = reader.uint32();
|
|
@@ -1859,7 +1859,7 @@ exports.Trip = {
|
|
|
1859
1859
|
},
|
|
1860
1860
|
decode(input, length) {
|
|
1861
1861
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
1862
|
-
|
|
1862
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1863
1863
|
const message = createBaseTrip();
|
|
1864
1864
|
while (reader.pos < end) {
|
|
1865
1865
|
const tag = reader.uint32();
|
|
@@ -2153,7 +2153,7 @@ exports.TripCompact = {
|
|
|
2153
2153
|
},
|
|
2154
2154
|
decode(input, length) {
|
|
2155
2155
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2156
|
-
|
|
2156
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2157
2157
|
const message = createBaseTripCompact();
|
|
2158
2158
|
while (reader.pos < end) {
|
|
2159
2159
|
const tag = reader.uint32();
|
|
@@ -2513,7 +2513,7 @@ exports.TripCompact_GreenDrivingEntry = {
|
|
|
2513
2513
|
},
|
|
2514
2514
|
decode(input, length) {
|
|
2515
2515
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2516
|
-
|
|
2516
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2517
2517
|
const message = createBaseTripCompact_GreenDrivingEntry();
|
|
2518
2518
|
while (reader.pos < end) {
|
|
2519
2519
|
const tag = reader.uint32();
|
|
@@ -2582,7 +2582,7 @@ exports.TripCompact_TemperatureEntry = {
|
|
|
2582
2582
|
},
|
|
2583
2583
|
decode(input, length) {
|
|
2584
2584
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2585
|
-
|
|
2585
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2586
2586
|
const message = createBaseTripCompact_TemperatureEntry();
|
|
2587
2587
|
while (reader.pos < end) {
|
|
2588
2588
|
const tag = reader.uint32();
|
|
@@ -2651,7 +2651,7 @@ exports.TripCompact_HumidityEntry = {
|
|
|
2651
2651
|
},
|
|
2652
2652
|
decode(input, length) {
|
|
2653
2653
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2654
|
-
|
|
2654
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2655
2655
|
const message = createBaseTripCompact_HumidityEntry();
|
|
2656
2656
|
while (reader.pos < end) {
|
|
2657
2657
|
const tag = reader.uint32();
|
|
@@ -2720,7 +2720,7 @@ exports.TripCompact_CrashesEntry = {
|
|
|
2720
2720
|
},
|
|
2721
2721
|
decode(input, length) {
|
|
2722
2722
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2723
|
-
|
|
2723
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2724
2724
|
const message = createBaseTripCompact_CrashesEntry();
|
|
2725
2725
|
while (reader.pos < end) {
|
|
2726
2726
|
const tag = reader.uint32();
|
|
@@ -2789,7 +2789,7 @@ exports.TripCompact_SpeedsEntry = {
|
|
|
2789
2789
|
},
|
|
2790
2790
|
decode(input, length) {
|
|
2791
2791
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2792
|
-
|
|
2792
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2793
2793
|
const message = createBaseTripCompact_SpeedsEntry();
|
|
2794
2794
|
while (reader.pos < end) {
|
|
2795
2795
|
const tag = reader.uint32();
|
|
@@ -2863,7 +2863,7 @@ exports.TripPoint = {
|
|
|
2863
2863
|
},
|
|
2864
2864
|
decode(input, length) {
|
|
2865
2865
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2866
|
-
|
|
2866
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2867
2867
|
const message = createBaseTripPoint();
|
|
2868
2868
|
while (reader.pos < end) {
|
|
2869
2869
|
const tag = reader.uint32();
|
|
@@ -2944,7 +2944,7 @@ exports.TripDurationStat = {
|
|
|
2944
2944
|
},
|
|
2945
2945
|
decode(input, length) {
|
|
2946
2946
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2947
|
-
|
|
2947
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2948
2948
|
const message = createBaseTripDurationStat();
|
|
2949
2949
|
while (reader.pos < end) {
|
|
2950
2950
|
const tag = reader.uint32();
|
|
@@ -3144,7 +3144,7 @@ exports.FusionTrip = {
|
|
|
3144
3144
|
},
|
|
3145
3145
|
decode(input, length) {
|
|
3146
3146
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3147
|
-
|
|
3147
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3148
3148
|
const message = createBaseFusionTrip();
|
|
3149
3149
|
while (reader.pos < end) {
|
|
3150
3150
|
const tag = reader.uint32();
|
|
@@ -3608,7 +3608,7 @@ exports.TripTask = {
|
|
|
3608
3608
|
},
|
|
3609
3609
|
decode(input, length) {
|
|
3610
3610
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
3611
|
-
|
|
3611
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3612
3612
|
const message = createBaseTripTask();
|
|
3613
3613
|
while (reader.pos < end) {
|
|
3614
3614
|
const tag = reader.uint32();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DashboardIndividualRequest, DashboardIndividualResponse, LogRequest, LogResponse, RouteReviewRequest, RouteReviewResponse, RouteStopRequest, RouteStopResponse, TripPerformanceRequest, TripPerformanceResponse, TripReportRequest, TripReportResponse } from "./fatehan/reports/report";
|
|
1
|
+
import { AreaSummaryReviewRequest, AreaSummaryReviewResponse, DashboardIndividualRequest, DashboardIndividualResponse, DeviceDataRequest, DeviceDataResponse, LogRequest, LogResponse, RouteReviewRequest, RouteReviewResponse, RouteStopRequest, RouteStopResponse, TripPerformanceRequest, TripPerformanceResponse, TripReportRequest, TripReportResponse, WorkCycleRequest, WorkCycleResponse } from "./fatehan/reports/report";
|
|
2
2
|
export declare class ReportService {
|
|
3
3
|
private readonly url;
|
|
4
4
|
private readonly namespace;
|
|
@@ -10,5 +10,8 @@ export declare class ReportService {
|
|
|
10
10
|
RouteReviewReport(request: RouteReviewRequest): Promise<RouteReviewResponse>;
|
|
11
11
|
DashboardIndividual(request: DashboardIndividualRequest): Promise<DashboardIndividualResponse>;
|
|
12
12
|
LogReport(request: LogRequest): Promise<LogResponse>;
|
|
13
|
+
DataReport(request: DeviceDataRequest): Promise<DeviceDataResponse>;
|
|
14
|
+
AreaSummaryReviewReport(request: AreaSummaryReviewRequest): Promise<AreaSummaryReviewResponse>;
|
|
15
|
+
WorkCycleReport(request: WorkCycleRequest): Promise<WorkCycleResponse>;
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+C;IACzE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;gBAE1B,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM;IAcjE,eAAe,CACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC;IAyBtB,qBAAqB,CAC1B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,uBAAuB,CAAC;IAyB5B,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyBnE,iBAAiB,CACtB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,mBAAmB,CAAC;IAyBxB,mBAAmB,CACxB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;IAyBhC,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;IAuBpD,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyBnE,uBAAuB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IAwB9B,eAAe,CACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC;CAuB9B"}
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ class ReportService {
|
|
|
8
8
|
this.url = url;
|
|
9
9
|
this.headers = {
|
|
10
10
|
"Content-Type": "application/octet-stream",
|
|
11
|
-
|
|
11
|
+
Accept: "application/octet-stream",
|
|
12
12
|
};
|
|
13
13
|
if (authorization) {
|
|
14
14
|
this.headers["Authorization"] = "Bearer " + authorization;
|
|
@@ -107,5 +107,50 @@ class ReportService {
|
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
+
DataReport(request) {
|
|
111
|
+
return new Promise(async (resolve, reject) => {
|
|
112
|
+
const response = await fetch(`${this.url}/${this.namespace}/DeviceDataReport`, {
|
|
113
|
+
method: "POST",
|
|
114
|
+
headers: this.headers,
|
|
115
|
+
body: report_1.DeviceDataRequest.encode(request).finish(),
|
|
116
|
+
});
|
|
117
|
+
if (response.ok) {
|
|
118
|
+
resolve(report_1.DeviceDataResponse.decode(new Uint8Array(await response.arrayBuffer())));
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
reject(await response.text());
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
AreaSummaryReviewReport(request) {
|
|
126
|
+
return new Promise(async (resolve, reject) => {
|
|
127
|
+
const response = await fetch(`${this.url}/${this.namespace}/AreaSummaryReviewReport`, {
|
|
128
|
+
method: "POST",
|
|
129
|
+
headers: this.headers,
|
|
130
|
+
body: report_1.AreaSummaryReviewRequest.encode(request).finish(),
|
|
131
|
+
});
|
|
132
|
+
if (response.ok) {
|
|
133
|
+
resolve(report_1.AreaSummaryReviewResponse.decode(new Uint8Array(await response.arrayBuffer())));
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
reject(await response.text());
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
WorkCycleReport(request) {
|
|
141
|
+
return new Promise(async (resolve, reject) => {
|
|
142
|
+
const response = await fetch(`${this.url}/${this.namespace}/WorkCycleReport`, {
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: this.headers,
|
|
145
|
+
body: report_1.WorkCycleRequest.encode(request).finish(),
|
|
146
|
+
});
|
|
147
|
+
if (response.ok) {
|
|
148
|
+
resolve(report_1.WorkCycleResponse.decode(new Uint8Array(await response.arrayBuffer())));
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
reject(await response.text());
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
110
155
|
}
|
|
111
156
|
exports.ReportService = ReportService;
|
package/dist/index.test.js
CHANGED
|
@@ -7,42 +7,42 @@ const vitest_1 = require("vitest");
|
|
|
7
7
|
const index_1 = require("./index");
|
|
8
8
|
const report_1 = require("./fatehan/reports/report");
|
|
9
9
|
const long_1 = __importDefault(require("long"));
|
|
10
|
-
(0, vitest_1.describe)(
|
|
10
|
+
(0, vitest_1.describe)("ReportService", () => {
|
|
11
11
|
let url = "http://report.myavl.ir:1272";
|
|
12
|
-
let token = "
|
|
12
|
+
let token = "1000028|oOCcnfZrHsjscQbnJcF8yvzSVRQPgzuH2nC1gat186e7a9f6";
|
|
13
13
|
let organization = "1000000";
|
|
14
14
|
let c = new index_1.ReportService(url, token, organization);
|
|
15
|
-
(0, vitest_1.it)(
|
|
15
|
+
(0, vitest_1.it)("TripPerformanceReport", async () => {
|
|
16
16
|
let res = await c.TripPerformanceReport({
|
|
17
|
-
|
|
18
|
-
groupByDevice: true,
|
|
19
|
-
deviceId: [long_1.default.fromInt(124251414), long_1.default.fromInt(124251413)],
|
|
17
|
+
deviceId: [long_1.default.fromInt(10168), long_1.default.fromInt(10532)],
|
|
20
18
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
21
|
-
finishedAt: new Date("2025-
|
|
22
|
-
groupByDatetime: report_1.TripPerformanceRequest_GroupBy.
|
|
19
|
+
finishedAt: new Date("2025-06-22 00:00:00"),
|
|
20
|
+
groupByDatetime: report_1.TripPerformanceRequest_GroupBy.Month,
|
|
21
|
+
groupByDevice: true,
|
|
22
|
+
hourly: false,
|
|
23
23
|
});
|
|
24
24
|
console.log("TripPerformanceReport", res.records);
|
|
25
25
|
});
|
|
26
|
-
(0, vitest_1.it)(
|
|
26
|
+
(0, vitest_1.it)("TripReport", async () => {
|
|
27
27
|
let res = await c.TripReport({
|
|
28
28
|
deviceIds: [long_1.default.fromInt(124251414), long_1.default.fromInt(124251413)],
|
|
29
29
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
30
|
-
finishedAt: new Date("2025-04-22 00:00:00")
|
|
30
|
+
finishedAt: new Date("2025-04-22 00:00:00"),
|
|
31
31
|
});
|
|
32
32
|
console.log("TripReport", res.records);
|
|
33
33
|
});
|
|
34
|
-
(0, vitest_1.it)(
|
|
34
|
+
(0, vitest_1.it)("RouteReviewReport", async () => {
|
|
35
35
|
let res = await c.RouteReviewReport({
|
|
36
36
|
deviceId: long_1.default.fromInt(124251414),
|
|
37
37
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
38
38
|
finishedAt: new Date("2025-04-22 00:00:00"),
|
|
39
39
|
includeTrip: true,
|
|
40
40
|
source: report_1.Source.CASSANDRA,
|
|
41
|
-
stopType: report_1.StopCalculateIo.IGNITION
|
|
41
|
+
stopType: report_1.StopCalculateIo.IGNITION,
|
|
42
42
|
});
|
|
43
43
|
console.log("RouteReviewReport", res.records);
|
|
44
44
|
});
|
|
45
|
-
(0, vitest_1.it)(
|
|
45
|
+
(0, vitest_1.it)("DashboardReport", async () => {
|
|
46
46
|
let res = await c.DashboardIndividual({
|
|
47
47
|
deviceId: long_1.default.fromInt(124251414),
|
|
48
48
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
@@ -50,7 +50,7 @@ const long_1 = __importDefault(require("long"));
|
|
|
50
50
|
});
|
|
51
51
|
console.log("DashboardReport", res);
|
|
52
52
|
});
|
|
53
|
-
(0, vitest_1.it)(
|
|
53
|
+
(0, vitest_1.it)("LogReport", async () => {
|
|
54
54
|
let res = await c.LogReport({
|
|
55
55
|
deviceId: long_1.default.fromInt(124251414),
|
|
56
56
|
startedAt: new Date("2025-05-19 00:00:00"),
|
|
@@ -61,4 +61,27 @@ const long_1 = __importDefault(require("long"));
|
|
|
61
61
|
});
|
|
62
62
|
console.log("LogReport", res);
|
|
63
63
|
});
|
|
64
|
+
(0, vitest_1.it)("AreaSummaryReviewReport", async () => {
|
|
65
|
+
let res = await c.AreaSummaryReviewReport({
|
|
66
|
+
areaIds: [long_1.default.fromInt(12425)],
|
|
67
|
+
areaSource: report_1.AreaSummaryReviewRequest_AreaSourceEnum.odyssey,
|
|
68
|
+
startedAt: new Date("2025-06-01 00:00:00"),
|
|
69
|
+
finishedAt: new Date("2025-06-30 00:00:00"),
|
|
70
|
+
deviceIds: [long_1.default.fromInt(124251414)],
|
|
71
|
+
groupBy: report_1.AreaSummaryReviewRequest_GroupEnum.month,
|
|
72
|
+
scope: report_1.AreaSummaryReviewRequest_ScopeEnum.both_side,
|
|
73
|
+
source: report_1.Source.CASSANDRA,
|
|
74
|
+
});
|
|
75
|
+
console.log("AreaSummaryReviewReport", res);
|
|
76
|
+
});
|
|
77
|
+
(0, vitest_1.it)("WorkCycleReport", async () => {
|
|
78
|
+
let res = await c.WorkCycleReport({
|
|
79
|
+
areaStopSeconds: 10,
|
|
80
|
+
startedAt: new Date("2025-06-01 00:00:00"),
|
|
81
|
+
finishedAt: new Date("2025-06-30 00:00:00"),
|
|
82
|
+
deviceIds: [long_1.default.fromInt(124251414)],
|
|
83
|
+
shovelStopSeconds: 60,
|
|
84
|
+
});
|
|
85
|
+
console.log("WorkCycleReport", res);
|
|
86
|
+
});
|
|
64
87
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fatehan/tsrp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"description": "fatehan main models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/google-protobuf": "^3.15.12",
|
|
30
|
-
"@types/long": "^
|
|
31
|
-
"@types/node": "^
|
|
30
|
+
"@types/long": "^5.0.0",
|
|
31
|
+
"@types/node": "^24.0.3",
|
|
32
32
|
"ts-node": "^10.9.2",
|
|
33
|
-
"ts-proto": "^2.7.
|
|
33
|
+
"ts-proto": "^2.7.5",
|
|
34
34
|
"typescript": "^5.8.3",
|
|
35
|
-
"vitest": "^3.2.
|
|
35
|
+
"vitest": "^3.2.3"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@bufbuild/protobuf": "^2.4.0",
|