@fivenet-app/gen 2025.9.1 → 2026.4.0

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 (134) hide show
  1. package/README.md +1 -1
  2. package/clients.ts +36 -0
  3. package/codegen/perms/perms.ts +186 -15
  4. package/codegen/sanitizer/sanitizer.ts +34 -1
  5. package/package.json +2 -2
  6. package/perms.ts +140 -8
  7. package/resources/accounts/accounts.ts +98 -31
  8. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +20 -20
  9. package/resources/audit/audit.ts +156 -38
  10. package/resources/calendar/{access.ts → access/access.ts} +30 -30
  11. package/resources/calendar/calendar.ts +17 -477
  12. package/resources/calendar/entries/entries.ts +474 -0
  13. package/resources/centrum/{access.ts → access/access.ts} +22 -22
  14. package/resources/centrum/{dispatchers.ts → dispatchers/dispatchers.ts} +14 -14
  15. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +151 -185
  16. package/resources/centrum/joblist.ts +136 -0
  17. package/resources/centrum/{settings.ts → settings/settings.ts} +70 -70
  18. package/resources/centrum/{units_access.ts → units/access/access.ts} +30 -30
  19. package/resources/centrum/{units.ts → units/units.ts} +131 -51
  20. package/resources/citizens/labels/labels.ts +526 -0
  21. package/resources/{users → citizens/licenses}/licenses.ts +17 -17
  22. package/resources/clientconfig/clientconfig.ts +126 -258
  23. package/resources/collab/collab.ts +4 -16
  24. package/resources/common/content/content.ts +108 -85
  25. package/resources/common/content/diff_activity.ts +267 -0
  26. package/resources/common/i18n.ts +2 -2
  27. package/resources/{common/cron → cron}/cron.ts +43 -43
  28. package/resources/documents/{access.ts → access/access.ts} +29 -52
  29. package/resources/documents/{activity.ts → activity/activity.ts} +171 -123
  30. package/resources/documents/approval/approval.ts +945 -0
  31. package/resources/documents/{category.ts → category/category.ts} +7 -7
  32. package/resources/documents/{comment.ts → comment/comment.ts} +10 -10
  33. package/resources/documents/data/data.ts +303 -0
  34. package/resources/documents/documents.ts +282 -667
  35. package/resources/{common/uuid.ts → documents/forms/forms.ts} +20 -20
  36. package/resources/documents/{pins.ts → pins/pins.ts} +5 -5
  37. package/resources/documents/references/references.ts +187 -0
  38. package/resources/documents/relations/relations.ts +184 -0
  39. package/resources/documents/{requests.ts → requests/requests.ts} +18 -18
  40. package/resources/documents/stamps/stamp.ts +355 -0
  41. package/resources/documents/{templates.ts → templates/templates.ts} +426 -84
  42. package/resources/documents/{workflow.ts → workflow/workflow.ts} +264 -26
  43. package/resources/file/filestore.ts +1 -1
  44. package/resources/{common/grpcws → grpcws}/grpcws.ts +52 -52
  45. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +54 -54
  46. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +17 -28
  47. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +70 -45
  48. package/resources/jobs/{labels.ts → labels/labels.ts} +34 -23
  49. package/resources/jobs/{job_props.ts → props/props.ts} +26 -38
  50. package/resources/jobs/{job_settings.ts → settings/settings.ts} +53 -53
  51. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +17 -17
  52. package/resources/livemap/{heatmap.ts → heatmap/heatmap.ts} +4 -4
  53. package/resources/livemap/{marker_marker.ts → markers/marker_marker.ts} +35 -35
  54. package/resources/livemap/{user_marker.ts → markers/user_marker.ts} +115 -36
  55. package/resources/mailer/{access.ts → access/access.ts} +67 -67
  56. package/resources/mailer/{email.ts → emails/email.ts} +19 -19
  57. package/resources/mailer/{events.ts → events/events.ts} +24 -24
  58. package/resources/mailer/{message.ts → messages/message.ts} +29 -29
  59. package/resources/mailer/{settings.ts → settings/settings.ts} +14 -13
  60. package/resources/mailer/{template.ts → templates/template.ts} +15 -15
  61. package/resources/mailer/{thread.ts → threads/thread.ts} +29 -29
  62. package/resources/notifications/{client_view.ts → clientview/clientview.ts} +22 -22
  63. package/resources/notifications/{events.ts → events/events.ts} +20 -20
  64. package/resources/notifications/notifications.ts +4 -4
  65. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +42 -42
  66. package/resources/permissions/{events.ts → events/events.ts} +7 -7
  67. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +30 -19
  68. package/resources/qualifications/{access.ts → access/access.ts} +19 -19
  69. package/resources/qualifications/{exam.ts → exam/exam.ts} +269 -141
  70. package/resources/qualifications/qualifications.ts +51 -179
  71. package/resources/settings/banner.ts +3 -3
  72. package/resources/settings/config.ts +527 -25
  73. package/resources/{documents/state.ts → settings/data.ts} +41 -20
  74. package/resources/settings/perms.ts +14 -14
  75. package/resources/stats/stats.ts +379 -0
  76. package/resources/sync/{activity.ts → activity/activity.ts} +104 -25
  77. package/resources/sync/{data.ts → data/data.ts} +405 -59
  78. package/resources/userinfo/{user_info.ts → userinfo.ts} +71 -93
  79. package/resources/users/{activity.ts → activity/activity.ts} +242 -101
  80. package/resources/users/{props.ts → props/props.ts} +91 -69
  81. package/resources/users/short/user.ts +184 -0
  82. package/resources/users/{users.ts → user.ts} +266 -195
  83. package/resources/vehicles/{activity.ts → activity/activity.ts} +20 -20
  84. package/resources/vehicles/{props.ts → props/props.ts} +28 -6
  85. package/resources/vehicles/vehicles.ts +20 -8
  86. package/resources/wiki/{access.ts → access/access.ts} +30 -30
  87. package/resources/wiki/{activity.ts → activity/activity.ts} +104 -70
  88. package/resources/wiki/page.ts +39 -15
  89. package/services/auth/auth.client.ts +23 -10
  90. package/services/auth/auth.ts +445 -262
  91. package/services/calendar/calendar.ts +56 -34
  92. package/services/centrum/centrum.ts +127 -127
  93. package/services/citizens/citizens.client.ts +0 -13
  94. package/services/citizens/citizens.ts +44 -134
  95. package/services/citizens/labels.client.ts +77 -0
  96. package/services/citizens/labels.ts +455 -0
  97. package/services/completor/completor.ts +36 -16
  98. package/services/documents/approval.client.ts +188 -0
  99. package/services/documents/approval.ts +1776 -0
  100. package/services/documents/documents.ts +164 -186
  101. package/services/documents/forms.client.ts +51 -0
  102. package/services/documents/forms.ts +232 -0
  103. package/services/documents/stamps.client.ts +77 -0
  104. package/services/documents/stamps.ts +481 -0
  105. package/services/documents/stats.client.ts +38 -0
  106. package/services/documents/stats.ts +245 -0
  107. package/services/jobs/conduct.client.ts +30 -3
  108. package/services/jobs/conduct.ts +159 -33
  109. package/services/jobs/jobs.ts +43 -43
  110. package/services/jobs/stats.client.ts +38 -0
  111. package/services/jobs/stats.ts +207 -0
  112. package/services/jobs/timeclock.ts +39 -39
  113. package/services/livemap/livemap.ts +18 -18
  114. package/services/mailer/mailer.ts +78 -78
  115. package/services/notifications/notifications.ts +35 -35
  116. package/services/qualifications/qualifications.ts +81 -46
  117. package/services/settings/accounts.client.ts +23 -10
  118. package/services/settings/accounts.ts +191 -30
  119. package/services/settings/cron.client.ts +13 -0
  120. package/services/settings/cron.ts +118 -5
  121. package/services/settings/laws.ts +1 -1
  122. package/services/settings/settings.ts +73 -52
  123. package/services/settings/system.client.ts +13 -0
  124. package/services/settings/system.ts +115 -15
  125. package/services/stats/stats.client.ts +7 -7
  126. package/services/stats/stats.ts +24 -24
  127. package/services/sync/sync.client.ts +271 -37
  128. package/services/sync/sync.ts +1525 -421
  129. package/services/vehicles/vehicles.ts +8 -8
  130. package/services/wiki/wiki.ts +8 -8
  131. package/svcs.ts +100 -6
  132. package/resources/centrum/attributes.ts +0 -183
  133. package/resources/documents/signoff.ts +0 -55
  134. package/resources/users/labels.ts +0 -160
