@fivenet-app/gen 2026.8.0 → 2026.10.2

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 (83) hide show
  1. package/LICENSE +201 -0
  2. package/clients.ts +12 -0
  3. package/codegen/perms/perms.ts +331 -2
  4. package/google/protobuf/any.ts +47 -103
  5. package/google/protobuf/descriptor.ts +28 -29
  6. package/google/protobuf/struct.ts +33 -22
  7. package/google/protobuf/timestamp.ts +3 -3
  8. package/package.json +2 -2
  9. package/perms.ts +58 -17
  10. package/resources/calendar/calendar.ts +11 -0
  11. package/resources/calendar/entries/entries.ts +23 -0
  12. package/resources/centrum/dispatches/dispatches.ts +214 -21
  13. package/resources/centrum/units/units.ts +212 -5
  14. package/resources/citizens/labels/access.ts +10 -6
  15. package/resources/cron/cron.ts +44 -3
  16. package/resources/dbsync/state.ts +192 -0
  17. package/resources/documents/stamps/access.ts +25 -0
  18. package/resources/documents/stamps/stamp.ts +0 -21
  19. package/resources/documents/templates/templates.ts +63 -61
  20. package/resources/documents/workflow/workflow.ts +61 -1
  21. package/resources/file/file.ts +3 -3
  22. package/resources/file/filestore.ts +26 -10
  23. package/resources/jobs/colleagues/activity/activity.ts +50 -8
  24. package/resources/jobs/colleagues/colleagues.ts +14 -1
  25. package/resources/jobs/groups/access/access.ts +29 -0
  26. package/resources/jobs/groups/activity.ts +332 -0
  27. package/resources/jobs/groups/group.ts +1666 -0
  28. package/resources/jobs/groups/short/group_member_short.ts +129 -0
  29. package/resources/jobs/job_asset.ts +116 -0
  30. package/resources/jobs/user_selector.ts +170 -0
  31. package/resources/notifications/clientview/clientview.ts +5 -1
  32. package/resources/notifications/events/events.ts +35 -1
  33. package/resources/notifications/notifications.ts +322 -2
  34. package/resources/permissions/attributes/attributes.ts +164 -2
  35. package/resources/permissions/authorization/authorization.ts +86 -0
  36. package/resources/permissions/permissions/permissions.ts +16 -1
  37. package/resources/properties/properties.ts +1648 -0
  38. package/resources/qualifications/activity/activity.ts +328 -0
  39. package/resources/qualifications/exam/exam.ts +108 -4
  40. package/resources/qualifications/qualifications.ts +36 -2
  41. package/resources/settings/config.ts +3 -3
  42. package/resources/settings/status.ts +197 -105
  43. package/resources/sync/activity/activity.ts +4 -4
  44. package/resources/sync/data/data.ts +16 -4
  45. package/resources/users/activity/activity.ts +220 -3
  46. package/resources/users/props/props.ts +13 -1
  47. package/resources/users/user.ts +13 -1
  48. package/resources/vehicles/activity/activity.ts +222 -3
  49. package/resources/vehicles/props/props.ts +13 -1
  50. package/resources/vehicles/vehicles.ts +13 -1
  51. package/services/auth/auth.ts +61 -67
  52. package/services/calendar/calendar.ts +1 -1
  53. package/services/calendar/entries.ts +3 -3
  54. package/services/centrum/centrum.ts +103 -1
  55. package/services/centrum/dispatches.ts +25 -1
  56. package/services/centrum/units.ts +28 -4
  57. package/services/citizens/citizens.client.ts +49 -0
  58. package/services/citizens/citizens.ts +384 -7
  59. package/services/completor/completor.ts +2 -2
  60. package/services/documents/approval.ts +2 -2
  61. package/services/documents/documents.ts +10 -9
  62. package/services/documents/templates.ts +24 -13
  63. package/services/jobs/colleagues.client.ts +34 -8
  64. package/services/jobs/colleagues.ts +289 -75
  65. package/services/jobs/conduct.ts +12 -19
  66. package/services/jobs/groups.client.ts +311 -0
  67. package/services/jobs/groups.ts +3654 -1
  68. package/services/jobs/timeclock.ts +30 -27
  69. package/services/notifications/notifications.client.ts +40 -1
  70. package/services/notifications/notifications.ts +483 -3
  71. package/services/qualifications/qualifications.client.ts +20 -7
  72. package/services/qualifications/qualifications.ts +291 -8
  73. package/services/settings/job_assets.client.ts +105 -0
  74. package/services/settings/job_assets.ts +373 -0
  75. package/services/settings/properties.client.ts +194 -0
  76. package/services/settings/properties.ts +1555 -0
  77. package/services/settings/settings.ts +1 -1
  78. package/services/settings/system.ts +29 -9
  79. package/services/sync/sync.client.ts +69 -33
  80. package/services/sync/sync.ts +557 -18
  81. package/services/vehicles/vehicles.client.ts +52 -0
  82. package/services/vehicles/vehicles.ts +386 -8
  83. package/svcs.ts +87 -1
