@fatehan/tsrp 1.6.34 → 1.6.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/fatehan/activities/workflow.d.ts +0 -219
- package/dist/fatehan/activities/workflow.d.ts.map +0 -1
- package/dist/fatehan/activities/workflow.js +0 -1941
- package/dist/fatehan/activities/workshift.d.ts +0 -87
- package/dist/fatehan/activities/workshift.d.ts.map +0 -1
- package/dist/fatehan/activities/workshift.js +0 -670
- package/dist/fatehan/apis/client.d.ts +0 -246
- package/dist/fatehan/apis/client.d.ts.map +0 -1
- package/dist/fatehan/apis/client.js +0 -2572
- package/dist/fatehan/areas/area.d.ts +0 -96
- package/dist/fatehan/areas/area.d.ts.map +0 -1
- package/dist/fatehan/areas/area.js +0 -761
- package/dist/fatehan/devices/devices.d.ts +0 -258
- package/dist/fatehan/devices/devices.d.ts.map +0 -1
- package/dist/fatehan/devices/devices.js +0 -2742
- package/dist/fatehan/devices/maintenance.d.ts +0 -64
- package/dist/fatehan/devices/maintenance.d.ts.map +0 -1
- package/dist/fatehan/devices/maintenance.js +0 -484
- package/dist/fatehan/financial/financial.d.ts +0 -162
- package/dist/fatehan/financial/financial.d.ts.map +0 -1
- package/dist/fatehan/financial/financial.js +0 -1701
- package/dist/fatehan/google/protobuf/descriptor.d.ts +0 -1303
- package/dist/fatehan/google/protobuf/descriptor.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/descriptor.js +0 -3467
- package/dist/fatehan/google/protobuf/duration.d.ts +0 -99
- package/dist/fatehan/google/protobuf/duration.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/duration.js +0 -63
- package/dist/fatehan/google/protobuf/field_mask.d.ts +0 -228
- package/dist/fatehan/google/protobuf/field_mask.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/field_mask.js +0 -57
- package/dist/fatehan/google/protobuf/timestamp.d.ts +0 -129
- package/dist/fatehan/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/fatehan/google/protobuf/timestamp.js +0 -63
- package/dist/fatehan/identities/authentication.d.ts +0 -164
- package/dist/fatehan/identities/authentication.d.ts.map +0 -1
- package/dist/fatehan/identities/authentication.js +0 -1291
- package/dist/fatehan/identities/identities.d.ts +0 -969
- package/dist/fatehan/identities/identities.d.ts.map +0 -1
- package/dist/fatehan/identities/identities.js +0 -2993
- package/dist/fatehan/models/fusion.d.ts +0 -149
- package/dist/fatehan/models/fusion.d.ts.map +0 -1
- package/dist/fatehan/models/fusion.js +0 -1531
- package/dist/fatehan/models/models.d.ts +0 -162
- package/dist/fatehan/models/models.d.ts.map +0 -1
- package/dist/fatehan/models/models.js +0 -1486
- package/dist/fatehan/notifies/direct.d.ts +0 -85
- package/dist/fatehan/notifies/direct.d.ts.map +0 -1
- package/dist/fatehan/notifies/direct.js +0 -669
- package/dist/fatehan/notifies/notify.d.ts +0 -245
- package/dist/fatehan/notifies/notify.d.ts.map +0 -1
- package/dist/fatehan/notifies/notify.js +0 -2087
- package/dist/fatehan/packets/commands.d.ts +0 -150
- package/dist/fatehan/packets/commands.d.ts.map +0 -1
- package/dist/fatehan/packets/commands.js +0 -1364
- package/dist/fatehan/packets/dataModel.d.ts +0 -1664
- package/dist/fatehan/packets/dataModel.d.ts.map +0 -1
- package/dist/fatehan/packets/dataModel.js +0 -15559
- package/dist/fatehan/packets/dataModule.d.ts +0 -61
- package/dist/fatehan/packets/dataModule.d.ts.map +0 -1
- package/dist/fatehan/packets/dataModule.js +0 -386
- package/dist/fatehan/packets/forge.d.ts +0 -142
- package/dist/fatehan/packets/forge.d.ts.map +0 -1
- package/dist/fatehan/packets/forge.js +0 -1339
- package/dist/fatehan/services/api.d.ts +0 -1304
- package/dist/fatehan/services/api.d.ts.map +0 -1
- package/dist/fatehan/services/api.js +0 -13554
- package/dist/fatehan/services/repositories.d.ts +0 -78
- package/dist/fatehan/services/repositories.d.ts.map +0 -1
- package/dist/fatehan/services/repositories.js +0 -620
- package/dist/fatehan/stream/stream.d.ts +0 -250
- package/dist/fatehan/stream/stream.d.ts.map +0 -1
- package/dist/fatehan/stream/stream.js +0 -1824
- package/dist/fatehan/trips/trip.d.ts +0 -325
- package/dist/fatehan/trips/trip.d.ts.map +0 -1
- package/dist/fatehan/trips/trip.js +0 -1635
- package/dist/fatehan/utils/buf/validate/validate.d.ts +0 -3520
- package/dist/fatehan/utils/buf/validate/validate.d.ts.map +0 -1
- package/dist/fatehan/utils/buf/validate/validate.js +0 -4248
- package/dist/services.d.ts +0 -80
- package/dist/services.d.ts.map +0 -1
- package/dist/services.js +0 -248
- package/dist/store/system.io.d.ts +0 -6
- package/dist/store/system.io.d.ts.map +0 -1
- package/dist/store/system.io.js +0 -14
- package/dist/system.io.d.ts +0 -6
- package/dist/system.io.d.ts.map +0 -1
- package/dist/system.io.js +0 -208
|
@@ -1,670 +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 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
|
-
}
|