@fivenet-app/gen 2025.5.2 → 2025.9.1

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 (169) hide show
  1. package/buf/validate/validate.ts +11301 -0
  2. package/clients.ts +157 -154
  3. package/codegen/dbscanner/dbscanner.ts +91 -0
  4. package/codegen/perms/perms.ts +208 -0
  5. package/codegen/sanitizer/sanitizer.ts +80 -0
  6. package/google/protobuf/any.ts +4 -3
  7. package/google/protobuf/descriptor.ts +393 -239
  8. package/google/protobuf/duration.ts +4 -3
  9. package/google/protobuf/struct.ts +485 -0
  10. package/google/protobuf/timestamp.ts +4 -3
  11. package/package.json +3 -3
  12. package/perms.ts +85 -159
  13. package/resources/accounts/accounts.ts +26 -25
  14. package/resources/accounts/oauth2.ts +30 -29
  15. package/resources/audit/audit.ts +36 -35
  16. package/resources/calendar/access.ts +49 -48
  17. package/resources/calendar/calendar.ts +122 -126
  18. package/resources/centrum/access.ts +345 -0
  19. package/resources/centrum/attributes.ts +8 -11
  20. package/resources/centrum/dispatchers.ts +149 -0
  21. package/resources/centrum/dispatches.ts +252 -115
  22. package/resources/centrum/settings.ts +384 -34
  23. package/resources/centrum/units.ts +112 -92
  24. package/resources/centrum/units_access.ts +54 -55
  25. package/resources/clientconfig/clientconfig.ts +890 -0
  26. package/resources/collab/collab.ts +817 -0
  27. package/resources/common/content/content.ts +113 -30
  28. package/resources/common/cron/cron.ts +43 -31
  29. package/resources/common/database/database.ts +92 -35
  30. package/resources/common/error.ts +17 -16
  31. package/resources/common/grpcws/grpcws.ts +24 -23
  32. package/resources/common/i18n.ts +20 -24
  33. package/resources/common/id_mapping.ts +69 -0
  34. package/resources/common/tests/objects.ts +4 -3
  35. package/resources/common/uuid.ts +4 -3
  36. package/resources/discord/discord.ts +209 -0
  37. package/resources/documents/access.ts +52 -53
  38. package/resources/documents/activity.ts +235 -58
  39. package/resources/documents/category.ts +20 -27
  40. package/resources/documents/comment.ts +26 -25
  41. package/resources/documents/documents.ts +335 -262
  42. package/resources/documents/pins.ts +127 -0
  43. package/resources/documents/requests.ts +31 -30
  44. package/resources/documents/signoff.ts +55 -0
  45. package/resources/documents/state.ts +69 -0
  46. package/resources/documents/templates.ts +119 -136
  47. package/resources/documents/workflow.ts +35 -24
  48. package/resources/file/file.ts +152 -0
  49. package/{services/settings → resources/file}/filestore.ts +179 -165
  50. package/resources/file/meta.ts +148 -0
  51. package/resources/jobs/activity.ts +39 -42
  52. package/resources/jobs/colleagues.ts +67 -60
  53. package/resources/jobs/conduct.ts +29 -30
  54. package/resources/jobs/job_props.ts +46 -48
  55. package/resources/jobs/job_settings.ts +45 -52
  56. package/resources/jobs/jobs.ts +14 -13
  57. package/resources/jobs/labels.ts +21 -22
  58. package/resources/jobs/timeclock.ts +26 -25
  59. package/resources/laws/laws.ts +40 -49
  60. package/resources/livemap/coords.ts +81 -0
  61. package/resources/livemap/heatmap.ts +93 -0
  62. package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
  63. package/resources/livemap/user_marker.ts +298 -0
  64. package/resources/mailer/access.ts +75 -74
  65. package/resources/mailer/email.ts +24 -27
  66. package/resources/mailer/events.ts +25 -24
  67. package/resources/mailer/message.ts +45 -50
  68. package/resources/mailer/settings.ts +12 -15
  69. package/resources/mailer/template.ts +25 -28
  70. package/resources/mailer/thread.ts +70 -71
  71. package/resources/notifications/client_view.ts +239 -0
  72. package/resources/notifications/events.ts +50 -101
  73. package/resources/notifications/notifications.ts +52 -57
  74. package/resources/permissions/attributes.ts +63 -206
  75. package/resources/permissions/events.ts +149 -0
  76. package/resources/permissions/permissions.ts +103 -34
  77. package/resources/qualifications/access.ts +27 -26
  78. package/resources/qualifications/exam.ts +188 -126
  79. package/resources/qualifications/qualifications.ts +370 -303
  80. package/resources/settings/banner.ts +14 -21
  81. package/resources/settings/config.ts +163 -79
  82. package/resources/settings/perms.ts +151 -0
  83. package/resources/settings/status.ts +533 -0
  84. package/resources/stats/stats.ts +3 -2
  85. package/resources/sync/activity.ts +24 -23
  86. package/resources/sync/data.ts +94 -26
  87. package/resources/timestamp/timestamp.ts +3 -2
  88. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  89. package/resources/userinfo/user_info.ts +464 -0
  90. package/resources/users/activity.ts +80 -85
  91. package/resources/users/labels.ts +18 -21
  92. package/resources/users/licenses.ts +9 -8
  93. package/resources/users/props.ts +61 -51
  94. package/resources/users/users.ts +100 -78
  95. package/resources/vehicles/activity.ts +231 -0
  96. package/resources/vehicles/props.ts +103 -0
  97. package/resources/vehicles/vehicles.ts +28 -15
  98. package/resources/wiki/access.ts +49 -48
  99. package/resources/wiki/activity.ts +133 -51
  100. package/resources/wiki/page.ts +134 -87
  101. package/services/auth/auth.client.ts +24 -27
  102. package/services/auth/auth.ts +222 -195
  103. package/services/calendar/calendar.client.ts +32 -91
  104. package/services/calendar/calendar.ts +110 -109
  105. package/services/centrum/centrum.client.ts +97 -137
  106. package/services/centrum/centrum.ts +701 -298
  107. package/services/citizens/citizens.client.ts +70 -39
  108. package/services/citizens/citizens.ts +183 -93
  109. package/services/completor/completor.client.ts +16 -35
  110. package/services/completor/completor.ts +65 -44
  111. package/services/documents/collab.client.ts +46 -0
  112. package/services/documents/collab.ts +13 -0
  113. package/services/documents/documents.client.ts +88 -217
  114. package/services/documents/documents.ts +490 -508
  115. package/services/filestore/filestore.client.ts +86 -0
  116. package/services/filestore/filestore.ts +262 -0
  117. package/services/jobs/conduct.client.ts +10 -25
  118. package/services/jobs/conduct.ts +36 -35
  119. package/services/jobs/jobs.client.ts +22 -61
  120. package/services/jobs/jobs.ts +108 -91
  121. package/services/jobs/timeclock.client.ts +8 -19
  122. package/services/jobs/timeclock.ts +47 -46
  123. package/services/livemap/livemap.client.ts +8 -19
  124. package/services/livemap/livemap.ts +290 -119
  125. package/services/mailer/mailer.client.ts +44 -127
  126. package/services/mailer/mailer.ts +213 -216
  127. package/services/notifications/notifications.client.ts +65 -0
  128. package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
  129. package/services/qualifications/qualifications.client.ts +46 -91
  130. package/services/qualifications/qualifications.ts +181 -175
  131. package/services/settings/accounts.client.ts +10 -25
  132. package/services/settings/accounts.ts +64 -41
  133. package/services/settings/config.client.ts +6 -13
  134. package/services/settings/config.ts +8 -7
  135. package/services/settings/cron.client.ts +4 -7
  136. package/services/settings/cron.ts +4 -3
  137. package/services/settings/laws.client.ts +10 -25
  138. package/services/settings/laws.ts +29 -28
  139. package/services/settings/settings.client.ts +57 -103
  140. package/services/settings/settings.ts +190 -607
  141. package/services/settings/system.client.ts +90 -0
  142. package/services/settings/system.ts +618 -0
  143. package/services/stats/stats.client.ts +4 -3
  144. package/services/stats/stats.ts +4 -3
  145. package/services/sync/sync.client.ts +16 -15
  146. package/services/sync/sync.ts +82 -52
  147. package/services/vehicles/vehicles.client.ts +17 -7
  148. package/services/vehicles/vehicles.ts +169 -24
  149. package/services/wiki/collab.client.ts +46 -0
  150. package/services/wiki/collab.ts +13 -0
  151. package/services/wiki/wiki.client.ts +28 -37
  152. package/services/wiki/wiki.ts +93 -63
  153. package/svcs.ts +79 -103
  154. package/resources/centrum/disponents.ts +0 -81
  155. package/resources/filestore/file.ts +0 -204
  156. package/resources/internet/access.ts +0 -358
  157. package/resources/internet/ads.ts +0 -257
  158. package/resources/internet/domain.ts +0 -328
  159. package/resources/internet/page.ts +0 -428
  160. package/resources/internet/search.ts +0 -128
  161. package/resources/livemap/tracker.ts +0 -81
  162. package/services/internet/ads.client.ts +0 -41
  163. package/services/internet/ads.ts +0 -145
  164. package/services/internet/domain.client.ts +0 -109
  165. package/services/internet/domain.ts +0 -658
  166. package/services/internet/internet.client.ts +0 -58
  167. package/services/internet/internet.ts +0 -268
  168. package/services/notificator/notificator.client.ts +0 -76
  169. package/services/settings/filestore.client.ts +0 -75
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
2
  // @generated from protobuf file "resources/stats/stats.proto" (package "resources.stats", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -15,7 +16,7 @@ import { MessageType } from "@protobuf-ts/runtime";
