@fivenet-app/gen 2025.5.3 → 2026.3.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 (195) hide show
  1. package/README.md +1 -1
  2. package/buf/validate/validate.ts +11301 -0
  3. package/clients.ts +193 -154
  4. package/codegen/dbscanner/dbscanner.ts +91 -0
  5. package/codegen/perms/perms.ts +287 -0
  6. package/codegen/sanitizer/sanitizer.ts +113 -0
  7. package/google/protobuf/any.ts +4 -3
  8. package/google/protobuf/descriptor.ts +393 -239
  9. package/google/protobuf/duration.ts +4 -3
  10. package/google/protobuf/struct.ts +485 -0
  11. package/google/protobuf/timestamp.ts +4 -3
  12. package/package.json +3 -3
  13. package/perms.ts +217 -160
  14. package/resources/accounts/accounts.ts +115 -47
  15. package/resources/accounts/{oauth2.ts → oauth2/oauth2.ts} +33 -32
  16. package/resources/audit/audit.ts +172 -53
  17. package/resources/calendar/{access.ts → access/access.ts} +72 -71
  18. package/resources/calendar/calendar.ts +79 -543
  19. package/resources/calendar/entries/entries.ts +474 -0
  20. package/resources/centrum/access/access.ts +345 -0
  21. package/resources/centrum/dispatchers/dispatchers.ts +149 -0
  22. package/resources/centrum/{dispatches.ts → dispatches/dispatches.ts} +267 -164
  23. package/resources/centrum/joblist.ts +136 -0
  24. package/resources/centrum/settings/settings.ts +657 -0
  25. package/resources/centrum/{units_access.ts → units/access/access.ts} +78 -79
  26. package/resources/centrum/{units.ts → units/units.ts} +230 -130
  27. package/resources/clientconfig/clientconfig.ts +1015 -0
  28. package/resources/collab/collab.ts +805 -0
  29. package/resources/common/content/content.ts +169 -63
  30. package/resources/common/content/diff_activity.ts +267 -0
  31. package/resources/common/database/database.ts +92 -35
  32. package/resources/common/error.ts +17 -16
  33. package/resources/common/i18n.ts +20 -24
  34. package/resources/common/id_mapping.ts +69 -0
  35. package/resources/common/tests/objects.ts +4 -3
  36. package/resources/{common/cron → cron}/cron.ts +77 -65
  37. package/resources/discord/discord.ts +209 -0
  38. package/resources/documents/{access.ts → access/access.ts} +75 -76
  39. package/resources/documents/{activity.ts → activity/activity.ts} +349 -124
  40. package/resources/documents/approval/approval.ts +945 -0
  41. package/resources/documents/{category.ts → category/category.ts} +25 -32
  42. package/resources/documents/{comment.ts → comment/comment.ts} +35 -34
  43. package/resources/documents/data/data.ts +303 -0
  44. package/resources/documents/documents.ts +374 -686
  45. package/resources/{common/uuid.ts → documents/forms/forms.ts} +22 -21
  46. package/resources/documents/pins/pins.ts +127 -0
  47. package/resources/documents/references/references.ts +187 -0
  48. package/resources/documents/relations/relations.ts +184 -0
  49. package/resources/documents/{requests.ts → requests/requests.ts} +45 -44
  50. package/resources/documents/stamps/stamp.ts +355 -0
  51. package/resources/documents/{templates.ts → templates/templates.ts} +524 -199
  52. package/resources/documents/workflow/workflow.ts +600 -0
  53. package/resources/file/file.ts +152 -0
  54. package/{services/settings → resources/file}/filestore.ts +179 -165
  55. package/resources/file/meta.ts +148 -0
  56. package/resources/{common/grpcws → grpcws}/grpcws.ts +66 -65
  57. package/resources/jobs/{activity.ts → colleagues/activity/activity.ts} +83 -86
  58. package/resources/jobs/{colleagues.ts → colleagues/colleagues.ts} +76 -80
  59. package/resources/jobs/{conduct.ts → conduct/conduct.ts} +86 -62
  60. package/resources/jobs/jobs.ts +14 -13
  61. package/resources/jobs/{labels.ts → labels/labels.ts} +36 -37
  62. package/resources/jobs/{job_props.ts → props/props.ts} +63 -65
  63. package/resources/jobs/{job_settings.ts → settings/settings.ts} +89 -96
  64. package/resources/jobs/{timeclock.ts → timeclock/timeclock.ts} +42 -41
  65. package/resources/laws/laws.ts +40 -49
  66. package/resources/livemap/coords.ts +81 -0
  67. package/resources/livemap/heatmap/heatmap.ts +93 -0
  68. package/resources/livemap/{livemap.ts → markers/marker_marker.ts} +68 -335
  69. package/resources/livemap/markers/user_marker.ts +377 -0
  70. package/resources/mailer/{access.ts → access/access.ts} +119 -118
  71. package/resources/mailer/{email.ts → emails/email.ts} +38 -41
  72. package/resources/mailer/{events.ts → events/events.ts} +44 -43
  73. package/resources/mailer/{message.ts → messages/message.ts} +69 -74
  74. package/resources/mailer/{settings.ts → settings/settings.ts} +23 -25
  75. package/resources/mailer/{template.ts → templates/template.ts} +37 -40
  76. package/resources/mailer/{thread.ts → threads/thread.ts} +93 -94
  77. package/resources/notifications/clientview/clientview.ts +239 -0
  78. package/resources/notifications/{events.ts → events/events.ts} +67 -130
  79. package/resources/notifications/notifications.ts +55 -60
  80. package/resources/permissions/{attributes.ts → attributes/attributes.ts} +94 -237
  81. package/resources/permissions/events/events.ts +149 -0
  82. package/resources/permissions/{permissions.ts → permissions/permissions.ts} +127 -47
  83. package/resources/qualifications/{access.ts → access/access.ts} +43 -42
  84. package/resources/qualifications/{exam.ts → exam/exam.ts} +419 -229
  85. package/resources/qualifications/qualifications.ts +327 -388
  86. package/resources/settings/banner.ts +14 -21
  87. package/resources/settings/config.ts +663 -79
  88. package/resources/settings/data.ts +90 -0
  89. package/resources/settings/perms.ts +151 -0
  90. package/resources/settings/status.ts +533 -0
  91. package/resources/stats/stats.ts +382 -2
  92. package/resources/sync/{activity.ts → activity/activity.ts} +126 -46
  93. package/resources/sync/data/data.ts +1001 -0
  94. package/resources/sync/data/v2/data.ts +220 -0
  95. package/resources/timestamp/timestamp.ts +3 -2
  96. package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
  97. package/resources/userinfo/userinfo.ts +442 -0
  98. package/resources/users/{activity.ts → activity/activity.ts} +182 -166
  99. package/resources/users/{labels.ts → labels/labels.ts} +27 -30
  100. package/resources/users/{licenses.ts → licenses/licenses.ts} +18 -17
  101. package/resources/users/{props.ts → props/props.ts} +109 -77
  102. package/resources/users/short/user.ts +184 -0
  103. package/resources/users/user.ts +528 -0
  104. package/resources/vehicles/activity/activity.ts +231 -0
  105. package/resources/vehicles/props/props.ts +125 -0
  106. package/resources/vehicles/vehicles.ts +43 -18
  107. package/resources/wiki/{access.ts → access/access.ts} +72 -71
  108. package/resources/wiki/{activity.ts → activity/activity.ts} +218 -102
  109. package/resources/wiki/page.ts +164 -93
  110. package/services/auth/auth.client.ts +45 -35
  111. package/services/auth/auth.ts +498 -288
  112. package/services/calendar/calendar.client.ts +32 -91
  113. package/services/calendar/calendar.ts +157 -134
  114. package/services/centrum/centrum.client.ts +97 -137
  115. package/services/centrum/centrum.ts +755 -352
  116. package/services/citizens/citizens.client.ts +70 -39
  117. package/services/citizens/citizens.ts +226 -112
  118. package/services/completor/completor.client.ts +16 -35
  119. package/services/completor/completor.ts +95 -54
  120. package/services/documents/approval.client.ts +188 -0
  121. package/services/documents/approval.ts +1776 -0
  122. package/services/documents/collab.client.ts +46 -0
  123. package/services/documents/collab.ts +13 -0
  124. package/services/documents/documents.client.ts +88 -217
  125. package/services/documents/documents.ts +579 -619
  126. package/services/documents/forms.client.ts +51 -0
  127. package/services/documents/forms.ts +232 -0
  128. package/services/documents/stamps.client.ts +77 -0
  129. package/services/documents/stamps.ts +481 -0
  130. package/services/documents/stats.client.ts +38 -0
  131. package/services/documents/stats.ts +245 -0
  132. package/services/filestore/filestore.client.ts +86 -0
  133. package/services/filestore/filestore.ts +262 -0
  134. package/services/jobs/conduct.client.ts +40 -28
  135. package/services/jobs/conduct.ts +183 -56
  136. package/services/jobs/jobs.client.ts +22 -61
  137. package/services/jobs/jobs.ts +138 -121
  138. package/services/jobs/stats.client.ts +38 -0
  139. package/services/jobs/stats.ts +207 -0
  140. package/services/jobs/timeclock.client.ts +8 -19
  141. package/services/jobs/timeclock.ts +76 -75
  142. package/services/livemap/livemap.client.ts +8 -19
  143. package/services/livemap/livemap.ts +297 -126
  144. package/services/mailer/mailer.client.ts +44 -127
  145. package/services/mailer/mailer.ts +266 -269
  146. package/services/notifications/notifications.client.ts +65 -0
  147. package/services/{notificator/notificator.ts → notifications/notifications.ts} +126 -83
  148. package/services/qualifications/qualifications.client.ts +46 -91
  149. package/services/qualifications/qualifications.ts +250 -209
  150. package/services/settings/accounts.client.ts +31 -33
  151. package/services/settings/accounts.ts +251 -67
  152. package/services/settings/config.client.ts +6 -13
  153. package/services/settings/config.ts +8 -7
  154. package/services/settings/cron.client.ts +4 -7
  155. package/services/settings/cron.ts +7 -6
  156. package/services/settings/laws.client.ts +10 -25
  157. package/services/settings/laws.ts +30 -29
  158. package/services/settings/settings.client.ts +57 -103
  159. package/services/settings/settings.ts +237 -633
  160. package/services/settings/system.client.ts +103 -0
  161. package/services/settings/system.ts +718 -0
  162. package/services/stats/stats.client.ts +9 -8
  163. package/services/stats/stats.ts +27 -26
  164. package/services/sync/sync.client.ts +16 -15
  165. package/services/sync/sync.ts +174 -97
  166. package/services/sync/v2/sync.client.ts +331 -0
  167. package/services/sync/v2/sync.ts +1766 -0
  168. package/services/vehicles/vehicles.client.ts +17 -7
  169. package/services/vehicles/vehicles.ts +170 -25
  170. package/services/wiki/collab.client.ts +46 -0
  171. package/services/wiki/collab.ts +13 -0
  172. package/services/wiki/wiki.client.ts +28 -37
  173. package/services/wiki/wiki.ts +97 -67
  174. package/svcs.ts +174 -106
  175. package/resources/centrum/attributes.ts +0 -186
  176. package/resources/centrum/disponents.ts +0 -81
  177. package/resources/centrum/settings.ts +0 -307
  178. package/resources/documents/workflow.ts +0 -351
  179. package/resources/filestore/file.ts +0 -204
  180. package/resources/internet/access.ts +0 -358
  181. package/resources/internet/ads.ts +0 -257
  182. package/resources/internet/domain.ts +0 -328
  183. package/resources/internet/page.ts +0 -428
  184. package/resources/internet/search.ts +0 -128
  185. package/resources/livemap/tracker.ts +0 -81
  186. package/resources/sync/data.ts +0 -587
  187. package/resources/users/users.ts +0 -435
  188. package/services/internet/ads.client.ts +0 -41
  189. package/services/internet/ads.ts +0 -145
  190. package/services/internet/domain.client.ts +0 -109
  191. package/services/internet/domain.ts +0 -658
  192. package/services/internet/internet.client.ts +0 -58
  193. package/services/internet/internet.ts +0 -268
  194. package/services/notificator/notificator.client.ts +0 -76
  195. 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/qualifications/qualifications.proto" (package "resources.qualifications", 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,10 +11,12 @@ 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 { Duration } from "../../google/protobuf/duration";
