@fatehan/tsrp 1.6.35 → 1.6.36

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