@fatehan/tsrp 1.6.15 → 1.6.17

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 -1211
  66. package/dist/fatehan/services/api.d.ts.map +0 -1
  67. package/dist/fatehan/services/api.js +0 -12547
  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 -78
  81. package/dist/services.d.ts.map +0 -1
  82. package/dist/services.js +0 -242
  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,1244 +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: 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 createBaseWorkShiftTemplateShowRequest() {
659
- return { id: Long.UZERO };
660
- }
661
- export const WorkShiftTemplateShowRequest = {
662
- encode(message, writer = new BinaryWriter()) {
663
- if (!message.id.equals(Long.UZERO)) {
664
- writer.uint32(8).uint64(message.id.toString());
665
- }
666
- return writer;
667
- },
668
- decode(input, length) {
669
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
670
- const end = length === undefined ? reader.len : reader.pos + length;
671
- const message = createBaseWorkShiftTemplateShowRequest();
672
- while (reader.pos < end) {
673
- const tag = reader.uint32();
674
- switch (tag >>> 3) {
675
- case 1: {
676
- if (tag !== 8) {
677
- break;
678
- }
679
- message.id = Long.fromString(reader.uint64().toString(), true);
680
- continue;
681
- }
682
- }
683
- if ((tag & 7) === 4 || tag === 0) {
684
- break;
685
- }
686
- reader.skip(tag & 7);
687
- }
688
- return message;
689
- },
690
- create(base) {
691
- return WorkShiftTemplateShowRequest.fromPartial(base ?? {});
692
- },
693
- fromPartial(object) {
694
- const message = createBaseWorkShiftTemplateShowRequest();
695
- message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
696
- return message;
697
- },
698
- };
699
- function createBaseWorkShiftTemplateIndexRequest() {
700
- return { page: 0, organizationId: undefined, createdBy: undefined };
701
- }
702
- export const WorkShiftTemplateIndexRequest = {
703
- encode(message, writer = new BinaryWriter()) {
704
- if (message.page !== 0) {
705
- writer.uint32(8).uint32(message.page);
706
- }
707
- if (message.organizationId !== undefined) {
708
- writer.uint32(16).uint64(message.organizationId.toString());
709
- }
710
- if (message.createdBy !== undefined) {
711
- writer.uint32(24).uint64(message.createdBy.toString());
712
- }
713
- return writer;
714
- },
715
- decode(input, length) {
716
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
717
- const end = length === undefined ? reader.len : reader.pos + length;
718
- const message = createBaseWorkShiftTemplateIndexRequest();
719
- while (reader.pos < end) {
720
- const tag = reader.uint32();
721
- switch (tag >>> 3) {
722
- case 1: {
723
- if (tag !== 8) {
724
- break;
725
- }
726
- message.page = reader.uint32();
727
- continue;
728
- }
729
- case 2: {
730
- if (tag !== 16) {
731
- break;
732
- }
733
- message.organizationId = Long.fromString(reader.uint64().toString(), true);
734
- continue;
735
- }
736
- case 3: {
737
- if (tag !== 24) {
738
- break;
739
- }
740
- message.createdBy = Long.fromString(reader.uint64().toString(), true);
741
- continue;
742
- }
743
- }
744
- if ((tag & 7) === 4 || tag === 0) {
745
- break;
746
- }
747
- reader.skip(tag & 7);
748
- }
749
- return message;
750
- },
751
- create(base) {
752
- return WorkShiftTemplateIndexRequest.fromPartial(base ?? {});
753
- },
754
- fromPartial(object) {
755
- const message = createBaseWorkShiftTemplateIndexRequest();
756
- message.page = object.page ?? 0;
757
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
758
- ? Long.fromValue(object.organizationId)
759
- : undefined;
760
- message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
761
- ? Long.fromValue(object.createdBy)
762
- : undefined;
763
- return message;
764
- },
765
- };
766
- function createBaseWorkShiftTemplateIndexResponse() {
767
- return { currentPage: 0, lastPage: 0, perPage: 0, data: [] };
768
- }
769
- export const WorkShiftTemplateIndexResponse = {
770
- encode(message, writer = new BinaryWriter()) {
771
- if (message.currentPage !== 0) {
772
- writer.uint32(8).uint32(message.currentPage);
773
- }
774
- if (message.lastPage !== 0) {
775
- writer.uint32(16).uint32(message.lastPage);
776
- }
777
- if (message.perPage !== 0) {
778
- writer.uint32(24).uint32(message.perPage);
779
- }
780
- for (const v of message.data) {
781
- WorkShiftTemplate.encode(v, writer.uint32(34).fork()).join();
782
- }
783
- return writer;
784
- },
785
- decode(input, length) {
786
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
787
- const end = length === undefined ? reader.len : reader.pos + length;
788
- const message = createBaseWorkShiftTemplateIndexResponse();
789
- while (reader.pos < end) {
790
- const tag = reader.uint32();
791
- switch (tag >>> 3) {
792
- case 1: {
793
- if (tag !== 8) {
794
- break;
795
- }
796
- message.currentPage = reader.uint32();
797
- continue;
798
- }
799
- case 2: {
800
- if (tag !== 16) {
801
- break;
802
- }
803
- message.lastPage = reader.uint32();
804
- continue;
805
- }
806
- case 3: {
807
- if (tag !== 24) {
808
- break;
809
- }
810
- message.perPage = reader.uint32();
811
- continue;
812
- }
813
- case 4: {
814
- if (tag !== 34) {
815
- break;
816
- }
817
- message.data.push(WorkShiftTemplate.decode(reader, reader.uint32()));
818
- continue;
819
- }
820
- }
821
- if ((tag & 7) === 4 || tag === 0) {
822
- break;
823
- }
824
- reader.skip(tag & 7);
825
- }
826
- return message;
827
- },
828
- create(base) {
829
- return WorkShiftTemplateIndexResponse.fromPartial(base ?? {});
830
- },
831
- fromPartial(object) {
832
- const message = createBaseWorkShiftTemplateIndexResponse();
833
- message.currentPage = object.currentPage ?? 0;
834
- message.lastPage = object.lastPage ?? 0;
835
- message.perPage = object.perPage ?? 0;
836
- message.data = object.data?.map((e) => WorkShiftTemplate.fromPartial(e)) || [];
837
- return message;
838
- },
839
- };
840
- function createBaseWorkShiftTemplateDestroyRequest() {
841
- return { id: Long.UZERO };
842
- }
843
- export const WorkShiftTemplateDestroyRequest = {
844
- encode(message, writer = new BinaryWriter()) {
845
- if (!message.id.equals(Long.UZERO)) {
846
- writer.uint32(8).uint64(message.id.toString());
847
- }
848
- return writer;
849
- },
850
- decode(input, length) {
851
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
852
- const end = length === undefined ? reader.len : reader.pos + length;
853
- const message = createBaseWorkShiftTemplateDestroyRequest();
854
- while (reader.pos < end) {
855
- const tag = reader.uint32();
856
- switch (tag >>> 3) {
857
- case 1: {
858
- if (tag !== 8) {
859
- break;
860
- }
861
- message.id = Long.fromString(reader.uint64().toString(), true);
862
- continue;
863
- }
864
- }
865
- if ((tag & 7) === 4 || tag === 0) {
866
- break;
867
- }
868
- reader.skip(tag & 7);
869
- }
870
- return message;
871
- },
872
- create(base) {
873
- return WorkShiftTemplateDestroyRequest.fromPartial(base ?? {});
874
- },
875
- fromPartial(object) {
876
- const message = createBaseWorkShiftTemplateDestroyRequest();
877
- message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
878
- return message;
879
- },
880
- };
881
- function createBaseWorkShiftTemplateDestroyResponse() {
882
- return { deleted: false };
883
- }
884
- export const WorkShiftTemplateDestroyResponse = {
885
- encode(message, writer = new BinaryWriter()) {
886
- if (message.deleted !== false) {
887
- writer.uint32(8).bool(message.deleted);
888
- }
889
- return writer;
890
- },
891
- decode(input, length) {
892
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
893
- const end = length === undefined ? reader.len : reader.pos + length;
894
- const message = createBaseWorkShiftTemplateDestroyResponse();
895
- while (reader.pos < end) {
896
- const tag = reader.uint32();
897
- switch (tag >>> 3) {
898
- case 1: {
899
- if (tag !== 8) {
900
- break;
901
- }
902
- message.deleted = reader.bool();
903
- continue;
904
- }
905
- }
906
- if ((tag & 7) === 4 || tag === 0) {
907
- break;
908
- }
909
- reader.skip(tag & 7);
910
- }
911
- return message;
912
- },
913
- create(base) {
914
- return WorkShiftTemplateDestroyResponse.fromPartial(base ?? {});
915
- },
916
- fromPartial(object) {
917
- const message = createBaseWorkShiftTemplateDestroyResponse();
918
- message.deleted = object.deleted ?? false;
919
- return message;
920
- },
921
- };
922
- function createBaseWorkShiftIndexRequest() {
923
- return {
924
- page: 0,
925
- deviceId: undefined,
926
- driverId: undefined,
927
- organizationId: undefined,
928
- templateId: undefined,
929
- createdBy: undefined,
930
- };
931
- }
932
- export const WorkShiftIndexRequest = {
933
- encode(message, writer = new BinaryWriter()) {
934
- if (message.page !== 0) {
935
- writer.uint32(8).uint32(message.page);
936
- }
937
- if (message.deviceId !== undefined) {
938
- writer.uint32(16).uint64(message.deviceId.toString());
939
- }
940
- if (message.driverId !== undefined) {
941
- writer.uint32(24).uint64(message.driverId.toString());
942
- }
943
- if (message.organizationId !== undefined) {
944
- writer.uint32(32).uint64(message.organizationId.toString());
945
- }
946
- if (message.templateId !== undefined) {
947
- writer.uint32(40).uint64(message.templateId.toString());
948
- }
949
- if (message.createdBy !== undefined) {
950
- writer.uint32(48).uint64(message.createdBy.toString());
951
- }
952
- return writer;
953
- },
954
- decode(input, length) {
955
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
956
- const end = length === undefined ? reader.len : reader.pos + length;
957
- const message = createBaseWorkShiftIndexRequest();
958
- while (reader.pos < end) {
959
- const tag = reader.uint32();
960
- switch (tag >>> 3) {
961
- case 1: {
962
- if (tag !== 8) {
963
- break;
964
- }
965
- message.page = reader.uint32();
966
- continue;
967
- }
968
- case 2: {
969
- if (tag !== 16) {
970
- break;
971
- }
972
- message.deviceId = Long.fromString(reader.uint64().toString(), true);
973
- continue;
974
- }
975
- case 3: {
976
- if (tag !== 24) {
977
- break;
978
- }
979
- message.driverId = Long.fromString(reader.uint64().toString(), true);
980
- continue;
981
- }
982
- case 4: {
983
- if (tag !== 32) {
984
- break;
985
- }
986
- message.organizationId = Long.fromString(reader.uint64().toString(), true);
987
- continue;
988
- }
989
- case 5: {
990
- if (tag !== 40) {
991
- break;
992
- }
993
- message.templateId = Long.fromString(reader.uint64().toString(), true);
994
- continue;
995
- }
996
- case 6: {
997
- if (tag !== 48) {
998
- break;
999
- }
1000
- message.createdBy = Long.fromString(reader.uint64().toString(), true);
1001
- continue;
1002
- }
1003
- }
1004
- if ((tag & 7) === 4 || tag === 0) {
1005
- break;
1006
- }
1007
- reader.skip(tag & 7);
1008
- }
1009
- return message;
1010
- },
1011
- create(base) {
1012
- return WorkShiftIndexRequest.fromPartial(base ?? {});
1013
- },
1014
- fromPartial(object) {
1015
- const message = createBaseWorkShiftIndexRequest();
1016
- message.page = object.page ?? 0;
1017
- message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
1018
- ? Long.fromValue(object.deviceId)
1019
- : undefined;
1020
- message.driverId = (object.driverId !== undefined && object.driverId !== null)
1021
- ? Long.fromValue(object.driverId)
1022
- : undefined;
1023
- message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
1024
- ? Long.fromValue(object.organizationId)
1025
- : undefined;
1026
- message.templateId = (object.templateId !== undefined && object.templateId !== null)
1027
- ? Long.fromValue(object.templateId)
1028
- : undefined;
1029
- message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
1030
- ? Long.fromValue(object.createdBy)
1031
- : undefined;
1032
- return message;
1033
- },
1034
- };
1035
- function createBaseWorkShiftIndexResponse() {
1036
- return { currentPage: 0, lastPage: 0, perPage: 0, data: [] };
1037
- }
1038
- export const WorkShiftIndexResponse = {
1039
- encode(message, writer = new BinaryWriter()) {
1040
- if (message.currentPage !== 0) {
1041
- writer.uint32(8).uint32(message.currentPage);
1042
- }
1043
- if (message.lastPage !== 0) {
1044
- writer.uint32(16).uint32(message.lastPage);
1045
- }
1046
- if (message.perPage !== 0) {
1047
- writer.uint32(24).uint32(message.perPage);
1048
- }
1049
- for (const v of message.data) {
1050
- WorkShift.encode(v, writer.uint32(34).fork()).join();
1051
- }
1052
- return writer;
1053
- },
1054
- decode(input, length) {
1055
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1056
- const end = length === undefined ? reader.len : reader.pos + length;
1057
- const message = createBaseWorkShiftIndexResponse();
1058
- while (reader.pos < end) {
1059
- const tag = reader.uint32();
1060
- switch (tag >>> 3) {
1061
- case 1: {
1062
- if (tag !== 8) {
1063
- break;
1064
- }
1065
- message.currentPage = reader.uint32();
1066
- continue;
1067
- }
1068
- case 2: {
1069
- if (tag !== 16) {
1070
- break;
1071
- }
1072
- message.lastPage = reader.uint32();
1073
- continue;
1074
- }
1075
- case 3: {
1076
- if (tag !== 24) {
1077
- break;
1078
- }
1079
- message.perPage = reader.uint32();
1080
- continue;
1081
- }
1082
- case 4: {
1083
- if (tag !== 34) {
1084
- break;
1085
- }
1086
- message.data.push(WorkShift.decode(reader, reader.uint32()));
1087
- continue;
1088
- }
1089
- }
1090
- if ((tag & 7) === 4 || tag === 0) {
1091
- break;
1092
- }
1093
- reader.skip(tag & 7);
1094
- }
1095
- return message;
1096
- },
1097
- create(base) {
1098
- return WorkShiftIndexResponse.fromPartial(base ?? {});
1099
- },
1100
- fromPartial(object) {
1101
- const message = createBaseWorkShiftIndexResponse();
1102
- message.currentPage = object.currentPage ?? 0;
1103
- message.lastPage = object.lastPage ?? 0;
1104
- message.perPage = object.perPage ?? 0;
1105
- message.data = object.data?.map((e) => WorkShift.fromPartial(e)) || [];
1106
- return message;
1107
- },
1108
- };
1109
- function createBaseWorkShiftShowRequest() {
1110
- return { id: Long.UZERO };
1111
- }
1112
- export const WorkShiftShowRequest = {
1113
- encode(message, writer = new BinaryWriter()) {
1114
- if (!message.id.equals(Long.UZERO)) {
1115
- writer.uint32(8).uint64(message.id.toString());
1116
- }
1117
- return writer;
1118
- },
1119
- decode(input, length) {
1120
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1121
- const end = length === undefined ? reader.len : reader.pos + length;
1122
- const message = createBaseWorkShiftShowRequest();
1123
- while (reader.pos < end) {
1124
- const tag = reader.uint32();
1125
- switch (tag >>> 3) {
1126
- case 1: {
1127
- if (tag !== 8) {
1128
- break;
1129
- }
1130
- message.id = Long.fromString(reader.uint64().toString(), true);
1131
- continue;
1132
- }
1133
- }
1134
- if ((tag & 7) === 4 || tag === 0) {
1135
- break;
1136
- }
1137
- reader.skip(tag & 7);
1138
- }
1139
- return message;
1140
- },
1141
- create(base) {
1142
- return WorkShiftShowRequest.fromPartial(base ?? {});
1143
- },
1144
- fromPartial(object) {
1145
- const message = createBaseWorkShiftShowRequest();
1146
- message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1147
- return message;
1148
- },
1149
- };
1150
- function createBaseWorkShiftDestroyRequest() {
1151
- return { id: Long.UZERO };
1152
- }
1153
- export const WorkShiftDestroyRequest = {
1154
- encode(message, writer = new BinaryWriter()) {
1155
- if (!message.id.equals(Long.UZERO)) {
1156
- writer.uint32(8).uint64(message.id.toString());
1157
- }
1158
- return writer;
1159
- },
1160
- decode(input, length) {
1161
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1162
- const end = length === undefined ? reader.len : reader.pos + length;
1163
- const message = createBaseWorkShiftDestroyRequest();
1164
- while (reader.pos < end) {
1165
- const tag = reader.uint32();
1166
- switch (tag >>> 3) {
1167
- case 1: {
1168
- if (tag !== 8) {
1169
- break;
1170
- }
1171
- message.id = Long.fromString(reader.uint64().toString(), true);
1172
- continue;
1173
- }
1174
- }
1175
- if ((tag & 7) === 4 || tag === 0) {
1176
- break;
1177
- }
1178
- reader.skip(tag & 7);
1179
- }
1180
- return message;
1181
- },
1182
- create(base) {
1183
- return WorkShiftDestroyRequest.fromPartial(base ?? {});
1184
- },
1185
- fromPartial(object) {
1186
- const message = createBaseWorkShiftDestroyRequest();
1187
- message.id = (object.id !== undefined && object.id !== null) ? Long.fromValue(object.id) : Long.UZERO;
1188
- return message;
1189
- },
1190
- };
1191
- function createBaseWorkShiftDestroyResponse() {
1192
- return { deleted: false };
1193
- }
1194
- export const WorkShiftDestroyResponse = {
1195
- encode(message, writer = new BinaryWriter()) {
1196
- if (message.deleted !== false) {
1197
- writer.uint32(8).bool(message.deleted);
1198
- }
1199
- return writer;
1200
- },
1201
- decode(input, length) {
1202
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1203
- const end = length === undefined ? reader.len : reader.pos + length;
1204
- const message = createBaseWorkShiftDestroyResponse();
1205
- while (reader.pos < end) {
1206
- const tag = reader.uint32();
1207
- switch (tag >>> 3) {
1208
- case 1: {
1209
- if (tag !== 8) {
1210
- break;
1211
- }
1212
- message.deleted = reader.bool();
1213
- continue;
1214
- }
1215
- }
1216
- if ((tag & 7) === 4 || tag === 0) {
1217
- break;
1218
- }
1219
- reader.skip(tag & 7);
1220
- }
1221
- return message;
1222
- },
1223
- create(base) {
1224
- return WorkShiftDestroyResponse.fromPartial(base ?? {});
1225
- },
1226
- fromPartial(object) {
1227
- const message = createBaseWorkShiftDestroyResponse();
1228
- message.deleted = object.deleted ?? false;
1229
- return message;
1230
- },
1231
- };
1232
- function toTimestamp(date) {
1233
- const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
1234
- const nanos = (date.getTime() % 1_000) * 1_000_000;
1235
- return { seconds, nanos };
1236
- }
1237
- function fromTimestamp(t) {
1238
- let millis = (t.seconds.toNumber() || 0) * 1_000;
1239
- millis += (t.nanos || 0) / 1_000_000;
1240
- return new globalThis.Date(millis);
1241
- }
1242
- function numberToLong(number) {
1243
- return Long.fromNumber(number);
1244
- }