14
- import { ExamQuestions } from "./exam";
15
- import { QualificationAccess } from "./access";
16
- import { UserShort } from "../users/users";
14
+ import { File } from "../file/file";
15
+ import { ExamQuestions } from "./exam/exam";
16
+ import { QualificationExamSettings } from "./exam/exam";
17
+ import { QualificationExamMode } from "./exam/exam";
18
+ import { QualificationAccess } from "./access/access";
19
+ import { UserShort } from "../users/short/user";
17
20
  import { Content } from "../common/content/content";
18
21
  import { Timestamp } from "../timestamp/timestamp";
19
22
  /**
@@ -21,198 +24,196 @@ import { Timestamp } from "../timestamp/timestamp";
21
24
  */
22
25
  export interface Qualification {
23
26
  /**
24
- * @generated from protobuf field: uint64 id = 1;
27
+ * @generated from protobuf field: int64 id = 1
25
28
  */
26
- id: number; // @gotags: sql:"primary_key" alias:"id"
29
+ id: number;
27
30
  /**
28
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
31
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
29
32
  */
30
33
  createdAt?: Timestamp;
31
34
  /**
32
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
35
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
33
36
  */
34
37
  updatedAt?: Timestamp;
35
38
  /**
36
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
39
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
37
40
  */
38
41
  deletedAt?: Timestamp;
39
42
  /**
40
- * @generated from protobuf field: string job = 5;
43
+ * @generated from protobuf field: string job = 5
41
44
  */
42
45
  job: string;
43
46
  /**
44
- * @generated from protobuf field: uint32 weight = 6;
47
+ * @generated from protobuf field: uint32 weight = 6
45
48
  */
46
49
  weight: number;
47
50
  /**
48
- * @generated from protobuf field: bool closed = 7;
51
+ * @generated from protobuf field: bool closed = 7
49
52
  */
50
53
  closed: boolean;
51
54
  /**
52
- * @generated from protobuf field: bool public = 26;
55
+ * @generated from protobuf field: bool draft = 8
56
+ */
57
+ draft: boolean;
58
+ /**
59
+ * @generated from protobuf field: bool public = 9
53
60
  */
54
61
  public: boolean;
55
62
  /**
56
- * @sanitize: method=StripTags
57
- *
58
- * @generated from protobuf field: string abbreviation = 8;
63
+ * @generated from protobuf field: string abbreviation = 10
59
64
  */
60
65
  abbreviation: string;
61
66
  /**
62
- * @sanitize
63
- *
64
- * @generated from protobuf field: string title = 9;
67
+ * @generated from protobuf field: string title = 11
65
68
  */
66
69
  title: string;
67
70
  /**
68
- * @sanitize: method=StripTags
69
- *
70
- * @generated from protobuf field: optional string description = 10;
71
+ * @generated from protobuf field: optional string description = 12
71
72
  */
72
73
  description?: string;
73
74
  /**
74
- * @generated from protobuf field: resources.common.content.Content content = 11;
75
+ * @generated from protobuf field: resources.common.content.Content content = 13
75
76
  */
76
77
  content?: Content;
77
78
  /**
78
- * @generated from protobuf field: optional int32 creator_id = 12;
79
+ * @generated from protobuf field: optional int32 creator_id = 14
79
80
  */
80
81
  creatorId?: number;
81
82
  /**
82
- * @generated from protobuf field: optional resources.users.UserShort creator = 13;
83
+ * @generated from protobuf field: optional resources.users.short.UserShort creator = 15
83
84
  */
84
- creator?: UserShort; // @gotags: alias:"creator"
85
+ creator?: UserShort;
85
86
  /**
86
- * @generated from protobuf field: string creator_job = 14;
87
+ * @generated from protobuf field: string creator_job = 16
87
88
  */
88
89
  creatorJob: string;
89
90
  /**
90
- * @generated from protobuf field: resources.qualifications.QualificationAccess access = 15;
91
+ * @generated from protobuf field: resources.qualifications.access.QualificationAccess access = 17
91
92
  */
92
93
  access?: QualificationAccess;
93
94
  /**
94
- * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 16;
95
+ * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 18
95
96
  */
96
97
  requirements: QualificationRequirement[];
97
98
  /**
98
- * @generated from protobuf field: bool discord_sync_enabled = 17;
99
+ * @generated from protobuf field: bool discord_sync_enabled = 19
99
100
  */
100
101
  discordSyncEnabled: boolean;
101
102
  /**
102
- * @generated from protobuf field: optional resources.qualifications.QualificationDiscordSettings discord_settings = 18;
103
+ * @generated from protobuf field: optional resources.qualifications.QualificationDiscordSettings discord_settings = 20
103
104
  */
104
105
  discordSettings?: QualificationDiscordSettings;
105
106
  /**
106
- * @generated from protobuf field: resources.qualifications.QualificationExamMode exam_mode = 19;
107
+ * @generated from protobuf field: resources.qualifications.exam.QualificationExamMode exam_mode = 21
107
108
  */
108
109
  examMode: QualificationExamMode;
109
110
  /**
110
- * @generated from protobuf field: optional resources.qualifications.QualificationExamSettings exam_settings = 20;
111
+ * @generated from protobuf field: optional resources.qualifications.exam.QualificationExamSettings exam_settings = 22
111
112
  */
112
113
  examSettings?: QualificationExamSettings;
113
114
  /**
114
- * @generated from protobuf field: optional resources.qualifications.ExamQuestions exam = 21;
115
+ * @generated from protobuf field: optional resources.qualifications.exam.ExamQuestions exam = 23
115
116
  */
116
117
  exam?: ExamQuestions;
117
118
  /**
118
- * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 22;
119
+ * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 24
119
120
  */
120
121
  result?: QualificationResult;
121
122
  /**
122
- * @generated from protobuf field: optional resources.qualifications.QualificationRequest request = 23;
123
+ * @generated from protobuf field: optional resources.qualifications.QualificationRequest request = 25
123
124
  */
124
125
  request?: QualificationRequest;
125
126
  /**
126
- * @generated from protobuf field: bool label_sync_enabled = 24;
127
+ * @generated from protobuf field: bool label_sync_enabled = 26
127
128
  */
128
129
  labelSyncEnabled: boolean;
129
130
  /**
130
- * @sanitize: method=StripTags
131
- *
132
- * @generated from protobuf field: optional string label_sync_format = 25;
131
+ * @generated from protobuf field: optional string label_sync_format = 27
133
132
  */
134
133
  labelSyncFormat?: string;
134
+ /**
135
+ * @generated from protobuf field: repeated resources.file.File files = 28
136
+ */
137
+ files: File[];
135
138
  }
