@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/users/props.proto" (package "resources.users", 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";
@@ -11,7 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
11
12
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
14
  import { Labels } from "./labels";
14
- import { File } from "../filestore/file";
15
+ import { File } from "../file/file";
15
16
  import { JobGrade } from "../jobs/jobs";
16
17
  import { Job } from "../jobs/jobs";
17
18
  import { Timestamp } from "../timestamp/timestamp";
@@ -20,61 +21,63 @@ import { Timestamp } from "../timestamp/timestamp";
20
21
  */
21
22
  export interface UserProps {
22
23
  /**
23
- * @generated from protobuf field: int32 user_id = 1;
24
+ * @generated from protobuf field: int32 user_id = 1
24
25
  */
25
26
  userId: number;
26
27
  /**
27
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 2;
28
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 2
28
29
  */
29
30
  updatedAt?: Timestamp;
30
31
  /**
31
- * @generated from protobuf field: optional bool wanted = 3;
32
+ * @generated from protobuf field: optional bool wanted = 3
32
33
  */
33
34
  wanted?: boolean;
34
35
  /**
35
- * @generated from protobuf field: optional string job_name = 4;
36
+ * @generated from protobuf field: optional string job_name = 4
36
37
  */
37
- jobName?: string; // @gotags: alias:"job"
38
+ jobName?: string;
38
39
  /**
39
- * @generated from protobuf field: optional resources.jobs.Job job = 5;
40
+ * @generated from protobuf field: optional resources.jobs.Job job = 5
40
41
  */
41
42
  job?: Job;
42
43
  /**
43
- * @generated from protobuf field: optional int32 job_grade_number = 6;
44
+ * @generated from protobuf field: optional int32 job_grade_number = 6
44
45
  */
45
- jobGradeNumber?: number; // @gotags: alias:"job_grade"
46
+ jobGradeNumber?: number;
46
47
  /**
47
- * @generated from protobuf field: optional resources.jobs.JobGrade job_grade = 7;
48
+ * @generated from protobuf field: optional resources.jobs.JobGrade job_grade = 7
48
49
  */
49
50
  jobGrade?: JobGrade;
50
51
  /**
51
- * @generated from protobuf field: optional uint32 traffic_infraction_points = 8;
52
+ * @generated from protobuf field: optional uint32 traffic_infraction_points = 8
52
53
  */
53
54
  trafficInfractionPoints?: number;
54
55
  /**
55
- * @generated from protobuf field: optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 13;
56
+ * @generated from protobuf field: optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 9
56
57
  */
57
58
  trafficInfractionPointsUpdatedAt?: Timestamp;
58
59
  /**
59
- * @generated from protobuf field: optional int64 open_fines = 9;
60
+ * @generated from protobuf field: optional int64 open_fines = 10
60
61
  */
61
62
  openFines?: number;
62
63
  /**
63
- * @generated from protobuf field: optional string blood_type = 10;
64
+ * @generated from protobuf field: optional string blood_type = 11
64
65
  */
65
66
  bloodType?: string;
66
67
  /**
67
- * @generated from protobuf field: optional resources.filestore.File mug_shot = 11;
68
+ * @generated from protobuf field: optional int64 mugshot_file_id = 12
68
69
  */
69
- mugShot?: File;
70
+ mugshotFileId?: number;
70
71
  /**
71
- * @generated from protobuf field: optional resources.users.Labels labels = 12;
72
+ * @generated from protobuf field: optional resources.file.File mugshot = 13
73
+ */
74
+ mugshot?: File;
75
+ /**
76
+ * @generated from protobuf field: optional resources.users.Labels labels = 14
72
77
  */
73
78
  labels?: Labels;
74
79
  /**
75
- * @sanitize: method=StripTags
76
- *
77
- * @generated from protobuf field: optional string email = 19;
80
+ * @generated from protobuf field: optional string email = 15
78
81
  */
79
82
  email?: string;
80
83
  }