@@ -5,10 +5,10 @@
5
5
  import { ServiceType } from "@protobuf-ts/runtime-rpc";
6
6
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
7
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
8
+ import { WireType } from "@protobuf-ts/runtime";
8
9
  import type { BinaryReadOptions } from "@protobuf-ts/runtime";
9
10
  import type { IBinaryReader } from "@protobuf-ts/runtime";
10
11
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
- import { WireType } 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";
@@ -18,6 +18,7 @@ import { Timestamp } from "../../resources/timestamp/timestamp";
18
18
  import { TimeclockWeeklyStats } from "../../resources/jobs/timeclock/timeclock";
19
19
  import { TimeclockStats } from "../../resources/jobs/timeclock/timeclock";
20
20
  import { PaginationResponse } from "../../resources/common/database/database";
21
+ import { UserSelector } from "../../resources/jobs/user_selector";
21
22
  import { DateRange } from "../../resources/common/database/database";
22
23
  import { TimeclockMode } from "../../resources/jobs/timeclock/timeclock";
23
24
  import { TimeclockViewMode } from "../../resources/jobs/timeclock/timeclock";
@@ -56,9 +57,9 @@ export interface ListTimeclockRequest {
56
57
  */
57
58
  perDay: boolean;
58
59
  /**
59
- * @generated from protobuf field: repeated int32 user_ids = 7
60
+ * @generated from protobuf field: optional resources.jobs.UserSelector users = 7
60
61
  */
61
- userIds: number[];
62
+ users?: UserSelector;
62
63
  }
63
64
  /**
64
65
  * @generated from protobuf message services.jobs.ListTimeclockResponse
@@ -157,9 +158,9 @@ export interface TimeclockRange {
157
158
  */
158
159
  export interface GetTimeclockStatsRequest {
159
160
  /**
160
- * @generated from protobuf field: optional int32 user_id = 1
161
+ * @generated from protobuf field: optional resources.jobs.UserSelector users = 1
161
162
  */
162
- userId?: number;
163
+ users?: UserSelector;
163
164
  }
164
165
  /**
165
166
  * @generated from protobuf message services.jobs.GetTimeclockStatsResponse
@@ -192,6 +193,10 @@ export interface ListInactiveEmployeesRequest {
192
193
  * @generated from protobuf field: int32 days = 3
193
194
  */
194
195
  days: number;
196
+ /**
197
+ * @generated from protobuf field: optional resources.jobs.UserSelector users = 4
198
+ */
199
+ users?: UserSelector;
195
200
  }
196
201
  /**
197
202
  * @generated from protobuf message services.jobs.ListInactiveEmployeesResponse
@@ -216,7 +221,7 @@ class ListTimeclockRequest$Type extends MessageType<ListTimeclockRequest> {
216
221
  { no: 4, name: "mode", kind: "enum", T: () => ["resources.jobs.timeclock.TimeclockMode", TimeclockMode, "TIMECLOCK_MODE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
217
222
  { no: 5, name: "date", kind: "message", T: () => DateRange },
218
223
  { no: 6, name: "per_day", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
219
- { no: 7, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "15" } } } }
224
+ { no: 7, name: "users", kind: "message", T: () => UserSelector }
220
225
  ]);
221
226
  }
222
227
  create(value?: PartialMessage<ListTimeclockRequest>): ListTimeclockRequest {
@@ -224,7 +229,6 @@ class ListTimeclockRequest$Type extends MessageType<ListTimeclockRequest> {
224
229
  message.userMode = 0;
225
230
  message.mode = 0;
226
231
  message.perDay = false;
227
- message.userIds = [];
228
232
  if (value !== undefined)
229
233
  reflectionMergePartial<ListTimeclockRequest>(this, message, value);
230
234
  return message;
@@ -252,12 +256,8 @@ class ListTimeclockRequest$Type extends MessageType<ListTimeclockRequest> {
252
256
  case /* bool per_day */ 6:
253
257
  message.perDay = reader.bool();
254
258
  break;
255
- case /* repeated int32 user_ids */ 7:
256
- if (wireType === WireType.LengthDelimited)
257
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
258
- message.userIds.push(reader.int32());
259
- else
260
- message.userIds.push(reader.int32());
259
+ case /* optional resources.jobs.UserSelector users */ 7:
260
+ message.users = UserSelector.internalBinaryRead(reader, reader.uint32(), options, message.users);
261
261
  break;
