@fivenet-app/gen 2026.8.0 → 2026.8.5

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 (38) hide show
  1. package/google/protobuf/descriptor.ts +3 -11
  2. package/google/protobuf/timestamp.ts +6 -7
  3. package/package.json +1 -1
  4. package/perms.ts +17 -4
  5. package/resources/calendar/calendar.ts +11 -0
  6. package/resources/calendar/entries/entries.ts +23 -0
  7. package/resources/centrum/dispatches/dispatches.ts +8 -8
  8. package/resources/centrum/units/units.ts +5 -5
  9. package/resources/citizens/labels/access.ts +10 -6
  10. package/resources/dbsync/state.ts +192 -0
  11. package/resources/documents/stamps/access.ts +25 -0
  12. package/resources/documents/stamps/stamp.ts +0 -21
  13. package/resources/documents/templates/templates.ts +61 -59
  14. package/resources/documents/workflow/workflow.ts +61 -1
  15. package/resources/jobs/groups/access/access.ts +29 -0
  16. package/resources/jobs/groups/activity.ts +332 -0
  17. package/resources/jobs/groups/group.ts +1666 -0
  18. package/resources/jobs/user_selector.ts +184 -0
  19. package/resources/settings/status.ts +197 -105
  20. package/services/calendar/calendar.ts +1 -1
  21. package/services/calendar/entries.ts +3 -3
  22. package/services/centrum/units.ts +3 -3
  23. package/services/completor/completor.ts +2 -2
  24. package/services/documents/approval.ts +2 -2
  25. package/services/documents/documents.ts +9 -9
  26. package/services/documents/templates.ts +13 -13
  27. package/services/jobs/colleagues.client.ts +34 -8
  28. package/services/jobs/colleagues.ts +263 -74
  29. package/services/jobs/conduct.ts +11 -19
  30. package/services/jobs/groups.client.ts +311 -0
  31. package/services/jobs/groups.ts +3596 -1
  32. package/services/jobs/timeclock.ts +30 -27
  33. package/services/qualifications/qualifications.ts +26 -4
  34. package/services/settings/settings.ts +1 -1
  35. package/services/sync/sync.client.ts +69 -33
  36. package/services/sync/sync.ts +442 -6
  37. package/services/vehicles/vehicles.ts +2 -2
  38. package/svcs.ts +29 -1
@@ -12,6 +12,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
12
12
  import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
+ import { DBSyncTableSyncState } from "../../resources/dbsync/state";
15
16
  import { DeleteVehicles } from "../../resources/sync/data/data";
16
17
  import { DeleteUsers } from "../../resources/sync/data/data";
17
18
  import { DataUserLocations } from "../../resources/sync/data/data";
@@ -31,6 +32,7 @@ import { AccountUpdate } from "../../resources/sync/activity/activity";
31
32
  import { TimeclockUpdate } from "../../resources/sync/activity/activity";
32
33
  import { ColleagueProps } from "../../resources/sync/activity/activity";
33
34
  import { ColleagueActivity } from "../../resources/jobs/colleagues/activity/activity";
35
+ import { VehicleProps } from "../../resources/vehicles/props/props";
34
36
  import { UserProps as UserProps$ } from "../../resources/users/props/props";
35
37
  import { UserProps } from "../../resources/sync/activity/activity";
36
38
  import { UserActivity } from "../../resources/users/activity/activity";
@@ -78,6 +80,19 @@ export interface GetStatusResponse {
78
80
  */
79
81
  accounts?: DataStatus;
80
82
  }
83
+ /**
84
+ * @generated from protobuf message services.sync.SourceUser
85
+ */
86
+ export interface SourceUser {
87
+ /**
88
+ * @generated from protobuf field: optional int32 user_id = 1
89
+ */
90
+ userId?: number;
91
+ /**
92
+ * @generated from protobuf field: optional string job = 2
93
+ */
94
+ job?: string;
95
+ }
81
96
  /**
82
97
  * @generated from protobuf message services.sync.RegisterAccountRequest
83
98
  */
@@ -232,6 +247,10 @@ export interface AddUserActivityRequest {
232
247
  * @generated from protobuf field: resources.users.activity.UserActivity user_activity = 1
233
248
  */
234
249
  userActivity?: UserActivity;
250
+ /**
251
+ * @generated from protobuf field: optional services.sync.SourceUser source_user = 2
252
+ */
253
+ sourceUser?: SourceUser;
235
254
  }
236
255
  /**
237
256
  * @generated from protobuf message services.sync.AddUserPropsRequest
@@ -241,6 +260,10 @@ export interface AddUserPropsRequest {
241
260
  * @generated from protobuf field: resources.sync.activity.UserProps user_props = 1
242
261
  */
243
262
  userProps?: UserProps;
263
+ /**
264
+ * @generated from protobuf field: optional services.sync.SourceUser source_user = 2
265
+ */
266
+ sourceUser?: SourceUser;
244
267
  }