@@ -82,20 +85,21 @@ export interface UserProps {
82
85
  class UserProps$Type extends MessageType<UserProps> {
83
86
  constructor() {
84
87
  super("resources.users.UserProps", [
85
- { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
88
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
86
89
  { no: 2, name: "updated_at", kind: "message", T: () => Timestamp },
87
90
  { no: 3, name: "wanted", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
88
- { no: 4, name: "job_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
91
+ { no: 4, name: "job_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "tagger.tags": "alias:\"job\"" } },
89
92
  { no: 5, name: "job", kind: "message", T: () => Job },
90
- { no: 6, name: "job_grade_number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
93
+ { no: 6, name: "job_grade_number", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "tagger.tags": "alias:\"job_grade\"" } },
91
94
  { no: 7, name: "job_grade", kind: "message", T: () => JobGrade },
92
95
  { no: 8, name: "traffic_infraction_points", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
93
- { no: 13, name: "traffic_infraction_points_updated_at", kind: "message", T: () => Timestamp },
94
- { no: 9, name: "open_fines", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
95
- { no: 10, name: "blood_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
96
- { no: 11, name: "mug_shot", kind: "message", T: () => File },
97
- { no: 12, name: "labels", kind: "message", T: () => Labels },
98
- { no: 19, name: "email", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "6", maxLen: "80" } } } }
96
+ { no: 9, name: "traffic_infraction_points_updated_at", kind: "message", T: () => Timestamp },
97
+ { no: 10, name: "open_fines", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
98
+ { no: 11, name: "blood_type", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
99
+ { no: 12, name: "mugshot_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
100
+ { no: 13, name: "mugshot", kind: "message", T: () => File, options: { "tagger.tags": "alias:\"mugshot\"" } },
101
+ { no: 14, name: "labels", kind: "message", T: () => Labels },
102
+ { no: 15, name: "email", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "6", maxLen: "80" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
99
103
  ]);
100
104
  }
101
105
  create(value?: PartialMessage<UserProps>): UserProps {
@@ -134,22 +138,25 @@ class UserProps$Type extends MessageType<UserProps> {
134
138
  case /* optional uint32 traffic_infraction_points */ 8:
135
139
  message.trafficInfractionPoints = reader.uint32();
136
140
  break;
137
- case /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at */ 13:
141
+ case /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at */ 9:
138
142
  message.trafficInfractionPointsUpdatedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.trafficInfractionPointsUpdatedAt);
139
143
  break;
140
- case /* optional int64 open_fines */ 9:
144
+ case /* optional int64 open_fines */ 10:
141
145
  message.openFines = reader.int64().toNumber();
142
146
  break;
143
- case /* optional string blood_type */ 10:
147
+ case /* optional string blood_type */ 11:
144
148
  message.bloodType = reader.string();
145
149
  break;
146
- case /* optional resources.filestore.File mug_shot */ 11:
147
- message.mugShot = File.internalBinaryRead(reader, reader.uint32(), options, message.mugShot);
150
+ case /* optional int64 mugshot_file_id */ 12:
151
+ message.mugshotFileId = reader.int64().toNumber();
152
+ break;
153
+ case /* optional resources.file.File mugshot */ 13:
154
+ message.mugshot = File.internalBinaryRead(reader, reader.uint32(), options, message.mugshot);
148
155
  break;
149
- case /* optional resources.users.Labels labels */ 12:
156
+ case /* optional resources.users.Labels labels */ 14:
150
157
  message.labels = Labels.internalBinaryRead(reader, reader.uint32(), options, message.labels);
151
158
  break;
152
- case /* optional string email */ 19:
159
+ case /* optional string email */ 15:
153
160
  message.email = reader.string();
154
161
  break;
155
162
  default:
@@ -188,24 +195,27 @@ class UserProps$Type extends MessageType<UserProps> {
188
195
  /* optional uint32 traffic_infraction_points = 8; */
189
196
  if (message.trafficInfractionPoints !== undefined)
190
197
  writer.tag(8, WireType.Varint).uint32(message.trafficInfractionPoints);
191
- /* optional int64 open_fines = 9; */
198
+ /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 9; */
199
+ if (message.trafficInfractionPointsUpdatedAt)
200
+ Timestamp.internalBinaryWrite(message.trafficInfractionPointsUpdatedAt, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
201
+ /* optional int64 open_fines = 10; */
192
202
  if (message.openFines !== undefined)
193
- writer.tag(9, WireType.Varint).int64(message.openFines);
194
- /* optional string blood_type = 10; */
203
+ writer.tag(10, WireType.Varint).int64(message.openFines);
204
+ /* optional string blood_type = 11; */
195
205
  if (message.bloodType !== undefined)
196
- writer.tag(10, WireType.LengthDelimited).string(message.bloodType);
197
- /* optional resources.filestore.File mug_shot = 11; */
198
- if (message.mugShot)
199
- File.internalBinaryWrite(message.mugShot, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
200
- /* optional resources.users.Labels labels = 12; */
206
+ writer.tag(11, WireType.LengthDelimited).string(message.bloodType);
207
+ /* optional int64 mugshot_file_id = 12; */
208
+ if (message.mugshotFileId !== undefined)
209
+ writer.tag(12, WireType.Varint).int64(message.mugshotFileId);
210
+ /* optional resources.file.File mugshot = 13; */
211
+ if (message.mugshot)
212
+ File.internalBinaryWrite(message.mugshot, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
213
+ /* optional resources.users.Labels labels = 14; */
201
214
  if (message.labels)
202
- Labels.internalBinaryWrite(message.labels, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
203
- /* optional resources.timestamp.Timestamp traffic_infraction_points_updated_at = 13; */
204
- if (message.trafficInfractionPointsUpdatedAt)
205
- Timestamp.internalBinaryWrite(message.trafficInfractionPointsUpdatedAt, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
206
- /* optional string email = 19; */
215
+ Labels.internalBinaryWrite(message.labels, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
216
+ /* optional string email = 15; */
207
217
  if (message.email !== undefined)
208
- writer.tag(19, WireType.LengthDelimited).string(message.email);
218
+ writer.tag(15, WireType.LengthDelimited).string(message.email);
209
219
  let u = options.writeUnknownFields;
210
220
  if (u !== false)
211
221
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -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/users/users.proto" (package "resources.users", 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,130 +13,137 @@ import { reflectionMergePartial } from "@protobuf-ts/runtime";
12
13
  import { MessageType } from "@protobuf-ts/runtime";
13
14
  import { License } from "./licenses";
14
15
  import { UserProps } from "./props";
15
- import { File } from "../filestore/file";
16
16
  /**
17
17
  * @generated from protobuf message resources.users.UserShort
18
18
  */
19
19
  export interface UserShort {
20
20
  /**
21
- * @generated from protobuf field: int32 user_id = 1;
21
+ * @generated from protobuf field: int32 user_id = 1
22
22
  */
23
- userId: number; // @gotags: alias:"id"
23
+ userId: number;
24
24
  /**
25
- * @generated from protobuf field: optional string identifier = 2;
25
+ * @generated from protobuf field: optional string identifier = 2
26
26
  */
27
27
  identifier?: string;
28
28
  /**
29
- * @generated from protobuf field: string job = 3;
29
+ * @generated from protobuf field: string job = 3
30
30
  */
31
31
  job: string;
32
32
  /**
33
- * @generated from protobuf field: optional string job_label = 4;
33
+ * @generated from protobuf field: optional string job_label = 4
34
34
  */
35
35
  jobLabel?: string;
36
36
  /**
37
- * @generated from protobuf field: int32 job_grade = 5;
37
+ * @generated from protobuf field: int32 job_grade = 5
38
38
  */
39
39
  jobGrade: number;
40
40
  /**
41
- * @generated from protobuf field: optional string job_grade_label = 6;
41
+ * @generated from protobuf field: optional string job_grade_label = 6
42
42
  */
43
43
  jobGradeLabel?: string;
44
44
  /**
45
- * @generated from protobuf field: string firstname = 7;
45
+ * @generated from protobuf field: string firstname = 7
46
46
  */
47
47
  firstname: string;
48
48
  /**
49
- * @generated from protobuf field: string lastname = 8;
49
+ * @generated from protobuf field: string lastname = 8
50
50
  */
51
51
  lastname: string;
52
52
  /**
53
- * @generated from protobuf field: string dateofbirth = 9;
53
+ * @generated from protobuf field: string dateofbirth = 9
54
54
  */
55
55
  dateofbirth: string;
56
56
  /**
57
- * @generated from protobuf field: optional string phone_number = 12;
57
+ * @generated from protobuf field: optional string phone_number = 12
58
58
  */
59
59
  phoneNumber?: string;
60
60
  /**
61
- * @generated from protobuf field: optional resources.filestore.File avatar = 17;
61
+ * @generated from protobuf field: optional int64 profile_picture_file_id = 17
62
62
  */
63
- avatar?: File;
63
+ profilePictureFileId?: number;
64
+ /**
65
+ * @generated from protobuf field: optional string profile_picture = 18
66
+ */
67
+ profilePicture?: string;
64
68
  }
65
69
  /**
66
70
  * @generated from protobuf message resources.users.User
67
71
  */
68
72
  export interface User {
69
73
  /**
70
- * @generated from protobuf field: int32 user_id = 1;
74
+ * @generated from protobuf field: int32 user_id = 1
71
75
  */
72
- userId: number; // @gotags: alias:"id"
76
+ userId: number;
73
77
  /**
74
- * @generated from protobuf field: optional string identifier = 2;
78
+ * @generated from protobuf field: optional string identifier = 2
75
79
  */
76
80
  identifier?: string;
77
81
  /**
78
- * @generated from protobuf field: string job = 3;
82
+ * @generated from protobuf field: string job = 3
79
83
  */
80
84
  job: string;
81
85
  /**
82
- * @generated from protobuf field: optional string job_label = 4;
86
+ * @generated from protobuf field: optional string job_label = 4
83
87
  */
84
88
  jobLabel?: string;
85
89
  /**
86
- * @generated from protobuf field: int32 job_grade = 5;
90
+ * @generated from protobuf field: int32 job_grade = 5
87
91
  */
88
92
  jobGrade: number;
89
93
  /**
90
- * @generated from protobuf field: optional string job_grade_label = 6;
94
+ * @generated from protobuf field: optional string job_grade_label = 6
91
95
  */
92
96
  jobGradeLabel?: string;
93
97
  /**
94
- * @generated from protobuf field: string firstname = 7;
98
+ * @generated from protobuf field: string firstname = 7
95
99
  */
96
100
  firstname: string;
97
101
  /**
98
- * @generated from protobuf field: string lastname = 8;
102
+ * @generated from protobuf field: string lastname = 8
99
103
  */
100
104
  lastname: string;
101
105
  /**
102
- * @generated from protobuf field: string dateofbirth = 9;
106
+ * @generated from protobuf field: string dateofbirth = 9
103
107
  */
104
108
  dateofbirth: string;
105
109
  /**
106
- * @generated from protobuf field: optional string sex = 10;
110
+ * @generated from protobuf field: optional string sex = 10
107
111
  */
108
112
  sex?: string;
109
113
  /**
110
- * @generated from protobuf field: optional string height = 11;
114
+ * @generated from protobuf field: optional string height = 11
111
115
  */
112
116
  height?: string;
113
117
  /**
114
- * @generated from protobuf field: optional string phone_number = 12;
118
+ * @generated from protobuf field: optional string phone_number = 12
115
119
  */
116
120
  phoneNumber?: string;
117
121
  /**
118
- * @generated from protobuf field: optional int32 visum = 13;
122
+ * @generated from protobuf field: optional int32 visum = 13
119
123
  */
120
124
  visum?: number;
121
125
  /**
122
- * @generated from protobuf field: optional int32 playtime = 14;
126
+ * @generated from protobuf field: optional int32 playtime = 14
123
127
  */
124
128
  playtime?: number;
125
129
  /**
126
- * @generated from protobuf field: resources.users.UserProps props = 15;
130
+ * @generated from protobuf field: resources.users.UserProps props = 15
131
+ */
132
+ props?: UserProps;
133
+ /**
134
+ * @generated from protobuf field: repeated resources.users.License licenses = 16
127
135
  */
128
- props?: UserProps; // @gotags: alias:"fivenet_user_props"
136
+ licenses: License[];
129
137
  /**
130
- * @generated from protobuf field: repeated resources.users.License licenses = 16;
138
+ * @generated from protobuf field: optional int64 profile_picture_file_id = 17
131
139
  */
132
- licenses: License[]; // @gotags: alias:"user_licenses"
140
+ profilePictureFileId?: number;
133
141
  /**
134
- * @generated from protobuf field: optional resources.filestore.File avatar = 17;
142
+ * @generated from protobuf field: optional string profile_picture = 18
135
143
  */
136
- avatar?: File;
144
+ profilePicture?: string;
137
145
  /**
138
- * @generated from protobuf field: optional string group = 18;
146
+ * @generated from protobuf field: optional string group = 20
139
147
  */
140
148
  group?: string;
141
149
  }
@@ -143,17 +151,18 @@ export interface User {
143
151
  class UserShort$Type extends MessageType<UserShort> {
144
152
  constructor() {
145
153
  super("resources.users.UserShort", [
146
- { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
147
- { no: 2, name: "identifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "64" } } } },
148
- { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
149
- { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
150
- { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: -1 } } } },
151
- { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
152
- { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "50" } } } },
153
- { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "50" } } } },
154
- { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { len: "10" } } } },
155
- { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
156
- { no: 17, name: "avatar", kind: "message", T: () => File }
154
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"id\"" } },
155
+ { no: 2, name: "identifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
156
+ { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "20" } } } },
157
+ { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
158
+ { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", int32: { gte: 0 } } } },
159
+ { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
160
+ { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "50" } } } },
161
+ { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "1", maxLen: "50" } } } },
162
+ { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "10" } } } },
163
+ { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
164
+ { no: 17, name: "profile_picture_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
165
+ { no: 18, name: "profile_picture", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
157
166
  ]);
158
167
  }
159
168
  create(value?: PartialMessage<UserShort>): UserShort {
@@ -203,8 +212,11 @@ class UserShort$Type extends MessageType<UserShort> {
203
212
  case /* optional string phone_number */ 12:
204
213
  message.phoneNumber = reader.string();
205
214
  break;
206
- case /* optional resources.filestore.File avatar */ 17:
207
- message.avatar = File.internalBinaryRead(reader, reader.uint32(), options, message.avatar);
215
+ case /* optional int64 profile_picture_file_id */ 17:
216
+ message.profilePictureFileId = reader.int64().toNumber();
217
+ break;
218
+ case /* optional string profile_picture */ 18:
219
+ message.profilePicture = reader.string();
208
220
  break;
209
221
  default:
210
222
  let u = options.readUnknownField;
@@ -248,9 +260,12 @@ class UserShort$Type extends MessageType<UserShort> {
248
260
  /* optional string phone_number = 12; */
249
261
  if (message.phoneNumber !== undefined)
250
262
  writer.tag(12, WireType.LengthDelimited).string(message.phoneNumber);
251
- /* optional resources.filestore.File avatar = 17; */
252
- if (message.avatar)
253
- File.internalBinaryWrite(message.avatar, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
263
+ /* optional int64 profile_picture_file_id = 17; */
264
+ if (message.profilePictureFileId !== undefined)
265
+ writer.tag(17, WireType.Varint).int64(message.profilePictureFileId);
266
+ /* optional string profile_picture = 18; */
267
+ if (message.profilePicture !== undefined)
268
+ writer.tag(18, WireType.LengthDelimited).string(message.profilePicture);
254
269
  let u = options.writeUnknownFields;
255
270
  if (u !== false)
256
271
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -265,24 +280,25 @@ export const UserShort = new UserShort$Type();
265
280
  class User$Type extends MessageType<User> {
266
281
  constructor() {
267
282
  super("resources.users.User", [
268
- { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
269
- { no: 2, name: "identifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "64" } } } },
270
- { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
271
- { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
272
- { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: -1 } } } },
273
- { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } },
274
- { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "50" } } } },
275
- { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "50" } } } },
276
- { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { len: "10" } } } },
277
- { no: 10, name: "sex", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", maxLen: "2" } } } },
283
+ { no: 1, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } }, "tagger.tags": "alias:\"id\"" } },
284
+ { no: 2, name: "identifier", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
285
+ { no: 3, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "20" } } } },
286
+ { no: 4, name: "job_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
287
+ { no: 5, name: "job_grade", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", int32: { gte: 0 } } } },
288
+ { no: 6, name: "job_grade_label", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } },
289
+ { no: 7, name: "firstname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "50" } } } },
290
+ { no: 8, name: "lastname", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { minLen: "1", maxLen: "50" } } } },
291
+ { no: 9, name: "dateofbirth", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { ignore: "IGNORE_IF_ZERO_VALUE", string: { maxLen: "10" } } } },
292
+ { no: 10, name: "sex", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "1", maxLen: "2" } } } },
278
293
  { no: 11, name: "height", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
279
- { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
280
- { no: 13, name: "visum", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
281
- { no: 14, name: "playtime", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
282
- { no: 15, name: "props", kind: "message", T: () => UserProps },
283
- { no: 16, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License },
284
- { no: 17, name: "avatar", kind: "message", T: () => File },
285
- { no: 18, name: "group", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50" } } } }
294
+ { no: 12, name: "phone_number", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
295
+ { no: 13, name: "visum", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
296
+ { no: 14, name: "playtime", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
297
+ { no: 15, name: "props", kind: "message", T: () => UserProps, options: { "tagger.tags": "alias:\"fivenet_user_props\"" } },
298
+ { no: 16, name: "licenses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => License, options: { "tagger.tags": "alias:\"user_licenses\"" } },
299
+ { no: 17, name: "profile_picture_file_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
300
+ { no: 18, name: "profile_picture", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
301
+ { no: 20, name: "group", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "50" } } } }
286
302
  ]);
287
303
  }
288
304
  create(value?: PartialMessage<User>): User {
@@ -351,10 +367,13 @@ class User$Type extends MessageType<User> {
351
367
  case /* repeated resources.users.License licenses */ 16:
352
368
  message.licenses.push(License.internalBinaryRead(reader, reader.uint32(), options));
353
369
  break;
354
- case /* optional resources.filestore.File avatar */ 17:
355
- message.avatar = File.internalBinaryRead(reader, reader.uint32(), options, message.avatar);
370
+ case /* optional int64 profile_picture_file_id */ 17:
371
+ message.profilePictureFileId = reader.int64().toNumber();
372
+ break;
373
+ case /* optional string profile_picture */ 18:
374
+ message.profilePicture = reader.string();
356
375
  break;
357
- case /* optional string group */ 18:
376
+ case /* optional string group */ 20:
358
377
  message.group = reader.string();
359
378
  break;
360
379
  default:
@@ -417,12 +436,15 @@ class User$Type extends MessageType<User> {
417
436
  /* repeated resources.users.License licenses = 16; */
418
437
  for (let i = 0; i < message.licenses.length; i++)
419
438
  License.internalBinaryWrite(message.licenses[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
420
- /* optional resources.filestore.File avatar = 17; */
421
- if (message.avatar)
422
- File.internalBinaryWrite(message.avatar, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
423
- /* optional string group = 18; */
439
+ /* optional int64 profile_picture_file_id = 17; */
440
+ if (message.profilePictureFileId !== undefined)
441
+ writer.tag(17, WireType.Varint).int64(message.profilePictureFileId);
442
+ /* optional string profile_picture = 18; */
443
+ if (message.profilePicture !== undefined)
444
+ writer.tag(18, WireType.LengthDelimited).string(message.profilePicture);
445
+ /* optional string group = 20; */
424
446
  if (message.group !== undefined)
425
- writer.tag(18, WireType.LengthDelimited).string(message.group);
447
+ writer.tag(20, WireType.LengthDelimited).string(message.group);
426
448
  let u = options.writeUnknownFields;
427
449
  if (u !== false)
428
450
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);