262
262
  default:
263
263
  let u = options.readUnknownField;
@@ -289,13 +289,9 @@ class ListTimeclockRequest$Type extends MessageType<ListTimeclockRequest> {
289
289
  /* bool per_day = 6; */
290
290
  if (message.perDay !== false)
291
291
  writer.tag(6, WireType.Varint).bool(message.perDay);
292
- /* repeated int32 user_ids = 7; */
293
- if (message.userIds.length) {
294
- writer.tag(7, WireType.LengthDelimited).fork();
295
- for (let i = 0; i < message.userIds.length; i++)
296
- writer.int32(message.userIds[i]);
297
- writer.join();
298
- }
292
+ /* optional resources.jobs.UserSelector users = 7; */
293
+ if (message.users)
294
+ UserSelector.internalBinaryWrite(message.users, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
299
295
  let u = options.writeUnknownFields;
300
296
  if (u !== false)
301
297
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -588,7 +584,7 @@ export const TimeclockRange = new TimeclockRange$Type();
588
584
  class GetTimeclockStatsRequest$Type extends MessageType<GetTimeclockStatsRequest> {
589
585
  constructor() {
590
586
  super("services.jobs.GetTimeclockStatsRequest", [
591
- { no: 1, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } }
587
+ { no: 1, name: "users", kind: "message", T: () => UserSelector }
592
588
  ]);
593
589
  }
594
590
  create(value?: PartialMessage<GetTimeclockStatsRequest>): GetTimeclockStatsRequest {
@@ -602,8 +598,8 @@ class GetTimeclockStatsRequest$Type extends MessageType<GetTimeclockStatsRequest
602
598
  while (reader.pos < end) {
603
599
  let [fieldNo, wireType] = reader.tag();
604
600
  switch (fieldNo) {
605
- case /* optional int32 user_id */ 1:
606
- message.userId = reader.int32();
601
+ case /* optional resources.jobs.UserSelector users */ 1:
602
+ message.users = UserSelector.internalBinaryRead(reader, reader.uint32(), options, message.users);
607
603
  break;
608
604
  default:
609
605
  let u = options.readUnknownField;
@@ -617,9 +613,9 @@ class GetTimeclockStatsRequest$Type extends MessageType<GetTimeclockStatsRequest
617
613
  return message;
618
614
  }
619
615
  internalBinaryWrite(message: GetTimeclockStatsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
620
- /* optional int32 user_id = 1; */
621
- if (message.userId !== undefined)
622
- writer.tag(1, WireType.Varint).int32(message.userId);
616
+ /* optional resources.jobs.UserSelector users = 1; */
617
+ if (message.users)
618
+ UserSelector.internalBinaryWrite(message.users, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
623
619
  let u = options.writeUnknownFields;
624
620
  if (u !== false)
625
621
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -690,7 +686,8 @@ class ListInactiveEmployeesRequest$Type extends MessageType<ListInactiveEmployee
690
686
  super("services.jobs.ListInactiveEmployeesRequest", [
691
687
  { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
692
688
  { no: 2, name: "sort", kind: "message", T: () => Sort },
693
- { no: 3, name: "days", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 1 } } } }
689
+ { no: 3, name: "days", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 1 } } } },
690
+ { no: 4, name: "users", kind: "message", T: () => UserSelector }
694
691
  ]);
695
692
  }
