@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,12 +4,16 @@
|
|
|
4
4
|
// protoc-gen-ts_proto v2.7.0
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: packets/messages.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.CommandStruct = exports.CommandFormat = exports.CommandValidation = exports.Command = exports.CommandAkn = exports.CommandContent = exports.CommandStatus = exports.protobufPackage = void 0;
|
|
9
12
|
exports.commandStatusFromJSON = commandStatusFromJSON;
|
|
10
13
|
exports.commandStatusToJSON = commandStatusToJSON;
|
|
11
14
|
/* eslint-disable */
|
|
12
15
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
16
|
+
const long_1 = __importDefault(require("long"));
|
|
13
17
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
14
18
|
exports.protobufPackage = "com.fatehan.packets";
|
|
15
19
|
var CommandStatus;
|
|
@@ -57,7 +61,7 @@ function commandStatusToJSON(object) {
|
|
|
57
61
|
}
|
|
58
62
|
function createBaseCommandContent() {
|
|
59
63
|
return {
|
|
60
|
-
deviceId:
|
|
64
|
+
deviceId: long_1.default.UZERO,
|
|
61
65
|
commandId: undefined,
|
|
62
66
|
message: undefined,
|
|
63
67
|
params: [],
|
|
@@ -67,11 +71,11 @@ function createBaseCommandContent() {
|
|
|
67
71
|
}
|
|
68
72
|
exports.CommandContent = {
|
|
69
73
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
70
|
-
if (message.deviceId
|
|
71
|
-
writer.uint32(8).uint64(message.deviceId);
|
|
74
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
75
|
+
writer.uint32(8).uint64(message.deviceId.toString());
|
|
72
76
|
}
|
|
73
77
|
if (message.commandId !== undefined) {
|
|
74
|
-
writer.uint32(16).uint64(message.commandId);
|
|
78
|
+
writer.uint32(16).uint64(message.commandId.toString());
|
|
75
79
|
}
|
|
76
80
|
if (message.message !== undefined) {
|
|
77
81
|
writer.uint32(26).string(message.message);
|
|
@@ -98,14 +102,14 @@ exports.CommandContent = {
|
|
|
98
102
|
if (tag !== 8) {
|
|
99
103
|
break;
|
|
100
104
|
}
|
|
101
|
-
message.deviceId =
|
|
105
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
102
106
|
continue;
|
|
103
107
|
}
|
|
104
108
|
case 2: {
|
|
105
109
|
if (tag !== 16) {
|
|
106
110
|
break;
|
|
107
111
|
}
|
|
108
|
-
message.commandId =
|
|
112
|
+
message.commandId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
109
113
|
continue;
|
|
110
114
|
}
|
|
111
115
|
case 3: {
|
|
@@ -146,8 +150,8 @@ exports.CommandContent = {
|
|
|
146
150
|
},
|
|
147
151
|
fromJSON(object) {
|
|
148
152
|
return {
|
|
149
|
-
deviceId: isSet(object.device_id) ?
|
|
150
|
-
commandId: isSet(object.command_id) ?
|
|
153
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
154
|
+
commandId: isSet(object.command_id) ? long_1.default.fromValue(object.command_id) : undefined,
|
|
151
155
|
message: isSet(object.message) ? globalThis.String(object.message) : undefined,
|
|
152
156
|
params: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.params) ? object.params.map((e) => globalThis.String(e)) : [],
|
|
153
157
|
rawCommand: isSet(object.raw_command) ? globalThis.String(object.raw_command) : undefined,
|
|
@@ -157,11 +161,11 @@ exports.CommandContent = {
|
|
|
157
161
|
toJSON(message) {
|
|
158
162
|
var _a;
|
|
159
163
|
const obj = {};
|
|
160
|
-
if (message.deviceId
|
|
161
|
-
obj.device_id =
|
|
164
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
165
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
162
166
|
}
|
|
163
167
|
if (message.commandId !== undefined) {
|
|
164
|
-
obj.command_id =
|
|
168
|
+
obj.command_id = (message.commandId || long_1.default.UZERO).toString();
|
|
165
169
|
}
|
|
166
170
|
if (message.message !== undefined) {
|
|
167
171
|
obj.message = message.message;
|
|
@@ -181,14 +185,18 @@ exports.CommandContent = {
|
|
|
181
185
|
return exports.CommandContent.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
182
186
|
},
|
|
183
187
|
fromPartial(object) {
|
|
184
|
-
var _a, _b, _c, _d
|
|
188
|
+
var _a, _b, _c, _d;
|
|
185
189
|
const message = createBaseCommandContent();
|
|
186
|
-
message.deviceId = (
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
message.
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
191
|
+
? long_1.default.fromValue(object.deviceId)
|
|
192
|
+
: long_1.default.UZERO;
|
|
193
|
+
message.commandId = (object.commandId !== undefined && object.commandId !== null)
|
|
194
|
+
? long_1.default.fromValue(object.commandId)
|
|
195
|
+
: undefined;
|
|
196
|
+
message.message = (_a = object.message) !== null && _a !== void 0 ? _a : undefined;
|
|
197
|
+
message.params = ((_b = object.params) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
198
|
+
message.rawCommand = (_c = object.rawCommand) !== null && _c !== void 0 ? _c : undefined;
|
|
199
|
+
message.command = (_d = object.command) !== null && _d !== void 0 ? _d : new Uint8Array(0);
|
|
192
200
|
return message;
|
|
193
201
|
},
|
|
194
202
|
};
|
|
@@ -263,8 +271,8 @@ exports.CommandAkn = {
|
|
|
263
271
|
};
|
|
264
272
|
function createBaseCommand() {
|
|
265
273
|
return {
|
|
266
|
-
id:
|
|
267
|
-
deviceId:
|
|
274
|
+
id: long_1.default.UZERO,
|
|
275
|
+
deviceId: long_1.default.UZERO,
|
|
268
276
|
userId: undefined,
|
|
269
277
|
commandId: undefined,
|
|
270
278
|
replyId: undefined,
|
|
@@ -277,20 +285,20 @@ function createBaseCommand() {
|
|
|
277
285
|
}
|
|
278
286
|
exports.Command = {
|
|
279
287
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
280
|
-
if (message.id
|
|
281
|
-
writer.uint32(8).uint64(message.id);
|
|
288
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
289
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
282
290
|
}
|
|
283
|
-
if (message.deviceId
|
|
284
|
-
writer.uint32(16).uint64(message.deviceId);
|
|
291
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
292
|
+
writer.uint32(16).uint64(message.deviceId.toString());
|
|
285
293
|
}
|
|
286
294
|
if (message.userId !== undefined) {
|
|
287
|
-
writer.uint32(24).uint64(message.userId);
|
|
295
|
+
writer.uint32(24).uint64(message.userId.toString());
|
|
288
296
|
}
|
|
289
297
|
if (message.commandId !== undefined) {
|
|
290
|
-
writer.uint32(32).uint64(message.commandId);
|
|
298
|
+
writer.uint32(32).uint64(message.commandId.toString());
|
|
291
299
|
}
|
|
292
300
|
if (message.replyId !== undefined) {
|
|
293
|
-
writer.uint32(40).uint64(message.replyId);
|
|
301
|
+
writer.uint32(40).uint64(message.replyId.toString());
|
|
294
302
|
}
|
|
295
303
|
if (message.status !== 0) {
|
|
296
304
|
writer.uint32(48).int32(message.status);
|
|
@@ -320,35 +328,35 @@ exports.Command = {
|
|
|
320
328
|
if (tag !== 8) {
|
|
321
329
|
break;
|
|
322
330
|
}
|
|
323
|
-
message.id =
|
|
331
|
+
message.id = long_1.default.fromString(reader.uint64().toString(), true);
|
|
324
332
|
continue;
|
|
325
333
|
}
|
|
326
334
|
case 2: {
|
|
327
335
|
if (tag !== 16) {
|
|
328
336
|
break;
|
|
329
337
|
}
|
|
330
|
-
message.deviceId =
|
|
338
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
331
339
|
continue;
|
|
332
340
|
}
|
|
333
341
|
case 3: {
|
|
334
342
|
if (tag !== 24) {
|
|
335
343
|
break;
|
|
336
344
|
}
|
|
337
|
-
message.userId =
|
|
345
|
+
message.userId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
338
346
|
continue;
|
|
339
347
|
}
|
|
340
348
|
case 4: {
|
|
341
349
|
if (tag !== 32) {
|
|
342
350
|
break;
|
|
343
351
|
}
|
|
344
|
-
message.commandId =
|
|
352
|
+
message.commandId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
345
353
|
continue;
|
|
346
354
|
}
|
|
347
355
|
case 5: {
|
|
348
356
|
if (tag !== 40) {
|
|
349
357
|
break;
|
|
350
358
|
}
|
|
351
|
-
message.replyId =
|
|
359
|
+
message.replyId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
352
360
|
continue;
|
|
353
361
|
}
|
|
354
362
|
case 6: {
|
|
@@ -396,11 +404,11 @@ exports.Command = {
|
|
|
396
404
|
},
|
|
397
405
|
fromJSON(object) {
|
|
398
406
|
return {
|
|
399
|
-
id: isSet(object.id) ?
|
|
400
|
-
deviceId: isSet(object.device_id) ?
|
|
401
|
-
userId: isSet(object.user_id) ?
|
|
402
|
-
commandId: isSet(object.command_id) ?
|
|
403
|
-
replyId: isSet(object.reply_id) ?
|
|
407
|
+
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
408
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
409
|
+
userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : undefined,
|
|
410
|
+
commandId: isSet(object.command_id) ? long_1.default.fromValue(object.command_id) : undefined,
|
|
411
|
+
replyId: isSet(object.reply_id) ? long_1.default.fromValue(object.reply_id) : undefined,
|
|
404
412
|
status: isSet(object.status) ? commandStatusFromJSON(object.status) : 0,
|
|
405
413
|
command: isSet(object.command) ? exports.CommandContent.fromJSON(object.command) : undefined,
|
|
406
414
|
akn: isSet(object.akn) ? exports.CommandAkn.fromJSON(object.akn) : undefined,
|
|
@@ -410,20 +418,20 @@ exports.Command = {
|
|
|
410
418
|
},
|
|
411
419
|
toJSON(message) {
|
|
412
420
|
const obj = {};
|
|
413
|
-
if (message.id
|
|
414
|
-
obj.id =
|
|
421
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
422
|
+
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
415
423
|
}
|
|
416
|
-
if (message.deviceId
|
|
417
|
-
obj.device_id =
|
|
424
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
425
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
418
426
|
}
|
|
419
427
|
if (message.userId !== undefined) {
|
|
420
|
-
obj.user_id =
|
|
428
|
+
obj.user_id = (message.userId || long_1.default.UZERO).toString();
|
|
421
429
|
}
|
|
422
430
|
if (message.commandId !== undefined) {
|
|
423
|
-
obj.command_id =
|
|
431
|
+
obj.command_id = (message.commandId || long_1.default.UZERO).toString();
|
|
424
432
|
}
|
|
425
433
|
if (message.replyId !== undefined) {
|
|
426
|
-
obj.reply_id =
|
|
434
|
+
obj.reply_id = (message.replyId || long_1.default.UZERO).toString();
|
|
427
435
|
}
|
|
428
436
|
if (message.status !== 0) {
|
|
429
437
|
obj.status = commandStatusToJSON(message.status);
|
|
@@ -446,33 +454,41 @@ exports.Command = {
|
|
|
446
454
|
return exports.Command.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
447
455
|
},
|
|
448
456
|
fromPartial(object) {
|
|
449
|
-
var _a, _b, _c
|
|
457
|
+
var _a, _b, _c;
|
|
450
458
|
const message = createBaseCommand();
|
|
451
|
-
message.id = (
|
|
452
|
-
message.deviceId = (
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
message.
|
|
456
|
-
|
|
459
|
+
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
460
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
461
|
+
? long_1.default.fromValue(object.deviceId)
|
|
462
|
+
: long_1.default.UZERO;
|
|
463
|
+
message.userId = (object.userId !== undefined && object.userId !== null)
|
|
464
|
+
? long_1.default.fromValue(object.userId)
|
|
465
|
+
: undefined;
|
|
466
|
+
message.commandId = (object.commandId !== undefined && object.commandId !== null)
|
|
467
|
+
? long_1.default.fromValue(object.commandId)
|
|
468
|
+
: undefined;
|
|
469
|
+
message.replyId = (object.replyId !== undefined && object.replyId !== null)
|
|
470
|
+
? long_1.default.fromValue(object.replyId)
|
|
471
|
+
: undefined;
|
|
472
|
+
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : 0;
|
|
457
473
|
message.command = (object.command !== undefined && object.command !== null)
|
|
458
474
|
? exports.CommandContent.fromPartial(object.command)
|
|
459
475
|
: undefined;
|
|
460
476
|
message.akn = (object.akn !== undefined && object.akn !== null) ? exports.CommandAkn.fromPartial(object.akn) : undefined;
|
|
461
|
-
message.createdAt = (
|
|
462
|
-
message.updatedAt = (
|
|
477
|
+
message.createdAt = (_b = object.createdAt) !== null && _b !== void 0 ? _b : undefined;
|
|
478
|
+
message.updatedAt = (_c = object.updatedAt) !== null && _c !== void 0 ? _c : undefined;
|
|
463
479
|
return message;
|
|
464
480
|
},
|
|
465
481
|
};
|
|
466
482
|
function createBaseCommandValidation() {
|
|
467
|
-
return { max:
|
|
483
|
+
return { max: long_1.default.ZERO, min: long_1.default.ZERO, name: "", type: "", description: "", isRequired: false };
|
|
468
484
|
}
|
|
469
485
|
exports.CommandValidation = {
|
|
470
486
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
471
|
-
if (message.max
|
|
472
|
-
writer.uint32(8).sint64(message.max);
|
|
487
|
+
if (!message.max.equals(long_1.default.ZERO)) {
|
|
488
|
+
writer.uint32(8).sint64(message.max.toString());
|
|
473
489
|
}
|
|
474
|
-
if (message.min
|
|
475
|
-
writer.uint32(16).sint64(message.min);
|
|
490
|
+
if (!message.min.equals(long_1.default.ZERO)) {
|
|
491
|
+
writer.uint32(16).sint64(message.min.toString());
|
|
476
492
|
}
|
|
477
493
|
if (message.name !== "") {
|
|
478
494
|
writer.uint32(26).string(message.name);
|
|
@@ -499,14 +515,14 @@ exports.CommandValidation = {
|
|
|
499
515
|
if (tag !== 8) {
|
|
500
516
|
break;
|
|
501
517
|
}
|
|
502
|
-
message.max =
|
|
518
|
+
message.max = long_1.default.fromString(reader.sint64().toString());
|
|
503
519
|
continue;
|
|
504
520
|
}
|
|
505
521
|
case 2: {
|
|
506
522
|
if (tag !== 16) {
|
|
507
523
|
break;
|
|
508
524
|
}
|
|
509
|
-
message.min =
|
|
525
|
+
message.min = long_1.default.fromString(reader.sint64().toString());
|
|
510
526
|
continue;
|
|
511
527
|
}
|
|
512
528
|
case 3: {
|
|
@@ -547,8 +563,8 @@ exports.CommandValidation = {
|
|
|
547
563
|
},
|
|
548
564
|
fromJSON(object) {
|
|
549
565
|
return {
|
|
550
|
-
max: isSet(object.max) ?
|
|
551
|
-
min: isSet(object.min) ?
|
|
566
|
+
max: isSet(object.max) ? long_1.default.fromValue(object.max) : long_1.default.ZERO,
|
|
567
|
+
min: isSet(object.min) ? long_1.default.fromValue(object.min) : long_1.default.ZERO,
|
|
552
568
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
553
569
|
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
554
570
|
description: isSet(object.description) ? globalThis.String(object.description) : "",
|
|
@@ -557,11 +573,11 @@ exports.CommandValidation = {
|
|
|
557
573
|
},
|
|
558
574
|
toJSON(message) {
|
|
559
575
|
const obj = {};
|
|
560
|
-
if (message.max
|
|
561
|
-
obj.max =
|
|
576
|
+
if (!message.max.equals(long_1.default.ZERO)) {
|
|
577
|
+
obj.max = (message.max || long_1.default.ZERO).toString();
|
|
562
578
|
}
|
|
563
|
-
if (message.min
|
|
564
|
-
obj.min =
|
|
579
|
+
if (!message.min.equals(long_1.default.ZERO)) {
|
|
580
|
+
obj.min = (message.min || long_1.default.ZERO).toString();
|
|
565
581
|
}
|
|
566
582
|
if (message.name !== "") {
|
|
567
583
|
obj.name = message.name;
|
|
@@ -581,14 +597,14 @@ exports.CommandValidation = {
|
|
|
581
597
|
return exports.CommandValidation.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
582
598
|
},
|
|
583
599
|
fromPartial(object) {
|
|
584
|
-
var _a, _b, _c, _d
|
|
600
|
+
var _a, _b, _c, _d;
|
|
585
601
|
const message = createBaseCommandValidation();
|
|
586
|
-
message.max = (
|
|
587
|
-
message.min = (
|
|
588
|
-
message.name = (
|
|
589
|
-
message.type = (
|
|
590
|
-
message.description = (
|
|
591
|
-
message.isRequired = (
|
|
602
|
+
message.max = (object.max !== undefined && object.max !== null) ? long_1.default.fromValue(object.max) : long_1.default.ZERO;
|
|
603
|
+
message.min = (object.min !== undefined && object.min !== null) ? long_1.default.fromValue(object.min) : long_1.default.ZERO;
|
|
604
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
605
|
+
message.type = (_b = object.type) !== null && _b !== void 0 ? _b : "";
|
|
606
|
+
message.description = (_c = object.description) !== null && _c !== void 0 ? _c : "";
|
|
607
|
+
message.isRequired = (_d = object.isRequired) !== null && _d !== void 0 ? _d : false;
|
|
592
608
|
return message;
|
|
593
609
|
},
|
|
594
610
|
};
|
|
@@ -666,14 +682,14 @@ exports.CommandFormat = {
|
|
|
666
682
|
};
|
|
667
683
|
function createBaseCommandStruct() {
|
|
668
684
|
return {
|
|
669
|
-
id:
|
|
670
|
-
trackerId:
|
|
685
|
+
id: long_1.default.UZERO,
|
|
686
|
+
trackerId: long_1.default.UZERO,
|
|
671
687
|
userCreatedId: undefined,
|
|
672
688
|
userUpdatedId: undefined,
|
|
673
689
|
organizationId: undefined,
|
|
674
690
|
name: "",
|
|
675
|
-
sortOrder:
|
|
676
|
-
visible:
|
|
691
|
+
sortOrder: long_1.default.UZERO,
|
|
692
|
+
visible: long_1.default.UZERO,
|
|
677
693
|
description: undefined,
|
|
678
694
|
sms: undefined,
|
|
679
695
|
grpc: undefined,
|
|
@@ -683,29 +699,29 @@ function createBaseCommandStruct() {
|
|
|
683
699
|
}
|
|
684
700
|
exports.CommandStruct = {
|
|
685
701
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
686
|
-
if (message.id
|
|
687
|
-
writer.uint32(8).uint64(message.id);
|
|
702
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
703
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
688
704
|
}
|
|
689
|
-
if (message.trackerId
|
|
690
|
-
writer.uint32(16).uint64(message.trackerId);
|
|
705
|
+
if (!message.trackerId.equals(long_1.default.UZERO)) {
|
|
706
|
+
writer.uint32(16).uint64(message.trackerId.toString());
|
|
691
707
|
}
|
|
692
708
|
if (message.userCreatedId !== undefined) {
|
|
693
|
-
writer.uint32(24).uint64(message.userCreatedId);
|
|
709
|
+
writer.uint32(24).uint64(message.userCreatedId.toString());
|
|
694
710
|
}
|
|
695
711
|
if (message.userUpdatedId !== undefined) {
|
|
696
|
-
writer.uint32(32).uint64(message.userUpdatedId);
|
|
712
|
+
writer.uint32(32).uint64(message.userUpdatedId.toString());
|
|
697
713
|
}
|
|
698
714
|
if (message.organizationId !== undefined) {
|
|
699
|
-
writer.uint32(40).uint64(message.organizationId);
|
|
715
|
+
writer.uint32(40).uint64(message.organizationId.toString());
|
|
700
716
|
}
|
|
701
717
|
if (message.name !== "") {
|
|
702
718
|
writer.uint32(50).string(message.name);
|
|
703
719
|
}
|
|
704
|
-
if (message.sortOrder
|
|
705
|
-
writer.uint32(56).uint64(message.sortOrder);
|
|
720
|
+
if (!message.sortOrder.equals(long_1.default.UZERO)) {
|
|
721
|
+
writer.uint32(56).uint64(message.sortOrder.toString());
|
|
706
722
|
}
|
|
707
|
-
if (message.visible
|
|
708
|
-
writer.uint32(64).uint64(message.visible);
|
|
723
|
+
if (!message.visible.equals(long_1.default.UZERO)) {
|
|
724
|
+
writer.uint32(64).uint64(message.visible.toString());
|
|
709
725
|
}
|
|
710
726
|
if (message.description !== undefined) {
|
|
711
727
|
writer.uint32(74).string(message.description);
|
|
@@ -735,35 +751,35 @@ exports.CommandStruct = {
|
|
|
735
751
|
if (tag !== 8) {
|
|
736
752
|
break;
|
|
737
753
|
}
|
|
738
|
-
message.id =
|
|
754
|
+
message.id = long_1.default.fromString(reader.uint64().toString(), true);
|
|
739
755
|
continue;
|
|
740
756
|
}
|
|
741
757
|
case 2: {
|
|
742
758
|
if (tag !== 16) {
|
|
743
759
|
break;
|
|
744
760
|
}
|
|
745
|
-
message.trackerId =
|
|
761
|
+
message.trackerId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
746
762
|
continue;
|
|
747
763
|
}
|
|
748
764
|
case 3: {
|
|
749
765
|
if (tag !== 24) {
|
|
750
766
|
break;
|
|
751
767
|
}
|
|
752
|
-
message.userCreatedId =
|
|
768
|
+
message.userCreatedId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
753
769
|
continue;
|
|
754
770
|
}
|
|
755
771
|
case 4: {
|
|
756
772
|
if (tag !== 32) {
|
|
757
773
|
break;
|
|
758
774
|
}
|
|
759
|
-
message.userUpdatedId =
|
|
775
|
+
message.userUpdatedId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
760
776
|
continue;
|
|
761
777
|
}
|
|
762
778
|
case 5: {
|
|
763
779
|
if (tag !== 40) {
|
|
764
780
|
break;
|
|
765
781
|
}
|
|
766
|
-
message.organizationId =
|
|
782
|
+
message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
767
783
|
continue;
|
|
768
784
|
}
|
|
769
785
|
case 6: {
|
|
@@ -777,14 +793,14 @@ exports.CommandStruct = {
|
|
|
777
793
|
if (tag !== 56) {
|
|
778
794
|
break;
|
|
779
795
|
}
|
|
780
|
-
message.sortOrder =
|
|
796
|
+
message.sortOrder = long_1.default.fromString(reader.uint64().toString(), true);
|
|
781
797
|
continue;
|
|
782
798
|
}
|
|
783
799
|
case 8: {
|
|
784
800
|
if (tag !== 64) {
|
|
785
801
|
break;
|
|
786
802
|
}
|
|
787
|
-
message.visible =
|
|
803
|
+
message.visible = long_1.default.fromString(reader.uint64().toString(), true);
|
|
788
804
|
continue;
|
|
789
805
|
}
|
|
790
806
|
case 9: {
|
|
@@ -832,14 +848,14 @@ exports.CommandStruct = {
|
|
|
832
848
|
},
|
|
833
849
|
fromJSON(object) {
|
|
834
850
|
return {
|
|
835
|
-
id: isSet(object.id) ?
|
|
836
|
-
trackerId: isSet(object.tracker_id) ?
|
|
837
|
-
userCreatedId: isSet(object.created_by) ?
|
|
838
|
-
userUpdatedId: isSet(object.updated_by) ?
|
|
839
|
-
organizationId: isSet(object.organization_id) ?
|
|
851
|
+
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
852
|
+
trackerId: isSet(object.tracker_id) ? long_1.default.fromValue(object.tracker_id) : long_1.default.UZERO,
|
|
853
|
+
userCreatedId: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
|
|
854
|
+
userUpdatedId: isSet(object.updated_by) ? long_1.default.fromValue(object.updated_by) : undefined,
|
|
855
|
+
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : undefined,
|
|
840
856
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
841
|
-
sortOrder: isSet(object.sord) ?
|
|
842
|
-
visible: isSet(object.visible) ?
|
|
857
|
+
sortOrder: isSet(object.sord) ? long_1.default.fromValue(object.sord) : long_1.default.UZERO,
|
|
858
|
+
visible: isSet(object.visible) ? long_1.default.fromValue(object.visible) : long_1.default.UZERO,
|
|
843
859
|
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
844
860
|
sms: isSet(object.sms) ? exports.CommandFormat.fromJSON(object.sms) : undefined,
|
|
845
861
|
grpc: isSet(object.grpc) ? exports.CommandFormat.fromJSON(object.grpc) : undefined,
|
|
@@ -849,29 +865,29 @@ exports.CommandStruct = {
|
|
|
849
865
|
},
|
|
850
866
|
toJSON(message) {
|
|
851
867
|
const obj = {};
|
|
852
|
-
if (message.id
|
|
853
|
-
obj.id =
|
|
868
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
869
|
+
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
854
870
|
}
|
|
855
|
-
if (message.trackerId
|
|
856
|
-
obj.tracker_id =
|
|
871
|
+
if (!message.trackerId.equals(long_1.default.UZERO)) {
|
|
872
|
+
obj.tracker_id = (message.trackerId || long_1.default.UZERO).toString();
|
|
857
873
|
}
|
|
858
874
|
if (message.userCreatedId !== undefined) {
|
|
859
|
-
obj.created_by =
|
|
875
|
+
obj.created_by = (message.userCreatedId || long_1.default.UZERO).toString();
|
|
860
876
|
}
|
|
861
877
|
if (message.userUpdatedId !== undefined) {
|
|
862
|
-
obj.updated_by =
|
|
878
|
+
obj.updated_by = (message.userUpdatedId || long_1.default.UZERO).toString();
|
|
863
879
|
}
|
|
864
880
|
if (message.organizationId !== undefined) {
|
|
865
|
-
obj.organization_id =
|
|
881
|
+
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
866
882
|
}
|
|
867
883
|
if (message.name !== "") {
|
|
868
884
|
obj.name = message.name;
|
|
869
885
|
}
|
|
870
|
-
if (message.sortOrder
|
|
871
|
-
obj.sord =
|
|
886
|
+
if (!message.sortOrder.equals(long_1.default.UZERO)) {
|
|
887
|
+
obj.sord = (message.sortOrder || long_1.default.UZERO).toString();
|
|
872
888
|
}
|
|
873
|
-
if (message.visible
|
|
874
|
-
obj.visible =
|
|
889
|
+
if (!message.visible.equals(long_1.default.UZERO)) {
|
|
890
|
+
obj.visible = (message.visible || long_1.default.UZERO).toString();
|
|
875
891
|
}
|
|
876
892
|
if (message.description !== undefined) {
|
|
877
893
|
obj.description = message.description;
|
|
@@ -894,23 +910,35 @@ exports.CommandStruct = {
|
|
|
894
910
|
return exports.CommandStruct.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
895
911
|
},
|
|
896
912
|
fromPartial(object) {
|
|
897
|
-
var _a, _b, _c, _d
|
|
913
|
+
var _a, _b, _c, _d;
|
|
898
914
|
const message = createBaseCommandStruct();
|
|
899
|
-
message.id = (
|
|
900
|
-
message.trackerId = (
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
message.
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
message.
|
|
907
|
-
|
|
915
|
+
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
916
|
+
message.trackerId = (object.trackerId !== undefined && object.trackerId !== null)
|
|
917
|
+
? long_1.default.fromValue(object.trackerId)
|
|
918
|
+
: long_1.default.UZERO;
|
|
919
|
+
message.userCreatedId = (object.userCreatedId !== undefined && object.userCreatedId !== null)
|
|
920
|
+
? long_1.default.fromValue(object.userCreatedId)
|
|
921
|
+
: undefined;
|
|
922
|
+
message.userUpdatedId = (object.userUpdatedId !== undefined && object.userUpdatedId !== null)
|
|
923
|
+
? long_1.default.fromValue(object.userUpdatedId)
|
|
924
|
+
: undefined;
|
|
925
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
926
|
+
? long_1.default.fromValue(object.organizationId)
|
|
927
|
+
: undefined;
|
|
928
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
929
|
+
message.sortOrder = (object.sortOrder !== undefined && object.sortOrder !== null)
|
|
930
|
+
? long_1.default.fromValue(object.sortOrder)
|
|
931
|
+
: long_1.default.UZERO;
|
|
932
|
+
message.visible = (object.visible !== undefined && object.visible !== null)
|
|
933
|
+
? long_1.default.fromValue(object.visible)
|
|
934
|
+
: long_1.default.UZERO;
|
|
935
|
+
message.description = (_b = object.description) !== null && _b !== void 0 ? _b : undefined;
|
|
908
936
|
message.sms = (object.sms !== undefined && object.sms !== null) ? exports.CommandFormat.fromPartial(object.sms) : undefined;
|
|
909
937
|
message.grpc = (object.grpc !== undefined && object.grpc !== null)
|
|
910
938
|
? exports.CommandFormat.fromPartial(object.grpc)
|
|
911
939
|
: undefined;
|
|
912
|
-
message.createdAt = (
|
|
913
|
-
message.updatedAt = (
|
|
940
|
+
message.createdAt = (_c = object.createdAt) !== null && _c !== void 0 ? _c : undefined;
|
|
941
|
+
message.updatedAt = (_d = object.updatedAt) !== null && _d !== void 0 ? _d : undefined;
|
|
914
942
|
return message;
|
|
915
943
|
},
|
|
916
944
|
};
|
|
@@ -940,12 +968,12 @@ function base64FromBytes(arr) {
|
|
|
940
968
|
}
|
|
941
969
|
}
|
|
942
970
|
function toTimestamp(date) {
|
|
943
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
971
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
944
972
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
945
973
|
return { seconds, nanos };
|
|
946
974
|
}
|
|
947
975
|
function fromTimestamp(t) {
|
|
948
|
-
let millis = (t.seconds || 0) * 1000;
|
|
976
|
+
let millis = (t.seconds.toNumber() || 0) * 1000;
|
|
949
977
|
millis += (t.nanos || 0) / 1000000;
|
|
950
978
|
return new globalThis.Date(millis);
|
|
951
979
|
}
|
|
@@ -960,15 +988,8 @@ function fromJsonTimestamp(o) {
|
|
|
960
988
|
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
961
989
|
}
|
|
962
990
|
}
|
|
963
|
-
function
|
|
964
|
-
|
|
965
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
966
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
967
|
-
}
|
|
968
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
969
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
970
|
-
}
|
|
971
|
-
return num;
|
|
991
|
+
function numberToLong(number) {
|
|
992
|
+
return long_1.default.fromNumber(number);
|
|
972
993
|
}
|
|
973
994
|
function isSet(value) {
|
|
974
995
|
return value !== null && value !== undefined;
|