136
139
  /**
137
140
  * @generated from protobuf message resources.qualifications.QualificationShort
138
141
  */
139
142
  export interface QualificationShort {
140
143
  /**
141
- * @generated from protobuf field: uint64 id = 1;
144
+ * @generated from protobuf field: int64 id = 1
142
145
  */
143
- id: number; // @gotags: sql:"primary_key" alias:"id"
146
+ id: number;
144
147
  /**
145
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
148
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
146
149
  */
147
150
  createdAt?: Timestamp;
148
151
  /**
149
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
152
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
150
153
  */
151
154
  updatedAt?: Timestamp;
152
155
  /**
153
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
156
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
154
157
  */
155
158
  deletedAt?: Timestamp;
156
159
  /**
157
- * @generated from protobuf field: string job = 5;
160
+ * @generated from protobuf field: string job = 5
158
161
  */
159
162
  job: string;
160
163
  /**
161
- * @generated from protobuf field: uint32 weight = 6;
164
+ * @generated from protobuf field: uint32 weight = 6
162
165
  */
163
166
  weight: number;
164
167
  /**
165
- * @generated from protobuf field: bool closed = 7;
168
+ * @generated from protobuf field: bool closed = 7
166
169
  */
167
170
  closed: boolean;
168
171
  /**
169
- * @generated from protobuf field: bool public = 22;
172
+ * @generated from protobuf field: bool draft = 8
173
+ */
174
+ draft: boolean;
175
+ /**
176
+ * @generated from protobuf field: bool public = 9
170
177
  */
171
178
  public: boolean;
172
179
  /**
173
- * @sanitize: method=StripTags
174
- *
175
- * @generated from protobuf field: string abbreviation = 8;
180
+ * @generated from protobuf field: string abbreviation = 10
176
181
  */
177
182
  abbreviation: string;
178
183
  /**
179
- * @sanitize
180
- *
181
- * @generated from protobuf field: string title = 9;
184
+ * @generated from protobuf field: string title = 11
182
185
  */
183
186
  title: string;
184
187
  /**
185
- * @sanitize: method=StripTags
186
- *
187
- * @generated from protobuf field: optional string description = 10;
188
+ * @generated from protobuf field: optional string description = 12
188
189
  */
189
190
  description?: string;
190
191
  /**
191
- * @generated from protobuf field: optional int32 creator_id = 12;
192
+ * @generated from protobuf field: optional int32 creator_id = 14
192
193
  */
193
194
  creatorId?: number;
194
195
  /**
195
- * @generated from protobuf field: optional resources.users.UserShort creator = 13;
196
+ * @generated from protobuf field: optional resources.users.short.UserShort creator = 15
196
197
  */
197
- creator?: UserShort; // @gotags: alias:"creator"
198
+ creator?: UserShort;
198
199
  /**
199
- * @generated from protobuf field: string creator_job = 14;
200
+ * @generated from protobuf field: string creator_job = 16
200
201
  */
201
202
  creatorJob: string;
202
203
  /**
203
- * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 16;
204
+ * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 18
204
205
  */
205
206
  requirements: QualificationRequirement[];
206
207
  /**
207
- * @generated from protobuf field: resources.qualifications.QualificationExamMode exam_mode = 18;
208
+ * @generated from protobuf field: resources.qualifications.exam.QualificationExamMode exam_mode = 21
208
209
  */
209
210
  examMode: QualificationExamMode;
210
211
  /**
211
- * @generated from protobuf field: optional resources.qualifications.QualificationExamSettings exam_settings = 19;
212
+ * @generated from protobuf field: optional resources.qualifications.exam.QualificationExamSettings exam_settings = 22
212
213
  */
213
214
  examSettings?: QualificationExamSettings;
214
215
  /**
215
- * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 21;
216
+ * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 24
216
217
  */
217
218
  result?: QualificationResult;
218
219
  }
