@fatehan/tsrp 1.0.2
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 +51 -0
- package/dist/fatehan/areas/area.js +401 -0
- package/dist/fatehan/google/protobuf/timestamp.d.ts +128 -0
- package/dist/fatehan/google/protobuf/timestamp.js +93 -0
- package/dist/fatehan/models/fusion.d.ts +70 -0
- package/dist/fatehan/models/fusion.js +802 -0
- package/dist/fatehan/models/models.d.ts +65 -0
- package/dist/fatehan/models/models.js +701 -0
- package/dist/fatehan/models/operation.d.ts +81 -0
- package/dist/fatehan/models/operation.js +874 -0
- package/dist/fatehan/notifies/notify.d.ts +147 -0
- package/dist/fatehan/notifies/notify.js +1634 -0
- package/dist/fatehan/packets/dataModel.d.ts +1254 -0
- package/dist/fatehan/packets/dataModel.js +16880 -0
- package/dist/fatehan/packets/messages.d.ts +52 -0
- package/dist/fatehan/packets/messages.js +402 -0
- package/dist/fatehan/reports/ReportServiceClientPb.js +265 -0
- package/dist/fatehan/reports/report.d.ts +916 -0
- package/dist/fatehan/reports/report.js +12050 -0
- package/dist/fatehan/trips/trip.d.ts +358 -0
- package/dist/fatehan/trips/trip.js +3752 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +59 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +38 -0
- package/package.json +32 -0
- package/readme.md +11 -0
|
@@ -0,0 +1,802 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.7.0
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: models/fusion.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.FusionCar = exports.CommandDevice = exports.AlertsListDevice = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
12
|
+
exports.protobufPackage = "fatehan";
|
|
13
|
+
function createBaseAlertsListDevice() {
|
|
14
|
+
return {
|
|
15
|
+
alertListId: 0,
|
|
16
|
+
dateCreate: 0,
|
|
17
|
+
userId: 0,
|
|
18
|
+
imei: 0,
|
|
19
|
+
content: "",
|
|
20
|
+
alertRead: 0,
|
|
21
|
+
alertId: 0,
|
|
22
|
+
title: "",
|
|
23
|
+
disabled: 0,
|
|
24
|
+
latitude: 0,
|
|
25
|
+
longitude: 0,
|
|
26
|
+
latitudeEnd: 0,
|
|
27
|
+
longitudeEnd: 0,
|
|
28
|
+
dateEnd: 0,
|
|
29
|
+
dateRead: 0,
|
|
30
|
+
alertSend: 0,
|
|
31
|
+
dateSend: 0,
|
|
32
|
+
vals: "",
|
|
33
|
+
relId: 0,
|
|
34
|
+
createdAt: undefined,
|
|
35
|
+
updatedAt: undefined,
|
|
36
|
+
identificationNo: undefined,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.AlertsListDevice = {
|
|
40
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
41
|
+
if (message.alertListId !== 0) {
|
|
42
|
+
writer.uint32(8).uint32(message.alertListId);
|
|
43
|
+
}
|
|
44
|
+
if (message.dateCreate !== 0) {
|
|
45
|
+
writer.uint32(16).uint32(message.dateCreate);
|
|
46
|
+
}
|
|
47
|
+
if (message.userId !== 0) {
|
|
48
|
+
writer.uint32(24).uint32(message.userId);
|
|
49
|
+
}
|
|
50
|
+
if (message.imei !== 0) {
|
|
51
|
+
writer.uint32(32).uint64(message.imei);
|
|
52
|
+
}
|
|
53
|
+
if (message.content !== "") {
|
|
54
|
+
writer.uint32(42).string(message.content);
|
|
55
|
+
}
|
|
56
|
+
if (message.alertRead !== 0) {
|
|
57
|
+
writer.uint32(48).uint32(message.alertRead);
|
|
58
|
+
}
|
|
59
|
+
if (message.alertId !== 0) {
|
|
60
|
+
writer.uint32(56).uint32(message.alertId);
|
|
61
|
+
}
|
|
62
|
+
if (message.title !== "") {
|
|
63
|
+
writer.uint32(66).string(message.title);
|
|
64
|
+
}
|
|
65
|
+
if (message.disabled !== 0) {
|
|
66
|
+
writer.uint32(72).uint32(message.disabled);
|
|
67
|
+
}
|
|
68
|
+
if (message.latitude !== 0) {
|
|
69
|
+
writer.uint32(85).float(message.latitude);
|
|
70
|
+
}
|
|
71
|
+
if (message.longitude !== 0) {
|
|
72
|
+
writer.uint32(93).float(message.longitude);
|
|
73
|
+
}
|
|
74
|
+
if (message.latitudeEnd !== 0) {
|
|
75
|
+
writer.uint32(101).float(message.latitudeEnd);
|
|
76
|
+
}
|
|
77
|
+
if (message.longitudeEnd !== 0) {
|
|
78
|
+
writer.uint32(109).float(message.longitudeEnd);
|
|
79
|
+
}
|
|
80
|
+
if (message.dateEnd !== 0) {
|
|
81
|
+
writer.uint32(112).uint32(message.dateEnd);
|
|
82
|
+
}
|
|
83
|
+
if (message.dateRead !== 0) {
|
|
84
|
+
writer.uint32(120).uint32(message.dateRead);
|
|
85
|
+
}
|
|
86
|
+
if (message.alertSend !== 0) {
|
|
87
|
+
writer.uint32(128).uint32(message.alertSend);
|
|
88
|
+
}
|
|
89
|
+
if (message.dateSend !== 0) {
|
|
90
|
+
writer.uint32(136).uint32(message.dateSend);
|
|
91
|
+
}
|
|
92
|
+
if (message.vals !== "") {
|
|
93
|
+
writer.uint32(146).string(message.vals);
|
|
94
|
+
}
|
|
95
|
+
if (message.relId !== 0) {
|
|
96
|
+
writer.uint32(152).uint32(message.relId);
|
|
97
|
+
}
|
|
98
|
+
if (message.createdAt !== undefined) {
|
|
99
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(162).fork()).join();
|
|
100
|
+
}
|
|
101
|
+
if (message.updatedAt !== undefined) {
|
|
102
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(170).fork()).join();
|
|
103
|
+
}
|
|
104
|
+
if (message.identificationNo !== undefined) {
|
|
105
|
+
writer.uint32(178).string(message.identificationNo);
|
|
106
|
+
}
|
|
107
|
+
return writer;
|
|
108
|
+
},
|
|
109
|
+
decode(input, length) {
|
|
110
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
111
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
112
|
+
const message = createBaseAlertsListDevice();
|
|
113
|
+
while (reader.pos < end) {
|
|
114
|
+
const tag = reader.uint32();
|
|
115
|
+
switch (tag >>> 3) {
|
|
116
|
+
case 1: {
|
|
117
|
+
if (tag !== 8) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
message.alertListId = reader.uint32();
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
case 2: {
|
|
124
|
+
if (tag !== 16) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
message.dateCreate = reader.uint32();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
case 3: {
|
|
131
|
+
if (tag !== 24) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
message.userId = reader.uint32();
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
case 4: {
|
|
138
|
+
if (tag !== 32) {
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
message.imei = longToNumber(reader.uint64());
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
case 5: {
|
|
145
|
+
if (tag !== 42) {
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
message.content = reader.string();
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
case 6: {
|
|
152
|
+
if (tag !== 48) {
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
message.alertRead = reader.uint32();
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
case 7: {
|
|
159
|
+
if (tag !== 56) {
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
message.alertId = reader.uint32();
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
case 8: {
|
|
166
|
+
if (tag !== 66) {
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
message.title = reader.string();
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
case 9: {
|
|
173
|
+
if (tag !== 72) {
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
message.disabled = reader.uint32();
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
case 10: {
|
|
180
|
+
if (tag !== 85) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
message.latitude = reader.float();
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
case 11: {
|
|
187
|
+
if (tag !== 93) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
message.longitude = reader.float();
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
case 12: {
|
|
194
|
+
if (tag !== 101) {
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
message.latitudeEnd = reader.float();
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
case 13: {
|
|
201
|
+
if (tag !== 109) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
message.longitudeEnd = reader.float();
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
case 14: {
|
|
208
|
+
if (tag !== 112) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
message.dateEnd = reader.uint32();
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
case 15: {
|
|
215
|
+
if (tag !== 120) {
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
message.dateRead = reader.uint32();
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
case 16: {
|
|
222
|
+
if (tag !== 128) {
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
message.alertSend = reader.uint32();
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
case 17: {
|
|
229
|
+
if (tag !== 136) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
message.dateSend = reader.uint32();
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
case 18: {
|
|
236
|
+
if (tag !== 146) {
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
message.vals = reader.string();
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
case 19: {
|
|
243
|
+
if (tag !== 152) {
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
message.relId = reader.uint32();
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
case 20: {
|
|
250
|
+
if (tag !== 162) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
case 21: {
|
|
257
|
+
if (tag !== 170) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
case 22: {
|
|
264
|
+
if (tag !== 178) {
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
message.identificationNo = reader.string();
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
reader.skip(tag & 7);
|
|
275
|
+
}
|
|
276
|
+
return message;
|
|
277
|
+
},
|
|
278
|
+
fromJSON(object) {
|
|
279
|
+
return {
|
|
280
|
+
alertListId: isSet(object.alertListId) ? globalThis.Number(object.alertListId) : 0,
|
|
281
|
+
dateCreate: isSet(object.dateCreate) ? globalThis.Number(object.dateCreate) : 0,
|
|
282
|
+
userId: isSet(object.userId) ? globalThis.Number(object.userId) : 0,
|
|
283
|
+
imei: isSet(object.imei) ? globalThis.Number(object.imei) : 0,
|
|
284
|
+
content: isSet(object.content) ? globalThis.String(object.content) : "",
|
|
285
|
+
alertRead: isSet(object.alertRead) ? globalThis.Number(object.alertRead) : 0,
|
|
286
|
+
alertId: isSet(object.alertId) ? globalThis.Number(object.alertId) : 0,
|
|
287
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
288
|
+
disabled: isSet(object.disabled) ? globalThis.Number(object.disabled) : 0,
|
|
289
|
+
latitude: isSet(object.latitude) ? globalThis.Number(object.latitude) : 0,
|
|
290
|
+
longitude: isSet(object.longitude) ? globalThis.Number(object.longitude) : 0,
|
|
291
|
+
latitudeEnd: isSet(object.latitudeEnd) ? globalThis.Number(object.latitudeEnd) : 0,
|
|
292
|
+
longitudeEnd: isSet(object.longitudeEnd) ? globalThis.Number(object.longitudeEnd) : 0,
|
|
293
|
+
dateEnd: isSet(object.dateEnd) ? globalThis.Number(object.dateEnd) : 0,
|
|
294
|
+
dateRead: isSet(object.dateRead) ? globalThis.Number(object.dateRead) : 0,
|
|
295
|
+
alertSend: isSet(object.alertSend) ? globalThis.Number(object.alertSend) : 0,
|
|
296
|
+
dateSend: isSet(object.dateSend) ? globalThis.Number(object.dateSend) : 0,
|
|
297
|
+
vals: isSet(object.vals) ? globalThis.String(object.vals) : "",
|
|
298
|
+
relId: isSet(object.relId) ? globalThis.Number(object.relId) : 0,
|
|
299
|
+
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
300
|
+
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
301
|
+
identificationNo: isSet(object.identificationNo) ? globalThis.String(object.identificationNo) : undefined,
|
|
302
|
+
};
|
|
303
|
+
},
|
|
304
|
+
toJSON(message) {
|
|
305
|
+
const obj = {};
|
|
306
|
+
if (message.alertListId !== 0) {
|
|
307
|
+
obj.alertListId = Math.round(message.alertListId);
|
|
308
|
+
}
|
|
309
|
+
if (message.dateCreate !== 0) {
|
|
310
|
+
obj.dateCreate = Math.round(message.dateCreate);
|
|
311
|
+
}
|
|
312
|
+
if (message.userId !== 0) {
|
|
313
|
+
obj.userId = Math.round(message.userId);
|
|
314
|
+
}
|
|
315
|
+
if (message.imei !== 0) {
|
|
316
|
+
obj.imei = Math.round(message.imei);
|
|
317
|
+
}
|
|
318
|
+
if (message.content !== "") {
|
|
319
|
+
obj.content = message.content;
|
|
320
|
+
}
|
|
321
|
+
if (message.alertRead !== 0) {
|
|
322
|
+
obj.alertRead = Math.round(message.alertRead);
|
|
323
|
+
}
|
|
324
|
+
if (message.alertId !== 0) {
|
|
325
|
+
obj.alertId = Math.round(message.alertId);
|
|
326
|
+
}
|
|
327
|
+
if (message.title !== "") {
|
|
328
|
+
obj.title = message.title;
|
|
329
|
+
}
|
|
330
|
+
if (message.disabled !== 0) {
|
|
331
|
+
obj.disabled = Math.round(message.disabled);
|
|
332
|
+
}
|
|
333
|
+
if (message.latitude !== 0) {
|
|
334
|
+
obj.latitude = message.latitude;
|
|
335
|
+
}
|
|
336
|
+
if (message.longitude !== 0) {
|
|
337
|
+
obj.longitude = message.longitude;
|
|
338
|
+
}
|
|
339
|
+
if (message.latitudeEnd !== 0) {
|
|
340
|
+
obj.latitudeEnd = message.latitudeEnd;
|
|
341
|
+
}
|
|
342
|
+
if (message.longitudeEnd !== 0) {
|
|
343
|
+
obj.longitudeEnd = message.longitudeEnd;
|
|
344
|
+
}
|
|
345
|
+
if (message.dateEnd !== 0) {
|
|
346
|
+
obj.dateEnd = Math.round(message.dateEnd);
|
|
347
|
+
}
|
|
348
|
+
if (message.dateRead !== 0) {
|
|
349
|
+
obj.dateRead = Math.round(message.dateRead);
|
|
350
|
+
}
|
|
351
|
+
if (message.alertSend !== 0) {
|
|
352
|
+
obj.alertSend = Math.round(message.alertSend);
|
|
353
|
+
}
|
|
354
|
+
if (message.dateSend !== 0) {
|
|
355
|
+
obj.dateSend = Math.round(message.dateSend);
|
|
356
|
+
}
|
|
357
|
+
if (message.vals !== "") {
|
|
358
|
+
obj.vals = message.vals;
|
|
359
|
+
}
|
|
360
|
+
if (message.relId !== 0) {
|
|
361
|
+
obj.relId = Math.round(message.relId);
|
|
362
|
+
}
|
|
363
|
+
if (message.createdAt !== undefined) {
|
|
364
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
365
|
+
}
|
|
366
|
+
if (message.updatedAt !== undefined) {
|
|
367
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
368
|
+
}
|
|
369
|
+
if (message.identificationNo !== undefined) {
|
|
370
|
+
obj.identificationNo = message.identificationNo;
|
|
371
|
+
}
|
|
372
|
+
return obj;
|
|
373
|
+
},
|
|
374
|
+
create(base) {
|
|
375
|
+
return exports.AlertsListDevice.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
376
|
+
},
|
|
377
|
+
fromPartial(object) {
|
|
378
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
379
|
+
const message = createBaseAlertsListDevice();
|
|
380
|
+
message.alertListId = (_a = object.alertListId) !== null && _a !== void 0 ? _a : 0;
|
|
381
|
+
message.dateCreate = (_b = object.dateCreate) !== null && _b !== void 0 ? _b : 0;
|
|
382
|
+
message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : 0;
|
|
383
|
+
message.imei = (_d = object.imei) !== null && _d !== void 0 ? _d : 0;
|
|
384
|
+
message.content = (_e = object.content) !== null && _e !== void 0 ? _e : "";
|
|
385
|
+
message.alertRead = (_f = object.alertRead) !== null && _f !== void 0 ? _f : 0;
|
|
386
|
+
message.alertId = (_g = object.alertId) !== null && _g !== void 0 ? _g : 0;
|
|
387
|
+
message.title = (_h = object.title) !== null && _h !== void 0 ? _h : "";
|
|
388
|
+
message.disabled = (_j = object.disabled) !== null && _j !== void 0 ? _j : 0;
|
|
389
|
+
message.latitude = (_k = object.latitude) !== null && _k !== void 0 ? _k : 0;
|
|
390
|
+
message.longitude = (_l = object.longitude) !== null && _l !== void 0 ? _l : 0;
|
|
391
|
+
message.latitudeEnd = (_m = object.latitudeEnd) !== null && _m !== void 0 ? _m : 0;
|
|
392
|
+
message.longitudeEnd = (_o = object.longitudeEnd) !== null && _o !== void 0 ? _o : 0;
|
|
393
|
+
message.dateEnd = (_p = object.dateEnd) !== null && _p !== void 0 ? _p : 0;
|
|
394
|
+
message.dateRead = (_q = object.dateRead) !== null && _q !== void 0 ? _q : 0;
|
|
395
|
+
message.alertSend = (_r = object.alertSend) !== null && _r !== void 0 ? _r : 0;
|
|
396
|
+
message.dateSend = (_s = object.dateSend) !== null && _s !== void 0 ? _s : 0;
|
|
397
|
+
message.vals = (_t = object.vals) !== null && _t !== void 0 ? _t : "";
|
|
398
|
+
message.relId = (_u = object.relId) !== null && _u !== void 0 ? _u : 0;
|
|
399
|
+
message.createdAt = (_v = object.createdAt) !== null && _v !== void 0 ? _v : undefined;
|
|
400
|
+
message.updatedAt = (_w = object.updatedAt) !== null && _w !== void 0 ? _w : undefined;
|
|
401
|
+
message.identificationNo = (_x = object.identificationNo) !== null && _x !== void 0 ? _x : undefined;
|
|
402
|
+
return message;
|
|
403
|
+
},
|
|
404
|
+
};
|
|
405
|
+
function createBaseCommandDevice() {
|
|
406
|
+
return {
|
|
407
|
+
cdId: 0,
|
|
408
|
+
commandId: 0,
|
|
409
|
+
imei: 0,
|
|
410
|
+
userId: 0,
|
|
411
|
+
dateCreate: 0,
|
|
412
|
+
status: 0,
|
|
413
|
+
command: "",
|
|
414
|
+
commandParse: undefined,
|
|
415
|
+
dateSend: 0,
|
|
416
|
+
response: undefined,
|
|
417
|
+
responseParse: undefined,
|
|
418
|
+
dateResponse: 0,
|
|
419
|
+
timeOut: 0,
|
|
420
|
+
type: 0,
|
|
421
|
+
deviceId: 0,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
exports.CommandDevice = {
|
|
425
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
426
|
+
if (message.cdId !== 0) {
|
|
427
|
+
writer.uint32(8).uint32(message.cdId);
|
|
428
|
+
}
|
|
429
|
+
if (message.commandId !== 0) {
|
|
430
|
+
writer.uint32(16).uint32(message.commandId);
|
|
431
|
+
}
|
|
432
|
+
if (message.imei !== 0) {
|
|
433
|
+
writer.uint32(24).uint64(message.imei);
|
|
434
|
+
}
|
|
435
|
+
if (message.userId !== 0) {
|
|
436
|
+
writer.uint32(32).sint32(message.userId);
|
|
437
|
+
}
|
|
438
|
+
if (message.dateCreate !== 0) {
|
|
439
|
+
writer.uint32(40).sint32(message.dateCreate);
|
|
440
|
+
}
|
|
441
|
+
if (message.status !== 0) {
|
|
442
|
+
writer.uint32(48).uint32(message.status);
|
|
443
|
+
}
|
|
444
|
+
if (message.command !== "") {
|
|
445
|
+
writer.uint32(58).string(message.command);
|
|
446
|
+
}
|
|
447
|
+
if (message.commandParse !== undefined) {
|
|
448
|
+
writer.uint32(66).string(message.commandParse);
|
|
449
|
+
}
|
|
450
|
+
if (message.dateSend !== 0) {
|
|
451
|
+
writer.uint32(72).sint32(message.dateSend);
|
|
452
|
+
}
|
|
453
|
+
if (message.response !== undefined) {
|
|
454
|
+
writer.uint32(82).string(message.response);
|
|
455
|
+
}
|
|
456
|
+
if (message.responseParse !== undefined) {
|
|
457
|
+
writer.uint32(90).string(message.responseParse);
|
|
458
|
+
}
|
|
459
|
+
if (message.dateResponse !== 0) {
|
|
460
|
+
writer.uint32(96).sint32(message.dateResponse);
|
|
461
|
+
}
|
|
462
|
+
if (message.timeOut !== 0) {
|
|
463
|
+
writer.uint32(104).sint32(message.timeOut);
|
|
464
|
+
}
|
|
465
|
+
if (message.type !== 0) {
|
|
466
|
+
writer.uint32(112).uint32(message.type);
|
|
467
|
+
}
|
|
468
|
+
if (message.deviceId !== 0) {
|
|
469
|
+
writer.uint32(120).uint64(message.deviceId);
|
|
470
|
+
}
|
|
471
|
+
return writer;
|
|
472
|
+
},
|
|
473
|
+
decode(input, length) {
|
|
474
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
475
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
476
|
+
const message = createBaseCommandDevice();
|
|
477
|
+
while (reader.pos < end) {
|
|
478
|
+
const tag = reader.uint32();
|
|
479
|
+
switch (tag >>> 3) {
|
|
480
|
+
case 1: {
|
|
481
|
+
if (tag !== 8) {
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
message.cdId = reader.uint32();
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
case 2: {
|
|
488
|
+
if (tag !== 16) {
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
message.commandId = reader.uint32();
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
case 3: {
|
|
495
|
+
if (tag !== 24) {
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
message.imei = longToNumber(reader.uint64());
|
|
499
|
+
continue;
|
|
500
|
+
}
|
|
501
|
+
case 4: {
|
|
502
|
+
if (tag !== 32) {
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
message.userId = reader.sint32();
|
|
506
|
+
continue;
|
|
507
|
+
}
|
|
508
|
+
case 5: {
|
|
509
|
+
if (tag !== 40) {
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
message.dateCreate = reader.sint32();
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
case 6: {
|
|
516
|
+
if (tag !== 48) {
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
message.status = reader.uint32();
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
case 7: {
|
|
523
|
+
if (tag !== 58) {
|
|
524
|
+
break;
|
|
525
|
+
}
|
|
526
|
+
message.command = reader.string();
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
case 8: {
|
|
530
|
+
if (tag !== 66) {
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
message.commandParse = reader.string();
|
|
534
|
+
continue;
|
|
535
|
+
}
|
|
536
|
+
case 9: {
|
|
537
|
+
if (tag !== 72) {
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
message.dateSend = reader.sint32();
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
case 10: {
|
|
544
|
+
if (tag !== 82) {
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
message.response = reader.string();
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
case 11: {
|
|
551
|
+
if (tag !== 90) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
message.responseParse = reader.string();
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
case 12: {
|
|
558
|
+
if (tag !== 96) {
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
message.dateResponse = reader.sint32();
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
case 13: {
|
|
565
|
+
if (tag !== 104) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
message.timeOut = reader.sint32();
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
case 14: {
|
|
572
|
+
if (tag !== 112) {
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
message.type = reader.uint32();
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
578
|
+
case 15: {
|
|
579
|
+
if (tag !== 120) {
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
message.deviceId = longToNumber(reader.uint64());
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
reader.skip(tag & 7);
|
|
590
|
+
}
|
|
591
|
+
return message;
|
|
592
|
+
},
|
|
593
|
+
fromJSON(object) {
|
|
594
|
+
return {
|
|
595
|
+
cdId: isSet(object.cdId) ? globalThis.Number(object.cdId) : 0,
|
|
596
|
+
commandId: isSet(object.commandId) ? globalThis.Number(object.commandId) : 0,
|
|
597
|
+
imei: isSet(object.imei) ? globalThis.Number(object.imei) : 0,
|
|
598
|
+
userId: isSet(object.userId) ? globalThis.Number(object.userId) : 0,
|
|
599
|
+
dateCreate: isSet(object.dateCreate) ? globalThis.Number(object.dateCreate) : 0,
|
|
600
|
+
status: isSet(object.status) ? globalThis.Number(object.status) : 0,
|
|
601
|
+
command: isSet(object.command) ? globalThis.String(object.command) : "",
|
|
602
|
+
commandParse: isSet(object.commandParse) ? globalThis.String(object.commandParse) : undefined,
|
|
603
|
+
dateSend: isSet(object.dateSend) ? globalThis.Number(object.dateSend) : 0,
|
|
604
|
+
response: isSet(object.response) ? globalThis.String(object.response) : undefined,
|
|
605
|
+
responseParse: isSet(object.responseParse) ? globalThis.String(object.responseParse) : undefined,
|
|
606
|
+
dateResponse: isSet(object.dateResponse) ? globalThis.Number(object.dateResponse) : 0,
|
|
607
|
+
timeOut: isSet(object.timeOut) ? globalThis.Number(object.timeOut) : 0,
|
|
608
|
+
type: isSet(object.type) ? globalThis.Number(object.type) : 0,
|
|
609
|
+
deviceId: isSet(object.deviceId) ? globalThis.Number(object.deviceId) : 0,
|
|
610
|
+
};
|
|
611
|
+
},
|
|
612
|
+
toJSON(message) {
|
|
613
|
+
const obj = {};
|
|
614
|
+
if (message.cdId !== 0) {
|
|
615
|
+
obj.cdId = Math.round(message.cdId);
|
|
616
|
+
}
|
|
617
|
+
if (message.commandId !== 0) {
|
|
618
|
+
obj.commandId = Math.round(message.commandId);
|
|
619
|
+
}
|
|
620
|
+
if (message.imei !== 0) {
|
|
621
|
+
obj.imei = Math.round(message.imei);
|
|
622
|
+
}
|
|
623
|
+
if (message.userId !== 0) {
|
|
624
|
+
obj.userId = Math.round(message.userId);
|
|
625
|
+
}
|
|
626
|
+
if (message.dateCreate !== 0) {
|
|
627
|
+
obj.dateCreate = Math.round(message.dateCreate);
|
|
628
|
+
}
|
|
629
|
+
if (message.status !== 0) {
|
|
630
|
+
obj.status = Math.round(message.status);
|
|
631
|
+
}
|
|
632
|
+
if (message.command !== "") {
|
|
633
|
+
obj.command = message.command;
|
|
634
|
+
}
|
|
635
|
+
if (message.commandParse !== undefined) {
|
|
636
|
+
obj.commandParse = message.commandParse;
|
|
637
|
+
}
|
|
638
|
+
if (message.dateSend !== 0) {
|
|
639
|
+
obj.dateSend = Math.round(message.dateSend);
|
|
640
|
+
}
|
|
641
|
+
if (message.response !== undefined) {
|
|
642
|
+
obj.response = message.response;
|
|
643
|
+
}
|
|
644
|
+
if (message.responseParse !== undefined) {
|
|
645
|
+
obj.responseParse = message.responseParse;
|
|
646
|
+
}
|
|
647
|
+
if (message.dateResponse !== 0) {
|
|
648
|
+
obj.dateResponse = Math.round(message.dateResponse);
|
|
649
|
+
}
|
|
650
|
+
if (message.timeOut !== 0) {
|
|
651
|
+
obj.timeOut = Math.round(message.timeOut);
|
|
652
|
+
}
|
|
653
|
+
if (message.type !== 0) {
|
|
654
|
+
obj.type = Math.round(message.type);
|
|
655
|
+
}
|
|
656
|
+
if (message.deviceId !== 0) {
|
|
657
|
+
obj.deviceId = Math.round(message.deviceId);
|
|
658
|
+
}
|
|
659
|
+
return obj;
|
|
660
|
+
},
|
|
661
|
+
create(base) {
|
|
662
|
+
return exports.CommandDevice.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
663
|
+
},
|
|
664
|
+
fromPartial(object) {
|
|
665
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
666
|
+
const message = createBaseCommandDevice();
|
|
667
|
+
message.cdId = (_a = object.cdId) !== null && _a !== void 0 ? _a : 0;
|
|
668
|
+
message.commandId = (_b = object.commandId) !== null && _b !== void 0 ? _b : 0;
|
|
669
|
+
message.imei = (_c = object.imei) !== null && _c !== void 0 ? _c : 0;
|
|
670
|
+
message.userId = (_d = object.userId) !== null && _d !== void 0 ? _d : 0;
|
|
671
|
+
message.dateCreate = (_e = object.dateCreate) !== null && _e !== void 0 ? _e : 0;
|
|
672
|
+
message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
|
|
673
|
+
message.command = (_g = object.command) !== null && _g !== void 0 ? _g : "";
|
|
674
|
+
message.commandParse = (_h = object.commandParse) !== null && _h !== void 0 ? _h : undefined;
|
|
675
|
+
message.dateSend = (_j = object.dateSend) !== null && _j !== void 0 ? _j : 0;
|
|
676
|
+
message.response = (_k = object.response) !== null && _k !== void 0 ? _k : undefined;
|
|
677
|
+
message.responseParse = (_l = object.responseParse) !== null && _l !== void 0 ? _l : undefined;
|
|
678
|
+
message.dateResponse = (_m = object.dateResponse) !== null && _m !== void 0 ? _m : 0;
|
|
679
|
+
message.timeOut = (_o = object.timeOut) !== null && _o !== void 0 ? _o : 0;
|
|
680
|
+
message.type = (_p = object.type) !== null && _p !== void 0 ? _p : 0;
|
|
681
|
+
message.deviceId = (_q = object.deviceId) !== null && _q !== void 0 ? _q : 0;
|
|
682
|
+
return message;
|
|
683
|
+
},
|
|
684
|
+
};
|
|
685
|
+
function createBaseFusionCar() {
|
|
686
|
+
return { carId: 0, deviceName: "", powerVoltage: 0 };
|
|
687
|
+
}
|
|
688
|
+
exports.FusionCar = {
|
|
689
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
690
|
+
if (message.carId !== 0) {
|
|
691
|
+
writer.uint32(8).uint64(message.carId);
|
|
692
|
+
}
|
|
693
|
+
if (message.deviceName !== "") {
|
|
694
|
+
writer.uint32(18).string(message.deviceName);
|
|
695
|
+
}
|
|
696
|
+
if (message.powerVoltage !== 0) {
|
|
697
|
+
writer.uint32(24).uint32(message.powerVoltage);
|
|
698
|
+
}
|
|
699
|
+
return writer;
|
|
700
|
+
},
|
|
701
|
+
decode(input, length) {
|
|
702
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
703
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
704
|
+
const message = createBaseFusionCar();
|
|
705
|
+
while (reader.pos < end) {
|
|
706
|
+
const tag = reader.uint32();
|
|
707
|
+
switch (tag >>> 3) {
|
|
708
|
+
case 1: {
|
|
709
|
+
if (tag !== 8) {
|
|
710
|
+
break;
|
|
711
|
+
}
|
|
712
|
+
message.carId = longToNumber(reader.uint64());
|
|
713
|
+
continue;
|
|
714
|
+
}
|
|
715
|
+
case 2: {
|
|
716
|
+
if (tag !== 18) {
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
message.deviceName = reader.string();
|
|
720
|
+
continue;
|
|
721
|
+
}
|
|
722
|
+
case 3: {
|
|
723
|
+
if (tag !== 24) {
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
message.powerVoltage = reader.uint32();
|
|
727
|
+
continue;
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
731
|
+
break;
|
|
732
|
+
}
|
|
733
|
+
reader.skip(tag & 7);
|
|
734
|
+
}
|
|
735
|
+
return message;
|
|
736
|
+
},
|
|
737
|
+
fromJSON(object) {
|
|
738
|
+
return {
|
|
739
|
+
carId: isSet(object.carId) ? globalThis.Number(object.carId) : 0,
|
|
740
|
+
deviceName: isSet(object.deviceName) ? globalThis.String(object.deviceName) : "",
|
|
741
|
+
powerVoltage: isSet(object.powerVoltage) ? globalThis.Number(object.powerVoltage) : 0,
|
|
742
|
+
};
|
|
743
|
+
},
|
|
744
|
+
toJSON(message) {
|
|
745
|
+
const obj = {};
|
|
746
|
+
if (message.carId !== 0) {
|
|
747
|
+
obj.carId = Math.round(message.carId);
|
|
748
|
+
}
|
|
749
|
+
if (message.deviceName !== "") {
|
|
750
|
+
obj.deviceName = message.deviceName;
|
|
751
|
+
}
|
|
752
|
+
if (message.powerVoltage !== 0) {
|
|
753
|
+
obj.powerVoltage = Math.round(message.powerVoltage);
|
|
754
|
+
}
|
|
755
|
+
return obj;
|
|
756
|
+
},
|
|
757
|
+
create(base) {
|
|
758
|
+
return exports.FusionCar.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
759
|
+
},
|
|
760
|
+
fromPartial(object) {
|
|
761
|
+
var _a, _b, _c;
|
|
762
|
+
const message = createBaseFusionCar();
|
|
763
|
+
message.carId = (_a = object.carId) !== null && _a !== void 0 ? _a : 0;
|
|
764
|
+
message.deviceName = (_b = object.deviceName) !== null && _b !== void 0 ? _b : "";
|
|
765
|
+
message.powerVoltage = (_c = object.powerVoltage) !== null && _c !== void 0 ? _c : 0;
|
|
766
|
+
return message;
|
|
767
|
+
},
|
|
768
|
+
};
|
|
769
|
+
function toTimestamp(date) {
|
|
770
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
771
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
772
|
+
return { seconds, nanos };
|
|
773
|
+
}
|
|
774
|
+
function fromTimestamp(t) {
|
|
775
|
+
let millis = (t.seconds || 0) * 1000;
|
|
776
|
+
millis += (t.nanos || 0) / 1000000;
|
|
777
|
+
return new globalThis.Date(millis);
|
|
778
|
+
}
|
|
779
|
+
function fromJsonTimestamp(o) {
|
|
780
|
+
if (o instanceof globalThis.Date) {
|
|
781
|
+
return o;
|
|
782
|
+
}
|
|
783
|
+
else if (typeof o === "string") {
|
|
784
|
+
return new globalThis.Date(o);
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
function longToNumber(int64) {
|
|
791
|
+
const num = globalThis.Number(int64.toString());
|
|
792
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
793
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
794
|
+
}
|
|
795
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
796
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
797
|
+
}
|
|
798
|
+
return num;
|
|
799
|
+
}
|
|
800
|
+
function isSet(value) {
|
|
801
|
+
return value !== null && value !== undefined;
|
|
802
|
+
}
|