@fatehan/tsrp 1.0.18 → 1.0.21
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 +21 -20
- package/dist/fatehan/areas/area.d.ts.map +1 -1
- package/dist/fatehan/areas/area.js +95 -86
- package/dist/fatehan/google/protobuf/timestamp.d.ts +3 -2
- package/dist/fatehan/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/fatehan/google/protobuf/timestamp.js +16 -20
- package/dist/fatehan/models/fusion.d.ts +15 -14
- package/dist/fatehan/models/fusion.d.ts.map +1 -1
- package/dist/fatehan/models/fusion.js +150 -135
- package/dist/fatehan/models/models.d.ts +25 -24
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +182 -159
- package/dist/fatehan/models/operation.d.ts +26 -25
- package/dist/fatehan/models/operation.d.ts.map +1 -1
- package/dist/fatehan/models/operation.js +111 -96
- package/dist/fatehan/notifies/notify.d.ts +23 -22
- package/dist/fatehan/notifies/notify.d.ts.map +1 -1
- package/dist/fatehan/notifies/notify.js +172 -146
- package/dist/fatehan/packets/dataModel.d.ts +63 -62
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +617 -541
- package/dist/fatehan/packets/messages.d.ts +22 -21
- package/dist/fatehan/packets/messages.d.ts.map +1 -1
- package/dist/fatehan/packets/messages.js +157 -136
- package/dist/fatehan/reports/report.d.ts +219 -222
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +1335 -1161
- package/dist/fatehan/trips/trip.d.ts +29 -28
- package/dist/fatehan/trips/trip.d.ts.map +1 -1
- package/dist/fatehan/trips/trip.js +153 -146
- package/dist/index.js +1 -1
- package/dist/index.test.js +12 -8
- package/package.json +4 -2
- package/readme.md +1 -1
package/dist/index.test.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const vitest_1 = require("vitest");
|
|
4
7
|
const index_1 = require("./index");
|
|
5
8
|
const report_1 = require("./fatehan/reports/report");
|
|
9
|
+
const long_1 = __importDefault(require("long"));
|
|
6
10
|
(0, vitest_1.describe)('ReportService', () => {
|
|
7
11
|
let url = "http://report.myavl.ir:1272";
|
|
8
12
|
let token = "Bearer 1000028|oOCcnfZrHsjscQbnJcF8yvzSVRQPgzuH2nC1gat186e7a9f6";
|
|
@@ -12,7 +16,7 @@ const report_1 = require("./fatehan/reports/report");
|
|
|
12
16
|
let res = await c.TripPerformanceReport({
|
|
13
17
|
hourly: false,
|
|
14
18
|
groupByDevice: true,
|
|
15
|
-
deviceId: [
|
|
19
|
+
deviceId: [long_1.default.fromInt(124251414), long_1.default.fromInt(124251413)],
|
|
16
20
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
17
21
|
finishedAt: new Date("2025-04-22 00:00:00"),
|
|
18
22
|
groupByDatetime: report_1.TripPerformanceRequest_GroupBy.All
|
|
@@ -21,7 +25,7 @@ const report_1 = require("./fatehan/reports/report");
|
|
|
21
25
|
});
|
|
22
26
|
(0, vitest_1.it)('TripReport', async () => {
|
|
23
27
|
let res = await c.TripReport({
|
|
24
|
-
deviceIds: [
|
|
28
|
+
deviceIds: [long_1.default.fromInt(124251414), long_1.default.fromInt(124251413)],
|
|
25
29
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
26
30
|
finishedAt: new Date("2025-04-22 00:00:00")
|
|
27
31
|
});
|
|
@@ -29,7 +33,7 @@ const report_1 = require("./fatehan/reports/report");
|
|
|
29
33
|
});
|
|
30
34
|
(0, vitest_1.it)('RouteReviewReport', async () => {
|
|
31
35
|
let res = await c.RouteReviewReport({
|
|
32
|
-
deviceId:
|
|
36
|
+
deviceId: long_1.default.fromInt(124251414),
|
|
33
37
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
34
38
|
finishedAt: new Date("2025-04-22 00:00:00"),
|
|
35
39
|
includeTrip: true,
|
|
@@ -40,7 +44,7 @@ const report_1 = require("./fatehan/reports/report");
|
|
|
40
44
|
});
|
|
41
45
|
(0, vitest_1.it)('DashboardReport', async () => {
|
|
42
46
|
let res = await c.DashboardIndividual({
|
|
43
|
-
deviceId:
|
|
47
|
+
deviceId: long_1.default.fromInt(124251414),
|
|
44
48
|
startedAt: new Date("2025-04-01 00:00:00"),
|
|
45
49
|
finishedAt: new Date("2025-04-22 00:00:00"),
|
|
46
50
|
});
|
|
@@ -48,12 +52,12 @@ const report_1 = require("./fatehan/reports/report");
|
|
|
48
52
|
});
|
|
49
53
|
(0, vitest_1.it)('LogReport', async () => {
|
|
50
54
|
let res = await c.LogReport({
|
|
51
|
-
deviceId: 124251414,
|
|
55
|
+
deviceId: long_1.default.fromInt(124251414),
|
|
52
56
|
startedAt: new Date("2025-05-19 00:00:00"),
|
|
53
57
|
finishedAt: new Date("2025-05-220 00:00:00"),
|
|
54
|
-
limit: 50,
|
|
55
|
-
page: 1,
|
|
56
|
-
sort: -1,
|
|
58
|
+
limit: long_1.default.fromInt(50),
|
|
59
|
+
page: long_1.default.fromInt(1),
|
|
60
|
+
sort: long_1.default.fromInt(-1),
|
|
57
61
|
});
|
|
58
62
|
console.log("LogReport", res);
|
|
59
63
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fatehan/tsrp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "fatehan main models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/google-protobuf": "^3.15.12",
|
|
30
|
+
"@types/long": "^4.0.2",
|
|
30
31
|
"@types/node": "^22.15.30",
|
|
31
32
|
"ts-node": "^10.9.2",
|
|
32
33
|
"ts-proto": "^2.7.3",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
},
|
|
36
37
|
"peerDependencies": {
|
|
37
38
|
"@bufbuild/protobuf": "^2.4.0",
|
|
38
|
-
"google-protobuf": "^3.21.4"
|
|
39
|
+
"google-protobuf": "^3.21.4",
|
|
40
|
+
"long": "^5.3.2"
|
|
39
41
|
}
|
|
40
42
|
}
|
package/readme.md
CHANGED
|
@@ -8,7 +8,7 @@ protoc \
|
|
|
8
8
|
-I ./src/fatehan \
|
|
9
9
|
-I ../protocols \
|
|
10
10
|
--ts_proto_out=./src/fatehan \
|
|
11
|
-
--ts_proto_opt=outputServices=none,outputClientImpl=false,esModuleInterop=true,outputEncodeMethods=true,outputJsonMethods=true \
|
|
11
|
+
--ts_proto_opt=outputServices=none,outputClientImpl=false,esModuleInterop=true,outputEncodeMethods=true,outputJsonMethods=true,useOptionals=messages,forceLong=long \
|
|
12
12
|
../protocols/**/*.proto
|
|
13
13
|
```
|
|
14
14
|
|