@@ -1,5 +1,5 @@
1
1
  // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
- // @generated from protobuf file "resources/centrum/units_access.proto" (package "resources.centrum", syntax proto3)
2
+ // @generated from protobuf file "resources/centrum/units/access/access.proto" (package "resources.centrum.units.access", syntax proto3)
3
3
  // tslint:disable
4
4
  // @ts-nocheck
5
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -11,23 +11,23 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
- import { QualificationShort } from "../qualifications/qualifications";
15
- import { Timestamp } from "../timestamp/timestamp";
14
+ import { QualificationShort } from "../../../qualifications/qualifications";
15
+ import { Timestamp } from "../../../timestamp/timestamp";
16
16
  /**
17
- * @generated from protobuf message resources.centrum.UnitAccess
17
+ * @generated from protobuf message resources.centrum.units.access.UnitAccess
18
18
  */
19
19
  export interface UnitAccess {
20
20
  /**
21
- * @generated from protobuf field: repeated resources.centrum.UnitJobAccess jobs = 1
21
+ * @generated from protobuf field: repeated resources.centrum.units.access.UnitJobAccess jobs = 1
22
22
  */
23
23
  jobs: UnitJobAccess[];
24
24
  /**
25
- * @generated from protobuf field: repeated resources.centrum.UnitQualificationAccess qualifications = 3
25
+ * @generated from protobuf field: repeated resources.centrum.units.access.UnitQualificationAccess qualifications = 3
26
26
  */
27
27
  qualifications: UnitQualificationAccess[];
28
28
  }
29
29
  /**
30
- * @generated from protobuf message resources.centrum.UnitJobAccess
30
+ * @generated from protobuf message resources.centrum.units.access.UnitJobAccess
31
31
  */
