@fatehan/tsrp 1.6.19 → 1.6.20

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.
Files changed (88) hide show
  1. package/package.json +1 -1
  2. package/dist/fatehan/activities/workflow.d.ts +0 -219
  3. package/dist/fatehan/activities/workflow.d.ts.map +0 -1
  4. package/dist/fatehan/activities/workflow.js +0 -1941
  5. package/dist/fatehan/activities/workshift.d.ts +0 -140
  6. package/dist/fatehan/activities/workshift.d.ts.map +0 -1
  7. package/dist/fatehan/activities/workshift.js +0 -1244
  8. package/dist/fatehan/apis/client.d.ts +0 -246
  9. package/dist/fatehan/apis/client.d.ts.map +0 -1
  10. package/dist/fatehan/apis/client.js +0 -2572
  11. package/dist/fatehan/areas/area.d.ts +0 -96
  12. package/dist/fatehan/areas/area.d.ts.map +0 -1
  13. package/dist/fatehan/areas/area.js +0 -761
  14. package/dist/fatehan/devices/devices.d.ts +0 -256
  15. package/dist/fatehan/devices/devices.d.ts.map +0 -1
  16. package/dist/fatehan/devices/devices.js +0 -2730
  17. package/dist/fatehan/devices/maintenance.d.ts +0 -64
  18. package/dist/fatehan/devices/maintenance.d.ts.map +0 -1
  19. package/dist/fatehan/devices/maintenance.js +0 -484
  20. package/dist/fatehan/financial/financial.d.ts +0 -162
  21. package/dist/fatehan/financial/financial.d.ts.map +0 -1
  22. package/dist/fatehan/financial/financial.js +0 -1701
  23. package/dist/fatehan/google/protobuf/descriptor.d.ts +0 -1303
  24. package/dist/fatehan/google/protobuf/descriptor.d.ts.map +0 -1
  25. package/dist/fatehan/google/protobuf/descriptor.js +0 -3467
  26. package/dist/fatehan/google/protobuf/duration.d.ts +0 -99
  27. package/dist/fatehan/google/protobuf/duration.d.ts.map +0 -1
  28. package/dist/fatehan/google/protobuf/duration.js +0 -63
  29. package/dist/fatehan/google/protobuf/field_mask.d.ts +0 -228
  30. package/dist/fatehan/google/protobuf/field_mask.d.ts.map +0 -1
  31. package/dist/fatehan/google/protobuf/field_mask.js +0 -57
  32. package/dist/fatehan/google/protobuf/timestamp.d.ts +0 -129
  33. package/dist/fatehan/google/protobuf/timestamp.d.ts.map +0 -1
  34. package/dist/fatehan/google/protobuf/timestamp.js +0 -63
  35. package/dist/fatehan/identities/authentication.d.ts +0 -164
  36. package/dist/fatehan/identities/authentication.d.ts.map +0 -1
  37. package/dist/fatehan/identities/authentication.js +0 -1291
  38. package/dist/fatehan/identities/identities.d.ts +0 -969
  39. package/dist/fatehan/identities/identities.d.ts.map +0 -1
  40. package/dist/fatehan/identities/identities.js +0 -2993
  41. package/dist/fatehan/models/fusion.d.ts +0 -149
  42. package/dist/fatehan/models/fusion.d.ts.map +0 -1
  43. package/dist/fatehan/models/fusion.js +0 -1531
  44. package/dist/fatehan/models/models.d.ts +0 -162
  45. package/dist/fatehan/models/models.d.ts.map +0 -1
  46. package/dist/fatehan/models/models.js +0 -1486
  47. package/dist/fatehan/notifies/direct.d.ts +0 -85
  48. package/dist/fatehan/notifies/direct.d.ts.map +0 -1
  49. package/dist/fatehan/notifies/direct.js +0 -669
  50. package/dist/fatehan/notifies/notify.d.ts +0 -232
  51. package/dist/fatehan/notifies/notify.d.ts.map +0 -1
  52. package/dist/fatehan/notifies/notify.js +0 -1958
  53. package/dist/fatehan/packets/commands.d.ts +0 -150
  54. package/dist/fatehan/packets/commands.d.ts.map +0 -1
  55. package/dist/fatehan/packets/commands.js +0 -1364
  56. package/dist/fatehan/packets/dataModel.d.ts +0 -1610
  57. package/dist/fatehan/packets/dataModel.d.ts.map +0 -1
  58. package/dist/fatehan/packets/dataModel.js +0 -14947
  59. package/dist/fatehan/packets/dataModule.d.ts +0 -61
  60. package/dist/fatehan/packets/dataModule.d.ts.map +0 -1
  61. package/dist/fatehan/packets/dataModule.js +0 -386
  62. package/dist/fatehan/packets/forge.d.ts +0 -142
  63. package/dist/fatehan/packets/forge.d.ts.map +0 -1
  64. package/dist/fatehan/packets/forge.js +0 -1339
  65. package/dist/fatehan/services/api.d.ts +0 -1220
  66. package/dist/fatehan/services/api.d.ts.map +0 -1
  67. package/dist/fatehan/services/api.js +0 -12660
  68. package/dist/fatehan/services/repositories.d.ts +0 -78
  69. package/dist/fatehan/services/repositories.d.ts.map +0 -1
  70. package/dist/fatehan/services/repositories.js +0 -620
  71. package/dist/fatehan/stream/stream.d.ts +0 -224
  72. package/dist/fatehan/stream/stream.d.ts.map +0 -1
  73. package/dist/fatehan/stream/stream.js +0 -1416
  74. package/dist/fatehan/trips/trip.d.ts +0 -325
  75. package/dist/fatehan/trips/trip.d.ts.map +0 -1
  76. package/dist/fatehan/trips/trip.js +0 -1635
  77. package/dist/fatehan/utils/buf/validate/validate.d.ts +0 -3520
  78. package/dist/fatehan/utils/buf/validate/validate.d.ts.map +0 -1
  79. package/dist/fatehan/utils/buf/validate/validate.js +0 -4248
  80. package/dist/services.d.ts +0 -79
  81. package/dist/services.d.ts.map +0 -1
  82. package/dist/services.js +0 -245
  83. package/dist/store/system.io.d.ts +0 -6
  84. package/dist/store/system.io.d.ts.map +0 -1
  85. package/dist/store/system.io.js +0 -14
  86. package/dist/system.io.d.ts +0 -6
  87. package/dist/system.io.d.ts.map +0 -1
  88. package/dist/system.io.js +0 -208