696
693
  create(value?: PartialMessage<ListInactiveEmployeesRequest>): ListInactiveEmployeesRequest {
@@ -714,6 +711,9 @@ class ListInactiveEmployeesRequest$Type extends MessageType<ListInactiveEmployee
714
711
  case /* int32 days */ 3:
715
712
  message.days = reader.int32();
716
713
  break;
714
+ case /* optional resources.jobs.UserSelector users */ 4:
715
+ message.users = UserSelector.internalBinaryRead(reader, reader.uint32(), options, message.users);
716
+ break;
717
717
  default:
718
718
  let u = options.readUnknownField;
719
719
  if (u === "throw")
@@ -735,6 +735,9 @@ class ListInactiveEmployeesRequest$Type extends MessageType<ListInactiveEmployee
735
735
  /* int32 days = 3; */
736
736
  if (message.days !== 0)
737
737
  writer.tag(3, WireType.Varint).int32(message.days);
738
+ /* optional resources.jobs.UserSelector users = 4; */
739
+ if (message.users)
740
+ UserSelector.internalBinaryWrite(message.users, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
738
741
  let u = options.writeUnknownFields;
739
742
  if (u !== false)
740
743
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -8,6 +8,12 @@ import { NotificationsService } from "./notifications";
8
8
  import type { StreamResponse } from "./notifications";
9
9
  import type { StreamRequest } from "./notifications";
10
10
  import type { DuplexStreamingCall } from "@protobuf-ts/runtime-rpc";
11
+ import type { UpdateNotificationPreferenceResponse } from "./notifications";
12
+ import type { UpdateNotificationPreferenceRequest } from "./notifications";
13
+ import type { GetNotificationPreferencesResponse } from "./notifications";
14
+ import type { GetNotificationPreferencesRequest } from "./notifications";
15
+ import type { UpdateNotificationStateResponse } from "./notifications";
16
+ import type { UpdateNotificationStateRequest } from "./notifications";
11
17
  import type { MarkNotificationsResponse } from "./notifications";
12
18
  import type { MarkNotificationsRequest } from "./notifications";
13
19
  import { stackIntercept } from "@protobuf-ts/runtime-rpc";
@@ -27,6 +33,18 @@ export interface INotificationsServiceClient {
27
33
  * @generated from protobuf rpc: MarkNotifications
28
34
  */
29
35
  markNotifications(input: MarkNotificationsRequest, options?: RpcOptions): UnaryCall<MarkNotificationsRequest, MarkNotificationsResponse>;
36
+ /**
37
+ * @generated from protobuf rpc: UpdateNotificationState
38
+ */
39
+ updateNotificationState(input: UpdateNotificationStateRequest, options?: RpcOptions): UnaryCall<UpdateNotificationStateRequest, UpdateNotificationStateResponse>;
40
+ /**
41
+ * @generated from protobuf rpc: GetNotificationPreferences
42
+ */
43
+ getNotificationPreferences(input: GetNotificationPreferencesRequest, options?: RpcOptions): UnaryCall<GetNotificationPreferencesRequest, GetNotificationPreferencesResponse>;
44
+ /**
45
+ * @generated from protobuf rpc: UpdateNotificationPreference
46
+ */
47
+ updateNotificationPreference(input: UpdateNotificationPreferenceRequest, options?: RpcOptions): UnaryCall<UpdateNotificationPreferenceRequest, UpdateNotificationPreferenceResponse>;
30
48
  /**
31
49
  * @generated from protobuf rpc: Stream
32
50
  */
@@ -55,11 +73,32 @@ export class NotificationsServiceClient implements INotificationsServiceClient,
55
73
  const method = this.methods[1], opt = this._transport.mergeOptions(options);
56
74
  return stackIntercept<MarkNotificationsRequest, MarkNotificationsResponse>("unary", this._transport, method, opt, input);
57
75
  }
76
+ /**
77
+ * @generated from protobuf rpc: UpdateNotificationState
78
+ */
79
+ updateNotificationState(input: UpdateNotificationStateRequest, options?: RpcOptions): UnaryCall<UpdateNotificationStateRequest, UpdateNotificationStateResponse> {
80
+ const method = this.methods[2], opt = this._transport.mergeOptions(options);
81
+ return stackIntercept<UpdateNotificationStateRequest, UpdateNotificationStateResponse>("unary", this._transport, method, opt, input);
82
+ }
83
+ /**
84
+ * @generated from protobuf rpc: GetNotificationPreferences
85
+ */
86
+ getNotificationPreferences(input: GetNotificationPreferencesRequest, options?: RpcOptions): UnaryCall<GetNotificationPreferencesRequest, GetNotificationPreferencesResponse> {
87
+ const method = this.methods[3], opt = this._transport.mergeOptions(options);
88
+ return stackIntercept<GetNotificationPreferencesRequest, GetNotificationPreferencesResponse>("unary", this._transport, method, opt, input);
89
+ }
90
+ /**
91
+ * @generated from protobuf rpc: UpdateNotificationPreference
92
+ */
93
+ updateNotificationPreference(input: UpdateNotificationPreferenceRequest, options?: RpcOptions): UnaryCall<UpdateNotificationPreferenceRequest, UpdateNotificationPreferenceResponse> {
94
+ const method = this.methods[4], opt = this._transport.mergeOptions(options);
95
+ return stackIntercept<UpdateNotificationPreferenceRequest, UpdateNotificationPreferenceResponse>("unary", this._transport, method, opt, input);
96
+ }
58
97
  /**
59
98
  * @generated from protobuf rpc: Stream
60
99
  */
61
100
  stream(options?: RpcOptions): DuplexStreamingCall<StreamRequest, StreamResponse> {
62
- const method = this.methods[2], opt = this._transport.mergeOptions(options);
101
+ const method = this.methods[5], opt = this._transport.mergeOptions(options);
63
102
  return stackIntercept<StreamRequest, StreamResponse>("duplex", this._transport, method, opt);
64
103
  }
65
104
  }