@fatehan/tsrp 1.0.20 → 1.0.22
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.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.test.js +12 -8
- package/package.json +4 -2
- package/readme.md +1 -1
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
// protoc-gen-ts_proto v2.7.0
|
|
5
5
|
// protoc v6.31.1
|
|
6
6
|
// source: notifies/notify.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.Notification_DataEntry = exports.Notification = exports.Notify_DataEntry = exports.Notify = exports.Receiver = exports.UserDeviceAlertList = exports.UserDeviceAlert_ConditionEntry = exports.UserDeviceAlert_ConditionList = exports.UserDeviceAlert_Condition = exports.UserDeviceAlert = exports.NotifyJob = exports.NotifyJob_Priority = exports.ObjectType = exports.Via = exports.protobufPackage = void 0;
|
|
9
12
|
exports.viaFromJSON = viaFromJSON;
|
|
@@ -14,6 +17,7 @@ exports.notifyJob_PriorityFromJSON = notifyJob_PriorityFromJSON;
|
|
|
14
17
|
exports.notifyJob_PriorityToJSON = notifyJob_PriorityToJSON;
|
|
15
18
|
/* eslint-disable */
|
|
16
19
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
20
|
+
const long_1 = __importDefault(require("long"));
|
|
17
21
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
18
22
|
const dataModel_1 = require("../packets/dataModel");
|
|
19
23
|
exports.protobufPackage = "com.fatehan.notifies";
|
|
@@ -153,18 +157,27 @@ function notifyJob_PriorityToJSON(object) {
|
|
|
153
157
|
}
|
|
154
158
|
}
|
|
155
159
|
function createBaseNotifyJob() {
|
|
156
|
-
return {
|
|
160
|
+
return {
|
|
161
|
+
id: long_1.default.UZERO,
|
|
162
|
+
userId: long_1.default.UZERO,
|
|
163
|
+
alertId: long_1.default.UZERO,
|
|
164
|
+
alertType: 0,
|
|
165
|
+
retries: 0,
|
|
166
|
+
priority: 0,
|
|
167
|
+
notify: undefined,
|
|
168
|
+
via: [],
|
|
169
|
+
};
|
|
157
170
|
}
|
|
158
171
|
exports.NotifyJob = {
|
|
159
172
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
160
|
-
if (message.id
|
|
161
|
-
writer.uint32(8).uint64(message.id);
|
|
173
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
174
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
162
175
|
}
|
|
163
|
-
if (message.userId
|
|
164
|
-
writer.uint32(16).uint64(message.userId);
|
|
176
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
177
|
+
writer.uint32(16).uint64(message.userId.toString());
|
|
165
178
|
}
|
|
166
|
-
if (message.alertId
|
|
167
|
-
writer.uint32(24).uint64(message.alertId);
|
|
179
|
+
if (!message.alertId.equals(long_1.default.UZERO)) {
|
|
180
|
+
writer.uint32(24).uint64(message.alertId.toString());
|
|
168
181
|
}
|
|
169
182
|
if (message.alertType !== 0) {
|
|
170
183
|
writer.uint32(32).int32(message.alertType);
|
|
@@ -196,21 +209,21 @@ exports.NotifyJob = {
|
|
|
196
209
|
if (tag !== 8) {
|
|
197
210
|
break;
|
|
198
211
|
}
|
|
199
|
-
message.id =
|
|
212
|
+
message.id = long_1.default.fromString(reader.uint64().toString(), true);
|
|
200
213
|
continue;
|
|
201
214
|
}
|
|
202
215
|
case 2: {
|
|
203
216
|
if (tag !== 16) {
|
|
204
217
|
break;
|
|
205
218
|
}
|
|
206
|
-
message.userId =
|
|
219
|
+
message.userId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
207
220
|
continue;
|
|
208
221
|
}
|
|
209
222
|
case 3: {
|
|
210
223
|
if (tag !== 24) {
|
|
211
224
|
break;
|
|
212
225
|
}
|
|
213
|
-
message.alertId =
|
|
226
|
+
message.alertId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
214
227
|
continue;
|
|
215
228
|
}
|
|
216
229
|
case 4: {
|
|
@@ -265,9 +278,9 @@ exports.NotifyJob = {
|
|
|
265
278
|
},
|
|
266
279
|
fromJSON(object) {
|
|
267
280
|
return {
|
|
268
|
-
id: isSet(object.id) ?
|
|
269
|
-
userId: isSet(object.user_id) ?
|
|
270
|
-
alertId: isSet(object.alert_id) ?
|
|
281
|
+
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
282
|
+
userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : long_1.default.UZERO,
|
|
283
|
+
alertId: isSet(object.alert_id) ? long_1.default.fromValue(object.alert_id) : long_1.default.UZERO,
|
|
271
284
|
alertType: isSet(object.alert_type) ? (0, dataModel_1.alertFromJSON)(object.alert_type) : 0,
|
|
272
285
|
retries: isSet(object.retries) ? globalThis.Number(object.retries) : 0,
|
|
273
286
|
priority: isSet(object.priority) ? notifyJob_PriorityFromJSON(object.priority) : 0,
|
|
@@ -278,14 +291,14 @@ exports.NotifyJob = {
|
|
|
278
291
|
toJSON(message) {
|
|
279
292
|
var _a;
|
|
280
293
|
const obj = {};
|
|
281
|
-
if (message.id
|
|
282
|
-
obj.id =
|
|
294
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
295
|
+
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
283
296
|
}
|
|
284
|
-
if (message.userId
|
|
285
|
-
obj.user_id =
|
|
297
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
298
|
+
obj.user_id = (message.userId || long_1.default.UZERO).toString();
|
|
286
299
|
}
|
|
287
|
-
if (message.alertId
|
|
288
|
-
obj.alert_id =
|
|
300
|
+
if (!message.alertId.equals(long_1.default.UZERO)) {
|
|
301
|
+
obj.alert_id = (message.alertId || long_1.default.UZERO).toString();
|
|
289
302
|
}
|
|
290
303
|
if (message.alertType !== 0) {
|
|
291
304
|
obj.alert_type = (0, dataModel_1.alertToJSON)(message.alertType);
|
|
@@ -308,27 +321,31 @@ exports.NotifyJob = {
|
|
|
308
321
|
return exports.NotifyJob.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
309
322
|
},
|
|
310
323
|
fromPartial(object) {
|
|
311
|
-
var _a, _b, _c, _d
|
|
324
|
+
var _a, _b, _c, _d;
|
|
312
325
|
const message = createBaseNotifyJob();
|
|
313
|
-
message.id = (
|
|
314
|
-
message.userId = (
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
message.
|
|
318
|
-
|
|
326
|
+
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
327
|
+
message.userId = (object.userId !== undefined && object.userId !== null)
|
|
328
|
+
? long_1.default.fromValue(object.userId)
|
|
329
|
+
: long_1.default.UZERO;
|
|
330
|
+
message.alertId = (object.alertId !== undefined && object.alertId !== null)
|
|
331
|
+
? long_1.default.fromValue(object.alertId)
|
|
332
|
+
: long_1.default.UZERO;
|
|
333
|
+
message.alertType = (_a = object.alertType) !== null && _a !== void 0 ? _a : 0;
|
|
334
|
+
message.retries = (_b = object.retries) !== null && _b !== void 0 ? _b : 0;
|
|
335
|
+
message.priority = (_c = object.priority) !== null && _c !== void 0 ? _c : 0;
|
|
319
336
|
message.notify = (object.notify !== undefined && object.notify !== null)
|
|
320
337
|
? exports.Notify.fromPartial(object.notify)
|
|
321
338
|
: undefined;
|
|
322
|
-
message.via = ((
|
|
339
|
+
message.via = ((_d = object.via) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
|
|
323
340
|
return message;
|
|
324
341
|
},
|
|
325
342
|
};
|
|
326
343
|
function createBaseUserDeviceAlert() {
|
|
327
344
|
return {
|
|
328
|
-
id:
|
|
329
|
-
userId:
|
|
330
|
-
deviceId:
|
|
331
|
-
alertId:
|
|
345
|
+
id: long_1.default.UZERO,
|
|
346
|
+
userId: long_1.default.UZERO,
|
|
347
|
+
deviceId: long_1.default.UZERO,
|
|
348
|
+
alertId: long_1.default.UZERO,
|
|
332
349
|
condition: {},
|
|
333
350
|
status: false,
|
|
334
351
|
format: "",
|
|
@@ -338,17 +355,17 @@ function createBaseUserDeviceAlert() {
|
|
|
338
355
|
}
|
|
339
356
|
exports.UserDeviceAlert = {
|
|
340
357
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
341
|
-
if (message.id
|
|
342
|
-
writer.uint32(8).uint64(message.id);
|
|
358
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
359
|
+
writer.uint32(8).uint64(message.id.toString());
|
|
343
360
|
}
|
|
344
|
-
if (message.userId
|
|
345
|
-
writer.uint32(16).uint64(message.userId);
|
|
361
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
362
|
+
writer.uint32(16).uint64(message.userId.toString());
|
|
346
363
|
}
|
|
347
|
-
if (message.deviceId
|
|
348
|
-
writer.uint32(32).uint64(message.deviceId);
|
|
364
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
365
|
+
writer.uint32(32).uint64(message.deviceId.toString());
|
|
349
366
|
}
|
|
350
|
-
if (message.alertId
|
|
351
|
-
writer.uint32(40).uint64(message.alertId);
|
|
367
|
+
if (!message.alertId.equals(long_1.default.UZERO)) {
|
|
368
|
+
writer.uint32(40).uint64(message.alertId.toString());
|
|
352
369
|
}
|
|
353
370
|
Object.entries(message.condition).forEach(([key, value]) => {
|
|
354
371
|
exports.UserDeviceAlert_ConditionEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
|
|
@@ -378,28 +395,28 @@ exports.UserDeviceAlert = {
|
|
|
378
395
|
if (tag !== 8) {
|
|
379
396
|
break;
|
|
380
397
|
}
|
|
381
|
-
message.id =
|
|
398
|
+
message.id = long_1.default.fromString(reader.uint64().toString(), true);
|
|
382
399
|
continue;
|
|
383
400
|
}
|
|
384
401
|
case 2: {
|
|
385
402
|
if (tag !== 16) {
|
|
386
403
|
break;
|
|
387
404
|
}
|
|
388
|
-
message.userId =
|
|
405
|
+
message.userId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
389
406
|
continue;
|
|
390
407
|
}
|
|
391
408
|
case 4: {
|
|
392
409
|
if (tag !== 32) {
|
|
393
410
|
break;
|
|
394
411
|
}
|
|
395
|
-
message.deviceId =
|
|
412
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
396
413
|
continue;
|
|
397
414
|
}
|
|
398
415
|
case 5: {
|
|
399
416
|
if (tag !== 40) {
|
|
400
417
|
break;
|
|
401
418
|
}
|
|
402
|
-
message.alertId =
|
|
419
|
+
message.alertId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
403
420
|
continue;
|
|
404
421
|
}
|
|
405
422
|
case 6: {
|
|
@@ -450,10 +467,10 @@ exports.UserDeviceAlert = {
|
|
|
450
467
|
},
|
|
451
468
|
fromJSON(object) {
|
|
452
469
|
return {
|
|
453
|
-
id: isSet(object.id) ?
|
|
454
|
-
userId: isSet(object.user_id) ?
|
|
455
|
-
deviceId: isSet(object.device_id) ?
|
|
456
|
-
alertId: isSet(object.alert_id) ?
|
|
470
|
+
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
471
|
+
userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : long_1.default.UZERO,
|
|
472
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
473
|
+
alertId: isSet(object.alert_id) ? long_1.default.fromValue(object.alert_id) : long_1.default.UZERO,
|
|
457
474
|
condition: isObject(object.condition)
|
|
458
475
|
? Object.entries(object.condition).reduce((acc, [key, value]) => {
|
|
459
476
|
acc[globalThis.Number(key)] = exports.UserDeviceAlert_ConditionList.fromJSON(value);
|
|
@@ -468,17 +485,17 @@ exports.UserDeviceAlert = {
|
|
|
468
485
|
},
|
|
469
486
|
toJSON(message) {
|
|
470
487
|
const obj = {};
|
|
471
|
-
if (message.id
|
|
472
|
-
obj.id =
|
|
488
|
+
if (!message.id.equals(long_1.default.UZERO)) {
|
|
489
|
+
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
473
490
|
}
|
|
474
|
-
if (message.userId
|
|
475
|
-
obj.user_id =
|
|
491
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
492
|
+
obj.user_id = (message.userId || long_1.default.UZERO).toString();
|
|
476
493
|
}
|
|
477
|
-
if (message.deviceId
|
|
478
|
-
obj.device_id =
|
|
494
|
+
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
495
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
479
496
|
}
|
|
480
|
-
if (message.alertId
|
|
481
|
-
obj.alert_id =
|
|
497
|
+
if (!message.alertId.equals(long_1.default.UZERO)) {
|
|
498
|
+
obj.alert_id = (message.alertId || long_1.default.UZERO).toString();
|
|
482
499
|
}
|
|
483
500
|
if (message.condition) {
|
|
484
501
|
const entries = Object.entries(message.condition);
|
|
@@ -507,22 +524,28 @@ exports.UserDeviceAlert = {
|
|
|
507
524
|
return exports.UserDeviceAlert.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
508
525
|
},
|
|
509
526
|
fromPartial(object) {
|
|
510
|
-
var _a, _b, _c, _d, _e
|
|
527
|
+
var _a, _b, _c, _d, _e;
|
|
511
528
|
const message = createBaseUserDeviceAlert();
|
|
512
|
-
message.id = (
|
|
513
|
-
message.userId = (
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
message.
|
|
529
|
+
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
530
|
+
message.userId = (object.userId !== undefined && object.userId !== null)
|
|
531
|
+
? long_1.default.fromValue(object.userId)
|
|
532
|
+
: long_1.default.UZERO;
|
|
533
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
534
|
+
? long_1.default.fromValue(object.deviceId)
|
|
535
|
+
: long_1.default.UZERO;
|
|
536
|
+
message.alertId = (object.alertId !== undefined && object.alertId !== null)
|
|
537
|
+
? long_1.default.fromValue(object.alertId)
|
|
538
|
+
: long_1.default.UZERO;
|
|
539
|
+
message.condition = Object.entries((_a = object.condition) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
517
540
|
if (value !== undefined) {
|
|
518
541
|
acc[globalThis.Number(key)] = exports.UserDeviceAlert_ConditionList.fromPartial(value);
|
|
519
542
|
}
|
|
520
543
|
return acc;
|
|
521
544
|
}, {});
|
|
522
|
-
message.status = (
|
|
523
|
-
message.format = (
|
|
524
|
-
message.alert = (
|
|
525
|
-
message.unit = (
|
|
545
|
+
message.status = (_b = object.status) !== null && _b !== void 0 ? _b : false;
|
|
546
|
+
message.format = (_c = object.format) !== null && _c !== void 0 ? _c : "";
|
|
547
|
+
message.alert = (_d = object.alert) !== null && _d !== void 0 ? _d : 0;
|
|
548
|
+
message.unit = (_e = object.unit) !== null && _e !== void 0 ? _e : undefined;
|
|
526
549
|
return message;
|
|
527
550
|
},
|
|
528
551
|
};
|
|
@@ -538,7 +561,7 @@ exports.UserDeviceAlert_Condition = {
|
|
|
538
561
|
writer.uint32(18).string(message.toTime);
|
|
539
562
|
}
|
|
540
563
|
if (message.soundId !== undefined) {
|
|
541
|
-
writer.uint32(24).uint64(message.soundId);
|
|
564
|
+
writer.uint32(24).uint64(message.soundId.toString());
|
|
542
565
|
}
|
|
543
566
|
if (message.text !== undefined) {
|
|
544
567
|
writer.uint32(34).string(message.text);
|
|
@@ -578,7 +601,7 @@ exports.UserDeviceAlert_Condition = {
|
|
|
578
601
|
if (tag !== 24) {
|
|
579
602
|
break;
|
|
580
603
|
}
|
|
581
|
-
message.soundId =
|
|
604
|
+
message.soundId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
582
605
|
continue;
|
|
583
606
|
}
|
|
584
607
|
case 4: {
|
|
@@ -621,7 +644,7 @@ exports.UserDeviceAlert_Condition = {
|
|
|
621
644
|
return {
|
|
622
645
|
fromTime: isSet(object.from_time) ? globalThis.String(object.from_time) : undefined,
|
|
623
646
|
toTime: isSet(object.to_time) ? globalThis.String(object.to_time) : undefined,
|
|
624
|
-
soundId: isSet(object.sound_id) ?
|
|
647
|
+
soundId: isSet(object.sound_id) ? long_1.default.fromValue(object.sound_id) : undefined,
|
|
625
648
|
text: isSet(object.text) ? globalThis.String(object.text) : undefined,
|
|
626
649
|
value: isSet(object.value) ? globalThis.String(object.value) : undefined,
|
|
627
650
|
type: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.type) ? object.type.map((e) => viaFromJSON(e)) : [],
|
|
@@ -637,7 +660,7 @@ exports.UserDeviceAlert_Condition = {
|
|
|
637
660
|
obj.to_time = message.toTime;
|
|
638
661
|
}
|
|
639
662
|
if (message.soundId !== undefined) {
|
|
640
|
-
obj.sound_id =
|
|
663
|
+
obj.sound_id = (message.soundId || long_1.default.UZERO).toString();
|
|
641
664
|
}
|
|
642
665
|
if (message.text !== undefined) {
|
|
643
666
|
obj.text = message.text;
|
|
@@ -654,14 +677,16 @@ exports.UserDeviceAlert_Condition = {
|
|
|
654
677
|
return exports.UserDeviceAlert_Condition.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
655
678
|
},
|
|
656
679
|
fromPartial(object) {
|
|
657
|
-
var _a, _b, _c, _d, _e
|
|
680
|
+
var _a, _b, _c, _d, _e;
|
|
658
681
|
const message = createBaseUserDeviceAlert_Condition();
|
|
659
682
|
message.fromTime = (_a = object.fromTime) !== null && _a !== void 0 ? _a : undefined;
|
|
660
683
|
message.toTime = (_b = object.toTime) !== null && _b !== void 0 ? _b : undefined;
|
|
661
|
-
message.soundId = (
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
message.
|
|
684
|
+
message.soundId = (object.soundId !== undefined && object.soundId !== null)
|
|
685
|
+
? long_1.default.fromValue(object.soundId)
|
|
686
|
+
: undefined;
|
|
687
|
+
message.text = (_c = object.text) !== null && _c !== void 0 ? _c : undefined;
|
|
688
|
+
message.value = (_d = object.value) !== null && _d !== void 0 ? _d : undefined;
|
|
689
|
+
message.type = ((_e = object.type) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
|
|
665
690
|
return message;
|
|
666
691
|
},
|
|
667
692
|
};
|
|
@@ -854,7 +879,7 @@ function createBaseReceiver() {
|
|
|
854
879
|
exports.Receiver = {
|
|
855
880
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
856
881
|
if (message.phone !== undefined) {
|
|
857
|
-
writer.uint32(8).uint64(message.phone);
|
|
882
|
+
writer.uint32(8).uint64(message.phone.toString());
|
|
858
883
|
}
|
|
859
884
|
if (message.email !== undefined) {
|
|
860
885
|
writer.uint32(18).string(message.email);
|
|
@@ -875,7 +900,7 @@ exports.Receiver = {
|
|
|
875
900
|
if (tag !== 8) {
|
|
876
901
|
break;
|
|
877
902
|
}
|
|
878
|
-
message.phone =
|
|
903
|
+
message.phone = long_1.default.fromString(reader.uint64().toString(), true);
|
|
879
904
|
continue;
|
|
880
905
|
}
|
|
881
906
|
case 2: {
|
|
@@ -902,7 +927,7 @@ exports.Receiver = {
|
|
|
902
927
|
},
|
|
903
928
|
fromJSON(object) {
|
|
904
929
|
return {
|
|
905
|
-
phone: isSet(object.phone) ?
|
|
930
|
+
phone: isSet(object.phone) ? long_1.default.fromValue(object.phone) : undefined,
|
|
906
931
|
email: isSet(object.email) ? globalThis.String(object.email) : undefined,
|
|
907
932
|
token: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.token) ? object.token.map((e) => globalThis.String(e)) : [],
|
|
908
933
|
};
|
|
@@ -911,7 +936,7 @@ exports.Receiver = {
|
|
|
911
936
|
var _a;
|
|
912
937
|
const obj = {};
|
|
913
938
|
if (message.phone !== undefined) {
|
|
914
|
-
obj.phone =
|
|
939
|
+
obj.phone = (message.phone || long_1.default.UZERO).toString();
|
|
915
940
|
}
|
|
916
941
|
if (message.email !== undefined) {
|
|
917
942
|
obj.email = message.email;
|
|
@@ -925,11 +950,11 @@ exports.Receiver = {
|
|
|
925
950
|
return exports.Receiver.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
926
951
|
},
|
|
927
952
|
fromPartial(object) {
|
|
928
|
-
var _a, _b
|
|
953
|
+
var _a, _b;
|
|
929
954
|
const message = createBaseReceiver();
|
|
930
|
-
message.phone = (
|
|
931
|
-
message.email = (
|
|
932
|
-
message.token = ((
|
|
955
|
+
message.phone = (object.phone !== undefined && object.phone !== null) ? long_1.default.fromValue(object.phone) : undefined;
|
|
956
|
+
message.email = (_a = object.email) !== null && _a !== void 0 ? _a : undefined;
|
|
957
|
+
message.token = ((_b = object.token) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
|
|
933
958
|
return message;
|
|
934
959
|
},
|
|
935
960
|
};
|
|
@@ -956,7 +981,7 @@ exports.Notify = {
|
|
|
956
981
|
writer.uint32(18).string(message.body);
|
|
957
982
|
}
|
|
958
983
|
if (message.sound !== undefined) {
|
|
959
|
-
writer.uint32(24).uint64(message.sound);
|
|
984
|
+
writer.uint32(24).uint64(message.sound.toString());
|
|
960
985
|
}
|
|
961
986
|
if (message.image !== undefined) {
|
|
962
987
|
writer.uint32(34).string(message.image);
|
|
@@ -968,7 +993,7 @@ exports.Notify = {
|
|
|
968
993
|
exports.Receiver.encode(message.receiver, writer.uint32(50).fork()).join();
|
|
969
994
|
}
|
|
970
995
|
if (message.objectId !== undefined) {
|
|
971
|
-
writer.uint32(56).uint64(message.objectId);
|
|
996
|
+
writer.uint32(56).uint64(message.objectId.toString());
|
|
972
997
|
}
|
|
973
998
|
if (message.objectType !== 0) {
|
|
974
999
|
writer.uint32(64).int32(message.objectType);
|
|
@@ -1006,7 +1031,7 @@ exports.Notify = {
|
|
|
1006
1031
|
if (tag !== 24) {
|
|
1007
1032
|
break;
|
|
1008
1033
|
}
|
|
1009
|
-
message.sound =
|
|
1034
|
+
message.sound = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1010
1035
|
continue;
|
|
1011
1036
|
}
|
|
1012
1037
|
case 4: {
|
|
@@ -1034,7 +1059,7 @@ exports.Notify = {
|
|
|
1034
1059
|
if (tag !== 56) {
|
|
1035
1060
|
break;
|
|
1036
1061
|
}
|
|
1037
|
-
message.objectId =
|
|
1062
|
+
message.objectId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1038
1063
|
continue;
|
|
1039
1064
|
}
|
|
1040
1065
|
case 8: {
|
|
@@ -1073,11 +1098,11 @@ exports.Notify = {
|
|
|
1073
1098
|
return {
|
|
1074
1099
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1075
1100
|
body: isSet(object.body) ? globalThis.String(object.body) : "",
|
|
1076
|
-
sound: isSet(object.sound) ?
|
|
1101
|
+
sound: isSet(object.sound) ? long_1.default.fromValue(object.sound) : undefined,
|
|
1077
1102
|
image: isSet(object.image) ? globalThis.String(object.image) : undefined,
|
|
1078
1103
|
icon: isSet(object.icon) ? globalThis.String(object.icon) : undefined,
|
|
1079
1104
|
receiver: isSet(object.receiver) ? exports.Receiver.fromJSON(object.receiver) : undefined,
|
|
1080
|
-
objectId: isSet(object.object_id) ?
|
|
1105
|
+
objectId: isSet(object.object_id) ? long_1.default.fromValue(object.object_id) : undefined,
|
|
1081
1106
|
objectType: isSet(object.object_type) ? objectTypeFromJSON(object.object_type) : 0,
|
|
1082
1107
|
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
1083
1108
|
data: isObject(object.data)
|
|
@@ -1097,7 +1122,7 @@ exports.Notify = {
|
|
|
1097
1122
|
obj.body = message.body;
|
|
1098
1123
|
}
|
|
1099
1124
|
if (message.sound !== undefined) {
|
|
1100
|
-
obj.sound =
|
|
1125
|
+
obj.sound = (message.sound || long_1.default.UZERO).toString();
|
|
1101
1126
|
}
|
|
1102
1127
|
if (message.image !== undefined) {
|
|
1103
1128
|
obj.image = message.image;
|
|
@@ -1109,7 +1134,7 @@ exports.Notify = {
|
|
|
1109
1134
|
obj.receiver = exports.Receiver.toJSON(message.receiver);
|
|
1110
1135
|
}
|
|
1111
1136
|
if (message.objectId !== undefined) {
|
|
1112
|
-
obj.object_id =
|
|
1137
|
+
obj.object_id = (message.objectId || long_1.default.UZERO).toString();
|
|
1113
1138
|
}
|
|
1114
1139
|
if (message.objectType !== 0) {
|
|
1115
1140
|
obj.object_type = objectTypeToJSON(message.objectType);
|
|
@@ -1132,20 +1157,22 @@ exports.Notify = {
|
|
|
1132
1157
|
return exports.Notify.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1133
1158
|
},
|
|
1134
1159
|
fromPartial(object) {
|
|
1135
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
1160
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1136
1161
|
const message = createBaseNotify();
|
|
1137
1162
|
message.title = (_a = object.title) !== null && _a !== void 0 ? _a : "";
|
|
1138
1163
|
message.body = (_b = object.body) !== null && _b !== void 0 ? _b : "";
|
|
1139
|
-
message.sound = (
|
|
1140
|
-
message.image = (
|
|
1141
|
-
message.icon = (
|
|
1164
|
+
message.sound = (object.sound !== undefined && object.sound !== null) ? long_1.default.fromValue(object.sound) : undefined;
|
|
1165
|
+
message.image = (_c = object.image) !== null && _c !== void 0 ? _c : undefined;
|
|
1166
|
+
message.icon = (_d = object.icon) !== null && _d !== void 0 ? _d : undefined;
|
|
1142
1167
|
message.receiver = (object.receiver !== undefined && object.receiver !== null)
|
|
1143
1168
|
? exports.Receiver.fromPartial(object.receiver)
|
|
1144
1169
|
: undefined;
|
|
1145
|
-
message.objectId = (
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
message.
|
|
1170
|
+
message.objectId = (object.objectId !== undefined && object.objectId !== null)
|
|
1171
|
+
? long_1.default.fromValue(object.objectId)
|
|
1172
|
+
: undefined;
|
|
1173
|
+
message.objectType = (_e = object.objectType) !== null && _e !== void 0 ? _e : 0;
|
|
1174
|
+
message.timestamp = (_f = object.timestamp) !== null && _f !== void 0 ? _f : undefined;
|
|
1175
|
+
message.data = Object.entries((_g = object.data) !== null && _g !== void 0 ? _g : {}).reduce((acc, [key, value]) => {
|
|
1149
1176
|
if (value !== undefined) {
|
|
1150
1177
|
acc[key] = globalThis.String(value);
|
|
1151
1178
|
}
|
|
@@ -1226,12 +1253,12 @@ exports.Notify_DataEntry = {
|
|
|
1226
1253
|
function createBaseNotification() {
|
|
1227
1254
|
return {
|
|
1228
1255
|
uuid: "",
|
|
1229
|
-
userId:
|
|
1256
|
+
userId: long_1.default.UZERO,
|
|
1230
1257
|
objectId: undefined,
|
|
1231
1258
|
objectType: 0,
|
|
1232
1259
|
title: "",
|
|
1233
1260
|
body: undefined,
|
|
1234
|
-
alertId:
|
|
1261
|
+
alertId: long_1.default.UZERO,
|
|
1235
1262
|
alertType: 0,
|
|
1236
1263
|
via: [],
|
|
1237
1264
|
data: {},
|
|
@@ -1247,11 +1274,11 @@ exports.Notification = {
|
|
|
1247
1274
|
if (message.uuid !== "") {
|
|
1248
1275
|
writer.uint32(10).string(message.uuid);
|
|
1249
1276
|
}
|
|
1250
|
-
if (message.userId
|
|
1251
|
-
writer.uint32(16).uint64(message.userId);
|
|
1277
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
1278
|
+
writer.uint32(16).uint64(message.userId.toString());
|
|
1252
1279
|
}
|
|
1253
1280
|
if (message.objectId !== undefined) {
|
|
1254
|
-
writer.uint32(24).uint64(message.objectId);
|
|
1281
|
+
writer.uint32(24).uint64(message.objectId.toString());
|
|
1255
1282
|
}
|
|
1256
1283
|
if (message.objectType !== 0) {
|
|
1257
1284
|
writer.uint32(32).int32(message.objectType);
|
|
@@ -1262,8 +1289,8 @@ exports.Notification = {
|
|
|
1262
1289
|
if (message.body !== undefined) {
|
|
1263
1290
|
writer.uint32(50).string(message.body);
|
|
1264
1291
|
}
|
|
1265
|
-
if (message.alertId
|
|
1266
|
-
writer.uint32(56).uint64(message.alertId);
|
|
1292
|
+
if (!message.alertId.equals(long_1.default.UZERO)) {
|
|
1293
|
+
writer.uint32(56).uint64(message.alertId.toString());
|
|
1267
1294
|
}
|
|
1268
1295
|
if (message.alertType !== 0) {
|
|
1269
1296
|
writer.uint32(64).int32(message.alertType);
|
|
@@ -1283,7 +1310,7 @@ exports.Notification = {
|
|
|
1283
1310
|
writer.uint32(98).string(message.icon);
|
|
1284
1311
|
}
|
|
1285
1312
|
if (message.sound !== undefined) {
|
|
1286
|
-
writer.uint32(104).uint64(message.sound);
|
|
1313
|
+
writer.uint32(104).uint64(message.sound.toString());
|
|
1287
1314
|
}
|
|
1288
1315
|
if (message.createdAt !== undefined) {
|
|
1289
1316
|
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(114).fork()).join();
|
|
@@ -1311,14 +1338,14 @@ exports.Notification = {
|
|
|
1311
1338
|
if (tag !== 16) {
|
|
1312
1339
|
break;
|
|
1313
1340
|
}
|
|
1314
|
-
message.userId =
|
|
1341
|
+
message.userId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1315
1342
|
continue;
|
|
1316
1343
|
}
|
|
1317
1344
|
case 3: {
|
|
1318
1345
|
if (tag !== 24) {
|
|
1319
1346
|
break;
|
|
1320
1347
|
}
|
|
1321
|
-
message.objectId =
|
|
1348
|
+
message.objectId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1322
1349
|
continue;
|
|
1323
1350
|
}
|
|
1324
1351
|
case 4: {
|
|
@@ -1346,7 +1373,7 @@ exports.Notification = {
|
|
|
1346
1373
|
if (tag !== 56) {
|
|
1347
1374
|
break;
|
|
1348
1375
|
}
|
|
1349
|
-
message.alertId =
|
|
1376
|
+
message.alertId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1350
1377
|
continue;
|
|
1351
1378
|
}
|
|
1352
1379
|
case 8: {
|
|
@@ -1398,7 +1425,7 @@ exports.Notification = {
|
|
|
1398
1425
|
if (tag !== 104) {
|
|
1399
1426
|
break;
|
|
1400
1427
|
}
|
|
1401
|
-
message.sound =
|
|
1428
|
+
message.sound = long_1.default.fromString(reader.uint64().toString(), true);
|
|
1402
1429
|
continue;
|
|
1403
1430
|
}
|
|
1404
1431
|
case 14: {
|
|
@@ -1426,12 +1453,12 @@ exports.Notification = {
|
|
|
1426
1453
|
fromJSON(object) {
|
|
1427
1454
|
return {
|
|
1428
1455
|
uuid: isSet(object.uuid) ? globalThis.String(object.uuid) : "",
|
|
1429
|
-
userId: isSet(object.user_id) ?
|
|
1430
|
-
objectId: isSet(object.object_id) ?
|
|
1456
|
+
userId: isSet(object.user_id) ? long_1.default.fromValue(object.user_id) : long_1.default.UZERO,
|
|
1457
|
+
objectId: isSet(object.object_id) ? long_1.default.fromValue(object.object_id) : undefined,
|
|
1431
1458
|
objectType: isSet(object.object_type) ? objectTypeFromJSON(object.object_type) : 0,
|
|
1432
1459
|
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1433
1460
|
body: isSet(object.body) ? globalThis.String(object.body) : undefined,
|
|
1434
|
-
alertId: isSet(object.alert_id) ?
|
|
1461
|
+
alertId: isSet(object.alert_id) ? long_1.default.fromValue(object.alert_id) : long_1.default.UZERO,
|
|
1435
1462
|
alertType: isSet(object.alert_type) ? globalThis.Number(object.alert_type) : 0,
|
|
1436
1463
|
via: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.via) ? object.via.map((e) => viaFromJSON(e)) : [],
|
|
1437
1464
|
data: isObject(object.data)
|
|
@@ -1442,7 +1469,7 @@ exports.Notification = {
|
|
|
1442
1469
|
: {},
|
|
1443
1470
|
image: isSet(object.image) ? globalThis.String(object.image) : undefined,
|
|
1444
1471
|
icon: isSet(object.icon) ? globalThis.String(object.icon) : undefined,
|
|
1445
|
-
sound: isSet(object.sound) ?
|
|
1472
|
+
sound: isSet(object.sound) ? long_1.default.fromValue(object.sound) : undefined,
|
|
1446
1473
|
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
1447
1474
|
readAt: isSet(object.read_at) ? fromJsonTimestamp(object.read_at) : undefined,
|
|
1448
1475
|
};
|
|
@@ -1453,11 +1480,11 @@ exports.Notification = {
|
|
|
1453
1480
|
if (message.uuid !== "") {
|
|
1454
1481
|
obj.uuid = message.uuid;
|
|
1455
1482
|
}
|
|
1456
|
-
if (message.userId
|
|
1457
|
-
obj.user_id =
|
|
1483
|
+
if (!message.userId.equals(long_1.default.UZERO)) {
|
|
1484
|
+
obj.user_id = (message.userId || long_1.default.UZERO).toString();
|
|
1458
1485
|
}
|
|
1459
1486
|
if (message.objectId !== undefined) {
|
|
1460
|
-
obj.object_id =
|
|
1487
|
+
obj.object_id = (message.objectId || long_1.default.UZERO).toString();
|
|
1461
1488
|
}
|
|
1462
1489
|
if (message.objectType !== 0) {
|
|
1463
1490
|
obj.object_type = objectTypeToJSON(message.objectType);
|
|
@@ -1468,8 +1495,8 @@ exports.Notification = {
|
|
|
1468
1495
|
if (message.body !== undefined) {
|
|
1469
1496
|
obj.body = message.body;
|
|
1470
1497
|
}
|
|
1471
|
-
if (message.alertId
|
|
1472
|
-
obj.alert_id =
|
|
1498
|
+
if (!message.alertId.equals(long_1.default.UZERO)) {
|
|
1499
|
+
obj.alert_id = (message.alertId || long_1.default.UZERO).toString();
|
|
1473
1500
|
}
|
|
1474
1501
|
if (message.alertType !== 0) {
|
|
1475
1502
|
obj.alert_type = Math.round(message.alertType);
|
|
@@ -1493,7 +1520,7 @@ exports.Notification = {
|
|
|
1493
1520
|
obj.icon = message.icon;
|
|
1494
1521
|
}
|
|
1495
1522
|
if (message.sound !== undefined) {
|
|
1496
|
-
obj.sound =
|
|
1523
|
+
obj.sound = (message.sound || long_1.default.UZERO).toString();
|
|
1497
1524
|
}
|
|
1498
1525
|
if (message.createdAt !== undefined) {
|
|
1499
1526
|
obj.created_at = message.createdAt.toISOString();
|
|
@@ -1507,28 +1534,34 @@ exports.Notification = {
|
|
|
1507
1534
|
return exports.Notification.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1508
1535
|
},
|
|
1509
1536
|
fromPartial(object) {
|
|
1510
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
1537
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
1511
1538
|
const message = createBaseNotification();
|
|
1512
1539
|
message.uuid = (_a = object.uuid) !== null && _a !== void 0 ? _a : "";
|
|
1513
|
-
message.userId = (
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
message.
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
message.
|
|
1520
|
-
message.
|
|
1521
|
-
message.
|
|
1540
|
+
message.userId = (object.userId !== undefined && object.userId !== null)
|
|
1541
|
+
? long_1.default.fromValue(object.userId)
|
|
1542
|
+
: long_1.default.UZERO;
|
|
1543
|
+
message.objectId = (object.objectId !== undefined && object.objectId !== null)
|
|
1544
|
+
? long_1.default.fromValue(object.objectId)
|
|
1545
|
+
: undefined;
|
|
1546
|
+
message.objectType = (_b = object.objectType) !== null && _b !== void 0 ? _b : 0;
|
|
1547
|
+
message.title = (_c = object.title) !== null && _c !== void 0 ? _c : "";
|
|
1548
|
+
message.body = (_d = object.body) !== null && _d !== void 0 ? _d : undefined;
|
|
1549
|
+
message.alertId = (object.alertId !== undefined && object.alertId !== null)
|
|
1550
|
+
? long_1.default.fromValue(object.alertId)
|
|
1551
|
+
: long_1.default.UZERO;
|
|
1552
|
+
message.alertType = (_e = object.alertType) !== null && _e !== void 0 ? _e : 0;
|
|
1553
|
+
message.via = ((_f = object.via) === null || _f === void 0 ? void 0 : _f.map((e) => e)) || [];
|
|
1554
|
+
message.data = Object.entries((_g = object.data) !== null && _g !== void 0 ? _g : {}).reduce((acc, [key, value]) => {
|
|
1522
1555
|
if (value !== undefined) {
|
|
1523
1556
|
acc[key] = globalThis.String(value);
|
|
1524
1557
|
}
|
|
1525
1558
|
return acc;
|
|
1526
1559
|
}, {});
|
|
1527
|
-
message.image = (
|
|
1528
|
-
message.icon = (
|
|
1529
|
-
message.sound = (
|
|
1530
|
-
message.createdAt = (
|
|
1531
|
-
message.readAt = (
|
|
1560
|
+
message.image = (_h = object.image) !== null && _h !== void 0 ? _h : undefined;
|
|
1561
|
+
message.icon = (_j = object.icon) !== null && _j !== void 0 ? _j : undefined;
|
|
1562
|
+
message.sound = (object.sound !== undefined && object.sound !== null) ? long_1.default.fromValue(object.sound) : undefined;
|
|
1563
|
+
message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
|
|
1564
|
+
message.readAt = (_l = object.readAt) !== null && _l !== void 0 ? _l : undefined;
|
|
1532
1565
|
return message;
|
|
1533
1566
|
},
|
|
1534
1567
|
};
|
|
@@ -1602,12 +1635,12 @@ exports.Notification_DataEntry = {
|
|
|
1602
1635
|
},
|
|
1603
1636
|
};
|
|
1604
1637
|
function toTimestamp(date) {
|
|
1605
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
1638
|
+
const seconds = numberToLong(Math.trunc(date.getTime() / 1000));
|
|
1606
1639
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1607
1640
|
return { seconds, nanos };
|
|
1608
1641
|
}
|
|
1609
1642
|
function fromTimestamp(t) {
|
|
1610
|
-
let millis = (t.seconds || 0) * 1000;
|
|
1643
|
+
let millis = (t.seconds.toNumber() || 0) * 1000;
|
|
1611
1644
|
millis += (t.nanos || 0) / 1000000;
|
|
1612
1645
|
return new globalThis.Date(millis);
|
|
1613
1646
|
}
|
|
@@ -1622,15 +1655,8 @@ function fromJsonTimestamp(o) {
|
|
|
1622
1655
|
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1623
1656
|
}
|
|
1624
1657
|
}
|
|
1625
|
-
function
|
|
1626
|
-
|
|
1627
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
1628
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1629
|
-
}
|
|
1630
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
1631
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
1632
|
-
}
|
|
1633
|
-
return num;
|
|
1658
|
+
function numberToLong(number) {
|
|
1659
|
+
return long_1.default.fromNumber(number);
|
|
1634
1660
|
}
|
|
1635
1661
|
function isObject(value) {
|
|
1636
1662
|
return typeof value === "object" && value !== null;
|