@@ -1,669 +0,0 @@
1
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
- // versions:
3
- // protoc-gen-ts_proto v2.11.8
4
- // protoc v7.34.1
5
- // source: notifies/direct.proto
6
- /* eslint-disable */
7
- import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
- import Long from "long";
9
- import { Duration } from "../google/protobuf/duration";
10
- import { Timestamp } from "../google/protobuf/timestamp";
11
- export const protobufPackage = "com.fatehan.notifies";
12
- export var Platform;
13
- (function (Platform) {
14
- Platform[Platform["UNSPECIFICED"] = 0] = "UNSPECIFICED";
15
- Platform[Platform["ANDROID"] = 1] = "ANDROID";
16
- Platform[Platform["WEB"] = 2] = "WEB";
17
- Platform[Platform["IOS"] = 3] = "IOS";
18
- Platform[Platform["DESKTOP"] = 4] = "DESKTOP";
19
- Platform[Platform["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
20
- })(Platform || (Platform = {}));
21
- function createBaseDirectMessageStateRequest() {
22
- return { uuid: "" };
23
- }
24
- export const DirectMessageStateRequest = {
25
- encode(message, writer = new BinaryWriter()) {
26
- if (message.uuid !== "") {
27
- writer.uint32(10).string(message.uuid);
28
- }
29
- return writer;
30
- },
31
- decode(input, length) {
32
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
33
- const end = length === undefined ? reader.len : reader.pos + length;
34
- const message = createBaseDirectMessageStateRequest();
35
- while (reader.pos < end) {
36
- const tag = reader.uint32();
37
- switch (tag >>> 3) {
38
- case 1: {
39
- if (tag !== 10) {
40
- break;
41
- }
42
- message.uuid = reader.string();
43
- continue;
44
- }
45
- }
46
- if ((tag & 7) === 4 || tag === 0) {
47
- break;
48
- }
49
- reader.skip(tag & 7);
50
- }
51
- return message;
52
- },
53
- create(base) {
54
- return DirectMessageStateRequest.fromPartial(base ?? {});
55
- },
56
- fromPartial(object) {
57
- const message = createBaseDirectMessageStateRequest();
58
- message.uuid = object.uuid ?? "";
59
- return message;
60
- },
61
- };
62
- function createBaseDirectMessageResult() {
63
- return { success: false, count: undefined };
64
- }
65
- export const DirectMessageResult = {
66
- encode(message, writer = new BinaryWriter()) {
67
- if (message.success !== false) {
68
- writer.uint32(8).bool(message.success);
69
- }
70
- if (message.count !== undefined) {
71
- writer.uint32(16).int32(message.count);
72
- }
73
- return writer;
74
- },
75
- decode(input, length) {
76
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
77
- const end = length === undefined ? reader.len : reader.pos + length;
78
- const message = createBaseDirectMessageResult();
79
- while (reader.pos < end) {
80
- const tag = reader.uint32();
81
- switch (tag >>> 3) {
82
- case 1: {
83
- if (tag !== 8) {
84
- break;
85
- }
86
- message.success = reader.bool();
87
- continue;
88
- }
89
- case 2: {
90
- if (tag !== 16) {
91
- break;
92
- }
93
- message.count = reader.int32();
94
- continue;
95
- }
96
- }
97
- if ((tag & 7) === 4 || tag === 0) {
98
- break;
99
- }
100
- reader.skip(tag & 7);
101
- }
102
- return message;
103
- },
104
- create(base) {
105
- return DirectMessageResult.fromPartial(base ?? {});
106
- },
107
- fromPartial(object) {
108
- const message = createBaseDirectMessageResult();
109
- message.success = object.success ?? false;
110
- message.count = object.count ?? undefined;
111
- return message;
112
- },
113
- };
114
- function createBaseDirectMessageStateResponse() {
115
- return { uuid: "", state: "", receivers: 0, sent: 0, failed: 0 };
116
- }
117
- export const DirectMessageStateResponse = {
118
- encode(message, writer = new BinaryWriter()) {
119
- if (message.uuid !== "") {
120
- writer.uint32(10).string(message.uuid);
121
- }
122
- if (message.state !== "") {
123
- writer.uint32(18).string(message.state);
124
- }
125
- if (message.receivers !== 0) {
126
- writer.uint32(24).uint32(message.receivers);
127
- }
128
- if (message.sent !== 0) {
129
- writer.uint32(32).uint32(message.sent);
130
- }
131
- if (message.failed !== 0) {
132
- writer.uint32(40).uint32(message.failed);
133
- }
134
- return writer;
135
- },
136
- decode(input, length) {
137
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
138
- const end = length === undefined ? reader.len : reader.pos + length;
139
- const message = createBaseDirectMessageStateResponse();
140
- while (reader.pos < end) {
141
- const tag = reader.uint32();
142
- switch (tag >>> 3) {
143
- case 1: {
144
- if (tag !== 10) {
145
- break;
146
- }
147
- message.uuid = reader.string();
148
- continue;
149
- }
150
- case 2: {
151
- if (tag !== 18) {
152
- break;
153
- }
154
- message.state = reader.string();
155
- continue;
156
- }
157
- case 3: {
158
- if (tag !== 24) {
159
- break;
160
- }
161
- message.receivers = reader.uint32();
162
- continue;
163
- }
164
- case 4: {
165
- if (tag !== 32) {
166
- break;
167
- }
168
- message.sent = reader.uint32();
169
- continue;
170
- }
171
- case 5: {
172
- if (tag !== 40) {
173
- break;
174
- }
175
- message.failed = reader.uint32();
176
- continue;
177
- }
178
- }
179
- if ((tag & 7) === 4 || tag === 0) {
180
- break;
181
- }
182
- reader.skip(tag & 7);
183
- }
184
- return message;
185
- },
186
- create(base) {
187
- return DirectMessageStateResponse.fromPartial(base ?? {});
188
- },
189
- fromPartial(object) {
190
- const message = createBaseDirectMessageStateResponse();
191
- message.uuid = object.uuid ?? "";
192
- message.state = object.state ?? "";
193
- message.receivers = object.receivers ?? 0;
194
- message.sent = object.sent ?? 0;
195
- message.failed = object.failed ?? 0;
196
- return message;
197
- },
198
- };
199
- function createBaseIdList() {
200
- return { ids: [] };
201
- }
202
- export const IdList = {
203
- encode(message, writer = new BinaryWriter()) {
204
- writer.uint32(10).fork();
205
- for (const v of message.ids) {
206
- writer.uint64(v.toString());
207
- }
208
- writer.join();
209
- return writer;
210
- },
211
- decode(input, length) {
212
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
213
- const end = length === undefined ? reader.len : reader.pos + length;
214
- const message = createBaseIdList();
215
- while (reader.pos < end) {
216
- const tag = reader.uint32();
217
- switch (tag >>> 3) {
218
- case 1: {
219
- if (tag === 8) {
220
- message.ids.push(Long.fromString(reader.uint64().toString(), true));
221
- continue;
222
- }
223
- if (tag === 10) {
224
- const end2 = reader.uint32() + reader.pos;
225
- while (reader.pos < end2) {
226
- message.ids.push(Long.fromString(reader.uint64().toString(), true));
227
- }
228
- continue;
229
- }
230
- break;
231
- }
232
- }
233
- if ((tag & 7) === 4 || tag === 0) {
234
- break;
235
- }
236
- reader.skip(tag & 7);
237
- }
238
- return message;
239
- },
240
- create(base) {
241
- return IdList.fromPartial(base ?? {});
242
- },
243
- fromPartial(object) {
244
- const message = createBaseIdList();
245
- message.ids = object.ids?.map((e) => Long.fromValue(e)) || [];
246
- return message;
247
- },
248
- };
249
- function createBaseDirectMessage() {
250
- return {
251
- uuid: "",
252
- title: "",
253
- body: undefined,
254
- picture: undefined,
255
- icon: undefined,
256
- sound: undefined,
257
- action: undefined,
258
- data: {},
259
- userId: undefined,
260
- deviceId: undefined,
261
- organizationId: undefined,
262
- topic: undefined,
263
- usersList: undefined,
264
- devicesList: undefined,
265
- platforms: [],
266
- timestamp: undefined,
267
- ttl: undefined,
268
- };
269
- }
270
- export const DirectMessage = {
271
- encode(message, writer = new BinaryWriter()) {
272
- if (message.uuid !== "") {
273
- writer.uint32(10).string(message.uuid);
274
- }
275
- if (message.title !== "") {
276
- writer.uint32(18).string(message.title);
277
- }
278
- if (message.body !== undefined) {
279
- writer.uint32(26).string(message.body);
280
- }
281
- if (message.picture !== undefined) {
282
- writer.uint32(34).string(message.picture);
283
- }
284
- if (message.icon !== undefined) {
285
- writer.uint32(42).string(message.icon);
286
- }
287
- if (message.sound !== undefined) {
288
- writer.uint32(50).string(message.sound);
289
- }
290
- if (message.action !== undefined) {
291
- writer.uint32(58).string(message.action);
292
- }
293
- globalThis.Object.entries(message.data).forEach(([key, value]) => {
294
- DirectMessage_DataEntry.encode({ key: key, value }, writer.uint32(130).fork()).join();
295
- });
296
- if (message.userId !== undefined) {
297
- writer.uint32(168).uint64(message.userId.toString());
298
- }
299
- if (message.deviceId !== undefined) {
300
- writer.uint32(176).uint64(message.deviceId.toString());
301
- }
302
- if (message.organizationId !== undefined) {
303
- writer.uint32(184).uint64(message.organizationId.toString());
304
- }
305
- if (message.topic !== undefined) {
306
- writer.uint32(194).string(message.topic);
307
- }
308
- if (message.usersList !== undefined) {
309
- IdList.encode(message.usersList, writer.uint32(202).fork()).join();
310
- }
311
- if (message.devicesList !== undefined) {
312
- IdList.encode(message.devicesList, writer.uint32(210).fork()).join();
313
- }
314
- writer.uint32(258).fork();
315
- for (const v of message.platforms) {
316
- writer.int32(v);
317
- }
318
- writer.join();
319
- if (message.timestamp !== undefined) {
320
- Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(250).fork()).join();
321
- }
322
- if (message.ttl !== undefined) {
323
- Duration.encode(message.ttl, writer.uint32(266).fork()).join();
324
- }
325
- return writer;
326
- },
327
- decode(input, length) {
328
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
329
- const end = length === undefined ? reader.len : reader.pos + length;
330
- const message = createBaseDirectMessage();
331
- while (reader.pos < end) {
332
- const tag = reader.uint32();
333
- switch (tag >>> 3) {
334
- case 1: {
335
- if (tag !== 10) {
336
- break;
337
- }
338
- message.uuid = reader.string();
339
- continue;
340
- }
341
- case 2: {
342
- if (tag !== 18) {
343
- break;
344
- }
345
- message.title = reader.string();
346
- continue;
347
- }
348
- case 3: {
349
- if (tag !== 26) {
350
- break;
351
- }
352
- message.body = reader.string();
353
- continue;
354
- }
355
- case 4: {
356
- if (tag !== 34) {
357
- break;
358
- }
359
- message.picture = reader.string();
360
- continue;
361
- }
362
- case 5: {
363
- if (tag !== 42) {
364
- break;
365
- }
366
- message.icon = reader.string();
367
- continue;
368
- }
369
- case 6: {
370
- if (tag !== 50) {
371
- break;
372
- }
373
- message.sound = reader.string();
374
- continue;
375
- }
376
- case 7: {
377
- if (tag !== 58) {
378
- break;
379
- }
380
- message.action = reader.string();
381
- continue;
382
- }
383
- case 16: {
384
- if (tag !== 130) {
385
- break;
386
- }
387
- const entry16 = DirectMessage_DataEntry.decode(reader, reader.uint32());
388
- if (entry16.value !== undefined) {
389
- message.data[entry16.key] = entry16.value;
390
- }
391
- continue;
392
- }
393
- case 21: {
394
- if (tag !== 168) {
395
- break;
396
- }
397
- message.userId = Long.fromString(reader.uint64().toString(), true);
398
- continue;
399
- }
400
- case 22: {
401
- if (tag !== 176) {
402
- break;
403
- }
404
- message.deviceId = Long.fromString(reader.uint64().toString(), true);
405
- continue;
406
- }
407
- case 23: {
408
- if (tag !== 184) {
409
- break;
410
- }
411
- message.organizationId = Long.fromString(reader.uint64().toString(), true);
412
- continue;
413
- }
414
- case 24: {
415
- if (tag !== 194) {
416
- break;
417
- }
418
- message.topic = reader.string();
419
- continue;
420
- }
421
- case 25: {
422
- if (tag !== 202) {
423
- break;
424
- }
425
- message.usersList = IdList.decode(reader, reader.uint32());
426
- continue;
427
- }
428
- case 26: {
429
- if (tag !== 210) {
430
- break;
431
- }
432
- message.devicesList = IdList.decode(reader, reader.uint32());
433
- continue;
434
- }
435
- case 32: {
436
- if (tag === 256) {
437
- message.platforms.push(reader.int32());
438
- continue;
439
- }
440
- if (tag === 258) {
441
- const end2 = reader.uint32() + reader.pos;
442
- while (reader.pos < end2) {
443
- message.platforms.push(reader.int32());
444
- }
445
- continue;
446
- }
447
- break;
448
- }
449
- case 31: {
450
- if (tag !== 250) {
451
- break;
452
- }
453
- message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
454
- continue;
455
- }
456
- case 33: {
457
- if (tag !== 266) {
458
- break;
459
- }
460
- message.ttl = Duration.decode(reader, reader.uint32());
461
- continue;
462
- }
463
- }
464
- if ((tag & 7) === 4 || tag === 0) {
465
- break;
466
- }
467
- reader.skip(tag & 7);
468
- }
469
- return message;
470
- },
471
- create(base) {
472
- return DirectMessage.fromPartial(base ?? {});
473
- },
474
- fromPartial(object) {
475
- const message = createBaseDirectMessage();
476
- message.uuid = object.uuid ?? "";
477
- message.title = object.title ?? "";
478
- message.body = object.body ?? undefined;
479
- message.picture = object.picture ?? undefined;
480
- message.icon = object.icon ?? undefined;
481
- message.sound = object.sound ?? undefined;
482
- message.action = object.action ?? undefined;
483
- message.data = globalThis.Object.entries(object.data ?? {}).reduce((acc, [key, value]) => {
484
- if (value !== undefined) {
485
- acc[key] = globalThis.String(value);
486
- }
487
- return acc;
488
- }, {});
489
- message.userId = (object.userId !== undefined && object.userId !== null)
490
- ? Long.fromValue(object.userId)
491
- : undefined;
492
- message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
493
- ? Long.fromValue(object.deviceId)
494
- : undefined;
495
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
496
- ? Long.fromValue(object.organizationId)
497
- : undefined;
498
- message.topic = object.topic ?? undefined;
499
- message.usersList = (object.usersList !== undefined && object.usersList !== null)
500
- ? IdList.fromPartial(object.usersList)
501
- : undefined;
502
- message.devicesList = (object.devicesList !== undefined && object.devicesList !== null)
503
- ? IdList.fromPartial(object.devicesList)
504
- : undefined;
505
- message.platforms = object.platforms?.map((e) => e) || [];
506
- message.timestamp = object.timestamp ?? undefined;
507
- message.ttl = (object.ttl !== undefined && object.ttl !== null) ? Duration.fromPartial(object.ttl) : undefined;
508
- return message;
509
- },
510
- };
511
- function createBaseDirectMessage_DataEntry() {
512
- return { key: "", value: "" };
513
- }
514
- export const DirectMessage_DataEntry = {
515
- encode(message, writer = new BinaryWriter()) {
516
- if (message.key !== "") {
517
- writer.uint32(10).string(message.key);
518
- }
519
- if (message.value !== "") {
520
- writer.uint32(18).string(message.value);
521
- }
522
- return writer;
523
- },
524
- decode(input, length) {
525
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
526
- const end = length === undefined ? reader.len : reader.pos + length;
527
- const message = createBaseDirectMessage_DataEntry();
528
- while (reader.pos < end) {
529
- const tag = reader.uint32();
530
- switch (tag >>> 3) {
531
- case 1: {
532
- if (tag !== 10) {
533
- break;
534
- }
535
- message.key = reader.string();
536
- continue;
537
- }
538
- case 2: {
539
- if (tag !== 18) {
540
- break;
541
- }
542
- message.value = reader.string();
543
- continue;
544
- }
545
- }
546
- if ((tag & 7) === 4 || tag === 0) {
547
- break;
548
- }
549
- reader.skip(tag & 7);
550
- }
551
- return message;
552
- },
553
- create(base) {
554
- return DirectMessage_DataEntry.fromPartial(base ?? {});
555
- },
556
- fromPartial(object) {
557
- const message = createBaseDirectMessage_DataEntry();
558
- message.key = object.key ?? "";
559
- message.value = object.value ?? "";
560
- return message;
561
- },
562
- };
563
- function createBaseDirectRawMessage() {
564
- return { topic: undefined, userIds: [], deviceIds: [], directMessage: undefined };
565
- }
566
- export const DirectRawMessage = {
567
- encode(message, writer = new BinaryWriter()) {
568
- if (message.topic !== undefined) {
569
- writer.uint32(10).string(message.topic);
570
- }
571
- writer.uint32(18).fork();
572
- for (const v of message.userIds) {
573
- writer.uint64(v.toString());
574
- }
575
- writer.join();
576
- writer.uint32(26).fork();
577
- for (const v of message.deviceIds) {
578
- writer.uint64(v.toString());
579
- }
580
- writer.join();
581
- if (message.directMessage !== undefined) {
582
- DirectMessage.encode(message.directMessage, writer.uint32(34).fork()).join();
583
- }
584
- return writer;
585
- },
586
- decode(input, length) {
587
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
588
- const end = length === undefined ? reader.len : reader.pos + length;
589
- const message = createBaseDirectRawMessage();
590
- while (reader.pos < end) {
591
- const tag = reader.uint32();
592
- switch (tag >>> 3) {
593
- case 1: {
594
- if (tag !== 10) {
595
- break;
596
- }
597
- message.topic = reader.string();
598
- continue;
599
- }
600
- case 2: {
601
- if (tag === 16) {
602
- message.userIds.push(Long.fromString(reader.uint64().toString(), true));
603
- continue;
604
- }
605
- if (tag === 18) {
606
- const end2 = reader.uint32() + reader.pos;
607
- while (reader.pos < end2) {
608
- message.userIds.push(Long.fromString(reader.uint64().toString(), true));
609
- }
610
- continue;
611
- }
612
- break;
613
- }
614
- case 3: {
615
- if (tag === 24) {
616
- message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
617
- continue;
618
- }
619
- if (tag === 26) {
620
- const end2 = reader.uint32() + reader.pos;
621
- while (reader.pos < end2) {
622
- message.deviceIds.push(Long.fromString(reader.uint64().toString(), true));
623
- }
624
- continue;
625
- }
626
- break;
627
- }
628
- case 4: {
629
- if (tag !== 34) {
630
- break;
631
- }
632
- message.directMessage = DirectMessage.decode(reader, reader.uint32());
633
- continue;
634
- }
635
- }
636
- if ((tag & 7) === 4 || tag === 0) {
637
- break;
638
- }
639
- reader.skip(tag & 7);
640
- }
641
- return message;
642
- },
643
- create(base) {
644
- return DirectRawMessage.fromPartial(base ?? {});
645
- },
646
- fromPartial(object) {
647
- const message = createBaseDirectRawMessage();
648
- message.topic = object.topic ?? undefined;
649
- message.userIds = object.userIds?.map((e) => Long.fromValue(e)) || [];
650
- message.deviceIds = object.deviceIds?.map((e) => Long.fromValue(e)) || [];
651
- message.directMessage = (object.directMessage !== undefined && object.directMessage !== null)
652
- ? DirectMessage.fromPartial(object.directMessage)
653
- : undefined;
654
- return message;
655
- },
656
- };
657
- function toTimestamp(date) {
658
- const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
659
- const nanos = (date.getTime() % 1_000) * 1_000_000;
660
- return { seconds, nanos };
661
- }
662
- function fromTimestamp(t) {
663
- let millis = (t.seconds.toNumber() || 0) * 1_000;
664
- millis += (t.nanos || 0) / 1_000_000;
665
- return new globalThis.Date(millis);
666
- }
667
- function numberToLong(number) {
668
- return Long.fromNumber(number);
669
- }