@@ -221,110 +222,93 @@ export interface QualificationShort {
221
222
  */
222
223
  export interface QualificationRequirement {
223
224
  /**
224
- * @generated from protobuf field: uint64 id = 1;
225
+ * @generated from protobuf field: int64 id = 1
225
226
  */
226
- id: number; // @gotags: sql:"primary_key" alias:"id"
227
+ id: number;
227
228
  /**
228
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
229
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
229
230
  */
230
231
  createdAt?: Timestamp;
231
232
  /**
232
- * @generated from protobuf field: uint64 qualification_id = 3;
233
+ * @generated from protobuf field: int64 qualification_id = 3
233
234
  */
234
235
  qualificationId: number;
235
236
  /**
236
- * @generated from protobuf field: uint64 target_qualification_id = 4;
237
+ * @generated from protobuf field: int64 target_qualification_id = 4
237
238
  */
238
239
  targetQualificationId: number;
239
240
  /**
240
- * @generated from protobuf field: optional resources.qualifications.QualificationShort target_qualification = 5;
241
+ * @generated from protobuf field: optional resources.qualifications.QualificationShort target_qualification = 5
241
242
  */
242
- targetQualification?: QualificationShort; // @gotags: alias:"targetqualification.*"
243
+ targetQualification?: QualificationShort;
243
244
  }
244
245
  /**
245
- * @dbscanner: json
246
- *
247
246
  * @generated from protobuf message resources.qualifications.QualificationDiscordSettings
248
247
  */
249
248
  export interface QualificationDiscordSettings {
250
249
  /**
251
- * @generated from protobuf field: optional string role_name = 1;
250
+ * @generated from protobuf field: optional string role_name = 1
252
251
  */
253
252
  roleName?: string;
254
253
  /**
255
- * @generated from protobuf field: optional string role_format = 2;
254
+ * @generated from protobuf field: optional string role_format = 2
256
255
  */
257
256
  roleFormat?: string;
258
257
  }
259
- /**
260
- * @dbscanner: json
261
- *
262
- * @generated from protobuf message resources.qualifications.QualificationExamSettings
263
- */
264
- export interface QualificationExamSettings {
265
- /**
266
- * @generated from protobuf field: google.protobuf.Duration time = 1;
267
- */
268
- time?: Duration;
269
- }
270
258
  /**
271
259
  * @generated from protobuf message resources.qualifications.QualificationRequest
272
260
  */
273
261
  export interface QualificationRequest {
274
262
  /**
275
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 1;
263
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 1
276
264
  */
277
265
  createdAt?: Timestamp;
278
266
  /**
279
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 2;
267
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 2
280
268
  */
281
269
  deletedAt?: Timestamp;
282
270
  /**
283
- * @generated from protobuf field: uint64 qualification_id = 3;
271
+ * @generated from protobuf field: int64 qualification_id = 3
284
272
  */
285
- qualificationId: number; // @gotags: sql:"primary_key" alias:"qualification_id"
273
+ qualificationId: number;
286
274
  /**
287
- * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 4;
275
+ * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 4
288
276
  */
289
277
  qualification?: QualificationShort;
290
278
  /**
291
- * @generated from protobuf field: int32 user_id = 5;
279
+ * @generated from protobuf field: int32 user_id = 5
292
280
  */
293
- userId: number; // @gotags: sql:"primary_key"
281
+ userId: number;
294
282
  /**
295
- * @generated from protobuf field: resources.users.UserShort user = 6;
283
+ * @generated from protobuf field: resources.users.short.UserShort user = 6
296
284
  */
297
- user?: UserShort; // @gotags: alias:"user"
285
+ user?: UserShort;
298
286
  /**
299
- * @sanitize: method=StripTags
300
- *
301
- * @generated from protobuf field: optional string user_comment = 7;
287
+ * @generated from protobuf field: optional string user_comment = 7
302
288
  */
303
289
  userComment?: string;
304
290
  /**
305
- * @generated from protobuf field: optional resources.qualifications.RequestStatus status = 8;
291
+ * @generated from protobuf field: optional resources.qualifications.RequestStatus status = 8
306
292
  */
307
293
  status?: RequestStatus;
308
294
  /**
309
- * @generated from protobuf field: optional resources.timestamp.Timestamp approved_at = 9;
295
+ * @generated from protobuf field: optional resources.timestamp.Timestamp approved_at = 9
310
296
  */
311
297
  approvedAt?: Timestamp;
312
298
  /**
313
- * @sanitize: method=StripTags
314
- *
315
- * @generated from protobuf field: optional string approver_comment = 10;
299
+ * @generated from protobuf field: optional string approver_comment = 10
316
300
  */
317
301
  approverComment?: string;
318
302
  /**
319
- * @generated from protobuf field: optional int32 approver_id = 11;
303
+ * @generated from protobuf field: optional int32 approver_id = 11
320
304
  */
321
305
  approverId?: number;
322
306
  /**
323
- * @generated from protobuf field: optional resources.users.UserShort approver = 12;
307
+ * @generated from protobuf field: optional resources.users.short.UserShort approver = 12
324
308
  */
325
- approver?: UserShort; // @gotags: alias:"approver"
309
+ approver?: UserShort;
326
310
  /**
327
- * @generated from protobuf field: optional string approver_job = 13;
311
+ * @generated from protobuf field: optional string approver_job = 13
328
312
  */
329
313
  approverJob?: string;
330
314
  }
@@ -333,81 +317,58 @@ export interface QualificationRequest {
333
317
  */
334
318
  export interface QualificationResult {
335
319
  /**
336
- * @generated from protobuf field: uint64 id = 1;
320
+ * @generated from protobuf field: int64 id = 1
337
321
  */
338
- id: number; // @gotags: sql:"primary_key" alias:"id"
322
+ id: number;
339
323
  /**
340
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
324
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
341
325
  */
342
326
  createdAt?: Timestamp;
343
327
  /**
344
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3;
328
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3
345
329
  */
346
330
  deletedAt?: Timestamp;
347
331
  /**
348
- * @generated from protobuf field: uint64 qualification_id = 4;
332
+ * @generated from protobuf field: int64 qualification_id = 4
349
333
  */
350
334
  qualificationId: number;
351
335
  /**
352
- * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 5;
336
+ * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 5
353
337
  */
354
338
  qualification?: QualificationShort;
355
339
  /**
356
- * @generated from protobuf field: int32 user_id = 6;
340
+ * @generated from protobuf field: int32 user_id = 6
357
341
  */
358
342
  userId: number;
359
343
  /**
360
- * @generated from protobuf field: resources.users.UserShort user = 7;
344
+ * @generated from protobuf field: resources.users.short.UserShort user = 7
361
345
  */
362
- user?: UserShort; // @gotags: alias:"user"
346
+ user?: UserShort;
363
347
  /**
364
- * @generated from protobuf field: resources.qualifications.ResultStatus status = 8;
348
+ * @generated from protobuf field: resources.qualifications.ResultStatus status = 8
365
349
  */
366
350
  status: ResultStatus;
367
351
  /**
368
- * @generated from protobuf field: optional float score = 9;
352
+ * @generated from protobuf field: optional float score = 9
369
353
  */
370
354
  score?: number;
371
355
  /**
372
- * @sanitize: method=StripTags
373
- *
374
- * @generated from protobuf field: string summary = 10;
356
+ * @generated from protobuf field: string summary = 10
375
357
  */
376
358
  summary: string;
377
359
  /**
378
- * @generated from protobuf field: int32 creator_id = 11;
360
+ * @generated from protobuf field: int32 creator_id = 11
379
361
  */
380
362
  creatorId: number;
381
363
  /**
382
- * @generated from protobuf field: resources.users.UserShort creator = 12;
364
+ * @generated from protobuf field: resources.users.short.UserShort creator = 12
383
365
  */
384
- creator?: UserShort; // @gotags: alias:"creator"
366
+ creator?: UserShort;
385
367
  /**
386
- * @generated from protobuf field: string creator_job = 13;
368
+ * @generated from protobuf field: string creator_job = 13
387
369
  */
388
370
  creatorJob: string;
389
371
  }
390
- /**
391
- * @generated from protobuf enum resources.qualifications.QualificationExamMode
392
- */
393
- export enum QualificationExamMode {
394
- /**
395
- * @generated from protobuf enum value: QUALIFICATION_EXAM_MODE_UNSPECIFIED = 0;
396
- */
397
- UNSPECIFIED = 0,
398
- /**
399
- * @generated from protobuf enum value: QUALIFICATION_EXAM_MODE_DISABLED = 1;
400
- */
401
- DISABLED = 1,
402
- /**
403
- * @generated from protobuf enum value: QUALIFICATION_EXAM_MODE_REQUEST_NEEDED = 2;
404
- */
405
- REQUEST_NEEDED = 2,
406
- /**
407
- * @generated from protobuf enum value: QUALIFICATION_EXAM_MODE_ENABLED = 3;
408
- */
409
- ENABLED = 3
410
- }
411
372
  /**
412
373
  * @generated from protobuf enum resources.qualifications.RequestStatus
413
374
  */
@@ -466,32 +427,34 @@ export enum ResultStatus {
466
427
  class Qualification$Type extends MessageType<Qualification> {
467
428
  constructor() {
468
429
  super("resources.qualifications.Qualification", [
469
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
430
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
470
431
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
471
432
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
472
433
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
473
- { no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
474
- { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "validate.rules": { uint32: { lt: 4294967295 } } } },
434
+ { no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
435
+ { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
475
436
  { no: 7, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
476
- { no: 26, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
477
- { no: 8, name: "abbreviation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
478
- { no: 9, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "1024" } } } },
479
- { no: 10, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "512" } } } },
480
- { no: 11, name: "content", kind: "message", T: () => Content },
481
- { no: 12, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
482
- { no: 13, name: "creator", kind: "message", T: () => UserShort },
483
- { no: 14, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
484
- { no: 15, name: "access", kind: "message", T: () => QualificationAccess },
485
- { no: 16, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
486
- { no: 17, name: "discord_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
487
- { no: 18, name: "discord_settings", kind: "message", T: () => QualificationDiscordSettings },
488
- { no: 19, name: "exam_mode", kind: "enum", T: () => ["resources.qualifications.QualificationExamMode", QualificationExamMode, "QUALIFICATION_EXAM_MODE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
489
- { no: 20, name: "exam_settings", kind: "message", T: () => QualificationExamSettings },
490
- { no: 21, name: "exam", kind: "message", T: () => ExamQuestions },
491
- { no: 22, name: "result", kind: "message", T: () => QualificationResult },
492
- { no: 23, name: "request", kind: "message", T: () => QualificationRequest },
493
- { no: 24, name: "label_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
494
- { no: 25, name: "label_sync_format", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "128" } } } }
437
+ { no: 8, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
438
+ { no: 9, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
439
+ { no: 10, name: "abbreviation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
440
+ { no: 11, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "1024" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
441
+ { no: 12, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
442
+ { no: 13, name: "content", kind: "message", T: () => Content },
443
+ { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
444
+ { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
445
+ { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
446
+ { no: 17, name: "access", kind: "message", T: () => QualificationAccess },
447
+ { no: 18, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
448
+ { no: 19, name: "discord_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
449
+ { no: 20, name: "discord_settings", kind: "message", T: () => QualificationDiscordSettings },
450
+ { no: 21, name: "exam_mode", kind: "enum", T: () => ["resources.qualifications.exam.QualificationExamMode", QualificationExamMode, "QUALIFICATION_EXAM_MODE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
451
+ { no: 22, name: "exam_settings", kind: "message", T: () => QualificationExamSettings },
452
+ { no: 23, name: "exam", kind: "message", T: () => ExamQuestions },
453
+ { no: 24, name: "result", kind: "message", T: () => QualificationResult },
454
+ { no: 25, name: "request", kind: "message", T: () => QualificationRequest },
455
+ { no: 26, name: "label_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
456
+ { no: 27, name: "label_sync_format", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
457
+ { no: 28, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
495
458
  ]);
496
459
  }
497
460
  create(value?: PartialMessage<Qualification>): Qualification {
@@ -500,6 +463,7 @@ class Qualification$Type extends MessageType<Qualification> {
500
463
  message.job = "";
501
464
  message.weight = 0;
502
465
  message.closed = false;
466
+ message.draft = false;
503
467
  message.public = false;
504
468
  message.abbreviation = "";
505
469
  message.title = "";
@@ -508,6 +472,7 @@ class Qualification$Type extends MessageType<Qualification> {
508
472
  message.discordSyncEnabled = false;
509
473
  message.examMode = 0;
510
474
  message.labelSyncEnabled = false;
475
+ message.files = [];
511
476
  if (value !== undefined)
512
477
  reflectionMergePartial<Qualification>(this, message, value);
513
478
  return message;
@@ -517,8 +482,8 @@ class Qualification$Type extends MessageType<Qualification> {
517
482
  while (reader.pos < end) {
518
483
  let [fieldNo, wireType] = reader.tag();
519
484
  switch (fieldNo) {
520
- case /* uint64 id */ 1:
521
- message.id = reader.uint64().toNumber();
485
+ case /* int64 id */ 1:
486
+ message.id = reader.int64().toNumber();
522
487
  break;
523
488
  case /* optional resources.timestamp.Timestamp created_at */ 2:
524
489
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -538,63 +503,69 @@ class Qualification$Type extends MessageType<Qualification> {
538
503
  case /* bool closed */ 7:
539
504
  message.closed = reader.bool();
540
505
  break;
541
- case /* bool public */ 26:
506
+ case /* bool draft */ 8:
507
+ message.draft = reader.bool();
508
+ break;
509
+ case /* bool public */ 9:
542
510
  message.public = reader.bool();
543
511
  break;
544
- case /* string abbreviation */ 8:
512
+ case /* string abbreviation */ 10:
545
513
  message.abbreviation = reader.string();
546
514
  break;
547
- case /* string title */ 9:
515
+ case /* string title */ 11:
548
516
  message.title = reader.string();
549
517
  break;
550
- case /* optional string description */ 10:
518
+ case /* optional string description */ 12:
551
519
  message.description = reader.string();
552
520
  break;
553
- case /* resources.common.content.Content content */ 11:
521
+ case /* resources.common.content.Content content */ 13:
554
522
  message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
555
523
  break;
556
- case /* optional int32 creator_id */ 12:
524
+ case /* optional int32 creator_id */ 14:
557
525
  message.creatorId = reader.int32();
558
526
  break;
559
- case /* optional resources.users.UserShort creator */ 13:
527
+ case /* optional resources.users.short.UserShort creator */ 15:
560
528
  message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
561
529
  break;
562
- case /* string creator_job */ 14:
530
+ case /* string creator_job */ 16:
563
531
  message.creatorJob = reader.string();
564
532
  break;
565
- case /* resources.qualifications.QualificationAccess access */ 15:
533
+ case /* resources.qualifications.access.QualificationAccess access */ 17:
566
534
  message.access = QualificationAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
567
535
  break;
568
- case /* repeated resources.qualifications.QualificationRequirement requirements */ 16:
536
+ case /* repeated resources.qualifications.QualificationRequirement requirements */ 18:
569
537
  message.requirements.push(QualificationRequirement.internalBinaryRead(reader, reader.uint32(), options));
570
538
  break;
571
- case /* bool discord_sync_enabled */ 17:
539
+ case /* bool discord_sync_enabled */ 19:
572
540
  message.discordSyncEnabled = reader.bool();
573
541
  break;
574
- case /* optional resources.qualifications.QualificationDiscordSettings discord_settings */ 18:
542
+ case /* optional resources.qualifications.QualificationDiscordSettings discord_settings */ 20:
575
543
  message.discordSettings = QualificationDiscordSettings.internalBinaryRead(reader, reader.uint32(), options, message.discordSettings);
576
544
  break;
577
- case /* resources.qualifications.QualificationExamMode exam_mode */ 19:
545
+ case /* resources.qualifications.exam.QualificationExamMode exam_mode */ 21:
578
546
  message.examMode = reader.int32();
579
547
  break;
580
- case /* optional resources.qualifications.QualificationExamSettings exam_settings */ 20:
548
+ case /* optional resources.qualifications.exam.QualificationExamSettings exam_settings */ 22:
581
549
  message.examSettings = QualificationExamSettings.internalBinaryRead(reader, reader.uint32(), options, message.examSettings);
582
550
  break;
583
- case /* optional resources.qualifications.ExamQuestions exam */ 21:
551
+ case /* optional resources.qualifications.exam.ExamQuestions exam */ 23:
584
552
  message.exam = ExamQuestions.internalBinaryRead(reader, reader.uint32(), options, message.exam);
585
553
  break;
586
- case /* optional resources.qualifications.QualificationResult result */ 22:
554
+ case /* optional resources.qualifications.QualificationResult result */ 24:
587
555
  message.result = QualificationResult.internalBinaryRead(reader, reader.uint32(), options, message.result);
588
556
  break;
589
- case /* optional resources.qualifications.QualificationRequest request */ 23:
557
+ case /* optional resources.qualifications.QualificationRequest request */ 25:
590
558
  message.request = QualificationRequest.internalBinaryRead(reader, reader.uint32(), options, message.request);
591
559
  break;
592
- case /* bool label_sync_enabled */ 24:
560
+ case /* bool label_sync_enabled */ 26:
593
561
  message.labelSyncEnabled = reader.bool();
594
562
  break;
595
- case /* optional string label_sync_format */ 25:
563
+ case /* optional string label_sync_format */ 27:
596
564
  message.labelSyncFormat = reader.string();
597
565
  break;
566
+ case /* repeated resources.file.File files */ 28:
567
+ message.files.push(File.internalBinaryRead(reader, reader.uint32(), options));
568
+ break;
598
569
  default:
599
570
  let u = options.readUnknownField;
600
571
  if (u === "throw")
@@ -607,9 +578,9 @@ class Qualification$Type extends MessageType<Qualification> {
607
578
  return message;
608
579
  }
609
580
  internalBinaryWrite(message: Qualification, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
610
- /* uint64 id = 1; */
581
+ /* int64 id = 1; */
611
582
  if (message.id !== 0)
612
- writer.tag(1, WireType.Varint).uint64(message.id);
583
+ writer.tag(1, WireType.Varint).int64(message.id);
613
584
  /* optional resources.timestamp.Timestamp created_at = 2; */
614
585
  if (message.createdAt)
615
586
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
@@ -628,63 +599,69 @@ class Qualification$Type extends MessageType<Qualification> {
628
599
  /* bool closed = 7; */
629
600
  if (message.closed !== false)
630
601
  writer.tag(7, WireType.Varint).bool(message.closed);
631
- /* string abbreviation = 8; */
602
+ /* bool draft = 8; */
603
+ if (message.draft !== false)
604
+ writer.tag(8, WireType.Varint).bool(message.draft);
605
+ /* bool public = 9; */
606
+ if (message.public !== false)
607
+ writer.tag(9, WireType.Varint).bool(message.public);
608
+ /* string abbreviation = 10; */
632
609
  if (message.abbreviation !== "")
633
- writer.tag(8, WireType.LengthDelimited).string(message.abbreviation);
634
- /* string title = 9; */
610
+ writer.tag(10, WireType.LengthDelimited).string(message.abbreviation);
611
+ /* string title = 11; */
635
612
  if (message.title !== "")
636
- writer.tag(9, WireType.LengthDelimited).string(message.title);
637
- /* optional string description = 10; */
613
+ writer.tag(11, WireType.LengthDelimited).string(message.title);
614
+ /* optional string description = 12; */
638
615
  if (message.description !== undefined)
639
- writer.tag(10, WireType.LengthDelimited).string(message.description);
640
- /* resources.common.content.Content content = 11; */
616
+ writer.tag(12, WireType.LengthDelimited).string(message.description);
617
+ /* resources.common.content.Content content = 13; */
641
618
  if (message.content)
642
- Content.internalBinaryWrite(message.content, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
643
- /* optional int32 creator_id = 12; */
619
+ Content.internalBinaryWrite(message.content, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
620
+ /* optional int32 creator_id = 14; */
644
621
  if (message.creatorId !== undefined)
645
- writer.tag(12, WireType.Varint).int32(message.creatorId);
646
- /* optional resources.users.UserShort creator = 13; */
622
+ writer.tag(14, WireType.Varint).int32(message.creatorId);
623
+ /* optional resources.users.short.UserShort creator = 15; */
647
624
  if (message.creator)
648
- UserShort.internalBinaryWrite(message.creator, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
649
- /* string creator_job = 14; */
625
+ UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
626
+ /* string creator_job = 16; */
650
627
  if (message.creatorJob !== "")
651
- writer.tag(14, WireType.LengthDelimited).string(message.creatorJob);
652
- /* resources.qualifications.QualificationAccess access = 15; */
628
+ writer.tag(16, WireType.LengthDelimited).string(message.creatorJob);
629
+ /* resources.qualifications.access.QualificationAccess access = 17; */
653
630
  if (message.access)
654
- QualificationAccess.internalBinaryWrite(message.access, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
655
- /* repeated resources.qualifications.QualificationRequirement requirements = 16; */
631
+ QualificationAccess.internalBinaryWrite(message.access, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
632
+ /* repeated resources.qualifications.QualificationRequirement requirements = 18; */
656
633
  for (let i = 0; i < message.requirements.length; i++)
657
- QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
658
- /* bool discord_sync_enabled = 17; */
634
+ QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
635
+ /* bool discord_sync_enabled = 19; */
659
636
  if (message.discordSyncEnabled !== false)
660
- writer.tag(17, WireType.Varint).bool(message.discordSyncEnabled);
661
- /* optional resources.qualifications.QualificationDiscordSettings discord_settings = 18; */
637
+ writer.tag(19, WireType.Varint).bool(message.discordSyncEnabled);
638
+ /* optional resources.qualifications.QualificationDiscordSettings discord_settings = 20; */
662
639
  if (message.discordSettings)
663
- QualificationDiscordSettings.internalBinaryWrite(message.discordSettings, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
664
- /* resources.qualifications.QualificationExamMode exam_mode = 19; */
640
+ QualificationDiscordSettings.internalBinaryWrite(message.discordSettings, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
641
+ /* resources.qualifications.exam.QualificationExamMode exam_mode = 21; */
665
642
  if (message.examMode !== 0)
666
- writer.tag(19, WireType.Varint).int32(message.examMode);
667
- /* optional resources.qualifications.QualificationExamSettings exam_settings = 20; */
643
+ writer.tag(21, WireType.Varint).int32(message.examMode);
644
+ /* optional resources.qualifications.exam.QualificationExamSettings exam_settings = 22; */
668
645
  if (message.examSettings)
669
- QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
670
- /* optional resources.qualifications.ExamQuestions exam = 21; */
646
+ QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
647
+ /* optional resources.qualifications.exam.ExamQuestions exam = 23; */
671
648
  if (message.exam)
672
- ExamQuestions.internalBinaryWrite(message.exam, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
673
- /* optional resources.qualifications.QualificationResult result = 22; */
649
+ ExamQuestions.internalBinaryWrite(message.exam, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
650
+ /* optional resources.qualifications.QualificationResult result = 24; */
674
651
  if (message.result)
675
- QualificationResult.internalBinaryWrite(message.result, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
676
- /* optional resources.qualifications.QualificationRequest request = 23; */
652
+ QualificationResult.internalBinaryWrite(message.result, writer.tag(24, WireType.LengthDelimited).fork(), options).join();
653
+ /* optional resources.qualifications.QualificationRequest request = 25; */
677
654
  if (message.request)
678
- QualificationRequest.internalBinaryWrite(message.request, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
679
- /* bool label_sync_enabled = 24; */
655
+ QualificationRequest.internalBinaryWrite(message.request, writer.tag(25, WireType.LengthDelimited).fork(), options).join();
656
+ /* bool label_sync_enabled = 26; */
680
657
  if (message.labelSyncEnabled !== false)
681
- writer.tag(24, WireType.Varint).bool(message.labelSyncEnabled);
682
- /* optional string label_sync_format = 25; */
658
+ writer.tag(26, WireType.Varint).bool(message.labelSyncEnabled);
659
+ /* optional string label_sync_format = 27; */
683
660
  if (message.labelSyncFormat !== undefined)
684
- writer.tag(25, WireType.LengthDelimited).string(message.labelSyncFormat);
685
- /* bool public = 26; */
686
- if (message.public !== false)
687
- writer.tag(26, WireType.Varint).bool(message.public);
661
+ writer.tag(27, WireType.LengthDelimited).string(message.labelSyncFormat);
662
+ /* repeated resources.file.File files = 28; */
663
+ for (let i = 0; i < message.files.length; i++)
664
+ File.internalBinaryWrite(message.files[i], writer.tag(28, WireType.LengthDelimited).fork(), options).join();
688
665
  let u = options.writeUnknownFields;
689
666
  if (u !== false)
690
667
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -699,24 +676,25 @@ export const Qualification = new Qualification$Type();
699
676
  class QualificationShort$Type extends MessageType<QualificationShort> {
700
677
  constructor() {
701
678
  super("resources.qualifications.QualificationShort", [
702
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
679
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
703
680
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
704
681
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
705
682
  { no: 4, name: "deleted_at", kind: "message", T: () => Timestamp },
706
- { no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
707
- { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "validate.rules": { uint32: { lt: 4294967295 } } } },
683
+ { no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
684
+ { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
708
685
  { no: 7, name: "closed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
709
- { no: 22, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
710
- { no: 8, name: "abbreviation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
711
- { no: 9, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "1024" } } } },
712
- { no: 10, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "512" } } } },
713
- { no: 12, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
714
- { no: 13, name: "creator", kind: "message", T: () => UserShort },
715
- { no: 14, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } },
716
- { no: 16, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
717
- { no: 18, name: "exam_mode", kind: "enum", T: () => ["resources.qualifications.QualificationExamMode", QualificationExamMode, "QUALIFICATION_EXAM_MODE_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
718
- { no: 19, name: "exam_settings", kind: "message", T: () => QualificationExamSettings },
719
- { no: 21, name: "result", kind: "message", T: () => QualificationResult }
686
+ { no: 8, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
687
+ { no: 9, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
688
+ { no: 10, name: "abbreviation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
689
+ { no: 11, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "1024" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
690
+ { no: 12, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
691
+ { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
692
+ { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
693
+ { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
694
+ { no: 18, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
695
+ { no: 21, name: "exam_mode", kind: "enum", T: () => ["resources.qualifications.exam.QualificationExamMode", QualificationExamMode, "QUALIFICATION_EXAM_MODE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
696
+ { no: 22, name: "exam_settings", kind: "message", T: () => QualificationExamSettings },
697
+ { no: 24, name: "result", kind: "message", T: () => QualificationResult }
720
698
  ]);
721
699
  }
722
700
  create(value?: PartialMessage<QualificationShort>): QualificationShort {
@@ -725,6 +703,7 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
725
703
  message.job = "";
726
704
  message.weight = 0;
727
705
  message.closed = false;
706
+ message.draft = false;
728
707
  message.public = false;
729
708
  message.abbreviation = "";
730
709
  message.title = "";
@@ -740,8 +719,8 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
740
719
  while (reader.pos < end) {
741
720
  let [fieldNo, wireType] = reader.tag();
742
721
  switch (fieldNo) {
743
- case /* uint64 id */ 1:
744
- message.id = reader.uint64().toNumber();
722
+ case /* int64 id */ 1:
723
+ message.id = reader.int64().toNumber();
745
724
  break;
746
725
  case /* optional resources.timestamp.Timestamp created_at */ 2:
747
726
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -761,37 +740,40 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
761
740
  case /* bool closed */ 7:
762
741
  message.closed = reader.bool();
763
742
  break;
764
- case /* bool public */ 22:
743
+ case /* bool draft */ 8:
744
+ message.draft = reader.bool();
745
+ break;
746
+ case /* bool public */ 9:
765
747
  message.public = reader.bool();
766
748
  break;
767
- case /* string abbreviation */ 8:
749
+ case /* string abbreviation */ 10:
768
750
  message.abbreviation = reader.string();
769
751
  break;
770
- case /* string title */ 9:
752
+ case /* string title */ 11:
771
753
  message.title = reader.string();
772
754
  break;
773
- case /* optional string description */ 10:
755
+ case /* optional string description */ 12:
774
756
  message.description = reader.string();
775
757
  break;
776
- case /* optional int32 creator_id */ 12:
758
+ case /* optional int32 creator_id */ 14:
777
759
  message.creatorId = reader.int32();
778
760
  break;
779
- case /* optional resources.users.UserShort creator */ 13:
761
+ case /* optional resources.users.short.UserShort creator */ 15:
780
762
  message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
781
763
  break;
782
- case /* string creator_job */ 14:
764
+ case /* string creator_job */ 16:
783
765
  message.creatorJob = reader.string();
784
766
  break;
785
- case /* repeated resources.qualifications.QualificationRequirement requirements */ 16:
767
+ case /* repeated resources.qualifications.QualificationRequirement requirements */ 18:
786
768
  message.requirements.push(QualificationRequirement.internalBinaryRead(reader, reader.uint32(), options));
787
769
  break;
788
- case /* resources.qualifications.QualificationExamMode exam_mode */ 18:
770
+ case /* resources.qualifications.exam.QualificationExamMode exam_mode */ 21:
789
771
  message.examMode = reader.int32();
790
772
  break;
791
- case /* optional resources.qualifications.QualificationExamSettings exam_settings */ 19:
773
+ case /* optional resources.qualifications.exam.QualificationExamSettings exam_settings */ 22:
792
774
  message.examSettings = QualificationExamSettings.internalBinaryRead(reader, reader.uint32(), options, message.examSettings);
793
775
  break;
794
- case /* optional resources.qualifications.QualificationResult result */ 21:
776
+ case /* optional resources.qualifications.QualificationResult result */ 24:
795
777
  message.result = QualificationResult.internalBinaryRead(reader, reader.uint32(), options, message.result);
796
778
  break;
797
779
  default:
@@ -806,9 +788,9 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
806
788
  return message;
807
789
  }
808
790
  internalBinaryWrite(message: QualificationShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
809
- /* uint64 id = 1; */
791
+ /* int64 id = 1; */
810
792
  if (message.id !== 0)
811
- writer.tag(1, WireType.Varint).uint64(message.id);
793
+ writer.tag(1, WireType.Varint).int64(message.id);
812
794
  /* optional resources.timestamp.Timestamp created_at = 2; */
813
795
  if (message.createdAt)
814
796
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
@@ -827,39 +809,42 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
827
809
  /* bool closed = 7; */
828
810
  if (message.closed !== false)
829
811
  writer.tag(7, WireType.Varint).bool(message.closed);
830
- /* string abbreviation = 8; */
812
+ /* bool draft = 8; */
813
+ if (message.draft !== false)
814
+ writer.tag(8, WireType.Varint).bool(message.draft);
815
+ /* bool public = 9; */
816
+ if (message.public !== false)
817
+ writer.tag(9, WireType.Varint).bool(message.public);
818
+ /* string abbreviation = 10; */
831
819
  if (message.abbreviation !== "")
832
- writer.tag(8, WireType.LengthDelimited).string(message.abbreviation);
833
- /* string title = 9; */
820
+ writer.tag(10, WireType.LengthDelimited).string(message.abbreviation);
821
+ /* string title = 11; */
834
822
  if (message.title !== "")
835
- writer.tag(9, WireType.LengthDelimited).string(message.title);
836
- /* optional string description = 10; */
823
+ writer.tag(11, WireType.LengthDelimited).string(message.title);
824
+ /* optional string description = 12; */
837
825
  if (message.description !== undefined)
838
- writer.tag(10, WireType.LengthDelimited).string(message.description);
839
- /* optional int32 creator_id = 12; */
826
+ writer.tag(12, WireType.LengthDelimited).string(message.description);
827
+ /* optional int32 creator_id = 14; */
840
828
  if (message.creatorId !== undefined)
841
- writer.tag(12, WireType.Varint).int32(message.creatorId);
842
- /* optional resources.users.UserShort creator = 13; */
829
+ writer.tag(14, WireType.Varint).int32(message.creatorId);
830
+ /* optional resources.users.short.UserShort creator = 15; */
843
831
  if (message.creator)
844
- UserShort.internalBinaryWrite(message.creator, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
845
- /* string creator_job = 14; */
832
+ UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
833
+ /* string creator_job = 16; */
846
834
  if (message.creatorJob !== "")
847
- writer.tag(14, WireType.LengthDelimited).string(message.creatorJob);
848
- /* repeated resources.qualifications.QualificationRequirement requirements = 16; */
835
+ writer.tag(16, WireType.LengthDelimited).string(message.creatorJob);
836
+ /* repeated resources.qualifications.QualificationRequirement requirements = 18; */
849
837
  for (let i = 0; i < message.requirements.length; i++)
850
- QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
851
- /* resources.qualifications.QualificationExamMode exam_mode = 18; */
838
+ QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
839
+ /* resources.qualifications.exam.QualificationExamMode exam_mode = 21; */
852
840
  if (message.examMode !== 0)
853
- writer.tag(18, WireType.Varint).int32(message.examMode);
854
- /* optional resources.qualifications.QualificationExamSettings exam_settings = 19; */
841
+ writer.tag(21, WireType.Varint).int32(message.examMode);
842
+ /* optional resources.qualifications.exam.QualificationExamSettings exam_settings = 22; */
855
843
  if (message.examSettings)
856
- QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
857
- /* optional resources.qualifications.QualificationResult result = 21; */
844
+ QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
845
+ /* optional resources.qualifications.QualificationResult result = 24; */
858
846
  if (message.result)
859
- QualificationResult.internalBinaryWrite(message.result, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
860
- /* bool public = 22; */
861
- if (message.public !== false)
862
- writer.tag(22, WireType.Varint).bool(message.public);
847
+ QualificationResult.internalBinaryWrite(message.result, writer.tag(24, WireType.LengthDelimited).fork(), options).join();
863
848
  let u = options.writeUnknownFields;
864
849
  if (u !== false)
865
850
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -874,11 +859,11 @@ export const QualificationShort = new QualificationShort$Type();
874
859
  class QualificationRequirement$Type extends MessageType<QualificationRequirement> {
875
860
  constructor() {
876
861
  super("resources.qualifications.QualificationRequirement", [
877
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
862
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
878
863
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
879
- { no: 3, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
880
- { no: 4, name: "target_qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
881
- { no: 5, name: "target_qualification", kind: "message", T: () => QualificationShort }
864
+ { no: 3, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
865
+ { no: 4, name: "target_qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
866
+ { no: 5, name: "target_qualification", kind: "message", T: () => QualificationShort, options: { "tagger.tags": "alias:\"targetqualification\"" } }
882
867
  ]);
883
868
  }
884
869
  create(value?: PartialMessage<QualificationRequirement>): QualificationRequirement {
@@ -895,17 +880,17 @@ class QualificationRequirement$Type extends MessageType<QualificationRequirement
895
880
  while (reader.pos < end) {
896
881
  let [fieldNo, wireType] = reader.tag();
897
882
  switch (fieldNo) {
898
- case /* uint64 id */ 1:
899
- message.id = reader.uint64().toNumber();
883
+ case /* int64 id */ 1:
884
+ message.id = reader.int64().toNumber();
900
885
  break;
901
886
  case /* optional resources.timestamp.Timestamp created_at */ 2:
902
887
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
903
888
  break;
904
- case /* uint64 qualification_id */ 3:
905
- message.qualificationId = reader.uint64().toNumber();
889
+ case /* int64 qualification_id */ 3:
890
+ message.qualificationId = reader.int64().toNumber();
906
891
  break;
907
- case /* uint64 target_qualification_id */ 4:
908
- message.targetQualificationId = reader.uint64().toNumber();
892
+ case /* int64 target_qualification_id */ 4:
893
+ message.targetQualificationId = reader.int64().toNumber();
909
894
  break;
910
895
  case /* optional resources.qualifications.QualificationShort target_qualification */ 5:
911
896
  message.targetQualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.targetQualification);
@@ -922,18 +907,18 @@ class QualificationRequirement$Type extends MessageType<QualificationRequirement
922
907
  return message;
923
908
  }
924
909
  internalBinaryWrite(message: QualificationRequirement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
925
- /* uint64 id = 1; */
910
+ /* int64 id = 1; */
926
911
  if (message.id !== 0)
927
- writer.tag(1, WireType.Varint).uint64(message.id);
912
+ writer.tag(1, WireType.Varint).int64(message.id);
928
913
  /* optional resources.timestamp.Timestamp created_at = 2; */
929
914
  if (message.createdAt)
930
915
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
931
- /* uint64 qualification_id = 3; */
916
+ /* int64 qualification_id = 3; */
932
917
  if (message.qualificationId !== 0)
933
- writer.tag(3, WireType.Varint).uint64(message.qualificationId);
934
- /* uint64 target_qualification_id = 4; */
918
+ writer.tag(3, WireType.Varint).int64(message.qualificationId);
919
+ /* int64 target_qualification_id = 4; */
935
920
  if (message.targetQualificationId !== 0)
936
- writer.tag(4, WireType.Varint).uint64(message.targetQualificationId);
921
+ writer.tag(4, WireType.Varint).int64(message.targetQualificationId);
937
922
  /* optional resources.qualifications.QualificationShort target_qualification = 5; */
938
923
  if (message.targetQualification)
939
924
  QualificationShort.internalBinaryWrite(message.targetQualification, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
@@ -951,9 +936,9 @@ export const QualificationRequirement = new QualificationRequirement$Type();
951
936
  class QualificationDiscordSettings$Type extends MessageType<QualificationDiscordSettings> {
952
937
  constructor() {
953
938
  super("resources.qualifications.QualificationDiscordSettings", [
954
- { no: 1, name: "role_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "64" } } } },
955
- { no: 2, name: "role_format", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "64" } } } }
956
- ]);
939
+ { no: 1, name: "role_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
940
+ { no: 2, name: "role_format", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } }
941
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
957
942
  }
958
943
  create(value?: PartialMessage<QualificationDiscordSettings>): QualificationDiscordSettings {
959
944
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -1001,67 +986,21 @@ class QualificationDiscordSettings$Type extends MessageType<QualificationDiscord
1001
986
  */
1002
987
  export const QualificationDiscordSettings = new QualificationDiscordSettings$Type();
1003
988
  // @generated message type with reflection information, may provide speed optimized methods
1004
- class QualificationExamSettings$Type extends MessageType<QualificationExamSettings> {
1005
- constructor() {
1006
- super("resources.qualifications.QualificationExamSettings", [
1007
- { no: 1, name: "time", kind: "message", T: () => Duration, options: { "validate.rules": { duration: { required: true, lt: { seconds: "1036800" }, gte: { seconds: "300" } } } } }
1008
- ]);
1009
- }
1010
- create(value?: PartialMessage<QualificationExamSettings>): QualificationExamSettings {
1011
- const message = globalThis.Object.create((this.messagePrototype!));
1012
- if (value !== undefined)
1013
- reflectionMergePartial<QualificationExamSettings>(this, message, value);
1014
- return message;
1015
- }
1016
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: QualificationExamSettings): QualificationExamSettings {
1017
- let message = target ?? this.create(), end = reader.pos + length;
1018
- while (reader.pos < end) {
1019
- let [fieldNo, wireType] = reader.tag();
1020
- switch (fieldNo) {
1021
- case /* google.protobuf.Duration time */ 1:
1022
- message.time = Duration.internalBinaryRead(reader, reader.uint32(), options, message.time);
1023
- break;
1024
- default:
1025
- let u = options.readUnknownField;
1026
- if (u === "throw")
1027
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1028
- let d = reader.skip(wireType);
1029
- if (u !== false)
1030
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1031
- }
1032
- }
1033
- return message;
1034
- }
1035
- internalBinaryWrite(message: QualificationExamSettings, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1036
- /* google.protobuf.Duration time = 1; */
1037
- if (message.time)
1038
- Duration.internalBinaryWrite(message.time, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1039
- let u = options.writeUnknownFields;
1040
- if (u !== false)
1041
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1042
- return writer;
1043
- }
1044
- }
1045
- /**
1046
- * @generated MessageType for protobuf message resources.qualifications.QualificationExamSettings
1047
- */
1048
- export const QualificationExamSettings = new QualificationExamSettings$Type();
1049
- // @generated message type with reflection information, may provide speed optimized methods
1050
989
  class QualificationRequest$Type extends MessageType<QualificationRequest> {
1051
990
  constructor() {
1052
991
  super("resources.qualifications.QualificationRequest", [
1053
992
  { no: 1, name: "created_at", kind: "message", T: () => Timestamp },
1054
993
  { no: 2, name: "deleted_at", kind: "message", T: () => Timestamp },
1055
- { no: 3, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
994
+ { no: 3, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"qualification_id\"" } },
1056
995
  { no: 4, name: "qualification", kind: "message", T: () => QualificationShort },
1057
- { no: 5, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
1058
- { no: 6, name: "user", kind: "message", T: () => UserShort },
1059
- { no: 7, name: "user_comment", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "512" } } } },
1060
- { no: 8, name: "status", kind: "enum", opt: true, T: () => ["resources.qualifications.RequestStatus", RequestStatus, "REQUEST_STATUS_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
996
+ { no: 5, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } }, "tagger.tags": "sql:\"primary_key\"" } },
997
+ { no: 6, name: "user", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"user\"" } },
998
+ { no: 7, name: "user_comment", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
999
+ { no: 8, name: "status", kind: "enum", opt: true, T: () => ["resources.qualifications.RequestStatus", RequestStatus, "REQUEST_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1061
1000
  { no: 9, name: "approved_at", kind: "message", T: () => Timestamp },
1062
- { no: 10, name: "approver_comment", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "512" } } } },
1063
- { no: 11, name: "approver_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
1064
- { no: 12, name: "approver", kind: "message", T: () => UserShort },
1001
+ { no: 10, name: "approver_comment", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
1002
+ { no: 11, name: "approver_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
1003
+ { no: 12, name: "approver", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"approver\"" } },
1065
1004
  { no: 13, name: "approver_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
1066
1005
  ]);
1067
1006
  }
@@ -1084,8 +1023,8 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1084
1023
  case /* optional resources.timestamp.Timestamp deleted_at */ 2:
1085
1024
  message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
1086
1025
  break;
1087
- case /* uint64 qualification_id */ 3:
1088
- message.qualificationId = reader.uint64().toNumber();
1026
+ case /* int64 qualification_id */ 3:
1027
+ message.qualificationId = reader.int64().toNumber();
1089
1028
  break;
1090
1029
  case /* optional resources.qualifications.QualificationShort qualification */ 4:
1091
1030
  message.qualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.qualification);
@@ -1093,7 +1032,7 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1093
1032
  case /* int32 user_id */ 5:
1094
1033
  message.userId = reader.int32();
1095
1034
  break;
1096
- case /* resources.users.UserShort user */ 6:
1035
+ case /* resources.users.short.UserShort user */ 6:
1097
1036
  message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
1098
1037
  break;
1099
1038
  case /* optional string user_comment */ 7:
@@ -1111,7 +1050,7 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1111
1050
  case /* optional int32 approver_id */ 11:
1112
1051
  message.approverId = reader.int32();
1113
1052
  break;
1114
- case /* optional resources.users.UserShort approver */ 12:
1053
+ case /* optional resources.users.short.UserShort approver */ 12:
1115
1054
  message.approver = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.approver);
1116
1055
  break;
1117
1056
  case /* optional string approver_job */ 13:
@@ -1135,16 +1074,16 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1135
1074
  /* optional resources.timestamp.Timestamp deleted_at = 2; */
1136
1075
  if (message.deletedAt)
1137
1076
  Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1138
- /* uint64 qualification_id = 3; */
1077
+ /* int64 qualification_id = 3; */
1139
1078
  if (message.qualificationId !== 0)
1140
- writer.tag(3, WireType.Varint).uint64(message.qualificationId);
1079
+ writer.tag(3, WireType.Varint).int64(message.qualificationId);
1141
1080
  /* optional resources.qualifications.QualificationShort qualification = 4; */
1142
1081
  if (message.qualification)
1143
1082
  QualificationShort.internalBinaryWrite(message.qualification, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
1144
1083
  /* int32 user_id = 5; */
1145
1084
  if (message.userId !== 0)
1146
1085
  writer.tag(5, WireType.Varint).int32(message.userId);
1147
- /* resources.users.UserShort user = 6; */
1086
+ /* resources.users.short.UserShort user = 6; */
1148
1087
  if (message.user)
1149
1088
  UserShort.internalBinaryWrite(message.user, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
1150
1089
  /* optional string user_comment = 7; */
@@ -1162,7 +1101,7 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1162
1101
  /* optional int32 approver_id = 11; */
1163
1102
  if (message.approverId !== undefined)
1164
1103
  writer.tag(11, WireType.Varint).int32(message.approverId);
1165
- /* optional resources.users.UserShort approver = 12; */
1104
+ /* optional resources.users.short.UserShort approver = 12; */
1166
1105
  if (message.approver)
1167
1106
  UserShort.internalBinaryWrite(message.approver, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
1168
1107
  /* optional string approver_job = 13; */
@@ -1182,19 +1121,19 @@ export const QualificationRequest = new QualificationRequest$Type();
1182
1121
  class QualificationResult$Type extends MessageType<QualificationResult> {
1183
1122
  constructor() {
1184
1123
  super("resources.qualifications.QualificationResult", [
1185
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
1124
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
1186
1125
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
1187
1126
  { no: 3, name: "deleted_at", kind: "message", T: () => Timestamp },
1188
- { no: 4, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
1127
+ { no: 4, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
1189
1128
  { no: 5, name: "qualification", kind: "message", T: () => QualificationShort },
1190
- { no: 6, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gte: 0 } } } },
1191
- { no: 7, name: "user", kind: "message", T: () => UserShort },
1192
- { no: 8, name: "status", kind: "enum", T: () => ["resources.qualifications.ResultStatus", ResultStatus, "RESULT_STATUS_"], options: { "validate.rules": { enum: { definedOnly: true } } } },
1193
- { no: 9, name: "score", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/, options: { "validate.rules": { float: { lte: 1000, gte: 0 } } } },
1194
- { no: 10, name: "summary", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "512" } } } },
1195
- { no: 11, name: "creator_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "validate.rules": { int32: { gt: 0 } } } },
1196
- { no: 12, name: "creator", kind: "message", T: () => UserShort },
1197
- { no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "20" } } } }
1129
+ { no: 6, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
1130
+ { no: 7, name: "user", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"user\"" } },
1131
+ { no: 8, name: "status", kind: "enum", T: () => ["resources.qualifications.ResultStatus", ResultStatus, "RESULT_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1132
+ { no: 9, name: "score", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { float: { lte: 1000, gte: 0 } } } },
1133
+ { no: 10, name: "summary", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, stripHtmlTags: true } } },
1134
+ { no: 11, name: "creator_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
1135
+ { no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
1136
+ { no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } }
1198
1137
  ]);
1199
1138
  }
1200
1139
  create(value?: PartialMessage<QualificationResult>): QualificationResult {
@@ -1215,8 +1154,8 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1215
1154
  while (reader.pos < end) {
1216
1155
  let [fieldNo, wireType] = reader.tag();
1217
1156
  switch (fieldNo) {
1218
- case /* uint64 id */ 1:
1219
- message.id = reader.uint64().toNumber();
1157
+ case /* int64 id */ 1:
1158
+ message.id = reader.int64().toNumber();
1220
1159
  break;
1221
1160
  case /* optional resources.timestamp.Timestamp created_at */ 2:
1222
1161
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -1224,8 +1163,8 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1224
1163
  case /* optional resources.timestamp.Timestamp deleted_at */ 3:
1225
1164
  message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
1226
1165
  break;
1227
- case /* uint64 qualification_id */ 4:
1228
- message.qualificationId = reader.uint64().toNumber();
1166
+ case /* int64 qualification_id */ 4:
1167
+ message.qualificationId = reader.int64().toNumber();
1229
1168
  break;
1230
1169
  case /* optional resources.qualifications.QualificationShort qualification */ 5:
1231
1170
  message.qualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.qualification);
@@ -1233,7 +1172,7 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1233
1172
  case /* int32 user_id */ 6:
1234
1173
  message.userId = reader.int32();
1235
1174
  break;
1236
- case /* resources.users.UserShort user */ 7:
1175
+ case /* resources.users.short.UserShort user */ 7:
1237
1176
  message.user = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.user);
1238
1177
  break;
1239
1178
  case /* resources.qualifications.ResultStatus status */ 8:
@@ -1248,7 +1187,7 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1248
1187
  case /* int32 creator_id */ 11:
1249
1188
  message.creatorId = reader.int32();
1250
1189
  break;
1251
- case /* resources.users.UserShort creator */ 12:
1190
+ case /* resources.users.short.UserShort creator */ 12:
1252
1191
  message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
1253
1192
  break;
1254
1193
  case /* string creator_job */ 13:
@@ -1266,25 +1205,25 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1266
1205
  return message;
1267
1206
  }
1268
1207
  internalBinaryWrite(message: QualificationResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1269
- /* uint64 id = 1; */
1208
+ /* int64 id = 1; */
1270
1209
  if (message.id !== 0)
1271
- writer.tag(1, WireType.Varint).uint64(message.id);
1210
+ writer.tag(1, WireType.Varint).int64(message.id);
1272
1211
  /* optional resources.timestamp.Timestamp created_at = 2; */
1273
1212
  if (message.createdAt)
1274
1213
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1275
1214
  /* optional resources.timestamp.Timestamp deleted_at = 3; */
1276
1215
  if (message.deletedAt)
1277
1216
  Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1278
- /* uint64 qualification_id = 4; */
1217
+ /* int64 qualification_id = 4; */
1279
1218
  if (message.qualificationId !== 0)
1280
- writer.tag(4, WireType.Varint).uint64(message.qualificationId);
1219
+ writer.tag(4, WireType.Varint).int64(message.qualificationId);
1281
1220
  /* optional resources.qualifications.QualificationShort qualification = 5; */
1282
1221
  if (message.qualification)
1283
1222
  QualificationShort.internalBinaryWrite(message.qualification, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
1284
1223
  /* int32 user_id = 6; */
1285
1224
  if (message.userId !== 0)
1286
1225
  writer.tag(6, WireType.Varint).int32(message.userId);
1287
- /* resources.users.UserShort user = 7; */
1226
+ /* resources.users.short.UserShort user = 7; */
1288
1227
  if (message.user)
1289
1228
  UserShort.internalBinaryWrite(message.user, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
1290
1229
  /* resources.qualifications.ResultStatus status = 8; */
@@ -1299,7 +1238,7 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1299
1238
  /* int32 creator_id = 11; */
1300
1239
  if (message.creatorId !== 0)
1301
1240
  writer.tag(11, WireType.Varint).int32(message.creatorId);
1302
- /* resources.users.UserShort creator = 12; */
1241
+ /* resources.users.short.UserShort creator = 12; */
1303
1242
  if (message.creator)
1304
1243
  UserShort.internalBinaryWrite(message.creator, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
1305
1244
  /* string creator_job = 13; */