32
32
  export interface UnitJobAccess {
33
33
  /**
@@ -59,17 +59,17 @@ export interface UnitJobAccess {
59
59
  */
60
60
  jobGradeLabel?: string;
61
61
  /**
62
- * @generated from protobuf field: resources.centrum.UnitAccessLevel access = 8
62
+ * @generated from protobuf field: resources.centrum.units.access.UnitAccessLevel access = 8
63
63
  */
64
64
  access: UnitAccessLevel;
65
65
  }
66
66
  /**
67
- * @generated from protobuf message resources.centrum.UnitUserAccess
67
+ * @generated from protobuf message resources.centrum.units.access.UnitUserAccess
68
68
  */
69
69
  export interface UnitUserAccess {
70
70
  }
71
71
  /**
72
- * @generated from protobuf message resources.centrum.UnitQualificationAccess
72
+ * @generated from protobuf message resources.centrum.units.access.UnitQualificationAccess
73
73
  */
74
74
  export interface UnitQualificationAccess {
75
75
  /**
@@ -93,12 +93,12 @@ export interface UnitQualificationAccess {
93
93
  */
94
94
  qualification?: QualificationShort;
95
95
  /**
96
- * @generated from protobuf field: resources.centrum.UnitAccessLevel access = 6
96
+ * @generated from protobuf field: resources.centrum.units.access.UnitAccessLevel access = 6
97
97
  */
98
98
  access: UnitAccessLevel;
99
99
  }
100
100
  /**
101
- * @generated from protobuf enum resources.centrum.UnitAccessLevel
101
+ * @generated from protobuf enum resources.centrum.units.access.UnitAccessLevel
102
102
  */