245
268
  /**
246
269
  * @generated from protobuf message services.sync.GetUserPropsRequest
@@ -260,6 +283,50 @@ export interface GetUserPropsResponse {
260
283
  */
261
284
  userProps?: UserProps$;
262
285
  }
286
+ /**
287
+ * @generated from protobuf message services.sync.GetVehiclePropsRequest
288
+ */
289
+ export interface GetVehiclePropsRequest {
290
+ /**
291
+ * @generated from protobuf field: string plate = 1
292
+ */
293
+ plate: string;
294
+ }
295
+ /**
296
+ * @generated from protobuf message services.sync.GetVehiclePropsResponse
297
+ */
298
+ export interface GetVehiclePropsResponse {
299
+ /**
300
+ * @generated from protobuf field: resources.vehicles.props.VehicleProps vehicle_props = 1
301
+ */
302
+ vehicleProps?: VehicleProps;
303
+ }
304
+ /**
305
+ * @generated from protobuf message services.sync.SetVehiclePropsRequest
306
+ */
307
+ export interface SetVehiclePropsRequest {
308
+ /**
309
+ * @generated from protobuf field: resources.vehicles.props.VehicleProps vehicle_props = 1
310
+ */
311
+ vehicleProps?: VehicleProps;
312
+ /**
313
+ * @generated from protobuf field: optional string reason = 2
314
+ */
315
+ reason?: string;
316
+ /**
317
+ * @generated from protobuf field: optional services.sync.SourceUser source_user = 3
318
+ */
319
+ sourceUser?: SourceUser;
320
+ }
321
+ /**
322
+ * @generated from protobuf message services.sync.SetVehiclePropsResponse
323
+ */
324
+ export interface SetVehiclePropsResponse {
325
+ /**
326
+ * @generated from protobuf field: resources.vehicles.props.VehicleProps vehicle_props = 1
327
+ */
328
+ vehicleProps?: VehicleProps;
329
+ }
263
330
  /**
264
331
  * @generated from protobuf message services.sync.AddColleagueActivityRequest
265
332
  */
@@ -268,6 +335,10 @@ export interface AddColleagueActivityRequest {
268
335
  * @generated from protobuf field: resources.jobs.colleagues.activity.ColleagueActivity colleague_activity = 1
269
336
  */
270
337
  colleagueActivity?: ColleagueActivity;
338
+ /**
339
+ * @generated from protobuf field: optional services.sync.SourceUser source_user = 2
340
+ */
341
+ sourceUser?: SourceUser;
271
342
  }
272
343
  /**
273
344
  * @generated from protobuf message services.sync.AddColleaguePropsRequest
@@ -277,6 +348,10 @@ export interface AddColleaguePropsRequest {
277
348
  * @generated from protobuf field: resources.sync.activity.ColleagueProps colleague_props = 1
278
349
  */
279
350
  colleagueProps?: ColleagueProps;
351
+ /**
352
+ * @generated from protobuf field: optional services.sync.SourceUser source_user = 2
353
+ */
354
+ sourceUser?: SourceUser;
280
355
  }
281
356
  /**
282
357
  * @generated from protobuf message services.sync.AddJobTimeclockRequest
@@ -605,6 +680,27 @@ export interface StreamRequest {
605
680
  * @generated from protobuf field: optional string version = 1
606
681
  */
607
682
  version?: string;
683
+ /**
684
+ * @generated from protobuf oneof: data
685
+ */
686
+ data: {
687
+ oneofKind: "syncState";
688
+ /**
689
+ * @generated from protobuf field: services.sync.ClientSyncState sync_state = 2
690
+ */
691
+ syncState: ClientSyncState;
692
+ } | {
693
+ oneofKind: undefined;
694
+ };
695
+ }
696
+ /**
697
+ * @generated from protobuf message services.sync.ClientSyncState
698
+ */
699
+ export interface ClientSyncState {
700
+ /**
701
+ * @generated from protobuf field: repeated resources.dbsync.DBSyncTableSyncState tables = 1
702
+ */
703
+ tables: DBSyncTableSyncState[];
608
704
  }
609
705
  // @generated message type with reflection information, may provide speed optimized methods
