@fatehan/tsrp 1.5.6 → 1.5.9

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.
@@ -27,6 +27,7 @@ export var ObjectType;
27
27
  ObjectType[ObjectType["USER"] = 2] = "USER";
28
28
  ObjectType[ObjectType["OPERATION"] = 3] = "OPERATION";
29
29
  ObjectType[ObjectType["WORKFLOW_TASK"] = 4] = "WORKFLOW_TASK";
30
+ ObjectType[ObjectType["MAINTENANCE"] = 5] = "MAINTENANCE";
30
31
  ObjectType[ObjectType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
31
32
  })(ObjectType || (ObjectType = {}));
32
33
  export var AreaEventType;
@@ -55,47 +56,6 @@ export var NotifyJob_Priority;
55
56
  NotifyJob_Priority[NotifyJob_Priority["HIGH"] = 2] = "HIGH";
56
57
  NotifyJob_Priority[NotifyJob_Priority["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
57
58
  })(NotifyJob_Priority || (NotifyJob_Priority = {}));
58
- function createBaseTestMessage() {
59
- return { name: "" };
60
- }
61
- export const TestMessage = {
62
- encode(message, writer = new BinaryWriter()) {
63
- if (message.name !== "") {
64
- writer.uint32(10).string(message.name);
65
- }
66
- return writer;
67
- },
68
- decode(input, length) {
69
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
70
- const end = length === undefined ? reader.len : reader.pos + length;
71
- const message = createBaseTestMessage();
72
- while (reader.pos < end) {
73
- const tag = reader.uint32();
74
- switch (tag >>> 3) {
75
- case 1: {
76
- if (tag !== 10) {
77
- break;
78
- }
79
- message.name = reader.string();
80
- continue;
81
- }
82
- }
83
- if ((tag & 7) === 4 || tag === 0) {
84
- break;
85
- }
86
- reader.skip(tag & 7);
87
- }
88
- return message;
89
- },
90
- create(base) {
91
- return TestMessage.fromPartial(base ?? {});
92
- },
93
- fromPartial(object) {
94
- const message = createBaseTestMessage();
95
- message.name = object.name ?? "";
96
- return message;
97
- },
98
- };
99
59
  function createBaseNotifyJob() {
100
60
  return { id: Long.UZERO, userId: Long.UZERO, retries: 0, priority: 0, notify: undefined, via: [] };
101
61
  }