103
103
  export enum UnitAccessLevel {
104
104
  /**
@@ -117,7 +117,7 @@ export enum UnitAccessLevel {
117
117
  // @generated message type with reflection information, may provide speed optimized methods
118
118
  class UnitAccess$Type extends MessageType<UnitAccess> {
119
119
  constructor() {
120
- super("resources.centrum.UnitAccess", [
120
+ super("resources.centrum.units.access.UnitAccess", [
121
121
  { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitJobAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"job_access\"" } },
122
122
  { no: 3, name: "qualifications", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitQualificationAccess, options: { "buf.validate.field": { repeated: { maxItems: "20" } }, "tagger.tags": "alias:\"qualification_access\"" } }
123
123
  ], { "codegen.dbscanner.dbscanner": { enabled: true } });
@@ -135,10 +135,10 @@ class UnitAccess$Type extends MessageType<UnitAccess> {
135
135
  while (reader.pos < end) {
136
136
  let [fieldNo, wireType] = reader.tag();
137
137
  switch (fieldNo) {
138
- case /* repeated resources.centrum.UnitJobAccess jobs */ 1:
138
+ case /* repeated resources.centrum.units.access.UnitJobAccess jobs */ 1:
139
139
  message.jobs.push(UnitJobAccess.internalBinaryRead(reader, reader.uint32(), options));
140
140
  break;
141
- case /* repeated resources.centrum.UnitQualificationAccess qualifications */ 3:
141
+ case /* repeated resources.centrum.units.access.UnitQualificationAccess qualifications */ 3:
142
142
  message.qualifications.push(UnitQualificationAccess.internalBinaryRead(reader, reader.uint32(), options));
143
143
  break;
144
144
  default:
@@ -153,10 +153,10 @@ class UnitAccess$Type extends MessageType<UnitAccess> {
153
153
  return message;
154
154
  }
155
155
  internalBinaryWrite(message: UnitAccess, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
156
- /* repeated resources.centrum.UnitJobAccess jobs = 1; */
156
+ /* repeated resources.centrum.units.access.UnitJobAccess jobs = 1; */
157
157
  for (let i = 0; i < message.jobs.length; i++)
158
158
  UnitJobAccess.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
159
- /* repeated resources.centrum.UnitQualificationAccess qualifications = 3; */
159
+ /* repeated resources.centrum.units.access.UnitQualificationAccess qualifications = 3; */
160
160
  for (let i = 0; i < message.qualifications.length; i++)
161
161
  UnitQualificationAccess.internalBinaryWrite(message.qualifications[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
162
162
  let u = options.writeUnknownFields;
@@ -166,13 +166,13 @@ class UnitAccess$Type extends MessageType<UnitAccess> {
166
166
  }
167
167
  }
168
168
  /**
169
- * @generated MessageType for protobuf message resources.centrum.UnitAccess
169
+ * @generated MessageType for protobuf message resources.centrum.units.access.UnitAccess
170
170
  */
171
171
  export const UnitAccess = new UnitAccess$Type();
172
172
  // @generated message type with reflection information, may provide speed optimized methods
173
173
  class UnitJobAccess$Type extends MessageType<UnitJobAccess> {
174
174
  constructor() {
175
- super("resources.centrum.UnitJobAccess", [
175
+ super("resources.centrum.units.access.UnitJobAccess", [
176
176
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
177
177
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
178
178
  { no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
@@ -180,7 +180,7 @@ class UnitJobAccess$Type extends MessageType<UnitJobAccess> {
180
180
  { no: 5, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
181
181
  { no: 6, name: "minimum_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
182
182
  { no: 7, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
183
- { no: 8, name: "access", kind: "enum", T: () => ["resources.centrum.UnitAccessLevel", UnitAccessLevel, "UNIT_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
183
+ { no: 8, name: "access", kind: "enum", T: () => ["resources.centrum.units.access.UnitAccessLevel", UnitAccessLevel, "UNIT_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
184
184
  ]);
185
185
  }
186
186
  create(value?: PartialMessage<UnitJobAccess>): UnitJobAccess {
@@ -220,7 +220,7 @@ class UnitJobAccess$Type extends MessageType<UnitJobAccess> {
220
220
  case /* optional string job_grade_label */ 7:
221
221
  message.jobGradeLabel = reader.string();
222
222
  break;
223
- case /* resources.centrum.UnitAccessLevel access */ 8:
223
+ case /* resources.centrum.units.access.UnitAccessLevel access */ 8:
224
224
  message.access = reader.int32();
225
225
  break;
226
226
  default:
@@ -256,7 +256,7 @@ class UnitJobAccess$Type extends MessageType<UnitJobAccess> {
256
256
  /* optional string job_grade_label = 7; */
257
257
  if (message.jobGradeLabel !== undefined)
258
258
  writer.tag(7, WireType.LengthDelimited).string(message.jobGradeLabel);
259
- /* resources.centrum.UnitAccessLevel access = 8; */
259
+ /* resources.centrum.units.access.UnitAccessLevel access = 8; */
260
260
  if (message.access !== 0)
261
261
  writer.tag(8, WireType.Varint).int32(message.access);
262
262
  let u = options.writeUnknownFields;
@@ -266,13 +266,13 @@ class UnitJobAccess$Type extends MessageType<UnitJobAccess> {
266
266
  }
267
267
  }
268
268
  /**
269
- * @generated MessageType for protobuf message resources.centrum.UnitJobAccess
269
+ * @generated MessageType for protobuf message resources.centrum.units.access.UnitJobAccess
270
270
  */
271
271
  export const UnitJobAccess = new UnitJobAccess$Type();
272
272
  // @generated message type with reflection information, may provide speed optimized methods
273
273
  class UnitUserAccess$Type extends MessageType<UnitUserAccess> {
274
274
  constructor() {
275
- super("resources.centrum.UnitUserAccess", []);
275
+ super("resources.centrum.units.access.UnitUserAccess", []);
276
276
  }
277
277
  create(value?: PartialMessage<UnitUserAccess>): UnitUserAccess {
278
278
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -304,19 +304,19 @@ class UnitUserAccess$Type extends MessageType<UnitUserAccess> {
304
304
  }
305
305
  }
306
306
  /**
307
- * @generated MessageType for protobuf message resources.centrum.UnitUserAccess
307
+ * @generated MessageType for protobuf message resources.centrum.units.access.UnitUserAccess
308
308
  */
309
309
  export const UnitUserAccess = new UnitUserAccess$Type();
310
310
  // @generated message type with reflection information, may provide speed optimized methods
311
311
  class UnitQualificationAccess$Type extends MessageType<UnitQualificationAccess> {
312
312
  constructor() {
313
- super("resources.centrum.UnitQualificationAccess", [
313
+ super("resources.centrum.units.access.UnitQualificationAccess", [
314
314
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
315
315
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
316
316
  { no: 3, name: "target_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
317
317
  { no: 4, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
318
318
  { no: 5, name: "qualification", kind: "message", T: () => QualificationShort },
319
- { no: 6, name: "access", kind: "enum", T: () => ["resources.centrum.UnitAccessLevel", UnitAccessLevel, "UNIT_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
319
+ { no: 6, name: "access", kind: "enum", T: () => ["resources.centrum.units.access.UnitAccessLevel", UnitAccessLevel, "UNIT_ACCESS_LEVEL_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } }
320
320
  ]);
321
321
  }
322
322
  create(value?: PartialMessage<UnitQualificationAccess>): UnitQualificationAccess {
@@ -349,7 +349,7 @@ class UnitQualificationAccess$Type extends MessageType<UnitQualificationAccess>
349
349
  case /* optional resources.qualifications.QualificationShort qualification */ 5:
350
350
  message.qualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.qualification);
351
351
  break;
352
- case /* resources.centrum.UnitAccessLevel access */ 6:
352
+ case /* resources.centrum.units.access.UnitAccessLevel access */ 6:
353
353
  message.access = reader.int32();
354
354
  break;
355
355
  default:
@@ -379,7 +379,7 @@ class UnitQualificationAccess$Type extends MessageType<UnitQualificationAccess>
379
379
  /* optional resources.qualifications.QualificationShort qualification = 5; */
380
380
  if (message.qualification)
381
381
  QualificationShort.internalBinaryWrite(message.qualification, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
382
- /* resources.centrum.UnitAccessLevel access = 6; */
382
+ /* resources.centrum.units.access.UnitAccessLevel access = 6; */
383
383
  if (message.access !== 0)
384
384
  writer.tag(6, WireType.Varint).int32(message.access);
385
385
  let u = options.writeUnknownFields;
@@ -389,6 +389,6 @@ class UnitQualificationAccess$Type extends MessageType<UnitQualificationAccess>
389
389
  }
390
390
  }
391
391
  /**
392
- * @generated MessageType for protobuf message resources.centrum.UnitQualificationAccess
392
+ * @generated MessageType for protobuf message resources.centrum.units.access.UnitQualificationAccess
393
393
  */
394
394
  export const UnitQualificationAccess = new UnitQualificationAccess$Type();
@@ -1,5 +1,5 @@
1
1
  // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
- // @generated from protobuf file "resources/centrum/units.proto" (package "resources.centrum", syntax proto3)
2
+ // @generated from protobuf file "resources/centrum/units/units.proto" (package "resources.centrum.units", syntax proto3)
3
3
  // tslint:disable
4
4
  // @ts-nocheck
5
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
@@ -11,12 +11,11 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
11
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
12
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
13
13
  import { MessageType } from "@protobuf-ts/runtime";
14
- import { Colleague } from "../jobs/colleagues";
15
- import { UnitAccess } from "./units_access";
16
- import { UnitAttributes } from "./attributes";
17
- import { Timestamp } from "../timestamp/timestamp";
14
+ import { Colleague } from "../../jobs/colleagues/colleagues";
15
+ import { UnitAccess } from "./access/access";
16
+ import { Timestamp } from "../../timestamp/timestamp";
18
17
  /**
19
- * @generated from protobuf message resources.centrum.Unit
18
+ * @generated from protobuf message resources.centrum.units.Unit
20
19
  */
21
20
  export interface Unit {
22
21
  /**
@@ -60,15 +59,15 @@ export interface Unit {
60
59
  */
61
60
  description?: string;
62
61
  /**
63
- * @generated from protobuf field: optional resources.centrum.UnitStatus status = 9
62
+ * @generated from protobuf field: optional resources.centrum.units.UnitStatus status = 9
64
63
  */
65
64
  status?: UnitStatus;
66
65
  /**
67
- * @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 11
66
+ * @generated from protobuf field: repeated resources.centrum.units.UnitAssignment users = 11
68
67
  */
69
68
  users: UnitAssignment[];
70
69
  /**
71
- * @generated from protobuf field: optional resources.centrum.UnitAttributes attributes = 12
70
+ * @generated from protobuf field: optional resources.centrum.units.UnitAttributes attributes = 12
72
71
  */
73
72
  attributes?: UnitAttributes;
74
73
  /**
@@ -76,12 +75,12 @@ export interface Unit {
76
75
  */
77
76
  homePostal?: string;
78
77
  /**
79
- * @generated from protobuf field: resources.centrum.UnitAccess access = 14
78
+ * @generated from protobuf field: resources.centrum.units.access.UnitAccess access = 14
80
79
  */
81
80
  access?: UnitAccess;
82
81
  }
83
82
  /**
84
- * @generated from protobuf message resources.centrum.UnitAssignments
83
+ * @generated from protobuf message resources.centrum.units.UnitAssignments
85
84
  */
86
85
  export interface UnitAssignments {
87
86
  /**
@@ -93,12 +92,12 @@ export interface UnitAssignments {
93
92
  */
94
93
  job: string;
95
94
  /**
96
- * @generated from protobuf field: repeated resources.centrum.UnitAssignment users = 3
95
+ * @generated from protobuf field: repeated resources.centrum.units.UnitAssignment users = 3
97
96
  */
98
97
  users: UnitAssignment[];
99
98
  }
100
99
  /**
101
- * @generated from protobuf message resources.centrum.UnitAssignment
100
+ * @generated from protobuf message resources.centrum.units.UnitAssignment
102
101
  */
103
102
  export interface UnitAssignment {
104
103
  /**
@@ -110,12 +109,12 @@ export interface UnitAssignment {
110
109
  */
111
110
  userId: number;
112
111
  /**
113
- * @generated from protobuf field: optional resources.jobs.Colleague user = 3
112
+ * @generated from protobuf field: optional resources.jobs.colleagues.Colleague user = 3
114
113
  */
115
114
  user?: Colleague;
116
115
  }
117
116
  /**
118
- * @generated from protobuf message resources.centrum.UnitStatus
117
+ * @generated from protobuf message resources.centrum.units.UnitStatus
119
118
  */
120
119
  export interface UnitStatus {
121
120
  /**
@@ -131,11 +130,11 @@ export interface UnitStatus {
131
130
  */
132
131
  unitId: number;
133
132
  /**
134
- * @generated from protobuf field: optional resources.centrum.Unit unit = 4
133
+ * @generated from protobuf field: optional resources.centrum.units.Unit unit = 4
135
134
  */
136
135
  unit?: Unit;
137
136
  /**
138
- * @generated from protobuf field: resources.centrum.StatusUnit status = 5
137
+ * @generated from protobuf field: resources.centrum.units.StatusUnit status = 5
139
138
  */
140
139
  status: StatusUnit;
141
140
  /**
@@ -151,7 +150,7 @@ export interface UnitStatus {
151
150
  */
152
151
  userId?: number;
153
152
  /**
154
- * @generated from protobuf field: optional resources.jobs.Colleague user = 9
153
+ * @generated from protobuf field: optional resources.jobs.colleagues.Colleague user = 9
155
154
  */
156
155
  user?: Colleague;
157
156
  /**
@@ -171,7 +170,7 @@ export interface UnitStatus {
171
170
  */
172
171
  creatorId?: number;
173
172
  /**
174
- * @generated from protobuf field: optional resources.jobs.Colleague creator = 14
173
+ * @generated from protobuf field: optional resources.jobs.colleagues.Colleague creator = 14
175
174
  */
176
175
  creator?: Colleague;
177
176
  /**
@@ -180,7 +179,16 @@ export interface UnitStatus {
180
179
  creatorJob?: string;
181
180
  }
182
181
  /**
183
- * @generated from protobuf enum resources.centrum.StatusUnit
182
+ * @generated from protobuf message resources.centrum.units.UnitAttributes
183
+ */
184
+ export interface UnitAttributes {
185
+ /**
186
+ * @generated from protobuf field: repeated resources.centrum.units.UnitAttribute list = 1
187
+ */
188
+ list: UnitAttribute[];
189
+ }
190
+ /**
191
+ * @generated from protobuf enum resources.centrum.units.StatusUnit
184
192
  */
185
193
  export enum StatusUnit {
186
194
  /**
@@ -216,10 +224,27 @@ export enum StatusUnit {
216
224
  */
217
225
  BUSY = 7
218
226
  }
227
+ /**
228
+ * @generated from protobuf enum resources.centrum.units.UnitAttribute
229
+ */
230
+ export enum UnitAttribute {
231
+ /**
232
+ * @generated from protobuf enum value: UNIT_ATTRIBUTE_UNSPECIFIED = 0;
233
+ */
234
+ UNSPECIFIED = 0,
235
+ /**
236
+ * @generated from protobuf enum value: UNIT_ATTRIBUTE_STATIC = 1;
237
+ */
238
+ STATIC = 1,
239
+ /**
240
+ * @generated from protobuf enum value: UNIT_ATTRIBUTE_NO_DISPATCH_AUTO_ASSIGN = 2;
241
+ */
242
+ NO_DISPATCH_AUTO_ASSIGN = 2
243
+ }
219
244
  // @generated message type with reflection information, may provide speed optimized methods
220
245
  class Unit$Type extends MessageType<Unit> {
221
246
  constructor() {
222
- super("resources.centrum.Unit", [
247
+ super("resources.centrum.units.Unit", [
223
248
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
224
249
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
225
250
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
@@ -227,8 +252,8 @@ class Unit$Type extends MessageType<Unit> {
227
252
  { no: 15, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
228
253
  { no: 5, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "24" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
229
254
  { no: 6, name: "initials", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "2", maxLen: "4" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
230
- { no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
231
- { no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128", suffix: "Icon" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
255
+ { no: 7, name: "color", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { len: "7", pattern: "^#[A-Fa-f0-9]{6}$" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
256
+ { no: 16, name: "icon", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
232
257
  { no: 8, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
233
258
  { no: 9, name: "status", kind: "message", T: () => UnitStatus },
234
259
  { no: 11, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment },
@@ -284,19 +309,19 @@ class Unit$Type extends MessageType<Unit> {
284
309
  case /* optional string description */ 8:
285
310
  message.description = reader.string();
286
311
  break;
287
- case /* optional resources.centrum.UnitStatus status */ 9:
312
+ case /* optional resources.centrum.units.UnitStatus status */ 9:
288
313
  message.status = UnitStatus.internalBinaryRead(reader, reader.uint32(), options, message.status);
289
314
  break;
290
- case /* repeated resources.centrum.UnitAssignment users */ 11:
315
+ case /* repeated resources.centrum.units.UnitAssignment users */ 11:
291
316
  message.users.push(UnitAssignment.internalBinaryRead(reader, reader.uint32(), options));
292
317
  break;
293
- case /* optional resources.centrum.UnitAttributes attributes */ 12:
318
+ case /* optional resources.centrum.units.UnitAttributes attributes */ 12:
294
319
  message.attributes = UnitAttributes.internalBinaryRead(reader, reader.uint32(), options, message.attributes);
295
320
  break;
296
321
  case /* optional string home_postal */ 13:
297
322
  message.homePostal = reader.string();
298
323
  break;
299
- case /* resources.centrum.UnitAccess access */ 14:
324
+ case /* resources.centrum.units.access.UnitAccess access */ 14:
300
325
  message.access = UnitAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
301
326
  break;
302
327
  default:
@@ -335,19 +360,19 @@ class Unit$Type extends MessageType<Unit> {
335
360
  /* optional string description = 8; */
336
361
  if (message.description !== undefined)
337
362
  writer.tag(8, WireType.LengthDelimited).string(message.description);
338
- /* optional resources.centrum.UnitStatus status = 9; */
363
+ /* optional resources.centrum.units.UnitStatus status = 9; */
339
364
  if (message.status)
340
365
  UnitStatus.internalBinaryWrite(message.status, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
341
- /* repeated resources.centrum.UnitAssignment users = 11; */
366
+ /* repeated resources.centrum.units.UnitAssignment users = 11; */
342
367
  for (let i = 0; i < message.users.length; i++)
343
368
  UnitAssignment.internalBinaryWrite(message.users[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
344
- /* optional resources.centrum.UnitAttributes attributes = 12; */
369
+ /* optional resources.centrum.units.UnitAttributes attributes = 12; */
345
370
  if (message.attributes)
346
371
  UnitAttributes.internalBinaryWrite(message.attributes, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
347
372
  /* optional string home_postal = 13; */
348
373
  if (message.homePostal !== undefined)
349
374
  writer.tag(13, WireType.LengthDelimited).string(message.homePostal);
350
- /* resources.centrum.UnitAccess access = 14; */
375
+ /* resources.centrum.units.access.UnitAccess access = 14; */
351
376
  if (message.access)
352
377
  UnitAccess.internalBinaryWrite(message.access, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
353
378
  /* optional string job_label = 15; */
@@ -363,13 +388,13 @@ class Unit$Type extends MessageType<Unit> {
363
388
  }
364
389
  }
365
390
  /**
366
- * @generated MessageType for protobuf message resources.centrum.Unit
391
+ * @generated MessageType for protobuf message resources.centrum.units.Unit
367
392
  */
368
393
  export const Unit = new Unit$Type();
369
394
  // @generated message type with reflection information, may provide speed optimized methods
370
395
  class UnitAssignments$Type extends MessageType<UnitAssignments> {
371
396
  constructor() {
372
- super("resources.centrum.UnitAssignments", [
397
+ super("resources.centrum.units.UnitAssignments", [
373
398
  { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
374
399
  { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
375
400
  { no: 3, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitAssignment }
@@ -395,7 +420,7 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
395
420
  case /* string job */ 2:
396
421
  message.job = reader.string();
397
422
  break;
398
- case /* repeated resources.centrum.UnitAssignment users */ 3:
423
+ case /* repeated resources.centrum.units.UnitAssignment users */ 3:
399
424
  message.users.push(UnitAssignment.internalBinaryRead(reader, reader.uint32(), options));
400
425
  break;
401
426
  default:
@@ -416,7 +441,7 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
416
441
  /* string job = 2; */
417
442
  if (message.job !== "")
418
443
  writer.tag(2, WireType.LengthDelimited).string(message.job);
419
- /* repeated resources.centrum.UnitAssignment users = 3; */
444
+ /* repeated resources.centrum.units.UnitAssignment users = 3; */
420
445
  for (let i = 0; i < message.users.length; i++)
421
446
  UnitAssignment.internalBinaryWrite(message.users[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
422
447
  let u = options.writeUnknownFields;
@@ -426,13 +451,13 @@ class UnitAssignments$Type extends MessageType<UnitAssignments> {
426
451
  }
427
452
  }
428
453
  /**
429
- * @generated MessageType for protobuf message resources.centrum.UnitAssignments
454
+ * @generated MessageType for protobuf message resources.centrum.units.UnitAssignments
430
455
  */
431
456
  export const UnitAssignments = new UnitAssignments$Type();
432
457
  // @generated message type with reflection information, may provide speed optimized methods
433
458
  class UnitAssignment$Type extends MessageType<UnitAssignment> {
434
459
  constructor() {
435
- super("resources.centrum.UnitAssignment", [
460
+ super("resources.centrum.units.UnitAssignment", [
436
461
  { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"unit_id\"" } },
437
462
  { no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } }, "tagger.tags": "sql:\"primary_key\" alias:\"user_id\"" } },
438
463
  { no: 3, name: "user", kind: "message", T: () => Colleague }
@@ -457,7 +482,7 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
457
482
  case /* int32 user_id */ 2:
458
483
  message.userId = reader.int32();
459
484
  break;
460
- case /* optional resources.jobs.Colleague user */ 3:
485
+ case /* optional resources.jobs.colleagues.Colleague user */ 3:
461
486
  message.user = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.user);
462
487
  break;
463
488
  default:
@@ -478,7 +503,7 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
478
503
  /* int32 user_id = 2; */
479
504
  if (message.userId !== 0)
480
505
  writer.tag(2, WireType.Varint).int32(message.userId);
481
- /* optional resources.jobs.Colleague user = 3; */
506
+ /* optional resources.jobs.colleagues.Colleague user = 3; */
482
507
  if (message.user)
483
508
  Colleague.internalBinaryWrite(message.user, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
484
509
  let u = options.writeUnknownFields;
@@ -488,18 +513,18 @@ class UnitAssignment$Type extends MessageType<UnitAssignment> {
488
513
  }
489
514
  }
490
515
  /**
491
- * @generated MessageType for protobuf message resources.centrum.UnitAssignment
516
+ * @generated MessageType for protobuf message resources.centrum.units.UnitAssignment
492
517
  */
493
518
  export const UnitAssignment = new UnitAssignment$Type();
494
519
  // @generated message type with reflection information, may provide speed optimized methods
495
520
  class UnitStatus$Type extends MessageType<UnitStatus> {
496
521
  constructor() {
497
- super("resources.centrum.UnitStatus", [
522
+ super("resources.centrum.units.UnitStatus", [
498
523
  { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
499
524
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
500
525
  { no: 3, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
501
526
  { no: 4, name: "unit", kind: "message", T: () => Unit },
502
- { no: 5, name: "status", kind: "enum", T: () => ["resources.centrum.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
527
+ { no: 5, name: "status", kind: "enum", T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
503
528
  { no: 6, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
504
529
  { no: 7, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
505
530
  { no: 8, name: "user_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
@@ -535,10 +560,10 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
535
560
  case /* int64 unit_id */ 3:
536
561
  message.unitId = reader.int64().toNumber();
537
562
  break;
538
- case /* optional resources.centrum.Unit unit */ 4:
563
+ case /* optional resources.centrum.units.Unit unit */ 4:
539
564
  message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
540
565
  break;
541
- case /* resources.centrum.StatusUnit status */ 5:
566
+ case /* resources.centrum.units.StatusUnit status */ 5:
542
567
  message.status = reader.int32();
543
568
  break;
544
569
  case /* optional string reason */ 6:
@@ -550,7 +575,7 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
550
575
  case /* optional int32 user_id */ 8:
551
576
  message.userId = reader.int32();
552
577
  break;
553
- case /* optional resources.jobs.Colleague user */ 9:
578
+ case /* optional resources.jobs.colleagues.Colleague user */ 9:
554
579
  message.user = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.user);
555
580
  break;
556
581
  case /* optional double x */ 10:
@@ -565,7 +590,7 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
565
590
  case /* optional int32 creator_id */ 13:
566
591
  message.creatorId = reader.int32();
567
592
  break;
568
- case /* optional resources.jobs.Colleague creator */ 14:
593
+ case /* optional resources.jobs.colleagues.Colleague creator */ 14:
569
594
  message.creator = Colleague.internalBinaryRead(reader, reader.uint32(), options, message.creator);
570
595
  break;
571
596
  case /* optional string creator_job */ 15:
@@ -592,10 +617,10 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
592
617
  /* int64 unit_id = 3; */
593
618
  if (message.unitId !== 0)
594
619
  writer.tag(3, WireType.Varint).int64(message.unitId);
595
- /* optional resources.centrum.Unit unit = 4; */
620
+ /* optional resources.centrum.units.Unit unit = 4; */
596
621
  if (message.unit)
597
622
  Unit.internalBinaryWrite(message.unit, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
598
- /* resources.centrum.StatusUnit status = 5; */
623
+ /* resources.centrum.units.StatusUnit status = 5; */
599
624
  if (message.status !== 0)
600
625
  writer.tag(5, WireType.Varint).int32(message.status);
601
626
  /* optional string reason = 6; */
@@ -607,7 +632,7 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
607
632
  /* optional int32 user_id = 8; */
608
633
  if (message.userId !== undefined)
609
634
  writer.tag(8, WireType.Varint).int32(message.userId);
610
- /* optional resources.jobs.Colleague user = 9; */
635
+ /* optional resources.jobs.colleagues.Colleague user = 9; */
611
636
  if (message.user)
612
637
  Colleague.internalBinaryWrite(message.user, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
613
638
  /* optional double x = 10; */
@@ -622,7 +647,7 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
622
647
  /* optional int32 creator_id = 13; */
623
648
  if (message.creatorId !== undefined)
624
649
  writer.tag(13, WireType.Varint).int32(message.creatorId);
625
- /* optional resources.jobs.Colleague creator = 14; */
650
+ /* optional resources.jobs.colleagues.Colleague creator = 14; */
626
651
  if (message.creator)
627
652
  Colleague.internalBinaryWrite(message.creator, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
628
653
  /* optional string creator_job = 15; */
@@ -635,6 +660,61 @@ class UnitStatus$Type extends MessageType<UnitStatus> {
635
660
  }
636
661
  }
637
662
  /**
638
- * @generated MessageType for protobuf message resources.centrum.UnitStatus
663
+ * @generated MessageType for protobuf message resources.centrum.units.UnitStatus
639
664
  */
640
665
  export const UnitStatus = new UnitStatus$Type();
666
+ // @generated message type with reflection information, may provide speed optimized methods
667
+ class UnitAttributes$Type extends MessageType<UnitAttributes> {
668
+ constructor() {
669
+ super("resources.centrum.units.UnitAttributes", [
670
+ { no: 1, name: "list", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.UnitAttribute", UnitAttribute, "UNIT_ATTRIBUTE_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } }
671
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
672
+ }
673
+ create(value?: PartialMessage<UnitAttributes>): UnitAttributes {
674
+ const message = globalThis.Object.create((this.messagePrototype!));
675
+ message.list = [];
676
+ if (value !== undefined)
677
+ reflectionMergePartial<UnitAttributes>(this, message, value);
678
+ return message;
679
+ }
680
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UnitAttributes): UnitAttributes {
681
+ let message = target ?? this.create(), end = reader.pos + length;
682
+ while (reader.pos < end) {
683
+ let [fieldNo, wireType] = reader.tag();
684
+ switch (fieldNo) {
685
+ case /* repeated resources.centrum.units.UnitAttribute list */ 1:
686
+ if (wireType === WireType.LengthDelimited)
687
+ for (let e = reader.int32() + reader.pos; reader.pos < e;)
688
+ message.list.push(reader.int32());
689
+ else
690
+ message.list.push(reader.int32());
691
+ break;
692
+ default:
693
+ let u = options.readUnknownField;
694
+ if (u === "throw")
695
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
696
+ let d = reader.skip(wireType);
697
+ if (u !== false)
698
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
699
+ }
700
+ }
701
+ return message;
702
+ }
703
+ internalBinaryWrite(message: UnitAttributes, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
704
+ /* repeated resources.centrum.units.UnitAttribute list = 1; */
705
+ if (message.list.length) {
706
+ writer.tag(1, WireType.LengthDelimited).fork();
707
+ for (let i = 0; i < message.list.length; i++)
708
+ writer.int32(message.list[i]);
709
+ writer.join();
710
+ }
711
+ let u = options.writeUnknownFields;
712
+ if (u !== false)
713
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
714
+ return writer;
715
+ }
716
+ }
717
+ /**
718
+ * @generated MessageType for protobuf message resources.centrum.units.UnitAttributes
719
+ */
720
+ export const UnitAttributes = new UnitAttributes$Type();