610
706
  class GetStatusRequest$Type extends MessageType<GetStatusRequest> {
@@ -733,6 +829,59 @@ class GetStatusResponse$Type extends MessageType<GetStatusResponse> {
733
829
  */
734
830
  export const GetStatusResponse = new GetStatusResponse$Type();
735
831
  // @generated message type with reflection information, may provide speed optimized methods
832
+ class SourceUser$Type extends MessageType<SourceUser> {
833
+ constructor() {
834
+ super("services.sync.SourceUser", [
835
+ { no: 1, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
836
+ { no: 2, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } }
837
+ ]);
838
+ }
839
+ create(value?: PartialMessage<SourceUser>): SourceUser {
840
+ const message = globalThis.Object.create((this.messagePrototype!));
841
+ if (value !== undefined)
842
+ reflectionMergePartial<SourceUser>(this, message, value);
843
+ return message;
844
+ }
845
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SourceUser): SourceUser {
846
+ let message = target ?? this.create(), end = reader.pos + length;
847
+ while (reader.pos < end) {
848
+ let [fieldNo, wireType] = reader.tag();
849
+ switch (fieldNo) {
850
+ case /* optional int32 user_id */ 1:
851
+ message.userId = reader.int32();
852
+ break;
853
+ case /* optional string job */ 2:
854
+ message.job = reader.string();
855
+ break;
856
+ default:
857
+ let u = options.readUnknownField;
858
+ if (u === "throw")
859
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
860
+ let d = reader.skip(wireType);
861
+ if (u !== false)
862
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
863
+ }
864
+ }
865
+ return message;
866
+ }
867
+ internalBinaryWrite(message: SourceUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
868
+ /* optional int32 user_id = 1; */
869
+ if (message.userId !== undefined)
870
+ writer.tag(1, WireType.Varint).int32(message.userId);
871
+ /* optional string job = 2; */
872
+ if (message.job !== undefined)
873
+ writer.tag(2, WireType.LengthDelimited).string(message.job);
874
+ let u = options.writeUnknownFields;
875
+ if (u !== false)
876
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
877
+ return writer;
878
+ }
879
+ }
880
+ /**
881
+ * @generated MessageType for protobuf message services.sync.SourceUser
882
+ */
883
+ export const SourceUser = new SourceUser$Type();
884
+ // @generated message type with reflection information, may provide speed optimized methods
736
885
  class RegisterAccountRequest$Type extends MessageType<RegisterAccountRequest> {
737
886
  constructor() {
738
887
  super("services.sync.RegisterAccountRequest", [
@@ -1337,7 +1486,8 @@ export const CloseUserDispatchesResponse = new CloseUserDispatchesResponse$Type(
1337
1486
  class AddUserActivityRequest$Type extends MessageType<AddUserActivityRequest> {
1338
1487
  constructor() {
1339
1488
  super("services.sync.AddUserActivityRequest", [
1340
- { no: 1, name: "user_activity", kind: "message", T: () => UserActivity, options: { "buf.validate.field": { required: true } } }
1489
+ { no: 1, name: "user_activity", kind: "message", T: () => UserActivity, options: { "buf.validate.field": { required: true } } },
1490
+ { no: 2, name: "source_user", kind: "message", T: () => SourceUser }
1341
1491
  ]);
1342
1492
  }
1343
1493
  create(value?: PartialMessage<AddUserActivityRequest>): AddUserActivityRequest {
@@ -1354,6 +1504,9 @@ class AddUserActivityRequest$Type extends MessageType<AddUserActivityRequest> {
1354
1504
  case /* resources.users.activity.UserActivity user_activity */ 1:
1355
1505
  message.userActivity = UserActivity.internalBinaryRead(reader, reader.uint32(), options, message.userActivity);
1356
1506
  break;
1507
+ case /* optional services.sync.SourceUser source_user */ 2:
1508
+ message.sourceUser = SourceUser.internalBinaryRead(reader, reader.uint32(), options, message.sourceUser);
1509
+ break;
1357
1510
  default:
1358
1511
  let u = options.readUnknownField;
1359
1512
  if (u === "throw")
@@ -1369,6 +1522,9 @@ class AddUserActivityRequest$Type extends MessageType<AddUserActivityRequest> {
1369
1522
  /* resources.users.activity.UserActivity user_activity = 1; */
1370
1523
  if (message.userActivity)
1371
1524
  UserActivity.internalBinaryWrite(message.userActivity, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1525
+ /* optional services.sync.SourceUser source_user = 2; */
1526
+ if (message.sourceUser)
1527
+ SourceUser.internalBinaryWrite(message.sourceUser, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1372
1528
  let u = options.writeUnknownFields;
1373
1529
  if (u !== false)
1374
1530
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1383,7 +1539,8 @@ export const AddUserActivityRequest = new AddUserActivityRequest$Type();
1383
1539
  class AddUserPropsRequest$Type extends MessageType<AddUserPropsRequest> {
1384
1540
  constructor() {
1385
1541
  super("services.sync.AddUserPropsRequest", [
1386
- { no: 1, name: "user_props", kind: "message", T: () => UserProps, options: { "buf.validate.field": { required: true } } }
1542
+ { no: 1, name: "user_props", kind: "message", T: () => UserProps, options: { "buf.validate.field": { required: true } } },
1543
+ { no: 2, name: "source_user", kind: "message", T: () => SourceUser }
1387
1544
  ]);
1388
1545
  }
1389
1546
  create(value?: PartialMessage<AddUserPropsRequest>): AddUserPropsRequest {
@@ -1400,6 +1557,9 @@ class AddUserPropsRequest$Type extends MessageType<AddUserPropsRequest> {
1400
1557
  case /* resources.sync.activity.UserProps user_props */ 1:
1401
1558
  message.userProps = UserProps.internalBinaryRead(reader, reader.uint32(), options, message.userProps);
1402
1559
  break;
1560
+ case /* optional services.sync.SourceUser source_user */ 2:
1561
+ message.sourceUser = SourceUser.internalBinaryRead(reader, reader.uint32(), options, message.sourceUser);
1562
+ break;
1403
1563
  default:
1404
1564
  let u = options.readUnknownField;
1405
1565
  if (u === "throw")
@@ -1415,6 +1575,9 @@ class AddUserPropsRequest$Type extends MessageType<AddUserPropsRequest> {
1415
1575
  /* resources.sync.activity.UserProps user_props = 1; */
1416
1576
  if (message.userProps)
1417
1577
  UserProps.internalBinaryWrite(message.userProps, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1578
+ /* optional services.sync.SourceUser source_user = 2; */
1579
+ if (message.sourceUser)
1580
+ SourceUser.internalBinaryWrite(message.sourceUser, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1418
1581
  let u = options.writeUnknownFields;
1419
1582
  if (u !== false)
1420
1583
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1519,10 +1682,210 @@ class GetUserPropsResponse$Type extends MessageType<GetUserPropsResponse> {
1519
1682
  */
1520
1683
  export const GetUserPropsResponse = new GetUserPropsResponse$Type();
1521
1684
  // @generated message type with reflection information, may provide speed optimized methods
1685
+ class GetVehiclePropsRequest$Type extends MessageType<GetVehiclePropsRequest> {
1686
+ constructor() {
1687
+ super("services.sync.GetVehiclePropsRequest", [
1688
+ { no: 1, name: "plate", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } }
1689
+ ]);
1690
+ }
1691
+ create(value?: PartialMessage<GetVehiclePropsRequest>): GetVehiclePropsRequest {
1692
+ const message = globalThis.Object.create((this.messagePrototype!));
1693
+ message.plate = "";
1694
+ if (value !== undefined)
1695
+ reflectionMergePartial<GetVehiclePropsRequest>(this, message, value);
1696
+ return message;
1697
+ }
1698
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetVehiclePropsRequest): GetVehiclePropsRequest {
1699
+ let message = target ?? this.create(), end = reader.pos + length;
1700
+ while (reader.pos < end) {
1701
+ let [fieldNo, wireType] = reader.tag();
1702
+ switch (fieldNo) {
1703
+ case /* string plate */ 1:
1704
+ message.plate = reader.string();
1705
+ break;
1706
+ default:
1707
+ let u = options.readUnknownField;
1708
+ if (u === "throw")
1709
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1710
+ let d = reader.skip(wireType);
1711
+ if (u !== false)
1712
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1713
+ }
1714
+ }
1715
+ return message;
1716
+ }
1717
+ internalBinaryWrite(message: GetVehiclePropsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1718
+ /* string plate = 1; */
1719
+ if (message.plate !== "")
1720
+ writer.tag(1, WireType.LengthDelimited).string(message.plate);
1721
+ let u = options.writeUnknownFields;
1722
+ if (u !== false)
1723
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1724
+ return writer;
1725
+ }
1726
+ }
1727
+ /**
1728
+ * @generated MessageType for protobuf message services.sync.GetVehiclePropsRequest
1729
+ */
1730
+ export const GetVehiclePropsRequest = new GetVehiclePropsRequest$Type();
1731
+ // @generated message type with reflection information, may provide speed optimized methods
1732
+ class GetVehiclePropsResponse$Type extends MessageType<GetVehiclePropsResponse> {
1733
+ constructor() {
1734
+ super("services.sync.GetVehiclePropsResponse", [
1735
+ { no: 1, name: "vehicle_props", kind: "message", T: () => VehicleProps }
1736
+ ]);
1737
+ }
1738
+ create(value?: PartialMessage<GetVehiclePropsResponse>): GetVehiclePropsResponse {
1739
+ const message = globalThis.Object.create((this.messagePrototype!));
1740
+ if (value !== undefined)
1741
+ reflectionMergePartial<GetVehiclePropsResponse>(this, message, value);
1742
+ return message;
1743
+ }
1744
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetVehiclePropsResponse): GetVehiclePropsResponse {
1745
+ let message = target ?? this.create(), end = reader.pos + length;
1746
+ while (reader.pos < end) {
1747
+ let [fieldNo, wireType] = reader.tag();
1748
+ switch (fieldNo) {
1749
+ case /* resources.vehicles.props.VehicleProps vehicle_props */ 1:
1750
+ message.vehicleProps = VehicleProps.internalBinaryRead(reader, reader.uint32(), options, message.vehicleProps);
1751
+ break;
1752
+ default:
1753
+ let u = options.readUnknownField;
1754
+ if (u === "throw")
1755
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1756
+ let d = reader.skip(wireType);
1757
+ if (u !== false)
1758
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1759
+ }
1760
+ }
1761
+ return message;
1762
+ }
1763
+ internalBinaryWrite(message: GetVehiclePropsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1764
+ /* resources.vehicles.props.VehicleProps vehicle_props = 1; */
1765
+ if (message.vehicleProps)
1766
+ VehicleProps.internalBinaryWrite(message.vehicleProps, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1767
+ let u = options.writeUnknownFields;
1768
+ if (u !== false)
1769
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1770
+ return writer;
1771
+ }
1772
+ }
1773
+ /**
1774
+ * @generated MessageType for protobuf message services.sync.GetVehiclePropsResponse
1775
+ */
1776
+ export const GetVehiclePropsResponse = new GetVehiclePropsResponse$Type();
1777
+ // @generated message type with reflection information, may provide speed optimized methods
1778
+ class SetVehiclePropsRequest$Type extends MessageType<SetVehiclePropsRequest> {
1779
+ constructor() {
1780
+ super("services.sync.SetVehiclePropsRequest", [
1781
+ { no: 1, name: "vehicle_props", kind: "message", T: () => VehicleProps, options: { "buf.validate.field": { required: true } } },
1782
+ { no: 2, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
1783
+ { no: 3, name: "source_user", kind: "message", T: () => SourceUser }
1784
+ ]);
1785
+ }
1786
+ create(value?: PartialMessage<SetVehiclePropsRequest>): SetVehiclePropsRequest {
1787
+ const message = globalThis.Object.create((this.messagePrototype!));
1788
+ if (value !== undefined)
1789
+ reflectionMergePartial<SetVehiclePropsRequest>(this, message, value);
1790
+ return message;
1791
+ }
1792
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetVehiclePropsRequest): SetVehiclePropsRequest {
1793
+ let message = target ?? this.create(), end = reader.pos + length;
1794
+ while (reader.pos < end) {
1795
+ let [fieldNo, wireType] = reader.tag();
1796
+ switch (fieldNo) {
1797
+ case /* resources.vehicles.props.VehicleProps vehicle_props */ 1:
1798
+ message.vehicleProps = VehicleProps.internalBinaryRead(reader, reader.uint32(), options, message.vehicleProps);
1799
+ break;
1800
+ case /* optional string reason */ 2:
1801
+ message.reason = reader.string();
1802
+ break;
1803
+ case /* optional services.sync.SourceUser source_user */ 3:
1804
+ message.sourceUser = SourceUser.internalBinaryRead(reader, reader.uint32(), options, message.sourceUser);
1805
+ break;
1806
+ default:
1807
+ let u = options.readUnknownField;
1808
+ if (u === "throw")
1809
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1810
+ let d = reader.skip(wireType);
1811
+ if (u !== false)
1812
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1813
+ }
1814
+ }
1815
+ return message;
1816
+ }
1817
+ internalBinaryWrite(message: SetVehiclePropsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1818
+ /* resources.vehicles.props.VehicleProps vehicle_props = 1; */
1819
+ if (message.vehicleProps)
1820
+ VehicleProps.internalBinaryWrite(message.vehicleProps, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1821
+ /* optional string reason = 2; */
1822
+ if (message.reason !== undefined)
1823
+ writer.tag(2, WireType.LengthDelimited).string(message.reason);
1824
+ /* optional services.sync.SourceUser source_user = 3; */
1825
+ if (message.sourceUser)
1826
+ SourceUser.internalBinaryWrite(message.sourceUser, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1827
+ let u = options.writeUnknownFields;
1828
+ if (u !== false)
1829
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1830
+ return writer;
1831
+ }
1832
+ }
1833
+ /**
1834
+ * @generated MessageType for protobuf message services.sync.SetVehiclePropsRequest
1835
+ */
1836
+ export const SetVehiclePropsRequest = new SetVehiclePropsRequest$Type();
1837
+ // @generated message type with reflection information, may provide speed optimized methods
1838
+ class SetVehiclePropsResponse$Type extends MessageType<SetVehiclePropsResponse> {
1839
+ constructor() {
1840
+ super("services.sync.SetVehiclePropsResponse", [
1841
+ { no: 1, name: "vehicle_props", kind: "message", T: () => VehicleProps }
1842
+ ]);
1843
+ }
1844
+ create(value?: PartialMessage<SetVehiclePropsResponse>): SetVehiclePropsResponse {
1845
+ const message = globalThis.Object.create((this.messagePrototype!));
1846
+ if (value !== undefined)
1847
+ reflectionMergePartial<SetVehiclePropsResponse>(this, message, value);
1848
+ return message;
1849
+ }
1850
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetVehiclePropsResponse): SetVehiclePropsResponse {
1851
+ let message = target ?? this.create(), end = reader.pos + length;
1852
+ while (reader.pos < end) {
1853
+ let [fieldNo, wireType] = reader.tag();
1854
+ switch (fieldNo) {
1855
+ case /* resources.vehicles.props.VehicleProps vehicle_props */ 1:
1856
+ message.vehicleProps = VehicleProps.internalBinaryRead(reader, reader.uint32(), options, message.vehicleProps);
1857
+ break;
1858
+ default:
1859
+ let u = options.readUnknownField;
1860
+ if (u === "throw")
1861
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1862
+ let d = reader.skip(wireType);
1863
+ if (u !== false)
1864
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1865
+ }
1866
+ }
1867
+ return message;
1868
+ }
1869
+ internalBinaryWrite(message: SetVehiclePropsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1870
+ /* resources.vehicles.props.VehicleProps vehicle_props = 1; */
1871
+ if (message.vehicleProps)
1872
+ VehicleProps.internalBinaryWrite(message.vehicleProps, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1873
+ let u = options.writeUnknownFields;
1874
+ if (u !== false)
1875
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1876
+ return writer;
1877
+ }
1878
+ }
1879
+ /**
1880
+ * @generated MessageType for protobuf message services.sync.SetVehiclePropsResponse
1881
+ */
1882
+ export const SetVehiclePropsResponse = new SetVehiclePropsResponse$Type();
1883
+ // @generated message type with reflection information, may provide speed optimized methods
1522
1884
  class AddColleagueActivityRequest$Type extends MessageType<AddColleagueActivityRequest> {
1523
1885
  constructor() {
1524
1886
  super("services.sync.AddColleagueActivityRequest", [
1525
- { no: 1, name: "colleague_activity", kind: "message", T: () => ColleagueActivity, options: { "buf.validate.field": { required: true } } }
1887
+ { no: 1, name: "colleague_activity", kind: "message", T: () => ColleagueActivity, options: { "buf.validate.field": { required: true } } },
1888
+ { no: 2, name: "source_user", kind: "message", T: () => SourceUser }
1526
1889
  ]);
1527
1890
  }
1528
1891
  create(value?: PartialMessage<AddColleagueActivityRequest>): AddColleagueActivityRequest {
@@ -1539,6 +1902,9 @@ class AddColleagueActivityRequest$Type extends MessageType<AddColleagueActivityR
1539
1902
  case /* resources.jobs.colleagues.activity.ColleagueActivity colleague_activity */ 1:
1540
1903
  message.colleagueActivity = ColleagueActivity.internalBinaryRead(reader, reader.uint32(), options, message.colleagueActivity);
1541
1904
  break;
1905
+ case /* optional services.sync.SourceUser source_user */ 2:
1906
+ message.sourceUser = SourceUser.internalBinaryRead(reader, reader.uint32(), options, message.sourceUser);
1907
+ break;
1542
1908
  default:
1543
1909
  let u = options.readUnknownField;
1544
1910
  if (u === "throw")
@@ -1554,6 +1920,9 @@ class AddColleagueActivityRequest$Type extends MessageType<AddColleagueActivityR
1554
1920
  /* resources.jobs.colleagues.activity.ColleagueActivity colleague_activity = 1; */
1555
1921
  if (message.colleagueActivity)
1556
1922
  ColleagueActivity.internalBinaryWrite(message.colleagueActivity, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1923
+ /* optional services.sync.SourceUser source_user = 2; */
1924
+ if (message.sourceUser)
1925
+ SourceUser.internalBinaryWrite(message.sourceUser, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1557
1926
  let u = options.writeUnknownFields;
1558
1927
  if (u !== false)
1559
1928
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1568,7 +1937,8 @@ export const AddColleagueActivityRequest = new AddColleagueActivityRequest$Type(
1568
1937
  class AddColleaguePropsRequest$Type extends MessageType<AddColleaguePropsRequest> {
1569
1938
  constructor() {
1570
1939
  super("services.sync.AddColleaguePropsRequest", [
1571
- { no: 1, name: "colleague_props", kind: "message", T: () => ColleagueProps, options: { "buf.validate.field": { required: true } } }
1940
+ { no: 1, name: "colleague_props", kind: "message", T: () => ColleagueProps, options: { "buf.validate.field": { required: true } } },
1941
+ { no: 2, name: "source_user", kind: "message", T: () => SourceUser }
1572
1942
  ]);
1573
1943
  }
1574
1944
  create(value?: PartialMessage<AddColleaguePropsRequest>): AddColleaguePropsRequest {
@@ -1585,6 +1955,9 @@ class AddColleaguePropsRequest$Type extends MessageType<AddColleaguePropsRequest
1585
1955
  case /* resources.sync.activity.ColleagueProps colleague_props */ 1:
1586
1956
  message.colleagueProps = ColleagueProps.internalBinaryRead(reader, reader.uint32(), options, message.colleagueProps);
1587
1957
  break;
1958
+ case /* optional services.sync.SourceUser source_user */ 2:
1959
+ message.sourceUser = SourceUser.internalBinaryRead(reader, reader.uint32(), options, message.sourceUser);
1960
+ break;
1588
1961
  default:
1589
1962
  let u = options.readUnknownField;
1590
1963
  if (u === "throw")
@@ -1600,6 +1973,9 @@ class AddColleaguePropsRequest$Type extends MessageType<AddColleaguePropsRequest
1600
1973
  /* resources.sync.activity.ColleagueProps colleague_props = 1; */
1601
1974
  if (message.colleagueProps)
1602
1975
  ColleagueProps.internalBinaryWrite(message.colleagueProps, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1976
+ /* optional services.sync.SourceUser source_user = 2; */
1977
+ if (message.sourceUser)
1978
+ SourceUser.internalBinaryWrite(message.sourceUser, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1603
1979
  let u = options.writeUnknownFields;
1604
1980
  if (u !== false)
1605
1981
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2694,11 +3070,13 @@ export const DeleteDataResponse = new DeleteDataResponse$Type();
2694
3070
  class StreamRequest$Type extends MessageType<StreamRequest> {
2695
3071
  constructor() {
2696
3072
  super("services.sync.StreamRequest", [
2697
- { no: 1, name: "version", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } }
3073
+ { no: 1, name: "version", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } },
3074
+ { no: 2, name: "sync_state", kind: "message", oneof: "data", T: () => ClientSyncState }
2698
3075
  ]);
2699
3076
  }
2700
3077
  create(value?: PartialMessage<StreamRequest>): StreamRequest {
2701
3078
  const message = globalThis.Object.create((this.messagePrototype!));
3079
+ message.data = { oneofKind: undefined };
2702
3080
  if (value !== undefined)
2703
3081
  reflectionMergePartial<StreamRequest>(this, message, value);
2704
3082
  return message;
@@ -2711,6 +3089,12 @@ class StreamRequest$Type extends MessageType<StreamRequest> {
2711
3089
  case /* optional string version */ 1:
2712
3090
  message.version = reader.string();
2713
3091
  break;
3092
+ case /* services.sync.ClientSyncState sync_state */ 2:
3093
+ message.data = {
3094
+ oneofKind: "syncState",
3095
+ syncState: ClientSyncState.internalBinaryRead(reader, reader.uint32(), options, (message.data as any).syncState)
3096
+ };
3097
+ break;
2714
3098
  default:
2715
3099
  let u = options.readUnknownField;
2716
3100
  if (u === "throw")
@@ -2726,6 +3110,9 @@ class StreamRequest$Type extends MessageType<StreamRequest> {
2726
3110
  /* optional string version = 1; */
2727
3111
  if (message.version !== undefined)
2728
3112
  writer.tag(1, WireType.LengthDelimited).string(message.version);
3113
+ /* services.sync.ClientSyncState sync_state = 2; */
3114
+ if (message.data.oneofKind === "syncState")
3115
+ ClientSyncState.internalBinaryWrite(message.data.syncState, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2729
3116
  let u = options.writeUnknownFields;
2730
3117
  if (u !== false)
2731
3118
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2736,6 +3123,53 @@ class StreamRequest$Type extends MessageType<StreamRequest> {
2736
3123
  * @generated MessageType for protobuf message services.sync.StreamRequest
2737
3124
  */
2738
3125
  export const StreamRequest = new StreamRequest$Type();
3126
+ // @generated message type with reflection information, may provide speed optimized methods
3127
+ class ClientSyncState$Type extends MessageType<ClientSyncState> {
3128
+ constructor() {
3129
+ super("services.sync.ClientSyncState", [
3130
+ { no: 1, name: "tables", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DBSyncTableSyncState, options: { "buf.validate.field": { repeated: { maxItems: "16" } } } }
3131
+ ]);
3132
+ }
3133
+ create(value?: PartialMessage<ClientSyncState>): ClientSyncState {
3134
+ const message = globalThis.Object.create((this.messagePrototype!));
3135
+ message.tables = [];
3136
+ if (value !== undefined)
3137
+ reflectionMergePartial<ClientSyncState>(this, message, value);
3138
+ return message;
3139
+ }
3140
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClientSyncState): ClientSyncState {
3141
+ let message = target ?? this.create(), end = reader.pos + length;
3142
+ while (reader.pos < end) {
3143
+ let [fieldNo, wireType] = reader.tag();
3144
+ switch (fieldNo) {
3145
+ case /* repeated resources.dbsync.DBSyncTableSyncState tables */ 1:
3146
+ message.tables.push(DBSyncTableSyncState.internalBinaryRead(reader, reader.uint32(), options));
3147
+ break;
3148
+ default:
3149
+ let u = options.readUnknownField;
3150
+ if (u === "throw")
3151
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
3152
+ let d = reader.skip(wireType);
3153
+ if (u !== false)
3154
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
3155
+ }
3156
+ }
3157
+ return message;
3158
+ }
3159
+ internalBinaryWrite(message: ClientSyncState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
3160
+ /* repeated resources.dbsync.DBSyncTableSyncState tables = 1; */
3161
+ for (let i = 0; i < message.tables.length; i++)
3162
+ DBSyncTableSyncState.internalBinaryWrite(message.tables[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
3163
+ let u = options.writeUnknownFields;
3164
+ if (u !== false)
3165
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
3166
+ return writer;
3167
+ }
3168
+ }
3169
+ /**
3170
+ * @generated MessageType for protobuf message services.sync.ClientSyncState
3171
+ */
3172
+ export const ClientSyncState = new ClientSyncState$Type();
2739
3173
  /**
2740
3174
  * @generated ServiceType for protobuf service services.sync.SyncService
2741
3175
  */
@@ -2749,6 +3183,8 @@ export const SyncService = new ServiceType("services.sync.SyncService", [
2749
3183
  { name: "AddUserActivity", options: {}, I: AddUserActivityRequest, O: AddActivityResponse },
2750
3184
  { name: "AddUserProps", options: {}, I: AddUserPropsRequest, O: AddActivityResponse },
2751
3185
  { name: "GetUserProps", options: {}, I: GetUserPropsRequest, O: GetUserPropsResponse },
3186
+ { name: "GetVehicleProps", options: {}, I: GetVehiclePropsRequest, O: GetVehiclePropsResponse },
3187
+ { name: "SetVehicleProps", options: {}, I: SetVehiclePropsRequest, O: SetVehiclePropsResponse },
2752
3188
  { name: "AddColleagueActivity", options: {}, I: AddColleagueActivityRequest, O: AddActivityResponse },
2753
3189
  { name: "AddColleagueProps", options: {}, I: AddColleaguePropsRequest, O: AddActivityResponse },
2754
3190
  { name: "AddJobTimeclock", options: {}, I: AddJobTimeclockRequest, O: AddActivityResponse },
@@ -2766,7 +3202,7 @@ export const SyncService = new ServiceType("services.sync.SyncService", [
2766
3202
  { name: "SetLastCharID", options: {}, I: SetLastCharIDRequest, O: SendDataResponse },
2767
3203
  { name: "DeleteUsers", options: {}, I: DeleteUsersRequest, O: DeleteDataResponse },
2768
3204
  { name: "DeleteVehicles", options: {}, I: DeleteVehiclesRequest, O: DeleteDataResponse },
2769
- { name: "Stream", serverStreaming: true, options: {}, I: StreamRequest, O: StreamResponse },
3205
+ { name: "Stream", serverStreaming: true, clientStreaming: true, options: {}, I: StreamRequest, O: StreamResponse },
2770
3206
  { name: "AddActivity", options: {}, I: AddActivityRequest, O: AddActivityResponse },
2771
3207
  { name: "SendData", options: {}, I: SendDataRequest, O: SendDataResponse },
2772
3208
  { name: "DeleteData", options: {}, I: DeleteDataRequest, O: DeleteDataResponse }
@@ -131,7 +131,7 @@ class ListVehiclesRequest$Type extends MessageType<ListVehiclesRequest> {
131
131
  { no: 2, name: "sort", kind: "message", T: () => Sort },
132
132
  { no: 3, name: "license_plate", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } },
133
133
  { no: 4, name: "model", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "32" } } } },
134
- { no: 5, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { items: { int32: { gte: 0 } } } } } },
134
+ { no: 5, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "10", items: { int32: { gte: 0 } } } } } },
135
135
  { no: 6, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
136
136
  { no: 7, name: "wanted", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
137
137
  ]);
@@ -381,7 +381,7 @@ class ListVehicleActivityRequest$Type extends MessageType<ListVehicleActivityReq
381
381
  { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
382
382
  { no: 2, name: "sort", kind: "message", T: () => Sort },
383
383
  { no: 3, name: "plate", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "32" } } } },
384
- { no: 4, name: "types", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.vehicles.activity.VehicleActivityType", VehicleActivityType, "VEHICLE_ACTIVITY_TYPE_"], options: { "buf.validate.field": { repeated: { maxItems: "20", items: { enum: { definedOnly: true } } } } } }
384
+ { no: 4, name: "types", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.vehicles.activity.VehicleActivityType", VehicleActivityType, "VEHICLE_ACTIVITY_TYPE_"], options: { "buf.validate.field": { repeated: { maxItems: "10", items: { enum: { definedOnly: true } } } } } }
385
385
  ]);
386
386
  }
387
387
  create(value?: PartialMessage<ListVehicleActivityRequest>): ListVehicleActivityRequest {