@fatehan/tsrp 1.0.11 → 1.0.12
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/packets/dataModel.d.ts +1 -0
- package/dist/fatehan/packets/dataModel.d.ts.map +1 -1
- package/dist/fatehan/packets/dataModel.js +27 -2
- package/dist/fatehan/packets/messages.d.ts +18 -19
- package/dist/fatehan/packets/messages.d.ts.map +1 -1
- package/dist/fatehan/packets/messages.js +130 -161
- package/dist/fatehan/reports/report.d.ts +77 -60
- package/dist/fatehan/reports/report.d.ts.map +1 -1
- package/dist/fatehan/reports/report.js +760 -499
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.test.js +4 -3
- package/package.json +2 -2
|
@@ -5,68 +5,56 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: packets/messages.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
8
|
+
exports.DeviceMessage = exports.DeviceAnswer = exports.DeviceCommandAkn = exports.DeviceCommand = exports.DeviceCommandAkn_Status = exports.protobufPackage = void 0;
|
|
9
|
+
exports.deviceCommandAkn_StatusFromJSON = deviceCommandAkn_StatusFromJSON;
|
|
10
|
+
exports.deviceCommandAkn_StatusToJSON = deviceCommandAkn_StatusToJSON;
|
|
11
11
|
/* eslint-disable */
|
|
12
12
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
13
13
|
exports.protobufPackage = "com.fatehan.packets";
|
|
14
|
-
var
|
|
15
|
-
(function (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function messageTypeFromJSON(object) {
|
|
14
|
+
var DeviceCommandAkn_Status;
|
|
15
|
+
(function (DeviceCommandAkn_Status) {
|
|
16
|
+
DeviceCommandAkn_Status[DeviceCommandAkn_Status["OFFLINE"] = 0] = "OFFLINE";
|
|
17
|
+
DeviceCommandAkn_Status[DeviceCommandAkn_Status["SENT"] = 1] = "SENT";
|
|
18
|
+
DeviceCommandAkn_Status[DeviceCommandAkn_Status["ERROR"] = 2] = "ERROR";
|
|
19
|
+
DeviceCommandAkn_Status[DeviceCommandAkn_Status["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
20
|
+
})(DeviceCommandAkn_Status || (exports.DeviceCommandAkn_Status = DeviceCommandAkn_Status = {}));
|
|
21
|
+
function deviceCommandAkn_StatusFromJSON(object) {
|
|
23
22
|
switch (object) {
|
|
24
23
|
case 0:
|
|
25
|
-
case "
|
|
26
|
-
return
|
|
24
|
+
case "OFFLINE":
|
|
25
|
+
return DeviceCommandAkn_Status.OFFLINE;
|
|
27
26
|
case 1:
|
|
28
|
-
case "
|
|
29
|
-
return
|
|
27
|
+
case "SENT":
|
|
28
|
+
return DeviceCommandAkn_Status.SENT;
|
|
30
29
|
case 2:
|
|
31
|
-
case "
|
|
32
|
-
return
|
|
33
|
-
case 3:
|
|
34
|
-
case "DeviceAnswerMessage":
|
|
35
|
-
return MessageType.DeviceAnswerMessage;
|
|
30
|
+
case "ERROR":
|
|
31
|
+
return DeviceCommandAkn_Status.ERROR;
|
|
36
32
|
case -1:
|
|
37
33
|
case "UNRECOGNIZED":
|
|
38
34
|
default:
|
|
39
|
-
return
|
|
35
|
+
return DeviceCommandAkn_Status.UNRECOGNIZED;
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
|
-
function
|
|
38
|
+
function deviceCommandAkn_StatusToJSON(object) {
|
|
43
39
|
switch (object) {
|
|
44
|
-
case
|
|
45
|
-
return "
|
|
46
|
-
case
|
|
47
|
-
return "
|
|
48
|
-
case
|
|
49
|
-
return "
|
|
50
|
-
case
|
|
51
|
-
return "DeviceAnswerMessage";
|
|
52
|
-
case MessageType.UNRECOGNIZED:
|
|
40
|
+
case DeviceCommandAkn_Status.OFFLINE:
|
|
41
|
+
return "OFFLINE";
|
|
42
|
+
case DeviceCommandAkn_Status.SENT:
|
|
43
|
+
return "SENT";
|
|
44
|
+
case DeviceCommandAkn_Status.ERROR:
|
|
45
|
+
return "ERROR";
|
|
46
|
+
case DeviceCommandAkn_Status.UNRECOGNIZED:
|
|
53
47
|
default:
|
|
54
48
|
return "UNRECOGNIZED";
|
|
55
49
|
}
|
|
56
50
|
}
|
|
57
51
|
function createBaseDeviceCommand() {
|
|
58
|
-
return {
|
|
52
|
+
return { command: "" };
|
|
59
53
|
}
|
|
60
54
|
exports.DeviceCommand = {
|
|
61
55
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
62
|
-
if (message.deviceId !== 0) {
|
|
63
|
-
writer.uint32(8).uint64(message.deviceId);
|
|
64
|
-
}
|
|
65
56
|
if (message.command !== "") {
|
|
66
|
-
writer.uint32(
|
|
67
|
-
}
|
|
68
|
-
if (message.commandId !== 0) {
|
|
69
|
-
writer.uint32(24).uint64(message.commandId);
|
|
57
|
+
writer.uint32(10).string(message.command);
|
|
70
58
|
}
|
|
71
59
|
return writer;
|
|
72
60
|
},
|
|
@@ -78,26 +66,12 @@ exports.DeviceCommand = {
|
|
|
78
66
|
const tag = reader.uint32();
|
|
79
67
|
switch (tag >>> 3) {
|
|
80
68
|
case 1: {
|
|
81
|
-
if (tag !==
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
message.deviceId = longToNumber(reader.uint64());
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
case 2: {
|
|
88
|
-
if (tag !== 18) {
|
|
69
|
+
if (tag !== 10) {
|
|
89
70
|
break;
|
|
90
71
|
}
|
|
91
72
|
message.command = reader.string();
|
|
92
73
|
continue;
|
|
93
74
|
}
|
|
94
|
-
case 3: {
|
|
95
|
-
if (tag !== 24) {
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
message.commandId = longToNumber(reader.uint64());
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
75
|
}
|
|
102
76
|
if ((tag & 7) === 4 || tag === 0) {
|
|
103
77
|
break;
|
|
@@ -107,49 +81,37 @@ exports.DeviceCommand = {
|
|
|
107
81
|
return message;
|
|
108
82
|
},
|
|
109
83
|
fromJSON(object) {
|
|
110
|
-
return {
|
|
111
|
-
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
112
|
-
command: isSet(object.command) ? globalThis.String(object.command) : "",
|
|
113
|
-
commandId: isSet(object.command_id) ? globalThis.Number(object.command_id) : 0,
|
|
114
|
-
};
|
|
84
|
+
return { command: isSet(object.command) ? globalThis.String(object.command) : "" };
|
|
115
85
|
},
|
|
116
86
|
toJSON(message) {
|
|
117
87
|
const obj = {};
|
|
118
|
-
if (message.deviceId !== 0) {
|
|
119
|
-
obj.device_id = Math.round(message.deviceId);
|
|
120
|
-
}
|
|
121
88
|
if (message.command !== "") {
|
|
122
89
|
obj.command = message.command;
|
|
123
90
|
}
|
|
124
|
-
if (message.commandId !== 0) {
|
|
125
|
-
obj.command_id = Math.round(message.commandId);
|
|
126
|
-
}
|
|
127
91
|
return obj;
|
|
128
92
|
},
|
|
129
93
|
create(base) {
|
|
130
94
|
return exports.DeviceCommand.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
131
95
|
},
|
|
132
96
|
fromPartial(object) {
|
|
133
|
-
var _a
|
|
97
|
+
var _a;
|
|
134
98
|
const message = createBaseDeviceCommand();
|
|
135
|
-
message.
|
|
136
|
-
message.command = (_b = object.command) !== null && _b !== void 0 ? _b : "";
|
|
137
|
-
message.commandId = (_c = object.commandId) !== null && _c !== void 0 ? _c : 0;
|
|
99
|
+
message.command = (_a = object.command) !== null && _a !== void 0 ? _a : "";
|
|
138
100
|
return message;
|
|
139
101
|
},
|
|
140
102
|
};
|
|
141
103
|
function createBaseDeviceCommandAkn() {
|
|
142
|
-
return {
|
|
104
|
+
return { status: 0, code: undefined, message: undefined };
|
|
143
105
|
}
|
|
144
106
|
exports.DeviceCommandAkn = {
|
|
145
107
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
146
|
-
if (message.command !== undefined) {
|
|
147
|
-
exports.DeviceCommand.encode(message.command, writer.uint32(10).fork()).join();
|
|
148
|
-
}
|
|
149
108
|
if (message.status !== 0) {
|
|
150
|
-
writer.uint32(
|
|
109
|
+
writer.uint32(8).int32(message.status);
|
|
110
|
+
}
|
|
111
|
+
if (message.code !== undefined) {
|
|
112
|
+
writer.uint32(16).sint64(message.code);
|
|
151
113
|
}
|
|
152
|
-
if (message.message !==
|
|
114
|
+
if (message.message !== undefined) {
|
|
153
115
|
writer.uint32(26).string(message.message);
|
|
154
116
|
}
|
|
155
117
|
return writer;
|
|
@@ -162,17 +124,17 @@ exports.DeviceCommandAkn = {
|
|
|
162
124
|
const tag = reader.uint32();
|
|
163
125
|
switch (tag >>> 3) {
|
|
164
126
|
case 1: {
|
|
165
|
-
if (tag !==
|
|
127
|
+
if (tag !== 8) {
|
|
166
128
|
break;
|
|
167
129
|
}
|
|
168
|
-
message.
|
|
130
|
+
message.status = reader.int32();
|
|
169
131
|
continue;
|
|
170
132
|
}
|
|
171
133
|
case 2: {
|
|
172
134
|
if (tag !== 16) {
|
|
173
135
|
break;
|
|
174
136
|
}
|
|
175
|
-
message.
|
|
137
|
+
message.code = longToNumber(reader.sint64());
|
|
176
138
|
continue;
|
|
177
139
|
}
|
|
178
140
|
case 3: {
|
|
@@ -192,20 +154,20 @@ exports.DeviceCommandAkn = {
|
|
|
192
154
|
},
|
|
193
155
|
fromJSON(object) {
|
|
194
156
|
return {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
message: isSet(object.message) ? globalThis.String(object.message) :
|
|
157
|
+
status: isSet(object.status) ? deviceCommandAkn_StatusFromJSON(object.status) : 0,
|
|
158
|
+
code: isSet(object.code) ? globalThis.Number(object.code) : undefined,
|
|
159
|
+
message: isSet(object.message) ? globalThis.String(object.message) : undefined,
|
|
198
160
|
};
|
|
199
161
|
},
|
|
200
162
|
toJSON(message) {
|
|
201
163
|
const obj = {};
|
|
202
|
-
if (message.command !== undefined) {
|
|
203
|
-
obj.command = exports.DeviceCommand.toJSON(message.command);
|
|
204
|
-
}
|
|
205
164
|
if (message.status !== 0) {
|
|
206
|
-
obj.status =
|
|
165
|
+
obj.status = deviceCommandAkn_StatusToJSON(message.status);
|
|
166
|
+
}
|
|
167
|
+
if (message.code !== undefined) {
|
|
168
|
+
obj.code = Math.round(message.code);
|
|
207
169
|
}
|
|
208
|
-
if (message.message !==
|
|
170
|
+
if (message.message !== undefined) {
|
|
209
171
|
obj.message = message.message;
|
|
210
172
|
}
|
|
211
173
|
return obj;
|
|
@@ -214,26 +176,21 @@ exports.DeviceCommandAkn = {
|
|
|
214
176
|
return exports.DeviceCommandAkn.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
215
177
|
},
|
|
216
178
|
fromPartial(object) {
|
|
217
|
-
var _a, _b;
|
|
179
|
+
var _a, _b, _c;
|
|
218
180
|
const message = createBaseDeviceCommandAkn();
|
|
219
|
-
message.command = (object.command !== undefined && object.command !== null)
|
|
220
|
-
? exports.DeviceCommand.fromPartial(object.command)
|
|
221
|
-
: undefined;
|
|
222
181
|
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : 0;
|
|
223
|
-
message.
|
|
182
|
+
message.code = (_b = object.code) !== null && _b !== void 0 ? _b : undefined;
|
|
183
|
+
message.message = (_c = object.message) !== null && _c !== void 0 ? _c : undefined;
|
|
224
184
|
return message;
|
|
225
185
|
},
|
|
226
186
|
};
|
|
227
187
|
function createBaseDeviceAnswer() {
|
|
228
|
-
return {
|
|
188
|
+
return { answer: "" };
|
|
229
189
|
}
|
|
230
190
|
exports.DeviceAnswer = {
|
|
231
191
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
232
|
-
if (message.deviceId !== 0) {
|
|
233
|
-
writer.uint32(8).uint64(message.deviceId);
|
|
234
|
-
}
|
|
235
192
|
if (message.answer !== "") {
|
|
236
|
-
writer.uint32(
|
|
193
|
+
writer.uint32(10).string(message.answer);
|
|
237
194
|
}
|
|
238
195
|
return writer;
|
|
239
196
|
},
|
|
@@ -245,14 +202,7 @@ exports.DeviceAnswer = {
|
|
|
245
202
|
const tag = reader.uint32();
|
|
246
203
|
switch (tag >>> 3) {
|
|
247
204
|
case 1: {
|
|
248
|
-
if (tag !==
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
message.deviceId = longToNumber(reader.uint64());
|
|
252
|
-
continue;
|
|
253
|
-
}
|
|
254
|
-
case 2: {
|
|
255
|
-
if (tag !== 18) {
|
|
205
|
+
if (tag !== 10) {
|
|
256
206
|
break;
|
|
257
207
|
}
|
|
258
208
|
message.answer = reader.string();
|
|
@@ -267,16 +217,10 @@ exports.DeviceAnswer = {
|
|
|
267
217
|
return message;
|
|
268
218
|
},
|
|
269
219
|
fromJSON(object) {
|
|
270
|
-
return {
|
|
271
|
-
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
272
|
-
answer: isSet(object.answer) ? globalThis.String(object.answer) : "",
|
|
273
|
-
};
|
|
220
|
+
return { answer: isSet(object.answer) ? globalThis.String(object.answer) : "" };
|
|
274
221
|
},
|
|
275
222
|
toJSON(message) {
|
|
276
223
|
const obj = {};
|
|
277
|
-
if (message.deviceId !== 0) {
|
|
278
|
-
obj.device_id = Math.round(message.deviceId);
|
|
279
|
-
}
|
|
280
224
|
if (message.answer !== "") {
|
|
281
225
|
obj.answer = message.answer;
|
|
282
226
|
}
|
|
@@ -286,30 +230,38 @@ exports.DeviceAnswer = {
|
|
|
286
230
|
return exports.DeviceAnswer.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
287
231
|
},
|
|
288
232
|
fromPartial(object) {
|
|
289
|
-
var _a
|
|
233
|
+
var _a;
|
|
290
234
|
const message = createBaseDeviceAnswer();
|
|
291
|
-
message.
|
|
292
|
-
message.answer = (_b = object.answer) !== null && _b !== void 0 ? _b : "";
|
|
235
|
+
message.answer = (_a = object.answer) !== null && _a !== void 0 ? _a : "";
|
|
293
236
|
return message;
|
|
294
237
|
},
|
|
295
238
|
};
|
|
296
|
-
function
|
|
297
|
-
return {
|
|
239
|
+
function createBaseDeviceMessage() {
|
|
240
|
+
return { deviceId: 0, transactionId: 0, command: undefined, akn: undefined, answer: undefined };
|
|
298
241
|
}
|
|
299
|
-
exports.
|
|
242
|
+
exports.DeviceMessage = {
|
|
300
243
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
301
|
-
if (message.
|
|
302
|
-
writer.uint32(8).
|
|
244
|
+
if (message.deviceId !== 0) {
|
|
245
|
+
writer.uint32(8).uint64(message.deviceId);
|
|
246
|
+
}
|
|
247
|
+
if (message.transactionId !== 0) {
|
|
248
|
+
writer.uint32(16).uint64(message.transactionId);
|
|
249
|
+
}
|
|
250
|
+
if (message.command !== undefined) {
|
|
251
|
+
exports.DeviceCommand.encode(message.command, writer.uint32(26).fork()).join();
|
|
252
|
+
}
|
|
253
|
+
if (message.akn !== undefined) {
|
|
254
|
+
exports.DeviceCommandAkn.encode(message.akn, writer.uint32(34).fork()).join();
|
|
303
255
|
}
|
|
304
|
-
if (message.
|
|
305
|
-
writer.uint32(
|
|
256
|
+
if (message.answer !== undefined) {
|
|
257
|
+
exports.DeviceAnswer.encode(message.answer, writer.uint32(42).fork()).join();
|
|
306
258
|
}
|
|
307
259
|
return writer;
|
|
308
260
|
},
|
|
309
261
|
decode(input, length) {
|
|
310
262
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
311
263
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
312
|
-
const message =
|
|
264
|
+
const message = createBaseDeviceMessage();
|
|
313
265
|
while (reader.pos < end) {
|
|
314
266
|
const tag = reader.uint32();
|
|
315
267
|
switch (tag >>> 3) {
|
|
@@ -317,14 +269,35 @@ exports.BrokerMessage = {
|
|
|
317
269
|
if (tag !== 8) {
|
|
318
270
|
break;
|
|
319
271
|
}
|
|
320
|
-
message.
|
|
272
|
+
message.deviceId = longToNumber(reader.uint64());
|
|
321
273
|
continue;
|
|
322
274
|
}
|
|
323
275
|
case 2: {
|
|
324
|
-
if (tag !==
|
|
276
|
+
if (tag !== 16) {
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
message.transactionId = longToNumber(reader.uint64());
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
case 3: {
|
|
283
|
+
if (tag !== 26) {
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
message.command = exports.DeviceCommand.decode(reader, reader.uint32());
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
case 4: {
|
|
290
|
+
if (tag !== 34) {
|
|
325
291
|
break;
|
|
326
292
|
}
|
|
327
|
-
message.
|
|
293
|
+
message.akn = exports.DeviceCommandAkn.decode(reader, reader.uint32());
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
case 5: {
|
|
297
|
+
if (tag !== 42) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
message.answer = exports.DeviceAnswer.decode(reader, reader.uint32());
|
|
328
301
|
continue;
|
|
329
302
|
}
|
|
330
303
|
}
|
|
@@ -337,56 +310,52 @@ exports.BrokerMessage = {
|
|
|
337
310
|
},
|
|
338
311
|
fromJSON(object) {
|
|
339
312
|
return {
|
|
340
|
-
|
|
341
|
-
|
|
313
|
+
deviceId: isSet(object.device_id) ? globalThis.Number(object.device_id) : 0,
|
|
314
|
+
transactionId: isSet(object.transaction_id) ? globalThis.Number(object.transaction_id) : 0,
|
|
315
|
+
command: isSet(object.command) ? exports.DeviceCommand.fromJSON(object.command) : undefined,
|
|
316
|
+
akn: isSet(object.akn) ? exports.DeviceCommandAkn.fromJSON(object.akn) : undefined,
|
|
317
|
+
answer: isSet(object.answer) ? exports.DeviceAnswer.fromJSON(object.answer) : undefined,
|
|
342
318
|
};
|
|
343
319
|
},
|
|
344
320
|
toJSON(message) {
|
|
345
321
|
const obj = {};
|
|
346
|
-
if (message.
|
|
347
|
-
obj.
|
|
322
|
+
if (message.deviceId !== 0) {
|
|
323
|
+
obj.device_id = Math.round(message.deviceId);
|
|
324
|
+
}
|
|
325
|
+
if (message.transactionId !== 0) {
|
|
326
|
+
obj.transaction_id = Math.round(message.transactionId);
|
|
327
|
+
}
|
|
328
|
+
if (message.command !== undefined) {
|
|
329
|
+
obj.command = exports.DeviceCommand.toJSON(message.command);
|
|
330
|
+
}
|
|
331
|
+
if (message.akn !== undefined) {
|
|
332
|
+
obj.akn = exports.DeviceCommandAkn.toJSON(message.akn);
|
|
348
333
|
}
|
|
349
|
-
if (message.
|
|
350
|
-
obj.
|
|
334
|
+
if (message.answer !== undefined) {
|
|
335
|
+
obj.answer = exports.DeviceAnswer.toJSON(message.answer);
|
|
351
336
|
}
|
|
352
337
|
return obj;
|
|
353
338
|
},
|
|
354
339
|
create(base) {
|
|
355
|
-
return exports.
|
|
340
|
+
return exports.DeviceMessage.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
356
341
|
},
|
|
357
342
|
fromPartial(object) {
|
|
358
343
|
var _a, _b;
|
|
359
|
-
const message =
|
|
360
|
-
message.
|
|
361
|
-
message.
|
|
344
|
+
const message = createBaseDeviceMessage();
|
|
345
|
+
message.deviceId = (_a = object.deviceId) !== null && _a !== void 0 ? _a : 0;
|
|
346
|
+
message.transactionId = (_b = object.transactionId) !== null && _b !== void 0 ? _b : 0;
|
|
347
|
+
message.command = (object.command !== undefined && object.command !== null)
|
|
348
|
+
? exports.DeviceCommand.fromPartial(object.command)
|
|
349
|
+
: undefined;
|
|
350
|
+
message.akn = (object.akn !== undefined && object.akn !== null)
|
|
351
|
+
? exports.DeviceCommandAkn.fromPartial(object.akn)
|
|
352
|
+
: undefined;
|
|
353
|
+
message.answer = (object.answer !== undefined && object.answer !== null)
|
|
354
|
+
? exports.DeviceAnswer.fromPartial(object.answer)
|
|
355
|
+
: undefined;
|
|
362
356
|
return message;
|
|
363
357
|
},
|
|
364
358
|
};
|
|
365
|
-
function bytesFromBase64(b64) {
|
|
366
|
-
if (globalThis.Buffer) {
|
|
367
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
const bin = globalThis.atob(b64);
|
|
371
|
-
const arr = new Uint8Array(bin.length);
|
|
372
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
373
|
-
arr[i] = bin.charCodeAt(i);
|
|
374
|
-
}
|
|
375
|
-
return arr;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
function base64FromBytes(arr) {
|
|
379
|
-
if (globalThis.Buffer) {
|
|
380
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
381
|
-
}
|
|
382
|
-
else {
|
|
383
|
-
const bin = [];
|
|
384
|
-
arr.forEach((byte) => {
|
|
385
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
386
|
-
});
|
|
387
|
-
return globalThis.btoa(bin.join(""));
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
359
|
function longToNumber(int64) {
|
|
391
360
|
const num = globalThis.Number(int64.toString());
|
|
392
361
|
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import { WorkCycle } from "../areas/area";
|
|
2
|
+
import { Point, WorkCycle } from "../areas/area";
|
|
3
3
|
import { Data, Log } from "../packets/dataModel";
|
|
4
4
|
import { FusionTrip, Trip, TripDurationStat, TripPoint } from "../trips/trip";
|
|
5
5
|
export declare const protobufPackage = "com.fatehan.reports";
|
|
@@ -10,6 +10,22 @@ export declare enum Source {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function sourceFromJSON(object: any): Source;
|
|
12
12
|
export declare function sourceToJSON(object: Source): string;
|
|
13
|
+
export declare enum RouteStopType {
|
|
14
|
+
NONE = 0,
|
|
15
|
+
IDLING = 1,
|
|
16
|
+
STOPS = 2,
|
|
17
|
+
UNRECOGNIZED = -1
|
|
18
|
+
}
|
|
19
|
+
export declare function routeStopTypeFromJSON(object: any): RouteStopType;
|
|
20
|
+
export declare function routeStopTypeToJSON(object: RouteStopType): string;
|
|
21
|
+
export declare enum StopCalculateIo {
|
|
22
|
+
BOTH = 0,
|
|
23
|
+
SPEED = 1,
|
|
24
|
+
IGNITION = 2,
|
|
25
|
+
UNRECOGNIZED = -1
|
|
26
|
+
}
|
|
27
|
+
export declare function stopCalculateIoFromJSON(object: any): StopCalculateIo;
|
|
28
|
+
export declare function stopCalculateIoToJSON(object: StopCalculateIo): string;
|
|
13
29
|
export interface WorkCycleRequest {
|
|
14
30
|
deviceId: number[];
|
|
15
31
|
startedAt: Date | undefined;
|
|
@@ -136,6 +152,7 @@ export interface TripPerformanceRequest {
|
|
|
136
152
|
finishedAt: Date | undefined;
|
|
137
153
|
groupByDevice: boolean;
|
|
138
154
|
groupByDatetime: TripPerformanceRequest_GroupBy;
|
|
155
|
+
hourly: boolean;
|
|
139
156
|
}
|
|
140
157
|
export declare enum TripPerformanceRequest_GroupBy {
|
|
141
158
|
All = 0,
|
|
@@ -335,38 +352,39 @@ export interface EnvironmentalResponse {
|
|
|
335
352
|
export interface EnvironmentalResponse_EnvironmentalField {
|
|
336
353
|
deviceId: number;
|
|
337
354
|
ignition?: boolean | undefined;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
355
|
+
gpsTime: Date | undefined;
|
|
356
|
+
defaultHumidity?: number | undefined;
|
|
357
|
+
eyeHumidity1?: number | undefined;
|
|
358
|
+
eyeHumidity2?: number | undefined;
|
|
359
|
+
eyeHumidity3?: number | undefined;
|
|
360
|
+
eyeHumidity4?: number | undefined;
|
|
361
|
+
bleHumidity01?: number | undefined;
|
|
362
|
+
bleHumidity02?: number | undefined;
|
|
363
|
+
bleHumidity03?: number | undefined;
|
|
364
|
+
bleHumidity04?: number | undefined;
|
|
365
|
+
defaultTemperature?: number | undefined;
|
|
366
|
+
intakeAirTemperature?: number | undefined;
|
|
367
|
+
ambientAirTemperature?: number | undefined;
|
|
368
|
+
engineOilTemperature?: number | undefined;
|
|
369
|
+
coolantTemperature?: number | undefined;
|
|
370
|
+
bleTemperature01?: number | undefined;
|
|
371
|
+
bleTemperature02?: number | undefined;
|
|
372
|
+
bleTemperature03?: number | undefined;
|
|
373
|
+
bleTemperature04?: number | undefined;
|
|
374
|
+
engineTemperature?: number | undefined;
|
|
375
|
+
batteryTemperature?: number | undefined;
|
|
376
|
+
dallasTemperature1?: number | undefined;
|
|
377
|
+
dallasTemperature2?: number | undefined;
|
|
378
|
+
dallasTemperature3?: number | undefined;
|
|
379
|
+
dallasTemperature4?: number | undefined;
|
|
380
|
+
llsTemperature01?: number | undefined;
|
|
381
|
+
llsTemperature02?: number | undefined;
|
|
382
|
+
llsTemperature03?: number | undefined;
|
|
383
|
+
llsTemperature04?: number | undefined;
|
|
384
|
+
eyeTemperature01?: number | undefined;
|
|
385
|
+
eyeTemperature02?: number | undefined;
|
|
386
|
+
eyeTemperature03?: number | undefined;
|
|
387
|
+
eyeTemperature04?: number | undefined;
|
|
370
388
|
}
|
|
371
389
|
export interface EnvironmentalRequest {
|
|
372
390
|
deviceId: number;
|
|
@@ -630,45 +648,42 @@ export interface DailyTrafficRequest {
|
|
|
630
648
|
between: boolean;
|
|
631
649
|
deviceIds: number[];
|
|
632
650
|
}
|
|
633
|
-
export interface
|
|
651
|
+
export interface RouteStopPoint {
|
|
652
|
+
duration: number;
|
|
653
|
+
startedAt: Date | undefined;
|
|
654
|
+
finishedAt: Date | undefined;
|
|
655
|
+
type: RouteStopType;
|
|
656
|
+
point: Point | undefined;
|
|
657
|
+
}
|
|
658
|
+
export interface RouteStopResponse {
|
|
659
|
+
list: RouteStopPoint[];
|
|
660
|
+
records: number;
|
|
661
|
+
cost: number;
|
|
662
|
+
threads: number;
|
|
663
|
+
}
|
|
664
|
+
export interface RouteStopRequest {
|
|
634
665
|
startedAt: Date | undefined;
|
|
635
666
|
finishedAt: Date | undefined;
|
|
636
667
|
source: Source;
|
|
637
|
-
stopType:
|
|
638
|
-
includeTrip: boolean;
|
|
668
|
+
stopType: StopCalculateIo;
|
|
639
669
|
deviceId: number;
|
|
640
670
|
}
|
|
641
|
-
export
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
671
|
+
export interface RouteReviewRequest {
|
|
672
|
+
startedAt: Date | undefined;
|
|
673
|
+
finishedAt: Date | undefined;
|
|
674
|
+
source: Source;
|
|
675
|
+
stopType: StopCalculateIo;
|
|
676
|
+
deviceId: number;
|
|
677
|
+
includeTrip: boolean;
|
|
647
678
|
}
|
|
648
|
-
export declare function routeReviewRequest_StopTypeFromJSON(object: any): RouteReviewRequest_StopType;
|
|
649
|
-
export declare function routeReviewRequest_StopTypeToJSON(object: RouteReviewRequest_StopType): string;
|
|
650
679
|
export interface RouteReviewResponse {
|
|
651
680
|
routeList: Data[];
|
|
652
|
-
stopList:
|
|
681
|
+
stopList: RouteStopPoint[];
|
|
653
682
|
tripList: Trip[];
|
|
654
683
|
records: number;
|
|
655
684
|
cost: number;
|
|
656
685
|
threads: number;
|
|
657
686
|
}
|
|
658
|
-
export declare enum RouteReviewResponse_StopType {
|
|
659
|
-
NONE = 0,
|
|
660
|
-
IDLING = 1,
|
|
661
|
-
STOPS = 2,
|
|
662
|
-
UNRECOGNIZED = -1
|
|
663
|
-
}
|
|
664
|
-
export declare function routeReviewResponse_StopTypeFromJSON(object: any): RouteReviewResponse_StopType;
|
|
665
|
-
export declare function routeReviewResponse_StopTypeToJSON(object: RouteReviewResponse_StopType): string;
|
|
666
|
-
export interface RouteReviewResponse_Stop {
|
|
667
|
-
duration: number;
|
|
668
|
-
startedAt: Date | undefined;
|
|
669
|
-
finishedAt: Date | undefined;
|
|
670
|
-
type: RouteReviewResponse_StopType;
|
|
671
|
-
}
|
|
672
687
|
export interface AreaReviewRequest {
|
|
673
688
|
startedAt: Date | undefined;
|
|
674
689
|
finishedAt: Date | undefined;
|
|
@@ -886,9 +901,11 @@ export declare const DailyTrafficResponse: MessageFns<DailyTrafficResponse>;
|
|
|
886
901
|
export declare const DailyTrafficResponse_Traffic: MessageFns<DailyTrafficResponse_Traffic>;
|
|
887
902
|
export declare const DailyTrafficResponse_DailyTraffic: MessageFns<DailyTrafficResponse_DailyTraffic>;
|
|
888
903
|
export declare const DailyTrafficRequest: MessageFns<DailyTrafficRequest>;
|
|
904
|
+
export declare const RouteStopPoint: MessageFns<RouteStopPoint>;
|
|
905
|
+
export declare const RouteStopResponse: MessageFns<RouteStopResponse>;
|
|
906
|
+
export declare const RouteStopRequest: MessageFns<RouteStopRequest>;
|
|
889
907
|
export declare const RouteReviewRequest: MessageFns<RouteReviewRequest>;
|
|
890
908
|
export declare const RouteReviewResponse: MessageFns<RouteReviewResponse>;
|
|
891
|
-
export declare const RouteReviewResponse_Stop: MessageFns<RouteReviewResponse_Stop>;
|
|
892
909
|
export declare const AreaReviewRequest: MessageFns<AreaReviewRequest>;
|
|
893
910
|
export declare const AreaReviewResponse: MessageFns<AreaReviewResponse>;
|
|
894
911
|
export declare const AreaReviewResponse_AreaReview: MessageFns<AreaReviewResponse_AreaReview>;
|