@@ -116,7 +76,7 @@ export const NotifyJob = {
116
76
  if (message.notify !== undefined) {
117
77
  Notify.encode(message.notify, writer.uint32(42).fork()).join();
118
78
  }
119
- writer.uint32(50).fork();
79
+ writer.uint32(98).fork();
120
80
  for (const v of message.via) {
121
81
  writer.int32(v);
122
82
  }
@@ -165,12 +125,12 @@ export const NotifyJob = {
165
125
  message.notify = Notify.decode(reader, reader.uint32());
166
126
  continue;
167
127
  }
168
- case 6: {
169
- if (tag === 48) {
128
+ case 12: {
129
+ if (tag === 96) {
170
130
  message.via.push(reader.int32());
171
131
  continue;
172
132
  }
173
- if (tag === 50) {
133
+ if (tag === 98) {
174
134
  const end2 = reader.uint32() + reader.pos;
175
135
  while (reader.pos < end2) {
176
136
  message.via.push(reader.int32());
@@ -205,807 +165,62 @@ export const NotifyJob = {
205
165
  return message;
206
166
  },
207
167
  };
208
- function createBaseUserDeviceAlert() {
168
+ function createBaseNotify() {
209
169
  return {
210
- id: Long.UZERO,
211
- userId: Long.UZERO,
212
- deviceId: Long.UZERO,
213
- organizationId: Long.UZERO,
214
- alertId: Long.UZERO,
215
- condition: {},
216
- timing: {},
217
- status: false,
218
- format: "",
219
- alert: 0,
220
- unit: undefined,
221
- objectType: undefined,
222
- objectId: undefined,
223
- };
224
- }
225
- export const UserDeviceAlert = {
226
- encode(message, writer = new BinaryWriter()) {
227
- if (!message.id.equals(Long.UZERO)) {
228
- writer.uint32(8).uint64(message.id.toString());
229
- }
230
- if (!message.userId.equals(Long.UZERO)) {
231
- writer.uint32(16).uint64(message.userId.toString());
232
- }
233
- if (!message.deviceId.equals(Long.UZERO)) {
234
- writer.uint32(32).uint64(message.deviceId.toString());
235
- }
236
- if (!message.organizationId.equals(Long.UZERO)) {
237
- writer.uint32(88).uint64(message.organizationId.toString());
238
- }
239
- if (!message.alertId.equals(Long.UZERO)) {
240
- writer.uint32(40).uint64(message.alertId.toString());
241
- }
242
- globalThis.Object.entries(message.condition).forEach(([key, value]) => {
243
- UserDeviceAlert_ConditionEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
244
- });
245
- globalThis.Object.entries(message.timing).forEach(([key, value]) => {
246
- UserDeviceAlert_TimingEntry.encode({ key: key, value }, writer.uint32(114).fork()).join();
247
- });
248
- if (message.status !== false) {
249
- writer.uint32(56).bool(message.status);
250
- }
251
- if (message.format !== "") {
252
- writer.uint32(66).string(message.format);
253
- }
254
- if (message.alert !== 0) {
255
- writer.uint32(72).int32(message.alert);
256
- }
257
- if (message.unit !== undefined) {
258
- writer.uint32(82).string(message.unit);
259
- }
260
- if (message.objectType !== undefined) {
261
- writer.uint32(98).string(message.objectType);
262
- }
263
- if (message.objectId !== undefined) {
264
- writer.uint32(104).uint64(message.objectId.toString());
265
- }
266
- return writer;
267
- },
268
- decode(input, length) {
269
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
270
- const end = length === undefined ? reader.len : reader.pos + length;
271
- const message = createBaseUserDeviceAlert();
272
- while (reader.pos < end) {
273
- const tag = reader.uint32();
274
- switch (tag >>> 3) {
275
- case 1: {
276
- if (tag !== 8) {
277
- break;
278
- }
279
- message.id = Long.fromString(reader.uint64().toString(), true);
280
- continue;
281
- }
282
- case 2: {
283
- if (tag !== 16) {
284
- break;
285
- }
286
- message.userId = Long.fromString(reader.uint64().toString(), true);
287
- continue;
288
- }
289
- case 4: {
290
- if (tag !== 32) {
291
- break;
292
- }
293
- message.deviceId = Long.fromString(reader.uint64().toString(), true);
294
- continue;
295
- }
296
- case 11: {
297
- if (tag !== 88) {
298
- break;
299
- }
300
- message.organizationId = Long.fromString(reader.uint64().toString(), true);
301
- continue;
302
- }
303
- case 5: {
304
- if (tag !== 40) {
305
- break;
306
- }
307
- message.alertId = Long.fromString(reader.uint64().toString(), true);
308
- continue;
309
- }
310
- case 6: {
311
- if (tag !== 50) {
312
- break;
313
- }
314
- const entry6 = UserDeviceAlert_ConditionEntry.decode(reader, reader.uint32());
315
- if (entry6.value !== undefined) {
316
- message.condition[entry6.key] = entry6.value;
317
- }
318
- continue;
319
- }
320
- case 14: {
321
- if (tag !== 114) {
322
- break;
323
- }
324
- const entry14 = UserDeviceAlert_TimingEntry.decode(reader, reader.uint32());
325
- if (entry14.value !== undefined) {
326
- message.timing[entry14.key] = entry14.value;
327
- }
328
- continue;
329
- }
330
- case 7: {
331
- if (tag !== 56) {
332
- break;
333
- }
334
- message.status = reader.bool();
335
- continue;
336
- }
337
- case 8: {
338
- if (tag !== 66) {
339
- break;
340
- }
341
- message.format = reader.string();
342
- continue;
343
- }
344
- case 9: {
345
- if (tag !== 72) {
346
- break;
347
- }
348
- message.alert = reader.int32();
349
- continue;
350
- }
351
- case 10: {
352
- if (tag !== 82) {
353
- break;
354
- }
355
- message.unit = reader.string();
356
- continue;
357
- }
358
- case 12: {
359
- if (tag !== 98) {
360
- break;
361
- }
362
- message.objectType = reader.string();
363
- continue;
364
- }
365
- case 13: {
366
- if (tag !== 104) {
367
- break;
368
- }
369
- message.objectId = Long.fromString(reader.uint64().toString(), true);
370
- continue;
371
- }
372
- }
373
- if ((tag & 7) === 4 || tag === 0) {
374
- break;
375
- }
376
- reader.skip(tag & 7);
377
- }
378
- return message;
379
- },
380
- create(base) {
381
- return UserDeviceAlert.fromPartial(base ?? {});
382
- },
383
- fromPartial(object) {
384
- const message = createBaseUserDeviceAlert();
385
- message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
386
- message.userId = (object.userId !== undefined && object.userId !== null)
387
- ? Long.fromValue(object.userId)
388
- : Long.UZERO;
389
- message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
390
- ? Long.fromValue(object.deviceId)
391
- : Long.UZERO;
392
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
393
- ? Long.fromValue(object.organizationId)
394
- : Long.UZERO;
395
- message.alertId = (object.alertId !== undefined && object.alertId !== null)
396
- ? Long.fromValue(object.alertId)
397
- : Long.UZERO;
398
- message.condition = globalThis.Object.entries(object.condition ?? {})
399
- .reduce((acc, [key, value]) => {
400
- if (value !== undefined) {
401
- acc[globalThis.Number(key)] = UserDeviceAlert_ConditionList.fromPartial(value);
402
- }
403
- return acc;
404
- }, {});
405
- message.timing = globalThis.Object.entries(object.timing ?? {})
406
- .reduce((acc, [key, value]) => {
407
- if (value !== undefined) {
408
- acc[globalThis.Number(key)] = UserDeviceAlert_ConditionList.fromPartial(value);
409
- }
410
- return acc;
411
- }, {});
412
- message.status = object.status ?? false;
413
- message.format = object.format ?? "";
414
- message.alert = object.alert ?? 0;
415
- message.unit = object.unit ?? undefined;
416
- message.objectType = object.objectType ?? undefined;
417
- message.objectId = (object.objectId !== undefined && object.objectId !== null)
418
- ? Long.fromValue(object.objectId)
419
- : undefined;
420
- return message;
421
- },
422
- };
423
- function createBaseUserDeviceAlert_Condition() {
424
- return { fromTime: undefined, toTime: undefined, soundId: undefined, text: undefined, value: undefined, type: [] };
425
- }
426
- export const UserDeviceAlert_Condition = {
427
- encode(message, writer = new BinaryWriter()) {
428
- if (message.fromTime !== undefined) {
429
- writer.uint32(10).string(message.fromTime);
430
- }
431
- if (message.toTime !== undefined) {
432
- writer.uint32(18).string(message.toTime);
433
- }
434
- if (message.soundId !== undefined) {
435
- writer.uint32(24).uint64(message.soundId.toString());
436
- }
437
- if (message.text !== undefined) {
438
- writer.uint32(34).string(message.text);
439
- }
440
- if (message.value !== undefined) {
441
- writer.uint32(40).sint64(message.value.toString());
442
- }
443
- writer.uint32(50).fork();
444
- for (const v of message.type) {
445
- writer.int32(v);
446
- }
447
- writer.join();
448
- return writer;
449
- },
450
- decode(input, length) {
451
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
452
- const end = length === undefined ? reader.len : reader.pos + length;
453
- const message = createBaseUserDeviceAlert_Condition();
454
- while (reader.pos < end) {
455
- const tag = reader.uint32();
456
- switch (tag >>> 3) {
457
- case 1: {
458
- if (tag !== 10) {
459
- break;
460
- }
461
- message.fromTime = reader.string();
462
- continue;
463
- }
464
- case 2: {
465
- if (tag !== 18) {
466
- break;
467
- }
468
- message.toTime = reader.string();
469
- continue;
470
- }
471
- case 3: {
472
- if (tag !== 24) {
473
- break;
474
- }
475
- message.soundId = Long.fromString(reader.uint64().toString(), true);
476
- continue;
477
- }
478
- case 4: {
479
- if (tag !== 34) {
480
- break;
481
- }
482
- message.text = reader.string();
483
- continue;
484
- }
485
- case 5: {
486
- if (tag !== 40) {
487
- break;
488
- }
489
- message.value = Long.fromString(reader.sint64().toString());
490
- continue;
491
- }
492
- case 6: {
493
- if (tag === 48) {
494
- message.type.push(reader.int32());
495
- continue;
496
- }
497
- if (tag === 50) {
498
- const end2 = reader.uint32() + reader.pos;
499
- while (reader.pos < end2) {
500
- message.type.push(reader.int32());
501
- }
502
- continue;
503
- }
504
- break;
505
- }
506
- }
507
- if ((tag & 7) === 4 || tag === 0) {
508
- break;
509
- }
510
- reader.skip(tag & 7);
511
- }
512
- return message;
513
- },
514
- create(base) {
515
- return UserDeviceAlert_Condition.fromPartial(base ?? {});
516
- },
517
- fromPartial(object) {
518
- const message = createBaseUserDeviceAlert_Condition();
519
- message.fromTime = object.fromTime ?? undefined;
520
- message.toTime = object.toTime ?? undefined;
521
- message.soundId = (object.soundId !== undefined && object.soundId !== null)
522
- ? Long.fromValue(object.soundId)
523
- : undefined;
524
- message.text = object.text ?? undefined;
525
- message.value = (object.value !== undefined && object.value !== null) ? Long.fromValue(object.value) : undefined;
526
- message.type = object.type?.map((e) => e) || [];
527
- return message;
528
- },
529
- };
530
- function createBaseUserDeviceAlert_ConditionList() {
531
- return { condition: [] };
532
- }
533
- export const UserDeviceAlert_ConditionList = {
534
- encode(message, writer = new BinaryWriter()) {
535
- for (const v of message.condition) {
536
- UserDeviceAlert_Condition.encode(v, writer.uint32(10).fork()).join();
537
- }
538
- return writer;
539
- },
540
- decode(input, length) {
541
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
542
- const end = length === undefined ? reader.len : reader.pos + length;
543
- const message = createBaseUserDeviceAlert_ConditionList();
544
- while (reader.pos < end) {
545
- const tag = reader.uint32();
546
- switch (tag >>> 3) {
547
- case 1: {
548
- if (tag !== 10) {
549
- break;
550
- }
551
- message.condition.push(UserDeviceAlert_Condition.decode(reader, reader.uint32()));
552
- continue;
553
- }
554
- }
555
- if ((tag & 7) === 4 || tag === 0) {
556
- break;
557
- }
558
- reader.skip(tag & 7);
559
- }
560
- return message;
561
- },
562
- create(base) {
563
- return UserDeviceAlert_ConditionList.fromPartial(base ?? {});
564
- },
565
- fromPartial(object) {
566
- const message = createBaseUserDeviceAlert_ConditionList();
567
- message.condition = object.condition?.map((e) => UserDeviceAlert_Condition.fromPartial(e)) || [];
568
- return message;
569
- },
570
- };
571
- function createBaseUserDeviceAlert_ConditionEntry() {
572
- return { key: 0, value: undefined };
573
- }
574
- export const UserDeviceAlert_ConditionEntry = {
575
- encode(message, writer = new BinaryWriter()) {
576
- if (message.key !== 0) {
577
- writer.uint32(8).uint32(message.key);
578
- }
579
- if (message.value !== undefined) {
580
- UserDeviceAlert_ConditionList.encode(message.value, writer.uint32(18).fork()).join();
581
- }
582
- return writer;
583
- },
584
- decode(input, length) {
585
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
586
- const end = length === undefined ? reader.len : reader.pos + length;
587
- const message = createBaseUserDeviceAlert_ConditionEntry();
588
- while (reader.pos < end) {
589
- const tag = reader.uint32();
590
- switch (tag >>> 3) {
591
- case 1: {
592
- if (tag !== 8) {
593
- break;
594
- }
595
- message.key = reader.uint32();
596
- continue;
597
- }
598
- case 2: {
599
- if (tag !== 18) {
600
- break;
601
- }
602
- message.value = UserDeviceAlert_ConditionList.decode(reader, reader.uint32());
603
- continue;
604
- }
605
- }
606
- if ((tag & 7) === 4 || tag === 0) {
607
- break;
608
- }
609
- reader.skip(tag & 7);
610
- }
611
- return message;
612
- },
613
- create(base) {
614
- return UserDeviceAlert_ConditionEntry.fromPartial(base ?? {});
615
- },
616
- fromPartial(object) {
617
- const message = createBaseUserDeviceAlert_ConditionEntry();
618
- message.key = object.key ?? 0;
619
- message.value = (object.value !== undefined && object.value !== null)
620
- ? UserDeviceAlert_ConditionList.fromPartial(object.value)
621
- : undefined;
622
- return message;
623
- },
624
- };
625
- function createBaseUserDeviceAlert_TimingEntry() {
626
- return { key: 0, value: undefined };
627
- }
628
- export const UserDeviceAlert_TimingEntry = {
629
- encode(message, writer = new BinaryWriter()) {
630
- if (message.key !== 0) {
631
- writer.uint32(8).uint32(message.key);
632
- }
633
- if (message.value !== undefined) {
634
- UserDeviceAlert_ConditionList.encode(message.value, writer.uint32(18).fork()).join();
635
- }
636
- return writer;
637
- },
638
- decode(input, length) {
639
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
640
- const end = length === undefined ? reader.len : reader.pos + length;
641
- const message = createBaseUserDeviceAlert_TimingEntry();
642
- while (reader.pos < end) {
643
- const tag = reader.uint32();
644
- switch (tag >>> 3) {
645
- case 1: {
646
- if (tag !== 8) {
647
- break;
648
- }
649
- message.key = reader.uint32();
650
- continue;
651
- }
652
- case 2: {
653
- if (tag !== 18) {
654
- break;
655
- }
656
- message.value = UserDeviceAlert_ConditionList.decode(reader, reader.uint32());
657
- continue;
658
- }
659
- }
660
- if ((tag & 7) === 4 || tag === 0) {
661
- break;
662
- }
663
- reader.skip(tag & 7);
664
- }
665
- return message;
666
- },
667
- create(base) {
668
- return UserDeviceAlert_TimingEntry.fromPartial(base ?? {});
669
- },
670
- fromPartial(object) {
671
- const message = createBaseUserDeviceAlert_TimingEntry();
672
- message.key = object.key ?? 0;
673
- message.value = (object.value !== undefined && object.value !== null)
674
- ? UserDeviceAlert_ConditionList.fromPartial(object.value)
675
- : undefined;
676
- return message;
677
- },
678
- };
679
- function createBaseUserDeviceAlertList() {
680
- return { list: [] };
681
- }
682
- export const UserDeviceAlertList = {
683
- encode(message, writer = new BinaryWriter()) {
684
- for (const v of message.list) {
685
- UserDeviceAlert.encode(v, writer.uint32(10).fork()).join();
686
- }
687
- return writer;
688
- },
689
- decode(input, length) {
690
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
691
- const end = length === undefined ? reader.len : reader.pos + length;
692
- const message = createBaseUserDeviceAlertList();
693
- while (reader.pos < end) {
694
- const tag = reader.uint32();
695
- switch (tag >>> 3) {
696
- case 1: {
697
- if (tag !== 10) {
698
- break;
699
- }
700
- message.list.push(UserDeviceAlert.decode(reader, reader.uint32()));
701
- continue;
702
- }
703
- }
704
- if ((tag & 7) === 4 || tag === 0) {
705
- break;
706
- }
707
- reader.skip(tag & 7);
708
- }
709
- return message;
710
- },
711
- create(base) {
712
- return UserDeviceAlertList.fromPartial(base ?? {});
713
- },
714
- fromPartial(object) {
715
- const message = createBaseUserDeviceAlertList();
716
- message.list = object.list?.map((e) => UserDeviceAlert.fromPartial(e)) || [];
717
- return message;
718
- },
719
- };
720
- function createBaseNotify() {
721
- return {
722
- title: "",
723
- body: undefined,
724
- sound: undefined,
725
- image: undefined,
726
- icon: undefined,
727
- receiver: undefined,
728
- objectId: undefined,
729
- objectType: 0,
730
- timestamp: undefined,
731
- data: {},
732
- };
733
- }
734
- export const Notify = {
735
- encode(message, writer = new BinaryWriter()) {
736
- if (message.title !== "") {
737
- writer.uint32(10).string(message.title);
738
- }
739
- if (message.body !== undefined) {
740
- writer.uint32(18).string(message.body);
741
- }
742
- if (message.sound !== undefined) {
743
- writer.uint32(24).uint64(message.sound.toString());
744
- }
745
- if (message.image !== undefined) {
746
- writer.uint32(34).string(message.image);
747
- }
748
- if (message.icon !== undefined) {
749
- writer.uint32(42).string(message.icon);
750
- }
751
- if (message.receiver !== undefined) {
752
- Receiver.encode(message.receiver, writer.uint32(50).fork()).join();
753
- }
754
- if (message.objectId !== undefined) {
755
- writer.uint32(56).uint64(message.objectId.toString());
756
- }
757
- if (message.objectType !== 0) {
758
- writer.uint32(64).int32(message.objectType);
759
- }
760
- if (message.timestamp !== undefined) {
761
- Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(74).fork()).join();
762
- }
763
- globalThis.Object.entries(message.data).forEach(([key, value]) => {
764
- Notify_DataEntry.encode({ key: key, value }, writer.uint32(82).fork()).join();
765
- });
766
- return writer;
767
- },
768
- decode(input, length) {
769
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
770
- const end = length === undefined ? reader.len : reader.pos + length;
771
- const message = createBaseNotify();
772
- while (reader.pos < end) {
773
- const tag = reader.uint32();
774
- switch (tag >>> 3) {
775
- case 1: {
776
- if (tag !== 10) {
777
- break;
778
- }
779
- message.title = reader.string();
780
- continue;
781
- }
782
- case 2: {
783
- if (tag !== 18) {
784
- break;
785
- }
786
- message.body = reader.string();
787
- continue;
788
- }
789
- case 3: {
790
- if (tag !== 24) {
791
- break;
792
- }
793
- message.sound = Long.fromString(reader.uint64().toString(), true);
794
- continue;
795
- }
796
- case 4: {
797
- if (tag !== 34) {
798
- break;
799
- }
800
- message.image = reader.string();
801
- continue;
802
- }
803
- case 5: {
804
- if (tag !== 42) {
805
- break;
806
- }
807
- message.icon = reader.string();
808
- continue;
809
- }
810
- case 6: {
811
- if (tag !== 50) {
812
- break;
813
- }
814
- message.receiver = Receiver.decode(reader, reader.uint32());
815
- continue;
816
- }
817
- case 7: {
818
- if (tag !== 56) {
819
- break;
820
- }
821
- message.objectId = Long.fromString(reader.uint64().toString(), true);
822
- continue;
823
- }
824
- case 8: {
825
- if (tag !== 64) {
826
- break;
827
- }
828
- message.objectType = reader.int32();
829
- continue;
830
- }
831
- case 9: {
832
- if (tag !== 74) {
833
- break;
834
- }
835
- message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
836
- continue;
837
- }
838
- case 10: {
839
- if (tag !== 82) {
840
- break;
841
- }
842
- const entry10 = Notify_DataEntry.decode(reader, reader.uint32());
843
- if (entry10.value !== undefined) {
844
- message.data[entry10.key] = entry10.value;
845
- }
846
- continue;
847
- }
848
- }
849
- if ((tag & 7) === 4 || tag === 0) {
850
- break;
851
- }
852
- reader.skip(tag & 7);
853
- }
854
- return message;
855
- },
856
- create(base) {
857
- return Notify.fromPartial(base ?? {});
858
- },
859
- fromPartial(object) {
860
- const message = createBaseNotify();
861
- message.title = object.title ?? "";
862
- message.body = object.body ?? undefined;
863
- message.sound = (object.sound !== undefined && object.sound !== null) ? Long.fromValue(object.sound) : undefined;
864
- message.image = object.image ?? undefined;
865
- message.icon = object.icon ?? undefined;
866
- message.receiver = (object.receiver !== undefined && object.receiver !== null)
867
- ? Receiver.fromPartial(object.receiver)
868
- : undefined;
869
- message.objectId = (object.objectId !== undefined && object.objectId !== null)
870
- ? Long.fromValue(object.objectId)
871
- : undefined;
872
- message.objectType = object.objectType ?? 0;
873
- message.timestamp = object.timestamp ?? undefined;
874
- message.data = globalThis.Object.entries(object.data ?? {}).reduce((acc, [key, value]) => {
875
- if (value !== undefined) {
876
- acc[key] = globalThis.String(value);
877
- }
878
- return acc;
879
- }, {});
880
- return message;
881
- },
882
- };
883
- function createBaseNotify_DataEntry() {
884
- return { key: "", value: "" };
885
- }
886
- export const Notify_DataEntry = {
887
- encode(message, writer = new BinaryWriter()) {
888
- if (message.key !== "") {
889
- writer.uint32(10).string(message.key);
890
- }
891
- if (message.value !== "") {
892
- writer.uint32(18).string(message.value);
893
- }
894
- return writer;
895
- },
896
- decode(input, length) {
897
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
898
- const end = length === undefined ? reader.len : reader.pos + length;
899
- const message = createBaseNotify_DataEntry();
900
- while (reader.pos < end) {
901
- const tag = reader.uint32();
902
- switch (tag >>> 3) {
903
- case 1: {
904
- if (tag !== 10) {
905
- break;
906
- }
907
- message.key = reader.string();
908
- continue;
909
- }
910
- case 2: {
911
- if (tag !== 18) {
912
- break;
913
- }
914
- message.value = reader.string();
915
- continue;
916
- }
917
- }
918
- if ((tag & 7) === 4 || tag === 0) {
919
- break;
920
- }
921
- reader.skip(tag & 7);
922
- }
923
- return message;
924
- },
925
- create(base) {
926
- return Notify_DataEntry.fromPartial(base ?? {});
927
- },
928
- fromPartial(object) {
929
- const message = createBaseNotify_DataEntry();
930
- message.key = object.key ?? "";
931
- message.value = object.value ?? "";
932
- return message;
933
- },
934
- };
935
- function createBaseNotification() {
936
- return {
937
- uuid: "",
938
- userId: Long.UZERO,
170
+ title: "",
171
+ body: undefined,
172
+ sound: undefined,
173
+ image: undefined,
174
+ icon: undefined,
175
+ receiver: undefined,
176
+ deviceId: undefined,
939
177
  objectId: undefined,
940
178
  objectType: undefined,
941
- title: "",
942
- body: undefined,
943
- alertId: undefined,
944
- alert: 0,
945
- via: [],
946
- data: {},
947
- image: undefined,
948
- sound: undefined,
949
- createdAt: undefined,
950
- readAt: undefined,
951
- userAlertId: undefined,
179
+ timestamp: undefined,
180
+ data: {},
952
181
  };
953
182
  }
954
- export const Notification = {
183
+ export const Notify = {
955
184
  encode(message, writer = new BinaryWriter()) {
956
- if (message.uuid !== "") {
957
- writer.uint32(10).string(message.uuid);
958
- }
959
- if (!message.userId.equals(Long.UZERO)) {
960
- writer.uint32(16).uint64(message.userId.toString());
961
- }
962
- if (message.objectId !== undefined) {
963
- writer.uint32(24).uint64(message.objectId.toString());
964
- }
965
- if (message.objectType !== undefined) {
966
- writer.uint32(32).int32(message.objectType);
967
- }
968
185
  if (message.title !== "") {
969
- writer.uint32(42).string(message.title);
186
+ writer.uint32(10).string(message.title);
970
187
  }
971
188
  if (message.body !== undefined) {
972
- writer.uint32(50).string(message.body);
189
+ writer.uint32(18).string(message.body);
973
190
  }
974
- if (message.alertId !== undefined) {
975
- writer.uint32(56).uint64(message.alertId.toString());
191
+ if (message.sound !== undefined) {
192
+ writer.uint32(24).uint64(message.sound.toString());
976
193
  }
977
- if (message.alert !== 0) {
978
- writer.uint32(64).int32(message.alert);
194
+ if (message.image !== undefined) {
195
+ writer.uint32(34).string(message.image);
979
196
  }
980
- writer.uint32(74).fork();
981
- for (const v of message.via) {
982
- writer.int32(v);
197
+ if (message.icon !== undefined) {
198
+ writer.uint32(42).string(message.icon);
983
199
  }
984
- writer.join();
985
- globalThis.Object.entries(message.data).forEach(([key, value]) => {
986
- Notification_DataEntry.encode({ key: key, value }, writer.uint32(82).fork()).join();
987
- });
988
- if (message.image !== undefined) {
989
- writer.uint32(90).string(message.image);
200
+ if (message.receiver !== undefined) {
201
+ Receiver.encode(message.receiver, writer.uint32(50).fork()).join();
990
202
  }
991
- if (message.sound !== undefined) {
992
- writer.uint32(96).uint64(message.sound.toString());
203
+ if (message.deviceId !== undefined) {
204
+ writer.uint32(56).uint64(message.deviceId.toString());
993
205
  }
994
- if (message.createdAt !== undefined) {
995
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(106).fork()).join();
206
+ if (message.objectId !== undefined) {
207
+ writer.uint32(64).uint64(message.objectId.toString());
996
208
  }
997
- if (message.readAt !== undefined) {
998
- Timestamp.encode(toTimestamp(message.readAt), writer.uint32(114).fork()).join();
209
+ if (message.objectType !== undefined) {
210
+ writer.uint32(72).int32(message.objectType);
999
211
  }
1000
- if (message.userAlertId !== undefined) {
1001
- writer.uint32(120).uint64(message.userAlertId.toString());
212
+ if (message.timestamp !== undefined) {
213
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(82).fork()).join();
1002
214
  }
215
+ globalThis.Object.entries(message.data).forEach(([key, value]) => {
216
+ Notify_DataEntry.encode({ key: key, value }, writer.uint32(90).fork()).join();
217
+ });
1003
218
  return writer;
1004
219
  },
1005
220
  decode(input, length) {
1006
221
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1007
222
  const end = length === undefined ? reader.len : reader.pos + length;
1008
- const message = createBaseNotification();
223
+ const message = createBaseNotify();
1009
224
  while (reader.pos < end) {
1010
225
  const tag = reader.uint32();
1011
226
  switch (tag >>> 3) {
@@ -1013,115 +228,80 @@ export const Notification = {
1013
228
  if (tag !== 10) {
1014
229
  break;
1015
230
  }
1016
- message.uuid = reader.string();
231
+ message.title = reader.string();
1017
232
  continue;
1018
233
  }
1019
234
  case 2: {
1020
- if (tag !== 16) {
235
+ if (tag !== 18) {
1021
236
  break;
1022
237
  }
1023
- message.userId = Long.fromString(reader.uint64().toString(), true);
238
+ message.body = reader.string();
1024
239
  continue;
1025
240
  }
1026
241
  case 3: {
1027
242
  if (tag !== 24) {
1028
243
  break;
1029
244
  }
1030
- message.objectId = Long.fromString(reader.uint64().toString(), true);
245
+ message.sound = Long.fromString(reader.uint64().toString(), true);
1031
246
  continue;
1032
247
  }
1033
248
  case 4: {
1034
- if (tag !== 32) {
249
+ if (tag !== 34) {
1035
250
  break;
1036
251
  }
1037
- message.objectType = reader.int32();
252
+ message.image = reader.string();
1038
253
  continue;
1039
254
  }
1040
255
  case 5: {
1041
256
  if (tag !== 42) {
1042
257
  break;
1043
258
  }
1044
- message.title = reader.string();
259
+ message.icon = reader.string();
1045
260
  continue;
1046
261
  }
1047
262
  case 6: {
1048
263
  if (tag !== 50) {
1049
264
  break;
1050
265
  }
1051
- message.body = reader.string();
266
+ message.receiver = Receiver.decode(reader, reader.uint32());
1052
267
  continue;
1053
268
  }
1054
269
  case 7: {
1055
270
  if (tag !== 56) {
1056
271
  break;
1057
272
  }
1058
- message.alertId = Long.fromString(reader.uint64().toString(), true);
273
+ message.deviceId = Long.fromString(reader.uint64().toString(), true);
1059
274
  continue;
1060
275
  }
1061
276
  case 8: {
1062
277
  if (tag !== 64) {
1063
278
  break;
1064
279
  }
1065
- message.alert = reader.int32();
280
+ message.objectId = Long.fromString(reader.uint64().toString(), true);
1066
281
  continue;
1067
282
  }
1068
283
  case 9: {
1069
- if (tag === 72) {
1070
- message.via.push(reader.int32());
1071
- continue;
1072
- }
1073
- if (tag === 74) {
1074
- const end2 = reader.uint32() + reader.pos;
1075
- while (reader.pos < end2) {
1076
- message.via.push(reader.int32());
1077
- }
1078
- continue;
284
+ if (tag !== 72) {
285
+ break;
1079
286
  }
1080
- break;
287
+ message.objectType = reader.int32();
288
+ continue;
1081
289
  }
1082
290
  case 10: {
1083
291
  if (tag !== 82) {
1084
292
  break;
1085
293
  }
1086
- const entry10 = Notification_DataEntry.decode(reader, reader.uint32());
1087
- if (entry10.value !== undefined) {
1088
- message.data[entry10.key] = entry10.value;
1089
- }
294
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1090
295
  continue;
1091
296
  }
1092
297
  case 11: {
1093
298
  if (tag !== 90) {
1094
299
  break;
1095
300
  }
1096
- message.image = reader.string();
1097
- continue;
1098
- }
1099
- case 12: {
1100
- if (tag !== 96) {
1101
- break;
1102
- }
1103
- message.sound = Long.fromString(reader.uint64().toString(), true);
1104
- continue;
1105
- }
1106
- case 13: {
1107
- if (tag !== 106) {
1108
- break;
1109
- }
1110
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1111
- continue;
1112
- }
1113
- case 14: {
1114
- if (tag !== 114) {
1115
- break;
1116
- }
1117
- message.readAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1118
- continue;
1119
- }
1120
- case 15: {
1121
- if (tag !== 120) {
1122
- break;
301
+ const entry11 = Notify_DataEntry.decode(reader, reader.uint32());
302
+ if (entry11.value !== undefined) {
303
+ message.data[entry11.key] = entry11.value;
1123
304
  }
1124
- message.userAlertId = Long.fromString(reader.uint64().toString(), true);
1125
305
  continue;
1126
306
  }
1127
307
  }
@@ -1133,45 +313,39 @@ export const Notification = {
1133
313
  return message;
1134
314
  },
1135
315
  create(base) {
1136
- return Notification.fromPartial(base ?? {});
316
+ return Notify.fromPartial(base ?? {});
1137
317
  },
1138
318
  fromPartial(object) {
1139
- const message = createBaseNotification();
1140
- message.uuid = object.uuid ?? "";
1141
- message.userId = (object.userId !== undefined && object.userId !== null)
1142
- ? Long.fromValue(object.userId)
1143
- : Long.UZERO;
319
+ const message = createBaseNotify();
320
+ message.title = object.title ?? "";
321
+ message.body = object.body ?? undefined;
322
+ message.sound = (object.sound !== undefined && object.sound !== null) ? Long.fromValue(object.sound) : undefined;
323
+ message.image = object.image ?? undefined;
324
+ message.icon = object.icon ?? undefined;
325
+ message.receiver = (object.receiver !== undefined && object.receiver !== null)
326
+ ? Receiver.fromPartial(object.receiver)
327
+ : undefined;
328
+ message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
329
+ ? Long.fromValue(object.deviceId)
330
+ : undefined;
1144
331
  message.objectId = (object.objectId !== undefined && object.objectId !== null)
1145
332
  ? Long.fromValue(object.objectId)
1146
333
  : undefined;
1147
334
  message.objectType = object.objectType ?? undefined;
1148
- message.title = object.title ?? "";
1149
- message.body = object.body ?? undefined;
1150
- message.alertId = (object.alertId !== undefined && object.alertId !== null)
1151
- ? Long.fromValue(object.alertId)
1152
- : undefined;
1153
- message.alert = object.alert ?? 0;
1154
- message.via = object.via?.map((e) => e) || [];
335
+ message.timestamp = object.timestamp ?? undefined;
1155
336
  message.data = globalThis.Object.entries(object.data ?? {}).reduce((acc, [key, value]) => {
1156
337
  if (value !== undefined) {
1157
338
  acc[key] = globalThis.String(value);
1158
339
  }
1159
340
  return acc;
1160
341
  }, {});
1161
- message.image = object.image ?? undefined;
1162
- message.sound = (object.sound !== undefined && object.sound !== null) ? Long.fromValue(object.sound) : undefined;
1163
- message.createdAt = object.createdAt ?? undefined;
1164
- message.readAt = object.readAt ?? undefined;
1165
- message.userAlertId = (object.userAlertId !== undefined && object.userAlertId !== null)
1166
- ? Long.fromValue(object.userAlertId)
1167
- : undefined;
1168
342
  return message;
1169
343
  },
1170
344
  };
1171
- function createBaseNotification_DataEntry() {
345
+ function createBaseNotify_DataEntry() {
1172
346
  return { key: "", value: "" };
1173
347
  }
1174
- export const Notification_DataEntry = {
348
+ export const Notify_DataEntry = {
1175
349
  encode(message, writer = new BinaryWriter()) {
1176
350
  if (message.key !== "") {
1177
351
  writer.uint32(10).string(message.key);
@@ -1184,7 +358,7 @@ export const Notification_DataEntry = {
1184
358
  decode(input, length) {
1185
359
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1186
360
  const end = length === undefined ? reader.len : reader.pos + length;
1187
- const message = createBaseNotification_DataEntry();
361
+ const message = createBaseNotify_DataEntry();
1188
362
  while (reader.pos < end) {
1189
363
  const tag = reader.uint32();
1190
364
  switch (tag >>> 3) {
@@ -1211,204 +385,96 @@ export const Notification_DataEntry = {
1211
385
  return message;
1212
386
  },
1213
387
  create(base) {
1214
- return Notification_DataEntry.fromPartial(base ?? {});
388
+ return Notify_DataEntry.fromPartial(base ?? {});
1215
389
  },
1216
390
  fromPartial(object) {
1217
- const message = createBaseNotification_DataEntry();
391
+ const message = createBaseNotify_DataEntry();
1218
392
  message.key = object.key ?? "";
1219
393
  message.value = object.value ?? "";
1220
394
  return message;
1221
395
  },
1222
396
  };
1223
- function createBaseAlertModel() {
1224
- return {
1225
- id: Long.UZERO,
1226
- organizationId: Long.UZERO,
1227
- alertId: Long.UZERO,
1228
- alertType: Long.UZERO,
1229
- unit: undefined,
1230
- value: undefined,
1231
- message: "",
1232
- name: "",
1233
- minValue: undefined,
1234
- maxValue: undefined,
1235
- picture: undefined,
1236
- createdBy: undefined,
1237
- updatedBy: undefined,
1238
- createdAt: undefined,
1239
- updatedAt: undefined,
1240
- objectType: undefined,
1241
- };
397
+ function createBaseNotification() {
398
+ return { id: "", userId: Long.UZERO, payload: undefined, via: [], createdAt: undefined, readAt: undefined };
1242
399
  }
1243
- export const AlertModel = {
400
+ export const Notification = {
1244
401
  encode(message, writer = new BinaryWriter()) {
1245
- if (!message.id.equals(Long.UZERO)) {
1246
- writer.uint32(8).uint64(message.id.toString());
1247
- }
1248
- if (!message.organizationId.equals(Long.UZERO)) {
1249
- writer.uint32(16).uint64(message.organizationId.toString());
1250
- }
1251
- if (!message.alertId.equals(Long.UZERO)) {
1252
- writer.uint32(24).uint64(message.alertId.toString());
1253
- }
1254
- if (!message.alertType.equals(Long.UZERO)) {
1255
- writer.uint32(32).uint64(message.alertType.toString());
402
+ if (message.id !== "") {
403
+ writer.uint32(10).string(message.id);
1256
404
  }
1257
- if (message.unit !== undefined) {
1258
- writer.uint32(42).string(message.unit);
1259
- }
1260
- if (message.value !== undefined) {
1261
- writer.uint32(48).uint64(message.value.toString());
1262
- }
1263
- if (message.message !== "") {
1264
- writer.uint32(58).string(message.message);
1265
- }
1266
- if (message.name !== "") {
1267
- writer.uint32(66).string(message.name);
1268
- }
1269
- if (message.minValue !== undefined) {
1270
- writer.uint32(74).string(message.minValue);
1271
- }
1272
- if (message.maxValue !== undefined) {
1273
- writer.uint32(82).string(message.maxValue);
1274
- }
1275
- if (message.picture !== undefined) {
1276
- writer.uint32(90).string(message.picture);
405
+ if (!message.userId.equals(Long.UZERO)) {
406
+ writer.uint32(16).uint64(message.userId.toString());
1277
407
  }
1278
- if (message.createdBy !== undefined) {
1279
- writer.uint32(96).uint64(message.createdBy.toString());
408
+ if (message.payload !== undefined) {
409
+ Notify.encode(message.payload, writer.uint32(26).fork()).join();
1280
410
  }
1281
- if (message.updatedBy !== undefined) {
1282
- writer.uint32(104).uint64(message.updatedBy.toString());
411
+ writer.uint32(34).fork();
412
+ for (const v of message.via) {
413
+ writer.int32(v);
1283
414
  }
415
+ writer.join();
1284
416
  if (message.createdAt !== undefined) {
1285
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(114).fork()).join();
1286
- }
1287
- if (message.updatedAt !== undefined) {
1288
- Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(122).fork()).join();
417
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
1289
418
  }
1290
- if (message.objectType !== undefined) {
1291
- writer.uint32(130).string(message.objectType);
419
+ if (message.readAt !== undefined) {
420
+ Timestamp.encode(toTimestamp(message.readAt), writer.uint32(50).fork()).join();
1292
421
  }
1293
422
  return writer;
1294
423
  },
1295
424
  decode(input, length) {
1296
425
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1297
426
  const end = length === undefined ? reader.len : reader.pos + length;
1298
- const message = createBaseAlertModel();
427
+ const message = createBaseNotification();
1299
428
  while (reader.pos < end) {
1300
429
  const tag = reader.uint32();
1301
430
  switch (tag >>> 3) {
1302
431
  case 1: {
1303
- if (tag !== 8) {
432
+ if (tag !== 10) {
1304
433
  break;
1305
434
  }
1306
- message.id = Long.fromString(reader.uint64().toString(), true);
435
+ message.id = reader.string();
1307
436
  continue;
1308
437
  }
1309
438
  case 2: {
1310
439
  if (tag !== 16) {
1311
440
  break;
1312
441
  }
1313
- message.organizationId = Long.fromString(reader.uint64().toString(), true);
442
+ message.userId = Long.fromString(reader.uint64().toString(), true);
1314
443
  continue;
1315
444
  }
1316
445
  case 3: {
1317
- if (tag !== 24) {
446
+ if (tag !== 26) {
1318
447
  break;
1319
448
  }
1320
- message.alertId = Long.fromString(reader.uint64().toString(), true);
449
+ message.payload = Notify.decode(reader, reader.uint32());
1321
450
  continue;
1322
451
  }
1323
452
  case 4: {
1324
- if (tag !== 32) {
1325
- break;
453
+ if (tag === 32) {
454
+ message.via.push(reader.int32());
455
+ continue;
1326
456
  }
1327
- message.alertType = Long.fromString(reader.uint64().toString(), true);
1328
- continue;
457
+ if (tag === 34) {
458
+ const end2 = reader.uint32() + reader.pos;
459
+ while (reader.pos < end2) {
460
+ message.via.push(reader.int32());
461
+ }
462
+ continue;
463
+ }
464
+ break;
1329
465
  }
1330
466
  case 5: {
1331
467
  if (tag !== 42) {
1332
468
  break;
1333
469
  }
1334
- message.unit = reader.string();
1335
- continue;
1336
- }
1337
- case 6: {
1338
- if (tag !== 48) {
1339
- break;
1340
- }
1341
- message.value = Long.fromString(reader.uint64().toString(), true);
1342
- continue;
1343
- }
1344
- case 7: {
1345
- if (tag !== 58) {
1346
- break;
1347
- }
1348
- message.message = reader.string();
1349
- continue;
1350
- }
1351
- case 8: {
1352
- if (tag !== 66) {
1353
- break;
1354
- }
1355
- message.name = reader.string();
1356
- continue;
1357
- }
1358
- case 9: {
1359
- if (tag !== 74) {
1360
- break;
1361
- }
1362
- message.minValue = reader.string();
1363
- continue;
1364
- }
1365
- case 10: {
1366
- if (tag !== 82) {
1367
- break;
1368
- }
1369
- message.maxValue = reader.string();
1370
- continue;
1371
- }
1372
- case 11: {
1373
- if (tag !== 90) {
1374
- break;
1375
- }
1376
- message.picture = reader.string();
1377
- continue;
1378
- }
1379
- case 12: {
1380
- if (tag !== 96) {
1381
- break;
1382
- }
1383
- message.createdBy = Long.fromString(reader.uint64().toString(), true);
1384
- continue;
1385
- }
1386
- case 13: {
1387
- if (tag !== 104) {
1388
- break;
1389
- }
1390
- message.updatedBy = Long.fromString(reader.uint64().toString(), true);
1391
- continue;
1392
- }
1393
- case 14: {
1394
- if (tag !== 114) {
1395
- break;
1396
- }
1397
470
  message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1398
471
  continue;
1399
472
  }
1400
- case 15: {
1401
- if (tag !== 122) {
1402
- break;
1403
- }
1404
- message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1405
- continue;
1406
- }
1407
- case 16: {
1408
- if (tag !== 130) {
473
+ case 6: {
474
+ if (tag !== 50) {
1409
475
  break;
1410
476
  }
1411
- message.objectType = reader.string();
477
+ message.readAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1412
478
  continue;
1413
479
  }
1414
480
  }
@@ -1420,36 +486,20 @@ export const AlertModel = {
1420
486
  return message;
1421
487
  },
1422
488
  create(base) {
1423
- return AlertModel.fromPartial(base ?? {});
489
+ return Notification.fromPartial(base ?? {});
1424
490
  },
1425
491
  fromPartial(object) {
1426
- const message = createBaseAlertModel();
1427
- message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1428
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1429
- ? Long.fromValue(object.organizationId)
1430
- : Long.UZERO;
1431
- message.alertId = (object.alertId !== undefined && object.alertId !== null)
1432
- ? Long.fromValue(object.alertId)
1433
- : Long.UZERO;
1434
- message.alertType = (object.alertType !== undefined && object.alertType !== null)
1435
- ? Long.fromValue(object.alertType)
492
+ const message = createBaseNotification();
493
+ message.id = object.id ?? "";
494
+ message.userId = (object.userId !== undefined && object.userId !== null)
495
+ ? Long.fromValue(object.userId)
1436
496
  : Long.UZERO;
1437
- message.unit = object.unit ?? undefined;
1438
- message.value = (object.value !== undefined && object.value !== null) ? Long.fromValue(object.value) : undefined;
1439
- message.message = object.message ?? "";
1440
- message.name = object.name ?? "";
1441
- message.minValue = object.minValue ?? undefined;
1442
- message.maxValue = object.maxValue ?? undefined;
1443
- message.picture = object.picture ?? undefined;
1444
- message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1445
- ? Long.fromValue(object.createdBy)
1446
- : undefined;
1447
- message.updatedBy = (object.updatedBy !== undefined && object.updatedBy !== null)
1448
- ? Long.fromValue(object.updatedBy)
497
+ message.payload = (object.payload !== undefined && object.payload !== null)
498
+ ? Notify.fromPartial(object.payload)
1449
499
  : undefined;
500
+ message.via = object.via?.map((e) => e) || [];
1450
501
  message.createdAt = object.createdAt ?? undefined;
1451
- message.updatedAt = object.updatedAt ?? undefined;
1452
- message.objectType = object.objectType ?? undefined;
502
+ message.readAt = object.readAt ?? undefined;
1453
503
  return message;
1454
504
  },
1455
505
  };
@@ -1852,9 +902,11 @@ export const EventData = {
1852
902
  for (const v of message.eventModules) {
1853
903
  EventModule.encode(v, writer.uint32(50).fork()).join();
1854
904
  }
905
+ writer.uint32(58).fork();
1855
906
  for (const v of message.via) {
1856
- writer.uint32(56).int32(v);
907
+ writer.int32(v);
1857
908
  }
909
+ writer.join();
1858
910
  if (message.templateId !== undefined) {
1859
911
  writer.uint32(64).uint64(message.templateId.toString());
1860
912
  }