15
16
  */
16
17
  export interface Stat {
17
18
  /**
18
- * @generated from protobuf field: optional int32 value = 1;
19
+ * @generated from protobuf field: optional int32 value = 1
19
20
  */
20
21
  value?: number;
21
22
  }
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
2
  // @generated from protobuf file "resources/sync/activity.proto" (package "resources.sync", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -20,19 +21,19 @@ import { UserProps as UserProps$ } from "../users/props";
20
21
  */
21
22
  export interface UserOAuth2Conn {
22
23
  /**
23
- * @generated from protobuf field: string provider_name = 1;
24
+ * @generated from protobuf field: string provider_name = 1
24
25
  */
25
26
  providerName: string;
26
27
  /**
27
- * @generated from protobuf field: string identifier = 2;
28
+ * @generated from protobuf field: string identifier = 2
28
29
  */
29
30
  identifier: string;
30
31
  /**
31
- * @generated from protobuf field: string external_id = 3;
32
+ * @generated from protobuf field: string external_id = 3
32
33
  */
33
34
  externalId: string;
34
35
  /**
35
- * @generated from protobuf field: string username = 4;
36
+ * @generated from protobuf field: string username = 4
36
37
  */
37
38
  username: string;
38
39
  }
@@ -41,11 +42,11 @@ export interface UserOAuth2Conn {
41
42
  */
42
43
  export interface UserProps {
43
44
  /**
44
- * @generated from protobuf field: optional string reason = 1;
45
+ * @generated from protobuf field: optional string reason = 1
45
46
  */
46
47
  reason?: string;
47
48
  /**
48
- * @generated from protobuf field: resources.users.UserProps props = 2;
49
+ * @generated from protobuf field: resources.users.UserProps props = 2
49
50
  */
50
51
  props?: UserProps$;
51
52
  }
@@ -54,11 +55,11 @@ export interface UserProps {
54
55
  */
55
56
  export interface ColleagueProps {
56
57
  /**
57
- * @generated from protobuf field: optional string reason = 1;
58
+ * @generated from protobuf field: optional string reason = 1
58
59
  */
59
60
  reason?: string;
60
61
  /**
61
- * @generated from protobuf field: resources.jobs.ColleagueProps props = 2;
62
+ * @generated from protobuf field: resources.jobs.ColleagueProps props = 2
62
63
  */
63
64
  props?: ColleagueProps$;
64
65
  }
@@ -67,29 +68,29 @@ export interface ColleagueProps {
67
68
  */
68
69
  export interface UserUpdate {
69
70
  /**
70
- * @generated from protobuf field: int32 user_id = 1;
71
+ * @generated from protobuf field: int32 user_id = 1
71
72
  */
72
73
  userId: number;
73
74
  /**
74
- * @generated from protobuf field: optional string group = 2;
75
+ * @generated from protobuf field: optional string group = 2
75
76
  */
76
77
  group?: string;
77
78
  /**
78
79
  * Char details
79
80
  *
80
- * @generated from protobuf field: optional string job = 3;
81
+ * @generated from protobuf field: optional string job = 3
81
82
  */
82
83
  job?: string;
83
84
  /**
84
- * @generated from protobuf field: optional int32 job_grade = 4;
85
+ * @generated from protobuf field: optional int32 job_grade = 4
85
86
  */
86
87
  jobGrade?: number;
87
88
  /**
88
- * @generated from protobuf field: optional string firstname = 5;
89
+ * @generated from protobuf field: optional string firstname = 5
89
90
  */
90
91
  firstname?: string;
91
92
  /**
92
- * @generated from protobuf field: optional string lastname = 6;
93
+ * @generated from protobuf field: optional string lastname = 6
93
94
  */
94
95
  lastname?: string;
95
96
  }
@@ -98,15 +99,15 @@ export interface UserUpdate {
98
99
  */
99
100
  export interface TimeclockUpdate {
100
101
  /**
101
- * @generated from protobuf field: string job = 1;
102
+ * @generated from protobuf field: string job = 1
102
103
  */
103
104
  job: string;
104
105
  /**
105
- * @generated from protobuf field: int32 user_id = 2;
106
+ * @generated from protobuf field: int32 user_id = 2
106
107
  */
107
108
  userId: number;
108
109
  /**
109
- * @generated from protobuf field: bool start = 3;
110
+ * @generated from protobuf field: bool start = 3
110
111
  */
111
112
  start: boolean;
112
113
  }
@@ -185,8 +186,8 @@ export const UserOAuth2Conn = new UserOAuth2Conn$Type();
185
186
  class UserProps$Type extends MessageType<UserProps> {
186
187
  constructor() {
187
188
  super("resources.sync.UserProps", [
188
- { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
189
- { no: 2, name: "props", kind: "message", T: () => UserProps$, options: { "validate.rules": { message: { required: true } } } }
189
+ { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
190
+ { no: 2, name: "props", kind: "message", T: () => UserProps$, options: { "buf.validate.field": { required: true } } }
190
191
  ]);
191
192
  }
192
193
  create(value?: PartialMessage<UserProps>): UserProps {
@@ -238,8 +239,8 @@ export const UserProps = new UserProps$Type();
238
239
  class ColleagueProps$Type extends MessageType<ColleagueProps> {
239
240
  constructor() {
240
241
  super("resources.sync.ColleagueProps", [
241
- { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "255" } } } },
242
- { no: 2, name: "props", kind: "message", T: () => ColleagueProps$, options: { "validate.rules": { message: { required: true } } } }
242
+ { no: 1, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } } } },
243
+ { no: 2, name: "props", kind: "message", T: () => ColleagueProps$, options: { "buf.validate.field": { required: true } } }
243
244
  ]);
244
245
  }
245
246
  create(value?: PartialMessage<ColleagueProps>): ColleagueProps {
@@ -293,7 +294,7 @@ class UserUpdate$Type extends MessageType<UserUpdate> {
293
294
  super("resources.sync.UserUpdate", [
294
295
  { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
295
296
  { no: 2, name: "group", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
296
- { no: 3, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
297
+ { no: 3, name: "job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
297
298
  { no: 4, name: "job_grade", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
298
299
  { no: 5, name: "firstname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
299
300
  { no: 6, name: "lastname", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
2
  // @generated from protobuf file "resources/sync/data.proto" (package "resources.sync", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -10,7 +11,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
10
11
  import type { PartialMessage } from "@protobuf-ts/runtime";
11
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
- import { Coords } from "../livemap/livemap";
14
+ import { Coords } from "../livemap/coords";
14
15
  import { License } from "../users/licenses";
15
16
  import { Vehicle } from "../vehicles/vehicles";
16
17
  import { User } from "../users/users";
@@ -20,7 +21,7 @@ import { Job } from "../jobs/jobs";
20
21
  */
21
22
  export interface DataStatus {
22
23
  /**
23
- * @generated from protobuf field: int64 count = 1;
24
+ * @generated from protobuf field: int64 count = 1
24
25
  */
25
26
  count: number;
26
27
  }
@@ -29,7 +30,7 @@ export interface DataStatus {
29
30
  */
30
31
  export interface DataJobs {
31
32
  /**
32
- * @generated from protobuf field: repeated resources.jobs.Job jobs = 1;
33
+ * @generated from protobuf field: repeated resources.jobs.Job jobs = 1
33
34
  */
34
35
  jobs: Job[];
35
36
  }
@@ -38,7 +39,7 @@ export interface DataJobs {
38
39
  */
39
40
  export interface DataUsers {
40
41
  /**
41
- * @generated from protobuf field: repeated resources.users.User users = 1;
42
+ * @generated from protobuf field: repeated resources.users.User users = 1
42
43
  */
43
44
  users: User[];
44
45
  }
@@ -47,7 +48,7 @@ export interface DataUsers {
47
48
  */
48
49
  export interface DataVehicles {
49
50
  /**
50
- * @generated from protobuf field: repeated resources.vehicles.Vehicle vehicles = 1;
51
+ * @generated from protobuf field: repeated resources.vehicles.Vehicle vehicles = 1
51
52
  */
52
53
  vehicles: Vehicle[];
53
54
  }
@@ -56,7 +57,7 @@ export interface DataVehicles {
56
57
  */
57
58
  export interface DataLicenses {
58
59
  /**
59
- * @generated from protobuf field: repeated resources.users.License licenses = 1;
60
+ * @generated from protobuf field: repeated resources.users.License licenses = 1
60
61
  */
61
62
  licenses: License[];
62
63
  }
@@ -65,11 +66,11 @@ export interface DataLicenses {
65
66
  */
66
67
  export interface DataUserLocations {
67
68
  /**
68
- * @generated from protobuf field: repeated resources.sync.CitizenLocations users = 1;
69
+ * @generated from protobuf field: repeated resources.sync.CitizenLocations users = 1
69
70
  */
70
71
  users: CitizenLocations[];
71
72
  /**
72
- * @generated from protobuf field: optional bool clear_all = 2;
73
+ * @generated from protobuf field: optional bool clear_all = 2
73
74
  */
74
75
  clearAll?: boolean;
75
76
  }
@@ -78,23 +79,23 @@ export interface DataUserLocations {
78
79
  */
79
80
  export interface CitizenLocations {
80
81
  /**
81
- * @generated from protobuf field: string identifier = 1;
82
+ * @generated from protobuf field: string identifier = 1
82
83
  */
83
84
  identifier: string;
84
85
  /**
85
- * @generated from protobuf field: string job = 2;
86
+ * @generated from protobuf field: string job = 2
86
87
  */
87
88
  job: string;
88
89
  /**
89
- * @generated from protobuf field: resources.livemap.Coords coords = 3;
90
+ * @generated from protobuf field: resources.livemap.Coords coords = 3
90
91
  */
91
92
  coords?: Coords;
92
93
  /**
93
- * @generated from protobuf field: bool hidden = 4;
94
+ * @generated from protobuf field: bool hidden = 4
94
95
  */
95
96
  hidden: boolean;
96
97
  /**
97
- * @generated from protobuf field: bool remove = 5;
98
+ * @generated from protobuf field: bool remove = 5
98
99
  */
99
100
  remove: boolean;
100
101
  }
@@ -103,7 +104,7 @@ export interface CitizenLocations {
103
104
  */
104
105
  export interface DeleteUsers {
105
106
  /**
106
- * @generated from protobuf field: repeated int32 user_ids = 1;
107
+ * @generated from protobuf field: repeated int32 user_ids = 1
107
108
  */
108
109
  userIds: number[];
109
110
  }
@@ -112,10 +113,23 @@ export interface DeleteUsers {
112
113
  */
113
114
  export interface DeleteVehicles {
114
115
  /**
115
- * @generated from protobuf field: repeated string plates = 1;
116
+ * @generated from protobuf field: repeated string plates = 1
116
117
  */
117
118
  plates: string[];
118
119
  }
120
+ /**
121
+ * @generated from protobuf message resources.sync.LastCharID
122
+ */
123
+ export interface LastCharID {
124
+ /**
125
+ * @generated from protobuf field: string identifier = 1
126
+ */
127
+ identifier: string;
128
+ /**
129
+ * @generated from protobuf field: optional int32 last_char_id = 2
130
+ */
131
+ lastCharId?: number;
132
+ }
119
133
  // @generated message type with reflection information, may provide speed optimized methods
120
134
  class DataStatus$Type extends MessageType<DataStatus> {
121
135
  constructor() {
@@ -167,7 +181,7 @@ export const DataStatus = new DataStatus$Type();
167
181
  class DataJobs$Type extends MessageType<DataJobs> {
168
182
  constructor() {
169
183
  super("resources.sync.DataJobs", [
170
- { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Job, options: { "validate.rules": { repeated: { maxItems: "200" } } } }
184
+ { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Job, options: { "buf.validate.field": { repeated: { maxItems: "200" } } } }
171
185
  ]);
172
186
  }
173
187
  create(value?: PartialMessage<DataJobs>): DataJobs {
@@ -214,7 +228,7 @@ export const DataJobs = new DataJobs$Type();
214
228
  class DataUsers$Type extends MessageType<DataUsers> {
215
229
  constructor() {
216
230
  super("resources.sync.DataUsers", [
217
- { no: 1, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => User, options: { "validate.rules": { repeated: { maxItems: "500" } } } }
231
+ { no: 1, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => User, options: { "buf.validate.field": { repeated: { maxItems: "500" } } } }
218
232
  ]);
219
233
  }
220
234
  create(value?: PartialMessage<DataUsers>): DataUsers {
@@ -261,7 +275,7 @@ export const DataUsers = new DataUsers$Type();
261
275
  class DataVehicles$Type extends MessageType<DataVehicles> {
262
276
  constructor() {
263
277
  super("resources.sync.DataVehicles", [
264
- { no: 1, name: "vehicles", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Vehicle, options: { "validate.rules": { repeated: { maxItems: "1000" } } } }
278
+ { no: 1, name: "vehicles", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Vehicle, options: { "buf.validate.field": { repeated: { maxItems: "1000" } } } }
265
279
  ]);
266
280
  }
267
281
  create(value?: PartialMessage<DataVehicles>): DataVehicles {
@@ -308,7 +322,7 @@ export const DataVehicles = new DataVehicles$Type();
308
322
  class DataLicenses$Type extends MessageType<DataLicenses> {
309
323
  constructor() {
310
324
  super("resources.sync.DataLicenses", [
311
- { no: 1, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License, options: { "validate.rules": { repeated: { maxItems: "200" } } } }
325
+ { no: 1, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License, options: { "buf.validate.field": { repeated: { maxItems: "200" } } } }
312
326
  ]);
313
327
  }
314
328
  create(value?: PartialMessage<DataLicenses>): DataLicenses {
@@ -355,7 +369,7 @@ export const DataLicenses = new DataLicenses$Type();
355
369
  class DataUserLocations$Type extends MessageType<DataUserLocations> {
356
370
  constructor() {
357
371
  super("resources.sync.DataUserLocations", [
358
- { no: 1, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CitizenLocations, options: { "validate.rules": { repeated: { maxItems: "2000" } } } },
372
+ { no: 1, name: "users", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CitizenLocations, options: { "buf.validate.field": { repeated: { maxItems: "2000" } } } },
359
373
  { no: 2, name: "clear_all", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
360
374
  ]);
361
375
  }
@@ -409,9 +423,9 @@ export const DataUserLocations = new DataUserLocations$Type();
409
423
  class CitizenLocations$Type extends MessageType<CitizenLocations> {
410
424
  constructor() {
411
425
  super("resources.sync.CitizenLocations", [
412
- { no: 1, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "64" } } } },
413
- { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
414
- { no: 3, name: "coords", kind: "message", T: () => Coords, options: { "validate.rules": { message: { required: true } } } },
426
+ { no: 1, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
427
+ { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
428
+ { no: 3, name: "coords", kind: "message", T: () => Coords, options: { "buf.validate.field": { required: true } } },
415
429
  { no: 4, name: "hidden", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
416
430
  { no: 5, name: "remove", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
417
431
  ]);
@@ -487,7 +501,7 @@ export const CitizenLocations = new CitizenLocations$Type();
487
501
  class DeleteUsers$Type extends MessageType<DeleteUsers> {
488
502
  constructor() {
489
503
  super("resources.sync.DeleteUsers", [
490
- { no: 1, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { repeated: { maxItems: "100" } } } }
504
+ { no: 1, name: "user_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "100" } } } }
491
505
  ]);
492
506
  }
493
507
  create(value?: PartialMessage<DeleteUsers>): DeleteUsers {
@@ -542,7 +556,7 @@ export const DeleteUsers = new DeleteUsers$Type();
542
556
  class DeleteVehicles$Type extends MessageType<DeleteVehicles> {
543
557
  constructor() {
544
558
  super("resources.sync.DeleteVehicles", [
545
- { no: 1, name: "plates", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "100" } } } }
559
+ { no: 1, name: "plates", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "100" } } } }
546
560
  ]);
547
561
  }
548
562
  create(value?: PartialMessage<DeleteVehicles>): DeleteVehicles {
@@ -585,3 +599,57 @@ class DeleteVehicles$Type extends MessageType<DeleteVehicles> {
585
599
  * @generated MessageType for protobuf message resources.sync.DeleteVehicles
586
600
  */
587
601
  export const DeleteVehicles = new DeleteVehicles$Type();
602
+ // @generated message type with reflection information, may provide speed optimized methods
603
+ class LastCharID$Type extends MessageType<LastCharID> {
604
+ constructor() {
605
+ super("resources.sync.LastCharID", [
606
+ { no: 1, name: "identifier", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
607
+ { no: 2, name: "last_char_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } }
608
+ ]);
609
+ }
610
+ create(value?: PartialMessage<LastCharID>): LastCharID {
611
+ const message = globalThis.Object.create((this.messagePrototype!));
612
+ message.identifier = "";
613
+ if (value !== undefined)
614
+ reflectionMergePartial<LastCharID>(this, message, value);
615
+ return message;
616
+ }
617
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LastCharID): LastCharID {
618
+ let message = target ?? this.create(), end = reader.pos + length;
619
+ while (reader.pos < end) {
620
+ let [fieldNo, wireType] = reader.tag();
621
+ switch (fieldNo) {
622
+ case /* string identifier */ 1:
623
+ message.identifier = reader.string();
624
+ break;
625
+ case /* optional int32 last_char_id */ 2:
626
+ message.lastCharId = reader.int32();
627
+ break;
628
+ default:
629
+ let u = options.readUnknownField;
630
+ if (u === "throw")
631
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
632
+ let d = reader.skip(wireType);
633
+ if (u !== false)
634
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
635
+ }
636
+ }
637
+ return message;
638
+ }
639
+ internalBinaryWrite(message: LastCharID, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
640
+ /* string identifier = 1; */
641
+ if (message.identifier !== "")
642
+ writer.tag(1, WireType.LengthDelimited).string(message.identifier);
643
+ /* optional int32 last_char_id = 2; */
644
+ if (message.lastCharId !== undefined)
645
+ writer.tag(2, WireType.Varint).int32(message.lastCharId);
646
+ let u = options.writeUnknownFields;
647
+ if (u !== false)
648
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
649
+ return writer;
650
+ }
651
+ }
652
+ /**
653
+ * @generated MessageType for protobuf message resources.sync.LastCharID
654
+ */
655
+ export const LastCharID = new LastCharID$Type();
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
1
+ // @generated by protobuf-ts 2.11.1 with parameter force_server_none,long_type_number,optimize_speed,ts_nocheck
2
2
  // @generated from protobuf file "resources/timestamp/timestamp.proto" (package "resources.timestamp", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  //
5
6
  // Copyright (c) HashiCorp, Inc.
@@ -26,7 +27,7 @@ import { Timestamp as Timestamp$ } from "../../google/protobuf/timestamp";
26
27
  */
27
28
  export interface Timestamp {
28
29
  /**
29
- * @generated from protobuf field: google.protobuf.Timestamp timestamp = 1;
30
+ * @generated from protobuf field: google.protobuf.Timestamp timestamp = 1
30
31
  */
31
32
  timestamp?: Timestamp$;
32
33
  }
@@ -1,5 +1,6 @@
1
- // @generated by protobuf-ts 2.10.0 with parameter optimize_speed,long_type_number,force_server_none
2
- // @generated from protobuf file "resources/centrum/user_unit.proto" (package "resources.centrum", syntax proto3)
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/tracker/mapping.proto" (package "resources.tracker", syntax proto3)
3
+ // tslint:disable
3
4
  // @ts-nocheck
4
5
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
5
6
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
@@ -12,62 +13,61 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
14
  import { Timestamp } from "../timestamp/timestamp";
14
15
  /**
15
- * @generated from protobuf message resources.centrum.UserUnitMapping
16
+ * @generated from protobuf message resources.tracker.UserMapping
16
17
  */
17
- export interface UserUnitMapping {
18
+ export interface UserMapping {
18
19
  /**
19
- * @generated from protobuf field: uint64 unit_id = 1;
20
+ * @generated from protobuf field: int32 user_id = 1
20
21
  */
21
- unitId: number;
22
+ userId: number;
22
23
  /**
23
- * @generated from protobuf field: string job = 2;
24
+ * @generated from protobuf field: optional int64 unit_id = 2
24
25
  */
25
- job: string;
26
+ unitId?: number;
26
27
  /**
27
- * @generated from protobuf field: int32 user_id = 3;
28
+ * @generated from protobuf field: resources.timestamp.Timestamp created_at = 3
28
29
  */
29
- userId: number;
30
+ createdAt?: Timestamp;
30
31
  /**
31
- * @generated from protobuf field: resources.timestamp.Timestamp created_at = 4;
32
+ * @generated from protobuf field: bool hidden = 4
32
33
  */
33
- createdAt?: Timestamp;
34
+ hidden: boolean;
34
35
  }
35
36
  // @generated message type with reflection information, may provide speed optimized methods
36
- class UserUnitMapping$Type extends MessageType<UserUnitMapping> {
37
+ class UserMapping$Type extends MessageType<UserMapping> {
37
38
  constructor() {
38
- super("resources.centrum.UserUnitMapping", [
39
- { no: 1, name: "unit_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
40
- { no: 2, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
41
- { no: 3, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
42
- { no: 4, name: "created_at", kind: "message", T: () => Timestamp }
39
+ super("resources.tracker.UserMapping", [
40
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
41
+ { no: 2, name: "unit_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
42
+ { no: 3, name: "created_at", kind: "message", T: () => Timestamp },
43
+ { no: 4, name: "hidden", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
43
44
  ]);
44
45
  }
45
- create(value?: PartialMessage<UserUnitMapping>): UserUnitMapping {
46
+ create(value?: PartialMessage<UserMapping>): UserMapping {
46
47
  const message = globalThis.Object.create((this.messagePrototype!));
47
- message.unitId = 0;
48
- message.job = "";
49
48
  message.userId = 0;
49
+ message.hidden = false;
50
50
  if (value !== undefined)
51
- reflectionMergePartial<UserUnitMapping>(this, message, value);
51
+ reflectionMergePartial<UserMapping>(this, message, value);
52
52
  return message;
53
53
  }
54
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserUnitMapping): UserUnitMapping {
54
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UserMapping): UserMapping {
55
55
  let message = target ?? this.create(), end = reader.pos + length;
56
56
  while (reader.pos < end) {
57
57
  let [fieldNo, wireType] = reader.tag();
58
58
  switch (fieldNo) {
59
- case /* uint64 unit_id */ 1:
60
- message.unitId = reader.uint64().toNumber();
61
- break;
62
- case /* string job */ 2:
63
- message.job = reader.string();
64
- break;
65
- case /* int32 user_id */ 3:
59
+ case /* int32 user_id */ 1:
66
60
  message.userId = reader.int32();
67
61
  break;
68
- case /* resources.timestamp.Timestamp created_at */ 4:
62
+ case /* optional int64 unit_id */ 2:
63
+ message.unitId = reader.int64().toNumber();
64
+ break;
65
+ case /* resources.timestamp.Timestamp created_at */ 3:
69
66
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
70
67
  break;
68
+ case /* bool hidden */ 4:
69
+ message.hidden = reader.bool();
70
+ break;
71
71
  default:
72
72
  let u = options.readUnknownField;
73
73
  if (u === "throw")
@@ -79,19 +79,19 @@ class UserUnitMapping$Type extends MessageType<UserUnitMapping> {
79
79
  }
80
80
  return message;
81
81
  }
82
- internalBinaryWrite(message: UserUnitMapping, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
83
- /* uint64 unit_id = 1; */
84
- if (message.unitId !== 0)
85
- writer.tag(1, WireType.Varint).uint64(message.unitId);
86
- /* string job = 2; */
87
- if (message.job !== "")
88
- writer.tag(2, WireType.LengthDelimited).string(message.job);
89
- /* int32 user_id = 3; */
82
+ internalBinaryWrite(message: UserMapping, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
83
+ /* int32 user_id = 1; */
90
84
  if (message.userId !== 0)
91
- writer.tag(3, WireType.Varint).int32(message.userId);
92
- /* resources.timestamp.Timestamp created_at = 4; */
85
+ writer.tag(1, WireType.Varint).int32(message.userId);
86
+ /* optional int64 unit_id = 2; */
87
+ if (message.unitId !== undefined)
88
+ writer.tag(2, WireType.Varint).int64(message.unitId);
89
+ /* resources.timestamp.Timestamp created_at = 3; */
93
90
  if (message.createdAt)
94
- Timestamp.internalBinaryWrite(message.createdAt, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
91
+ Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
92
+ /* bool hidden = 4; */
93
+ if (message.hidden !== false)
94
+ writer.tag(4, WireType.Varint).bool(message.hidden);
95
95
  let u = options.writeUnknownFields;
96
96
  if (u !== false)
97
97
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -99,6 +99,6 @@ class UserUnitMapping$Type extends MessageType<UserUnitMapping> {
99
99
  }
100
100
  }
101
101
  /**
102
- * @generated MessageType for protobuf message resources.centrum.UserUnitMapping
102
+ * @generated MessageType for protobuf message resources.tracker.UserMapping
103
103
  */
104
- export const UserUnitMapping = new UserUnitMapping$Type();
104
+ export const UserMapping = new UserMapping$Type();