@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
|
@@ -4,19 +4,23 @@
|
|
|
4
4
|
// protoc-gen-ts_proto v2.7.0
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: models/fusion.proto
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
7
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
11
|
exports.FusionNotify_Body = exports.FusionNotify = exports.FusionCar = exports.CommandDevice = exports.AlertsListDevice = exports.WorkCycleDeviceList = exports.WorkCycleDevice = exports.protobufPackage = void 0;
|
|
9
12
|
/* eslint-disable */
|
|
10
13
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
14
|
+
const long_1 = __importDefault(require("long"));
|
|
11
15
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
12
16
|
exports.protobufPackage = "com.fatehan.models";
|
|
13
17
|
function createBaseWorkCycleDevice() {
|
|
14
|
-
return { deviceId:
|
|
18
|
+
return { deviceId: long_1.default.UZERO, movable: false, radius: 0, groupId: 0, organizationId: long_1.default.UZERO, name: undefined };
|
|
15
19
|
}
|
|
16
20
|
exports.WorkCycleDevice = {
|
|
17
21
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
18
|
-
if (message.deviceId
|
|
19
|
-
writer.uint32(8).uint64(message.deviceId);
|
|
22
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
23
|
+
writer.uint32(8).uint64(message.deviceId.toString());
|
|
20
24
|
}
|
|
21
25
|
if (message.movable !== false) {
|
|
22
26
|
writer.uint32(16).bool(message.movable);
|
|
@@ -27,8 +31,8 @@ exports.WorkCycleDevice = {
|
|
|
27
31
|
if (message.groupId !== 0) {
|
|
28
32
|
writer.uint32(32).uint32(message.groupId);
|
|
29
33
|
}
|
|
30
|
-
if (message.organizationId
|
|
31
|
-
writer.uint32(40).uint64(message.organizationId);
|
|
34
|
+
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
35
|
+
writer.uint32(40).uint64(message.organizationId.toString());
|
|
32
36
|
}
|
|
33
37
|
if (message.name !== undefined) {
|
|
34
38
|
writer.uint32(50).string(message.name);
|
|
@@ -46,7 +50,7 @@ exports.WorkCycleDevice = {
|
|
|
46
50
|
if (tag !== 8) {
|
|
47
51
|
break;
|
|
48
52
|
}
|
|
49
|
-
message.deviceId =
|
|
53
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
50
54
|
continue;
|
|
51
55
|
}
|
|
52
56
|
case 2: {
|
|
@@ -74,7 +78,7 @@ exports.WorkCycleDevice = {
|
|
|
74
78
|
if (tag !== 40) {
|
|
75
79
|
break;
|
|
76
80
|
}
|
|
77
|
-
message.organizationId =
|
|
81
|
+
message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
78
82
|
continue;
|
|
79
83
|
}
|
|
80
84
|
case 6: {
|
|
@@ -94,18 +98,18 @@ exports.WorkCycleDevice = {
|
|
|
94
98
|
},
|
|
95
99
|
fromJSON(object) {
|
|
96
100
|
return {
|
|
97
|
-
deviceId: isSet(object.device_id) ?
|
|
101
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
98
102
|
movable: isSet(object.movable) ? globalThis.Boolean(object.movable) : false,
|
|
99
103
|
radius: isSet(object.radius) ? globalThis.Number(object.radius) : 0,
|
|
100
104
|
groupId: isSet(object.group_id) ? globalThis.Number(object.group_id) : 0,
|
|
101
|
-
organizationId: isSet(object.organization_id) ?
|
|
105
|
+
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
|
|
102
106
|
name: isSet(object.name) ? globalThis.String(object.name) : undefined,
|
|
103
107
|
};
|
|
104
108
|
},
|
|
105
109
|
toJSON(message) {
|
|
106
110
|
const obj = {};
|
|
107
|
-
if (message.deviceId
|
|
108
|
-
obj.device_id =
|
|
111
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
112
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
109
113
|
}
|
|
110
114
|
if (message.movable !== false) {
|
|
111
115
|
obj.movable = message.movable;
|
|
@@ -116,8 +120,8 @@ exports.WorkCycleDevice = {
|
|
|
116
120
|
if (message.groupId !== 0) {
|
|
117
121
|
obj.group_id = Math.round(message.groupId);
|
|
118
122
|
}
|
|
119
|
-
if (message.organizationId
|
|
120
|
-
obj.organization_id =
|
|
123
|
+
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
124
|
+
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
121
125
|
}
|
|
122
126
|
if (message.name !== undefined) {
|
|
123
127
|
obj.name = message.name;
|
|
@@ -128,14 +132,18 @@ exports.WorkCycleDevice = {
|
|
|
128
132
|
return exports.WorkCycleDevice.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
129
133
|
},
|
|
130
134
|
fromPartial(object) {
|
|
131
|
-
var _a, _b, _c, _d
|
|
135
|
+
var _a, _b, _c, _d;
|
|
132
136
|
const message = createBaseWorkCycleDevice();
|
|
133
|
-
message.deviceId = (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
message.
|
|
137
|
-
message.
|
|
138
|
-
message.
|
|
137
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
138
|
+
? long_1.default.fromValue(object.deviceId)
|
|
139
|
+
: long_1.default.UZERO;
|
|
140
|
+
message.movable = (_a = object.movable) !== null && _a !== void 0 ? _a : false;
|
|
141
|
+
message.radius = (_b = object.radius) !== null && _b !== void 0 ? _b : 0;
|
|
142
|
+
message.groupId = (_c = object.groupId) !== null && _c !== void 0 ? _c : 0;
|
|
143
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
144
|
+
? long_1.default.fromValue(object.organizationId)
|
|
145
|
+
: long_1.default.UZERO;
|
|
146
|
+
message.name = (_d = object.name) !== null && _d !== void 0 ? _d : undefined;
|
|
139
147
|
return message;
|
|
140
148
|
},
|
|
141
149
|
};
|
|
@@ -199,7 +207,7 @@ function createBaseAlertsListDevice() {
|
|
|
199
207
|
alertListId: 0,
|
|
200
208
|
dateCreate: 0,
|
|
201
209
|
userId: 0,
|
|
202
|
-
imei:
|
|
210
|
+
imei: long_1.default.UZERO,
|
|
203
211
|
content: "",
|
|
204
212
|
alertRead: 0,
|
|
205
213
|
alertId: 0,
|
|
@@ -231,8 +239,8 @@ exports.AlertsListDevice = {
|
|
|
231
239
|
if (message.userId !== 0) {
|
|
232
240
|
writer.uint32(24).uint32(message.userId);
|
|
233
241
|
}
|
|
234
|
-
if (message.imei
|
|
235
|
-
writer.uint32(32).uint64(message.imei);
|
|
242
|
+
if (!message.imei.equals(long_1.default.UZERO)) {
|
|
243
|
+
writer.uint32(32).uint64(message.imei.toString());
|
|
236
244
|
}
|
|
237
245
|
if (message.content !== "") {
|
|
238
246
|
writer.uint32(42).string(message.content);
|
|
@@ -322,7 +330,7 @@ exports.AlertsListDevice = {
|
|
|
322
330
|
if (tag !== 32) {
|
|
323
331
|
break;
|
|
324
332
|
}
|
|
325
|
-
message.imei =
|
|
333
|
+
message.imei = long_1.default.fromString(reader.uint64().toString(), true);
|
|
326
334
|
continue;
|
|
327
335
|
}
|
|
328
336
|
case 5: {
|
|
@@ -464,7 +472,7 @@ exports.AlertsListDevice = {
|
|
|
464
472
|
alertListId: isSet(object.alertListId) ? globalThis.Number(object.alertListId) : 0,
|
|
465
473
|
dateCreate: isSet(object.dateCreate) ? globalThis.Number(object.dateCreate) : 0,
|
|
466
474
|
userId: isSet(object.userId) ? globalThis.Number(object.userId) : 0,
|
|
467
|
-
imei: isSet(object.imei) ?
|
|
475
|
+
imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
|
|
468
476
|
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
469
477
|
alertRead: isSet(object.alertRead) ? globalThis.Number(object.alertRead) : 0,
|
|
470
478
|
alertId: isSet(object.alertId) ? globalThis.Number(object.alertId) : 0,
|
|
@@ -496,8 +504,8 @@ exports.AlertsListDevice = {
|
|
|
496
504
|
if (message.userId !== 0) {
|
|
497
505
|
obj.userId = Math.round(message.userId);
|
|
498
506
|
}
|
|
499
|
-
if (message.imei
|
|
500
|
-
obj.imei =
|
|
507
|
+
if (!message.imei.equals(long_1.default.UZERO)) {
|
|
508
|
+
obj.imei = (message.imei || long_1.default.UZERO).toString();
|
|
501
509
|
}
|
|
502
510
|
if (message.content !== "") {
|
|
503
511
|
obj.content = message.content;
|
|
@@ -559,30 +567,30 @@ exports.AlertsListDevice = {
|
|
|
559
567
|
return exports.AlertsListDevice.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
560
568
|
},
|
|
561
569
|
fromPartial(object) {
|
|
562
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w
|
|
570
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
563
571
|
const message = createBaseAlertsListDevice();
|
|
564
572
|
message.alertListId = (_a = object.alertListId) !== null && _a !== void 0 ? _a : 0;
|
|
565
573
|
message.dateCreate = (_b = object.dateCreate) !== null && _b !== void 0 ? _b : 0;
|
|
566
574
|
message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : 0;
|
|
567
|
-
message.imei = (
|
|
568
|
-
message.content = (
|
|
569
|
-
message.alertRead = (
|
|
570
|
-
message.alertId = (
|
|
571
|
-
message.title = (
|
|
572
|
-
message.disabled = (
|
|
573
|
-
message.latitude = (
|
|
574
|
-
message.longitude = (
|
|
575
|
-
message.latitudeEnd = (
|
|
576
|
-
message.longitudeEnd = (
|
|
577
|
-
message.dateEnd = (
|
|
578
|
-
message.dateRead = (
|
|
579
|
-
message.alertSend = (
|
|
580
|
-
message.dateSend = (
|
|
581
|
-
message.vals = (
|
|
582
|
-
message.relId = (
|
|
583
|
-
message.createdAt = (
|
|
584
|
-
message.updatedAt = (
|
|
585
|
-
message.identificationNo = (
|
|
575
|
+
message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
|
|
576
|
+
message.content = (_d = object.content) !== null && _d !== void 0 ? _d : "";
|
|
577
|
+
message.alertRead = (_e = object.alertRead) !== null && _e !== void 0 ? _e : 0;
|
|
578
|
+
message.alertId = (_f = object.alertId) !== null && _f !== void 0 ? _f : 0;
|
|
579
|
+
message.title = (_g = object.title) !== null && _g !== void 0 ? _g : "";
|
|
580
|
+
message.disabled = (_h = object.disabled) !== null && _h !== void 0 ? _h : 0;
|
|
581
|
+
message.latitude = (_j = object.latitude) !== null && _j !== void 0 ? _j : 0;
|
|
582
|
+
message.longitude = (_k = object.longitude) !== null && _k !== void 0 ? _k : 0;
|
|
583
|
+
message.latitudeEnd = (_l = object.latitudeEnd) !== null && _l !== void 0 ? _l : 0;
|
|
584
|
+
message.longitudeEnd = (_m = object.longitudeEnd) !== null && _m !== void 0 ? _m : 0;
|
|
585
|
+
message.dateEnd = (_o = object.dateEnd) !== null && _o !== void 0 ? _o : 0;
|
|
586
|
+
message.dateRead = (_p = object.dateRead) !== null && _p !== void 0 ? _p : 0;
|
|
587
|
+
message.alertSend = (_q = object.alertSend) !== null && _q !== void 0 ? _q : 0;
|
|
588
|
+
message.dateSend = (_r = object.dateSend) !== null && _r !== void 0 ? _r : 0;
|
|
589
|
+
message.vals = (_s = object.vals) !== null && _s !== void 0 ? _s : "";
|
|
590
|
+
message.relId = (_t = object.relId) !== null && _t !== void 0 ? _t : 0;
|
|
591
|
+
message.createdAt = (_u = object.createdAt) !== null && _u !== void 0 ? _u : undefined;
|
|
592
|
+
message.updatedAt = (_v = object.updatedAt) !== null && _v !== void 0 ? _v : undefined;
|
|
593
|
+
message.identificationNo = (_w = object.identificationNo) !== null && _w !== void 0 ? _w : undefined;
|
|
586
594
|
return message;
|
|
587
595
|
},
|
|
588
596
|
};
|
|
@@ -590,7 +598,7 @@ function createBaseCommandDevice() {
|
|
|
590
598
|
return {
|
|
591
599
|
cdId: 0,
|
|
592
600
|
commandId: 0,
|
|
593
|
-
imei:
|
|
601
|
+
imei: long_1.default.UZERO,
|
|
594
602
|
userId: 0,
|
|
595
603
|
dateCreate: 0,
|
|
596
604
|
status: 0,
|
|
@@ -602,7 +610,7 @@ function createBaseCommandDevice() {
|
|
|
602
610
|
dateResponse: 0,
|
|
603
611
|
timeOut: 0,
|
|
604
612
|
type: 0,
|
|
605
|
-
deviceId:
|
|
613
|
+
deviceId: long_1.default.UZERO,
|
|
606
614
|
};
|
|
607
615
|
}
|
|
608
616
|
exports.CommandDevice = {
|
|
@@ -613,8 +621,8 @@ exports.CommandDevice = {
|
|
|
613
621
|
if (message.commandId !== 0) {
|
|
614
622
|
writer.uint32(16).uint32(message.commandId);
|
|
615
623
|
}
|
|
616
|
-
if (message.imei
|
|
617
|
-
writer.uint32(24).uint64(message.imei);
|
|
624
|
+
if (!message.imei.equals(long_1.default.UZERO)) {
|
|
625
|
+
writer.uint32(24).uint64(message.imei.toString());
|
|
618
626
|
}
|
|
619
627
|
if (message.userId !== 0) {
|
|
620
628
|
writer.uint32(32).sint32(message.userId);
|
|
@@ -649,8 +657,8 @@ exports.CommandDevice = {
|
|
|
649
657
|
if (message.type !== 0) {
|
|
650
658
|
writer.uint32(112).uint32(message.type);
|
|
651
659
|
}
|
|
652
|
-
if (message.deviceId
|
|
653
|
-
writer.uint32(120).uint64(message.deviceId);
|
|
660
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
661
|
+
writer.uint32(120).uint64(message.deviceId.toString());
|
|
654
662
|
}
|
|
655
663
|
return writer;
|
|
656
664
|
},
|
|
@@ -679,7 +687,7 @@ exports.CommandDevice = {
|
|
|
679
687
|
if (tag !== 24) {
|
|
680
688
|
break;
|
|
681
689
|
}
|
|
682
|
-
message.imei =
|
|
690
|
+
message.imei = long_1.default.fromString(reader.uint64().toString(), true);
|
|
683
691
|
continue;
|
|
684
692
|
}
|
|
685
693
|
case 4: {
|
|
@@ -763,7 +771,7 @@ exports.CommandDevice = {
|
|
|
763
771
|
if (tag !== 120) {
|
|
764
772
|
break;
|
|
765
773
|
}
|
|
766
|
-
message.deviceId =
|
|
774
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
767
775
|
continue;
|
|
768
776
|
}
|
|
769
777
|
}
|
|
@@ -778,7 +786,7 @@ exports.CommandDevice = {
|
|
|
778
786
|
return {
|
|
779
787
|
cdId: isSet(object.cdId) ? globalThis.Number(object.cdId) : 0,
|
|
780
788
|
commandId: isSet(object.commandId) ? globalThis.Number(object.commandId) : 0,
|
|
781
|
-
imei: isSet(object.imei) ?
|
|
789
|
+
imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
|
|
782
790
|
userId: isSet(object.userId) ? globalThis.Number(object.userId) : 0,
|
|
783
791
|
dateCreate: isSet(object.dateCreate) ? globalThis.Number(object.dateCreate) : 0,
|
|
784
792
|
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
@@ -790,7 +798,7 @@ exports.CommandDevice = {
|
|
|
790
798
|
dateResponse: isSet(object.dateResponse) ? globalThis.Number(object.dateResponse) : 0,
|
|
791
799
|
timeOut: isSet(object.timeOut) ? globalThis.Number(object.timeOut) : 0,
|
|
792
800
|
type: isSet(object.type) ? globalThis.Number(object.type) : 0,
|
|
793
|
-
deviceId: isSet(object.deviceId) ?
|
|
801
|
+
deviceId: isSet(object.deviceId) ? long_1.default.fromValue(object.deviceId) : long_1.default.UZERO,
|
|
794
802
|
};
|
|
795
803
|
},
|
|
796
804
|
toJSON(message) {
|
|
@@ -801,8 +809,8 @@ exports.CommandDevice = {
|
|
|
801
809
|
if (message.commandId !== 0) {
|
|
802
810
|
obj.commandId = Math.round(message.commandId);
|
|
803
811
|
}
|
|
804
|
-
if (message.imei
|
|
805
|
-
obj.imei =
|
|
812
|
+
if (!message.imei.equals(long_1.default.UZERO)) {
|
|
813
|
+
obj.imei = (message.imei || long_1.default.UZERO).toString();
|
|
806
814
|
}
|
|
807
815
|
if (message.userId !== 0) {
|
|
808
816
|
obj.userId = Math.round(message.userId);
|
|
@@ -837,8 +845,8 @@ exports.CommandDevice = {
|
|
|
837
845
|
if (message.type !== 0) {
|
|
838
846
|
obj.type = Math.round(message.type);
|
|
839
847
|
}
|
|
840
|
-
if (message.deviceId
|
|
841
|
-
obj.deviceId =
|
|
848
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
849
|
+
obj.deviceId = (message.deviceId || long_1.default.UZERO).toString();
|
|
842
850
|
}
|
|
843
851
|
return obj;
|
|
844
852
|
},
|
|
@@ -846,33 +854,35 @@ exports.CommandDevice = {
|
|
|
846
854
|
return exports.CommandDevice.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
847
855
|
},
|
|
848
856
|
fromPartial(object) {
|
|
849
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
857
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
850
858
|
const message = createBaseCommandDevice();
|
|
851
859
|
message.cdId = (_a = object.cdId) !== null && _a !== void 0 ? _a : 0;
|
|
852
860
|
message.commandId = (_b = object.commandId) !== null && _b !== void 0 ? _b : 0;
|
|
853
|
-
message.imei = (
|
|
854
|
-
message.userId = (
|
|
855
|
-
message.dateCreate = (
|
|
856
|
-
message.status = (
|
|
857
|
-
message.command = (
|
|
858
|
-
message.commandParse = (
|
|
859
|
-
message.dateSend = (
|
|
860
|
-
message.response = (
|
|
861
|
-
message.responseParse = (
|
|
862
|
-
message.dateResponse = (
|
|
863
|
-
message.timeOut = (
|
|
864
|
-
message.type = (
|
|
865
|
-
message.deviceId = (
|
|
861
|
+
message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
|
|
862
|
+
message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : 0;
|
|
863
|
+
message.dateCreate = (_d = object.dateCreate) !== null && _d !== void 0 ? _d : 0;
|
|
864
|
+
message.status = (_e = object.status) !== null && _e !== void 0 ? _e : 0;
|
|
865
|
+
message.command = (_f = object.command) !== null && _f !== void 0 ? _f : "";
|
|
866
|
+
message.commandParse = (_g = object.commandParse) !== null && _g !== void 0 ? _g : undefined;
|
|
867
|
+
message.dateSend = (_h = object.dateSend) !== null && _h !== void 0 ? _h : 0;
|
|
868
|
+
message.response = (_j = object.response) !== null && _j !== void 0 ? _j : undefined;
|
|
869
|
+
message.responseParse = (_k = object.responseParse) !== null && _k !== void 0 ? _k : undefined;
|
|
870
|
+
message.dateResponse = (_l = object.dateResponse) !== null && _l !== void 0 ? _l : 0;
|
|
871
|
+
message.timeOut = (_m = object.timeOut) !== null && _m !== void 0 ? _m : 0;
|
|
872
|
+
message.type = (_o = object.type) !== null && _o !== void 0 ? _o : 0;
|
|
873
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
874
|
+
? long_1.default.fromValue(object.deviceId)
|
|
875
|
+
: long_1.default.UZERO;
|
|
866
876
|
return message;
|
|
867
877
|
},
|
|
868
878
|
};
|
|
869
879
|
function createBaseFusionCar() {
|
|
870
|
-
return { carId:
|
|
880
|
+
return { carId: long_1.default.UZERO, deviceName: "", powerVoltage: 0 };
|
|
871
881
|
}
|
|
872
882
|
exports.FusionCar = {
|
|
873
883
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
874
|
-
if (message.carId
|
|
875
|
-
writer.uint32(8).uint64(message.carId);
|
|
884
|
+
if (!message.carId.equals(long_1.default.UZERO)) {
|
|
885
|
+
writer.uint32(8).uint64(message.carId.toString());
|
|
876
886
|
}
|
|
877
887
|
if (message.deviceName !== "") {
|
|
878
888
|
writer.uint32(18).string(message.deviceName);
|
|
@@ -893,7 +903,7 @@ exports.FusionCar = {
|
|
|
893
903
|
if (tag !== 8) {
|
|
894
904
|
break;
|
|
895
905
|
}
|
|
896
|
-
message.carId =
|
|
906
|
+
message.carId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
897
907
|
continue;
|
|
898
908
|
}
|
|
899
909
|
case 2: {
|
|
@@ -920,15 +930,15 @@ exports.FusionCar = {
|
|
|
920
930
|
},
|
|
921
931
|
fromJSON(object) {
|
|
922
932
|
return {
|
|
923
|
-
carId: isSet(object.carId) ?
|
|
933
|
+
carId: isSet(object.carId) ? long_1.default.fromValue(object.carId) : long_1.default.UZERO,
|
|
924
934
|
deviceName: isSet(object.deviceName) ? globalThis.String(object.deviceName) : "",
|
|
925
935
|
powerVoltage: isSet(object.powerVoltage) ? globalThis.Number(object.powerVoltage) : 0,
|
|
926
936
|
};
|
|
927
937
|
},
|
|
928
938
|
toJSON(message) {
|
|
929
939
|
const obj = {};
|
|
930
|
-
if (message.carId
|
|
931
|
-
obj.carId =
|
|
940
|
+
if (!message.carId.equals(long_1.default.UZERO)) {
|
|
941
|
+
obj.carId = (message.carId || long_1.default.UZERO).toString();
|
|
932
942
|
}
|
|
933
943
|
if (message.deviceName !== "") {
|
|
934
944
|
obj.deviceName = message.deviceName;
|
|
@@ -942,21 +952,29 @@ exports.FusionCar = {
|
|
|
942
952
|
return exports.FusionCar.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
943
953
|
},
|
|
944
954
|
fromPartial(object) {
|
|
945
|
-
var _a, _b
|
|
955
|
+
var _a, _b;
|
|
946
956
|
const message = createBaseFusionCar();
|
|
947
|
-
message.carId = (
|
|
948
|
-
message.deviceName = (
|
|
949
|
-
message.powerVoltage = (
|
|
957
|
+
message.carId = (object.carId !== undefined && object.carId !== null) ? long_1.default.fromValue(object.carId) : long_1.default.UZERO;
|
|
958
|
+
message.deviceName = (_a = object.deviceName) !== null && _a !== void 0 ? _a : "";
|
|
959
|
+
message.powerVoltage = (_b = object.powerVoltage) !== null && _b !== void 0 ? _b : 0;
|
|
950
960
|
return message;
|
|
951
961
|
},
|
|
952
962
|
};
|
|
953
963
|
function createBaseFusionNotify() {
|
|
954
|
-
return {
|
|
964
|
+
return {
|
|
965
|
+
userId: long_1.default.UZERO,
|
|
966
|
+
title: "",
|
|
967
|
+
body: "",
|
|
968
|
+
data: undefined,
|
|
969
|
+
image: undefined,
|
|
970
|
+
sound: undefined,
|
|
971
|
+
token: undefined,
|
|
972
|
+
};
|
|
955
973
|
}
|
|
956
974
|
exports.FusionNotify = {
|
|
957
975
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
958
|
-
if (message.userId
|
|
959
|
-
writer.uint32(8).uint64(message.userId);
|
|
976
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
977
|
+
writer.uint32(8).uint64(message.userId.toString());
|
|
960
978
|
}
|
|
961
979
|
if (message.title !== "") {
|
|
962
980
|
writer.uint32(18).string(message.title);
|
|
@@ -989,7 +1007,7 @@ exports.FusionNotify = {
|
|
|
989
1007
|
if (tag !== 8) {
|
|
990
1008
|
break;
|
|
991
1009
|
}
|
|
992
|
-
message.userId =
|
|
1010
|
+
message.userId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
993
1011
|
continue;
|
|
994
1012
|
}
|
|
995
1013
|
case 2: {
|
|
@@ -1044,7 +1062,7 @@ exports.FusionNotify = {
|
|
|
1044
1062
|
},
|
|
1045
1063
|
fromJSON(object) {
|
|
1046
1064
|
return {
|
|
1047
|
-
userId: isSet(object.userID) ?
|
|
1065
|
+
userId: isSet(object.userID) ? long_1.default.fromValue(object.userID) : long_1.default.UZERO,
|
|
1048
1066
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1049
1067
|
body: isSet(object.body) ? globalThis.String(object.body) : "",
|
|
1050
1068
|
data: isSet(object.data) ? exports.FusionNotify_Body.fromJSON(object.data) : undefined,
|
|
@@ -1055,8 +1073,8 @@ exports.FusionNotify = {
|
|
|
1055
1073
|
},
|
|
1056
1074
|
toJSON(message) {
|
|
1057
1075
|
const obj = {};
|
|
1058
|
-
if (message.userId
|
|
1059
|
-
obj.userID =
|
|
1076
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
1077
|
+
obj.userID = (message.userId || long_1.default.UZERO).toString();
|
|
1060
1078
|
}
|
|
1061
1079
|
if (message.title !== "") {
|
|
1062
1080
|
obj.title = message.title;
|
|
@@ -1082,17 +1100,19 @@ exports.FusionNotify = {
|
|
|
1082
1100
|
return exports.FusionNotify.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1083
1101
|
},
|
|
1084
1102
|
fromPartial(object) {
|
|
1085
|
-
var _a, _b, _c, _d, _e
|
|
1103
|
+
var _a, _b, _c, _d, _e;
|
|
1086
1104
|
const message = createBaseFusionNotify();
|
|
1087
|
-
message.userId = (
|
|
1088
|
-
|
|
1089
|
-
|
|
1105
|
+
message.userId = (object.userId !== undefined && object.userId !== null)
|
|
1106
|
+
? long_1.default.fromValue(object.userId)
|
|
1107
|
+
: long_1.default.UZERO;
|
|
1108
|
+
message.title = (_a = object.title) !== null && _a !== void 0 ? _a : "";
|
|
1109
|
+
message.body = (_b = object.body) !== null && _b !== void 0 ? _b : "";
|
|
1090
1110
|
message.data = (object.data !== undefined && object.data !== null)
|
|
1091
1111
|
? exports.FusionNotify_Body.fromPartial(object.data)
|
|
1092
1112
|
: undefined;
|
|
1093
|
-
message.image = (
|
|
1094
|
-
message.sound = (
|
|
1095
|
-
message.token = (
|
|
1113
|
+
message.image = (_c = object.image) !== null && _c !== void 0 ? _c : undefined;
|
|
1114
|
+
message.sound = (_d = object.sound) !== null && _d !== void 0 ? _d : undefined;
|
|
1115
|
+
message.token = (_e = object.token) !== null && _e !== void 0 ? _e : undefined;
|
|
1096
1116
|
return message;
|
|
1097
1117
|
},
|
|
1098
1118
|
};
|
|
@@ -1108,8 +1128,8 @@ function createBaseFusionNotify_Body() {
|
|
|
1108
1128
|
alertListId: undefined,
|
|
1109
1129
|
lat: 0,
|
|
1110
1130
|
lng: 0,
|
|
1111
|
-
gpsTime:
|
|
1112
|
-
imei:
|
|
1131
|
+
gpsTime: long_1.default.ZERO,
|
|
1132
|
+
imei: long_1.default.UZERO,
|
|
1113
1133
|
deviceName: "",
|
|
1114
1134
|
relId: undefined,
|
|
1115
1135
|
title: "",
|
|
@@ -1147,17 +1167,17 @@ exports.FusionNotify_Body = {
|
|
|
1147
1167
|
if (message.lng !== 0) {
|
|
1148
1168
|
writer.uint32(85).float(message.lng);
|
|
1149
1169
|
}
|
|
1150
|
-
if (message.gpsTime
|
|
1151
|
-
writer.uint32(88).sint64(message.gpsTime);
|
|
1170
|
+
if (!message.gpsTime.equals(long_1.default.ZERO)) {
|
|
1171
|
+
writer.uint32(88).sint64(message.gpsTime.toString());
|
|
1152
1172
|
}
|
|
1153
|
-
if (message.imei
|
|
1154
|
-
writer.uint32(96).uint64(message.imei);
|
|
1173
|
+
if (!message.imei.equals(long_1.default.UZERO)) {
|
|
1174
|
+
writer.uint32(96).uint64(message.imei.toString());
|
|
1155
1175
|
}
|
|
1156
1176
|
if (message.deviceName !== "") {
|
|
1157
1177
|
writer.uint32(106).string(message.deviceName);
|
|
1158
1178
|
}
|
|
1159
1179
|
if (message.relId !== undefined) {
|
|
1160
|
-
writer.uint32(112).uint64(message.relId);
|
|
1180
|
+
writer.uint32(112).uint64(message.relId.toString());
|
|
1161
1181
|
}
|
|
1162
1182
|
if (message.title !== "") {
|
|
1163
1183
|
writer.uint32(122).string(message.title);
|
|
@@ -1245,14 +1265,14 @@ exports.FusionNotify_Body = {
|
|
|
1245
1265
|
if (tag !== 88) {
|
|
1246
1266
|
break;
|
|
1247
1267
|
}
|
|
1248
|
-
message.gpsTime =
|
|
1268
|
+
message.gpsTime = long_1.default.fromString(reader.sint64().toString());
|
|
1249
1269
|
continue;
|
|
1250
1270
|
}
|
|
1251
1271
|
case 12: {
|
|
1252
1272
|
if (tag !== 96) {
|
|
1253
1273
|
break;
|
|
1254
1274
|
}
|
|
1255
|
-
message.imei =
|
|
1275
|
+
message.imei = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1256
1276
|
continue;
|
|
1257
1277
|
}
|
|
1258
1278
|
case 13: {
|
|
@@ -1266,7 +1286,7 @@ exports.FusionNotify_Body = {
|
|
|
1266
1286
|
if (tag !== 112) {
|
|
1267
1287
|
break;
|
|
1268
1288
|
}
|
|
1269
|
-
message.relId =
|
|
1289
|
+
message.relId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1270
1290
|
continue;
|
|
1271
1291
|
}
|
|
1272
1292
|
case 15: {
|
|
@@ -1296,10 +1316,10 @@ exports.FusionNotify_Body = {
|
|
|
1296
1316
|
alertListId: isSet(object.alert_list_id) ? globalThis.Number(object.alert_list_id) : undefined,
|
|
1297
1317
|
lat: isSet(object.lat) ? globalThis.Number(object.lat) : 0,
|
|
1298
1318
|
lng: isSet(object.lng) ? globalThis.Number(object.lng) : 0,
|
|
1299
|
-
gpsTime: isSet(object.gps_time) ?
|
|
1300
|
-
imei: isSet(object.imei) ?
|
|
1319
|
+
gpsTime: isSet(object.gps_time) ? long_1.default.fromValue(object.gps_time) : long_1.default.ZERO,
|
|
1320
|
+
imei: isSet(object.imei) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO,
|
|
1301
1321
|
deviceName: isSet(object.device_name) ? globalThis.String(object.device_name) : "",
|
|
1302
|
-
relId: isSet(object.rel_id) ?
|
|
1322
|
+
relId: isSet(object.rel_id) ? long_1.default.fromValue(object.rel_id) : undefined,
|
|
1303
1323
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1304
1324
|
};
|
|
1305
1325
|
},
|
|
@@ -1335,17 +1355,17 @@ exports.FusionNotify_Body = {
|
|
|
1335
1355
|
if (message.lng !== 0) {
|
|
1336
1356
|
obj.lng = message.lng;
|
|
1337
1357
|
}
|
|
1338
|
-
if (message.gpsTime
|
|
1339
|
-
obj.gps_time =
|
|
1358
|
+
if (!message.gpsTime.equals(long_1.default.ZERO)) {
|
|
1359
|
+
obj.gps_time = (message.gpsTime || long_1.default.ZERO).toString();
|
|
1340
1360
|
}
|
|
1341
|
-
if (message.imei
|
|
1342
|
-
obj.imei =
|
|
1361
|
+
if (!message.imei.equals(long_1.default.UZERO)) {
|
|
1362
|
+
obj.imei = (message.imei || long_1.default.UZERO).toString();
|
|
1343
1363
|
}
|
|
1344
1364
|
if (message.deviceName !== "") {
|
|
1345
1365
|
obj.device_name = message.deviceName;
|
|
1346
1366
|
}
|
|
1347
1367
|
if (message.relId !== undefined) {
|
|
1348
|
-
obj.rel_id =
|
|
1368
|
+
obj.rel_id = (message.relId || long_1.default.UZERO).toString();
|
|
1349
1369
|
}
|
|
1350
1370
|
if (message.title !== "") {
|
|
1351
1371
|
obj.title = message.title;
|
|
@@ -1356,7 +1376,7 @@ exports.FusionNotify_Body = {
|
|
|
1356
1376
|
return exports.FusionNotify_Body.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1357
1377
|
},
|
|
1358
1378
|
fromPartial(object) {
|
|
1359
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
1379
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1360
1380
|
const message = createBaseFusionNotify_Body();
|
|
1361
1381
|
message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
|
|
1362
1382
|
message.alertParam = (_b = object.alertParam) !== null && _b !== void 0 ? _b : undefined;
|
|
@@ -1368,21 +1388,23 @@ exports.FusionNotify_Body = {
|
|
|
1368
1388
|
message.alertListId = (_h = object.alertListId) !== null && _h !== void 0 ? _h : undefined;
|
|
1369
1389
|
message.lat = (_j = object.lat) !== null && _j !== void 0 ? _j : 0;
|
|
1370
1390
|
message.lng = (_k = object.lng) !== null && _k !== void 0 ? _k : 0;
|
|
1371
|
-
message.gpsTime = (
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
message.
|
|
1375
|
-
message.
|
|
1391
|
+
message.gpsTime = (object.gpsTime !== undefined && object.gpsTime !== null)
|
|
1392
|
+
? long_1.default.fromValue(object.gpsTime)
|
|
1393
|
+
: long_1.default.ZERO;
|
|
1394
|
+
message.imei = (object.imei !== undefined && object.imei !== null) ? long_1.default.fromValue(object.imei) : long_1.default.UZERO;
|
|
1395
|
+
message.deviceName = (_l = object.deviceName) !== null && _l !== void 0 ? _l : "";
|
|
1396
|
+
message.relId = (object.relId !== undefined && object.relId !== null) ? long_1.default.fromValue(object.relId) : undefined;
|
|
1397
|
+
message.title = (_m = object.title) !== null && _m !== void 0 ? _m : "";
|
|
1376
1398
|
return message;
|
|
1377
1399
|
},
|
|
1378
1400
|
};
|
|
1379
1401
|
function toTimestamp(date) {
|
|
1380
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
1402
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
1381
1403
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1382
1404
|
return { seconds, nanos };
|
|
1383
1405
|
}
|
|
1384
1406
|
function fromTimestamp(t) {
|
|
1385
|
-
let millis = (t.seconds || 0) * 1000;
|
|
1407
|
+
let millis = (t.seconds.toNumber() || 0) * 1000;
|
|
1386
1408
|
millis += (t.nanos || 0) / 1000000;
|
|
1387
1409
|
return new globalThis.Date(millis);
|
|
1388
1410
|
}
|
|
@@ -1397,15 +1419,8 @@ function fromJsonTimestamp(o) {
|
|
|
1397
1419
|
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1398
1420
|
}
|
|
1399
1421
|
}
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1402
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1403
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1404
|
-
}
|
|
1405
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1406
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1407
|
-
}
|
|
1408
|
-
return num;
|
|
1422
|
+
function numberToLong(number) {
|
|
1423
|
+
return long_1.default.fromNumber(number);
|
|
1409
1424
|
}
|
|
1410
1425
|
function isSet(value) {
|
|
1411
1426
|
return value !== null && value !== undefined;
|