@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/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";
@@ -11,6 +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 { Duration } from "../../google/protobuf/duration";
15
+ import { File } from "../file/file";
14
16
  import { ExamQuestions } from "./exam";
15
17
  import { QualificationAccess } from "./access";
16
18
  import { UserShort } from "../users/users";
@@ -21,198 +23,196 @@ import { Timestamp } from "../timestamp/timestamp";
21
23
  */
22
24
  export interface Qualification {
23
25
  /**
24
- * @generated from protobuf field: uint64 id = 1;
26
+ * @generated from protobuf field: int64 id = 1
25
27
  */
26
- id: number; // @gotags: sql:"primary_key" alias:"id"
28
+ id: number;
27
29
  /**
28
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
30
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
29
31
  */
30
32
  createdAt?: Timestamp;
31
33
  /**
32
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
34
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
33
35
  */
34
36
  updatedAt?: Timestamp;
35
37
  /**
36
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
38
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
37
39
  */
38
40
  deletedAt?: Timestamp;
39
41
  /**
40
- * @generated from protobuf field: string job = 5;
42
+ * @generated from protobuf field: string job = 5
41
43
  */
42
44
  job: string;
43
45
  /**
44
- * @generated from protobuf field: uint32 weight = 6;
46
+ * @generated from protobuf field: uint32 weight = 6
45
47
  */
46
48
  weight: number;
47
49
  /**
48
- * @generated from protobuf field: bool closed = 7;
50
+ * @generated from protobuf field: bool closed = 7
49
51
  */
50
52
  closed: boolean;
51
53
  /**
52
- * @generated from protobuf field: bool public = 26;
54
+ * @generated from protobuf field: bool draft = 8
55
+ */
56
+ draft: boolean;
57
+ /**
58
+ * @generated from protobuf field: bool public = 9
53
59
  */
54
60
  public: boolean;
55
61
  /**
56
- * @sanitize: method=StripTags
57
- *
58
- * @generated from protobuf field: string abbreviation = 8;
62
+ * @generated from protobuf field: string abbreviation = 10
59
63
  */
60
64
  abbreviation: string;
61
65
  /**
62
- * @sanitize
63
- *
64
- * @generated from protobuf field: string title = 9;
66
+ * @generated from protobuf field: string title = 11
65
67
  */
66
68
  title: string;
67
69
  /**
68
- * @sanitize: method=StripTags
69
- *
70
- * @generated from protobuf field: optional string description = 10;
70
+ * @generated from protobuf field: optional string description = 12
71
71
  */
72
72
  description?: string;
73
73
  /**
74
- * @generated from protobuf field: resources.common.content.Content content = 11;
74
+ * @generated from protobuf field: resources.common.content.Content content = 13
75
75
  */
76
76
  content?: Content;
77
77
  /**
78
- * @generated from protobuf field: optional int32 creator_id = 12;
78
+ * @generated from protobuf field: optional int32 creator_id = 14
79
79
  */
80
80
  creatorId?: number;
81
81
  /**
82
- * @generated from protobuf field: optional resources.users.UserShort creator = 13;
82
+ * @generated from protobuf field: optional resources.users.UserShort creator = 15
83
83
  */
84
- creator?: UserShort; // @gotags: alias:"creator"
84
+ creator?: UserShort;
85
85
  /**
86
- * @generated from protobuf field: string creator_job = 14;
86
+ * @generated from protobuf field: string creator_job = 16
87
87
  */
88
88
  creatorJob: string;
89
89
  /**
90
- * @generated from protobuf field: resources.qualifications.QualificationAccess access = 15;
90
+ * @generated from protobuf field: resources.qualifications.QualificationAccess access = 17
91
91
  */
92
92
  access?: QualificationAccess;
93
93
  /**
94
- * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 16;
94
+ * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 18
95
95
  */
96
96
  requirements: QualificationRequirement[];
97
97
  /**
98
- * @generated from protobuf field: bool discord_sync_enabled = 17;
98
+ * @generated from protobuf field: bool discord_sync_enabled = 19
99
99
  */
100
100
  discordSyncEnabled: boolean;
101
101
  /**
102
- * @generated from protobuf field: optional resources.qualifications.QualificationDiscordSettings discord_settings = 18;
102
+ * @generated from protobuf field: optional resources.qualifications.QualificationDiscordSettings discord_settings = 20
103
103
  */
104
104
  discordSettings?: QualificationDiscordSettings;
105
105
  /**
106
- * @generated from protobuf field: resources.qualifications.QualificationExamMode exam_mode = 19;
106
+ * @generated from protobuf field: resources.qualifications.QualificationExamMode exam_mode = 21
107
107
  */
108
108
  examMode: QualificationExamMode;
109
109
  /**
110
- * @generated from protobuf field: optional resources.qualifications.QualificationExamSettings exam_settings = 20;
110
+ * @generated from protobuf field: optional resources.qualifications.QualificationExamSettings exam_settings = 22
111
111
  */
112
112
  examSettings?: QualificationExamSettings;
113
113
  /**
114
- * @generated from protobuf field: optional resources.qualifications.ExamQuestions exam = 21;
114
+ * @generated from protobuf field: optional resources.qualifications.ExamQuestions exam = 23
115
115
  */
116
116
  exam?: ExamQuestions;
117
117
  /**
118
- * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 22;
118
+ * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 24
119
119
  */
120
120
  result?: QualificationResult;
121
121
  /**
122
- * @generated from protobuf field: optional resources.qualifications.QualificationRequest request = 23;
122
+ * @generated from protobuf field: optional resources.qualifications.QualificationRequest request = 25
123
123
  */
124
124
  request?: QualificationRequest;
125
125
  /**
126
- * @generated from protobuf field: bool label_sync_enabled = 24;
126
+ * @generated from protobuf field: bool label_sync_enabled = 26
127
127
  */
128
128
  labelSyncEnabled: boolean;
129
129
  /**
130
- * @sanitize: method=StripTags
131
- *
132
- * @generated from protobuf field: optional string label_sync_format = 25;
130
+ * @generated from protobuf field: optional string label_sync_format = 27
133
131
  */
134
132
  labelSyncFormat?: string;
133
+ /**
134
+ * @generated from protobuf field: repeated resources.file.File files = 28
135
+ */
136
+ files: File[];
135
137
  }
136
138
  /**
137
139
  * @generated from protobuf message resources.qualifications.QualificationShort
138
140
  */
139
141
  export interface QualificationShort {
140
142
  /**
141
- * @generated from protobuf field: uint64 id = 1;
143
+ * @generated from protobuf field: int64 id = 1
142
144
  */
143
- id: number; // @gotags: sql:"primary_key" alias:"id"
145
+ id: number;
144
146
  /**
145
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
147
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
146
148
  */
147
149
  createdAt?: Timestamp;
148
150
  /**
149
- * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3;
151
+ * @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 3
150
152
  */
151
153
  updatedAt?: Timestamp;
152
154
  /**
153
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4;
155
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 4
154
156
  */
155
157
  deletedAt?: Timestamp;
156
158
  /**
157
- * @generated from protobuf field: string job = 5;
159
+ * @generated from protobuf field: string job = 5
158
160
  */
159
161
  job: string;
160
162
  /**
161
- * @generated from protobuf field: uint32 weight = 6;
163
+ * @generated from protobuf field: uint32 weight = 6
162
164
  */
163
165
  weight: number;
164
166
  /**
165
- * @generated from protobuf field: bool closed = 7;
167
+ * @generated from protobuf field: bool closed = 7
166
168
  */
167
169
  closed: boolean;
168
170
  /**
169
- * @generated from protobuf field: bool public = 22;
171
+ * @generated from protobuf field: bool draft = 8
172
+ */
173
+ draft: boolean;
174
+ /**
175
+ * @generated from protobuf field: bool public = 9
170
176
  */
171
177
  public: boolean;
172
178
  /**
173
- * @sanitize: method=StripTags
174
- *
175
- * @generated from protobuf field: string abbreviation = 8;
179
+ * @generated from protobuf field: string abbreviation = 10
176
180
  */
177
181
  abbreviation: string;
178
182
  /**
179
- * @sanitize
180
- *
181
- * @generated from protobuf field: string title = 9;
183
+ * @generated from protobuf field: string title = 11
182
184
  */
183
185
  title: string;
184
186
  /**
185
- * @sanitize: method=StripTags
186
- *
187
- * @generated from protobuf field: optional string description = 10;
187
+ * @generated from protobuf field: optional string description = 12
188
188
  */
189
189
  description?: string;
190
190
  /**
191
- * @generated from protobuf field: optional int32 creator_id = 12;
191
+ * @generated from protobuf field: optional int32 creator_id = 14
192
192
  */
193
193
  creatorId?: number;
194
194
  /**
195
- * @generated from protobuf field: optional resources.users.UserShort creator = 13;
195
+ * @generated from protobuf field: optional resources.users.UserShort creator = 15
196
196
  */
197
- creator?: UserShort; // @gotags: alias:"creator"
197
+ creator?: UserShort;
198
198
  /**
199
- * @generated from protobuf field: string creator_job = 14;
199
+ * @generated from protobuf field: string creator_job = 16
200
200
  */
201
201
  creatorJob: string;
202
202
  /**
203
- * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 16;
203
+ * @generated from protobuf field: repeated resources.qualifications.QualificationRequirement requirements = 18
204
204
  */
205
205
  requirements: QualificationRequirement[];
206
206
  /**
207
- * @generated from protobuf field: resources.qualifications.QualificationExamMode exam_mode = 18;
207
+ * @generated from protobuf field: resources.qualifications.QualificationExamMode exam_mode = 21
208
208
  */
209
209
  examMode: QualificationExamMode;
210
210
  /**
211
- * @generated from protobuf field: optional resources.qualifications.QualificationExamSettings exam_settings = 19;
211
+ * @generated from protobuf field: optional resources.qualifications.QualificationExamSettings exam_settings = 22
212
212
  */
213
213
  examSettings?: QualificationExamSettings;
214
214
  /**
215
- * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 21;
215
+ * @generated from protobuf field: optional resources.qualifications.QualificationResult result = 24
216
216
  */
217
217
  result?: QualificationResult;
218
218
  }
@@ -221,110 +221,114 @@ export interface QualificationShort {
221
221
  */
222
222
  export interface QualificationRequirement {
223
223
  /**
224
- * @generated from protobuf field: uint64 id = 1;
224
+ * @generated from protobuf field: int64 id = 1
225
225
  */
226
- id: number; // @gotags: sql:"primary_key" alias:"id"
226
+ id: number;
227
227
  /**
228
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
228
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
229
229
  */
230
230
  createdAt?: Timestamp;
231
231
  /**
232
- * @generated from protobuf field: uint64 qualification_id = 3;
232
+ * @generated from protobuf field: int64 qualification_id = 3
233
233
  */
234
234
  qualificationId: number;
235
235
  /**
236
- * @generated from protobuf field: uint64 target_qualification_id = 4;
236
+ * @generated from protobuf field: int64 target_qualification_id = 4
237
237
  */
238
238
  targetQualificationId: number;
239
239
  /**
240
- * @generated from protobuf field: optional resources.qualifications.QualificationShort target_qualification = 5;
240
+ * @generated from protobuf field: optional resources.qualifications.QualificationShort target_qualification = 5
241
241
  */
242
- targetQualification?: QualificationShort; // @gotags: alias:"targetqualification.*"
242
+ targetQualification?: QualificationShort;
243
243
  }
244
244
  /**
245
- * @dbscanner: json
246
- *
247
245
  * @generated from protobuf message resources.qualifications.QualificationDiscordSettings
248
246
  */
249
247
  export interface QualificationDiscordSettings {
250
248
  /**
251
- * @generated from protobuf field: optional string role_name = 1;
249
+ * @generated from protobuf field: optional string role_name = 1
252
250
  */
253
251
  roleName?: string;
254
252
  /**
255
- * @generated from protobuf field: optional string role_format = 2;
253
+ * @generated from protobuf field: optional string role_format = 2
256
254
  */
257
255
  roleFormat?: string;
258
256
  }
259
257
  /**
260
- * @dbscanner: json
261
- *
262
258
  * @generated from protobuf message resources.qualifications.QualificationExamSettings
263
259
  */
264
260
  export interface QualificationExamSettings {
265
261
  /**
266
- * @generated from protobuf field: google.protobuf.Duration time = 1;
262
+ * @generated from protobuf field: google.protobuf.Duration time = 1
267
263
  */
268
264
  time?: Duration;
265
+ /**
266
+ * @generated from protobuf field: bool auto_grade = 2
267
+ */
268
+ autoGrade: boolean;
269
+ /**
270
+ * @generated from protobuf field: resources.qualifications.AutoGradeMode auto_grade_mode = 3
271
+ */
272
+ autoGradeMode: AutoGradeMode;
273
+ /**
274
+ * @generated from protobuf field: int32 minimum_points = 4
275
+ */
276
+ minimumPoints: number;
269
277
  }
270
278
  /**
271
279
  * @generated from protobuf message resources.qualifications.QualificationRequest
272
280
  */
273
281
  export interface QualificationRequest {
274
282
  /**
275
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 1;
283
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 1
276
284
  */
277
285
  createdAt?: Timestamp;
278
286
  /**
279
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 2;
287
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 2
280
288
  */
281
289
  deletedAt?: Timestamp;
282
290
  /**
283
- * @generated from protobuf field: uint64 qualification_id = 3;
291
+ * @generated from protobuf field: int64 qualification_id = 3
284
292
  */
285
- qualificationId: number; // @gotags: sql:"primary_key" alias:"qualification_id"
293
+ qualificationId: number;
286
294
  /**
287
- * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 4;
295
+ * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 4
288
296
  */
289
297
  qualification?: QualificationShort;
290
298
  /**
291
- * @generated from protobuf field: int32 user_id = 5;
299
+ * @generated from protobuf field: int32 user_id = 5
292
300
  */
293
- userId: number; // @gotags: sql:"primary_key"
301
+ userId: number;
294
302
  /**
295
- * @generated from protobuf field: resources.users.UserShort user = 6;
303
+ * @generated from protobuf field: resources.users.UserShort user = 6
296
304
  */
297
- user?: UserShort; // @gotags: alias:"user"
305
+ user?: UserShort;
298
306
  /**
299
- * @sanitize: method=StripTags
300
- *
301
- * @generated from protobuf field: optional string user_comment = 7;
307
+ * @generated from protobuf field: optional string user_comment = 7
302
308
  */
303
309
  userComment?: string;
304
310
  /**
305
- * @generated from protobuf field: optional resources.qualifications.RequestStatus status = 8;
311
+ * @generated from protobuf field: optional resources.qualifications.RequestStatus status = 8
306
312
  */
307
313
  status?: RequestStatus;
308
314
  /**
309
- * @generated from protobuf field: optional resources.timestamp.Timestamp approved_at = 9;
315
+ * @generated from protobuf field: optional resources.timestamp.Timestamp approved_at = 9
310
316
  */
311
317
  approvedAt?: Timestamp;
312
318
  /**
313
- * @sanitize: method=StripTags
314
- *
315
- * @generated from protobuf field: optional string approver_comment = 10;
319
+ * @generated from protobuf field: optional string approver_comment = 10
316
320
  */
317
321
  approverComment?: string;
318
322
  /**
319
- * @generated from protobuf field: optional int32 approver_id = 11;
323
+ * @generated from protobuf field: optional int32 approver_id = 11
320
324
  */
321
325
  approverId?: number;
322
326
  /**
323
- * @generated from protobuf field: optional resources.users.UserShort approver = 12;
327
+ * @generated from protobuf field: optional resources.users.UserShort approver = 12
324
328
  */
325
- approver?: UserShort; // @gotags: alias:"approver"
329
+ approver?: UserShort;
326
330
  /**
327
- * @generated from protobuf field: optional string approver_job = 13;
331
+ * @generated from protobuf field: optional string approver_job = 13
328
332
  */
329
333
  approverJob?: string;
330
334
  }
@@ -333,57 +337,55 @@ export interface QualificationRequest {
333
337
  */
334
338
  export interface QualificationResult {
335
339
  /**
336
- * @generated from protobuf field: uint64 id = 1;
340
+ * @generated from protobuf field: int64 id = 1
337
341
  */
338
- id: number; // @gotags: sql:"primary_key" alias:"id"
342
+ id: number;
339
343
  /**
340
- * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2;
344
+ * @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 2
341
345
  */
342
346
  createdAt?: Timestamp;
343
347
  /**
344
- * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3;
348
+ * @generated from protobuf field: optional resources.timestamp.Timestamp deleted_at = 3
345
349
  */
346
350
  deletedAt?: Timestamp;
347
351
  /**
348
- * @generated from protobuf field: uint64 qualification_id = 4;
352
+ * @generated from protobuf field: int64 qualification_id = 4
349
353
  */
350
354
  qualificationId: number;
351
355
  /**
352
- * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 5;
356
+ * @generated from protobuf field: optional resources.qualifications.QualificationShort qualification = 5
353
357
  */
354
358
  qualification?: QualificationShort;
355
359
  /**
356
- * @generated from protobuf field: int32 user_id = 6;
360
+ * @generated from protobuf field: int32 user_id = 6
357
361
  */
358
362
  userId: number;
359
363
  /**
360
- * @generated from protobuf field: resources.users.UserShort user = 7;
364
+ * @generated from protobuf field: resources.users.UserShort user = 7
361
365
  */
362
- user?: UserShort; // @gotags: alias:"user"
366
+ user?: UserShort;
363
367
  /**
364
- * @generated from protobuf field: resources.qualifications.ResultStatus status = 8;
368
+ * @generated from protobuf field: resources.qualifications.ResultStatus status = 8
365
369
  */
366
370
  status: ResultStatus;
367
371
  /**
368
- * @generated from protobuf field: optional float score = 9;
372
+ * @generated from protobuf field: optional float score = 9
369
373
  */
370
374
  score?: number;
371
375
  /**
372
- * @sanitize: method=StripTags
373
- *
374
- * @generated from protobuf field: string summary = 10;
376
+ * @generated from protobuf field: string summary = 10
375
377
  */
376
378
  summary: string;
377
379
  /**
378
- * @generated from protobuf field: int32 creator_id = 11;
380
+ * @generated from protobuf field: int32 creator_id = 11
379
381
  */
380
382
  creatorId: number;
381
383
  /**
382
- * @generated from protobuf field: resources.users.UserShort creator = 12;
384
+ * @generated from protobuf field: resources.users.UserShort creator = 12
383
385
  */
384
- creator?: UserShort; // @gotags: alias:"creator"
386
+ creator?: UserShort;
385
387
  /**
386
- * @generated from protobuf field: string creator_job = 13;
388
+ * @generated from protobuf field: string creator_job = 13
387
389
  */
388
390
  creatorJob: string;
389
391
  }
@@ -408,6 +410,23 @@ export enum QualificationExamMode {
408
410
  */
409
411
  ENABLED = 3
410
412
  }
413
+ /**
414
+ * @generated from protobuf enum resources.qualifications.AutoGradeMode
415
+ */
416
+ export enum AutoGradeMode {
417
+ /**
418
+ * @generated from protobuf enum value: AUTO_GRADE_MODE_UNSPECIFIED = 0;
419
+ */
420
+ UNSPECIFIED = 0,
421
+ /**
422
+ * @generated from protobuf enum value: AUTO_GRADE_MODE_STRICT = 1;
423
+ */
424
+ STRICT = 1,
425
+ /**
426
+ * @generated from protobuf enum value: AUTO_GRADE_MODE_PARTIAL_CREDIT = 2;
427
+ */
428
+ PARTIAL_CREDIT = 2
429
+ }
411
430
  /**
412
431
  * @generated from protobuf enum resources.qualifications.RequestStatus
413
432
  */
@@ -466,32 +485,34 @@ export enum ResultStatus {
466
485
  class Qualification$Type extends MessageType<Qualification> {
467
486
  constructor() {
468
487
  super("resources.qualifications.Qualification", [
469
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
488
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
470
489
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
471
490
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
472
491
  { 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 } } } },
492
+ { no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
493
+ { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
475
494
  { 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" } } } }
495
+ { no: 8, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
496
+ { no: 9, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
497
+ { no: 10, name: "abbreviation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
498
+ { no: 11, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "1024" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
499
+ { no: 12, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
500
+ { no: 13, name: "content", kind: "message", T: () => Content },
501
+ { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
502
+ { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
503
+ { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
504
+ { no: 17, name: "access", kind: "message", T: () => QualificationAccess },
505
+ { no: 18, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
506
+ { no: 19, name: "discord_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
507
+ { no: 20, name: "discord_settings", kind: "message", T: () => QualificationDiscordSettings },
508
+ { no: 21, name: "exam_mode", kind: "enum", T: () => ["resources.qualifications.QualificationExamMode", QualificationExamMode, "QUALIFICATION_EXAM_MODE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
509
+ { no: 22, name: "exam_settings", kind: "message", T: () => QualificationExamSettings },
510
+ { no: 23, name: "exam", kind: "message", T: () => ExamQuestions },
511
+ { no: 24, name: "result", kind: "message", T: () => QualificationResult },
512
+ { no: 25, name: "request", kind: "message", T: () => QualificationRequest },
513
+ { no: 26, name: "label_sync_enabled", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
514
+ { 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, method: "StripTags" } } },
515
+ { no: 28, name: "files", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => File, options: { "tagger.tags": "alias:\"files\"" } }
495
516
  ]);
496
517
  }
497
518
  create(value?: PartialMessage<Qualification>): Qualification {
@@ -500,6 +521,7 @@ class Qualification$Type extends MessageType<Qualification> {
500
521
  message.job = "";
501
522
  message.weight = 0;
502
523
  message.closed = false;
524
+ message.draft = false;
503
525
  message.public = false;
504
526
  message.abbreviation = "";
505
527
  message.title = "";
@@ -508,6 +530,7 @@ class Qualification$Type extends MessageType<Qualification> {
508
530
  message.discordSyncEnabled = false;
509
531
  message.examMode = 0;
510
532
  message.labelSyncEnabled = false;
533
+ message.files = [];
511
534
  if (value !== undefined)
512
535
  reflectionMergePartial<Qualification>(this, message, value);
513
536
  return message;
@@ -517,8 +540,8 @@ class Qualification$Type extends MessageType<Qualification> {
517
540
  while (reader.pos < end) {
518
541
  let [fieldNo, wireType] = reader.tag();
519
542
  switch (fieldNo) {
520
- case /* uint64 id */ 1:
521
- message.id = reader.uint64().toNumber();
543
+ case /* int64 id */ 1:
544
+ message.id = reader.int64().toNumber();
522
545
  break;
523
546
  case /* optional resources.timestamp.Timestamp created_at */ 2:
524
547
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -538,63 +561,69 @@ class Qualification$Type extends MessageType<Qualification> {
538
561
  case /* bool closed */ 7:
539
562
  message.closed = reader.bool();
540
563
  break;
541
- case /* bool public */ 26:
564
+ case /* bool draft */ 8:
565
+ message.draft = reader.bool();
566
+ break;
567
+ case /* bool public */ 9:
542
568
  message.public = reader.bool();
543
569
  break;
544
- case /* string abbreviation */ 8:
570
+ case /* string abbreviation */ 10:
545
571
  message.abbreviation = reader.string();
546
572
  break;
547
- case /* string title */ 9:
573
+ case /* string title */ 11:
548
574
  message.title = reader.string();
549
575
  break;
550
- case /* optional string description */ 10:
576
+ case /* optional string description */ 12:
551
577
  message.description = reader.string();
552
578
  break;
553
- case /* resources.common.content.Content content */ 11:
579
+ case /* resources.common.content.Content content */ 13:
554
580
  message.content = Content.internalBinaryRead(reader, reader.uint32(), options, message.content);
555
581
  break;
556
- case /* optional int32 creator_id */ 12:
582
+ case /* optional int32 creator_id */ 14:
557
583
  message.creatorId = reader.int32();
558
584
  break;
559
- case /* optional resources.users.UserShort creator */ 13:
585
+ case /* optional resources.users.UserShort creator */ 15:
560
586
  message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
561
587
  break;
562
- case /* string creator_job */ 14:
588
+ case /* string creator_job */ 16:
563
589
  message.creatorJob = reader.string();
564
590
  break;
565
- case /* resources.qualifications.QualificationAccess access */ 15:
591
+ case /* resources.qualifications.QualificationAccess access */ 17:
566
592
  message.access = QualificationAccess.internalBinaryRead(reader, reader.uint32(), options, message.access);
567
593
  break;
568
- case /* repeated resources.qualifications.QualificationRequirement requirements */ 16:
594
+ case /* repeated resources.qualifications.QualificationRequirement requirements */ 18:
569
595
  message.requirements.push(QualificationRequirement.internalBinaryRead(reader, reader.uint32(), options));
570
596
  break;
571
- case /* bool discord_sync_enabled */ 17:
597
+ case /* bool discord_sync_enabled */ 19:
572
598
  message.discordSyncEnabled = reader.bool();
573
599
  break;
574
- case /* optional resources.qualifications.QualificationDiscordSettings discord_settings */ 18:
600
+ case /* optional resources.qualifications.QualificationDiscordSettings discord_settings */ 20:
575
601
  message.discordSettings = QualificationDiscordSettings.internalBinaryRead(reader, reader.uint32(), options, message.discordSettings);
576
602
  break;
577
- case /* resources.qualifications.QualificationExamMode exam_mode */ 19:
603
+ case /* resources.qualifications.QualificationExamMode exam_mode */ 21:
578
604
  message.examMode = reader.int32();
579
605
  break;
580
- case /* optional resources.qualifications.QualificationExamSettings exam_settings */ 20:
606
+ case /* optional resources.qualifications.QualificationExamSettings exam_settings */ 22:
581
607
  message.examSettings = QualificationExamSettings.internalBinaryRead(reader, reader.uint32(), options, message.examSettings);
582
608
  break;
583
- case /* optional resources.qualifications.ExamQuestions exam */ 21:
609
+ case /* optional resources.qualifications.ExamQuestions exam */ 23:
584
610
  message.exam = ExamQuestions.internalBinaryRead(reader, reader.uint32(), options, message.exam);
585
611
  break;
586
- case /* optional resources.qualifications.QualificationResult result */ 22:
612
+ case /* optional resources.qualifications.QualificationResult result */ 24:
587
613
  message.result = QualificationResult.internalBinaryRead(reader, reader.uint32(), options, message.result);
588
614
  break;
589
- case /* optional resources.qualifications.QualificationRequest request */ 23:
615
+ case /* optional resources.qualifications.QualificationRequest request */ 25:
590
616
  message.request = QualificationRequest.internalBinaryRead(reader, reader.uint32(), options, message.request);
591
617
  break;
592
- case /* bool label_sync_enabled */ 24:
618
+ case /* bool label_sync_enabled */ 26:
593
619
  message.labelSyncEnabled = reader.bool();
594
620
  break;
595
- case /* optional string label_sync_format */ 25:
621
+ case /* optional string label_sync_format */ 27:
596
622
  message.labelSyncFormat = reader.string();
597
623
  break;
624
+ case /* repeated resources.file.File files */ 28:
625
+ message.files.push(File.internalBinaryRead(reader, reader.uint32(), options));
626
+ break;
598
627
  default:
599
628
  let u = options.readUnknownField;
600
629
  if (u === "throw")
@@ -607,9 +636,9 @@ class Qualification$Type extends MessageType<Qualification> {
607
636
  return message;
608
637
  }
609
638
  internalBinaryWrite(message: Qualification, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
610
- /* uint64 id = 1; */
639
+ /* int64 id = 1; */
611
640
  if (message.id !== 0)
612
- writer.tag(1, WireType.Varint).uint64(message.id);
641
+ writer.tag(1, WireType.Varint).int64(message.id);
613
642
  /* optional resources.timestamp.Timestamp created_at = 2; */
614
643
  if (message.createdAt)
615
644
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
@@ -628,63 +657,69 @@ class Qualification$Type extends MessageType<Qualification> {
628
657
  /* bool closed = 7; */
629
658
  if (message.closed !== false)
630
659
  writer.tag(7, WireType.Varint).bool(message.closed);
631
- /* string abbreviation = 8; */
660
+ /* bool draft = 8; */
661
+ if (message.draft !== false)
662
+ writer.tag(8, WireType.Varint).bool(message.draft);
663
+ /* bool public = 9; */
664
+ if (message.public !== false)
665
+ writer.tag(9, WireType.Varint).bool(message.public);
666
+ /* string abbreviation = 10; */
632
667
  if (message.abbreviation !== "")
633
- writer.tag(8, WireType.LengthDelimited).string(message.abbreviation);
634
- /* string title = 9; */
668
+ writer.tag(10, WireType.LengthDelimited).string(message.abbreviation);
669
+ /* string title = 11; */
635
670
  if (message.title !== "")
636
- writer.tag(9, WireType.LengthDelimited).string(message.title);
637
- /* optional string description = 10; */
671
+ writer.tag(11, WireType.LengthDelimited).string(message.title);
672
+ /* optional string description = 12; */
638
673
  if (message.description !== undefined)
639
- writer.tag(10, WireType.LengthDelimited).string(message.description);
640
- /* resources.common.content.Content content = 11; */
674
+ writer.tag(12, WireType.LengthDelimited).string(message.description);
675
+ /* resources.common.content.Content content = 13; */
641
676
  if (message.content)
642
- Content.internalBinaryWrite(message.content, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
643
- /* optional int32 creator_id = 12; */
677
+ Content.internalBinaryWrite(message.content, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
678
+ /* optional int32 creator_id = 14; */
644
679
  if (message.creatorId !== undefined)
645
- writer.tag(12, WireType.Varint).int32(message.creatorId);
646
- /* optional resources.users.UserShort creator = 13; */
680
+ writer.tag(14, WireType.Varint).int32(message.creatorId);
681
+ /* optional resources.users.UserShort creator = 15; */
647
682
  if (message.creator)
648
- UserShort.internalBinaryWrite(message.creator, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
649
- /* string creator_job = 14; */
683
+ UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
684
+ /* string creator_job = 16; */
650
685
  if (message.creatorJob !== "")
651
- writer.tag(14, WireType.LengthDelimited).string(message.creatorJob);
652
- /* resources.qualifications.QualificationAccess access = 15; */
686
+ writer.tag(16, WireType.LengthDelimited).string(message.creatorJob);
687
+ /* resources.qualifications.QualificationAccess access = 17; */
653
688
  if (message.access)
654
- QualificationAccess.internalBinaryWrite(message.access, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
655
- /* repeated resources.qualifications.QualificationRequirement requirements = 16; */
689
+ QualificationAccess.internalBinaryWrite(message.access, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
690
+ /* repeated resources.qualifications.QualificationRequirement requirements = 18; */
656
691
  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; */
692
+ QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
693
+ /* bool discord_sync_enabled = 19; */
659
694
  if (message.discordSyncEnabled !== false)
660
- writer.tag(17, WireType.Varint).bool(message.discordSyncEnabled);
661
- /* optional resources.qualifications.QualificationDiscordSettings discord_settings = 18; */
695
+ writer.tag(19, WireType.Varint).bool(message.discordSyncEnabled);
696
+ /* optional resources.qualifications.QualificationDiscordSettings discord_settings = 20; */
662
697
  if (message.discordSettings)
663
- QualificationDiscordSettings.internalBinaryWrite(message.discordSettings, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
664
- /* resources.qualifications.QualificationExamMode exam_mode = 19; */
698
+ QualificationDiscordSettings.internalBinaryWrite(message.discordSettings, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
699
+ /* resources.qualifications.QualificationExamMode exam_mode = 21; */
665
700
  if (message.examMode !== 0)
666
- writer.tag(19, WireType.Varint).int32(message.examMode);
667
- /* optional resources.qualifications.QualificationExamSettings exam_settings = 20; */
701
+ writer.tag(21, WireType.Varint).int32(message.examMode);
702
+ /* optional resources.qualifications.QualificationExamSettings exam_settings = 22; */
668
703
  if (message.examSettings)
669
- QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
670
- /* optional resources.qualifications.ExamQuestions exam = 21; */
704
+ QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
705
+ /* optional resources.qualifications.ExamQuestions exam = 23; */
671
706
  if (message.exam)
672
- ExamQuestions.internalBinaryWrite(message.exam, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
673
- /* optional resources.qualifications.QualificationResult result = 22; */
707
+ ExamQuestions.internalBinaryWrite(message.exam, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
708
+ /* optional resources.qualifications.QualificationResult result = 24; */
674
709
  if (message.result)
675
- QualificationResult.internalBinaryWrite(message.result, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
676
- /* optional resources.qualifications.QualificationRequest request = 23; */
710
+ QualificationResult.internalBinaryWrite(message.result, writer.tag(24, WireType.LengthDelimited).fork(), options).join();
711
+ /* optional resources.qualifications.QualificationRequest request = 25; */
677
712
  if (message.request)
678
- QualificationRequest.internalBinaryWrite(message.request, writer.tag(23, WireType.LengthDelimited).fork(), options).join();
679
- /* bool label_sync_enabled = 24; */
713
+ QualificationRequest.internalBinaryWrite(message.request, writer.tag(25, WireType.LengthDelimited).fork(), options).join();
714
+ /* bool label_sync_enabled = 26; */
680
715
  if (message.labelSyncEnabled !== false)
681
- writer.tag(24, WireType.Varint).bool(message.labelSyncEnabled);
682
- /* optional string label_sync_format = 25; */
716
+ writer.tag(26, WireType.Varint).bool(message.labelSyncEnabled);
717
+ /* optional string label_sync_format = 27; */
683
718
  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);
719
+ writer.tag(27, WireType.LengthDelimited).string(message.labelSyncFormat);
720
+ /* repeated resources.file.File files = 28; */
721
+ for (let i = 0; i < message.files.length; i++)
722
+ File.internalBinaryWrite(message.files[i], writer.tag(28, WireType.LengthDelimited).fork(), options).join();
688
723
  let u = options.writeUnknownFields;
689
724
  if (u !== false)
690
725
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -699,24 +734,25 @@ export const Qualification = new Qualification$Type();
699
734
  class QualificationShort$Type extends MessageType<QualificationShort> {
700
735
  constructor() {
701
736
  super("resources.qualifications.QualificationShort", [
702
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
737
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
703
738
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
704
739
  { no: 3, name: "updated_at", kind: "message", T: () => Timestamp },
705
740
  { 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 } } } },
741
+ { no: 5, name: "job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
742
+ { no: 6, name: "weight", kind: "scalar", T: 13 /*ScalarType.UINT32*/, options: { "buf.validate.field": { uint32: { lt: 4294967295 } } } },
708
743
  { 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 }
744
+ { no: 8, name: "draft", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
745
+ { no: 9, name: "public", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
746
+ { no: 10, name: "abbreviation", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
747
+ { no: 11, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { minLen: "3", maxLen: "1024" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
748
+ { no: 12, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
749
+ { no: 14, name: "creator_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
750
+ { no: 15, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
751
+ { no: 16, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } },
752
+ { no: 18, name: "requirements", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QualificationRequirement },
753
+ { no: 21, name: "exam_mode", kind: "enum", T: () => ["resources.qualifications.QualificationExamMode", QualificationExamMode, "QUALIFICATION_EXAM_MODE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
754
+ { no: 22, name: "exam_settings", kind: "message", T: () => QualificationExamSettings },
755
+ { no: 24, name: "result", kind: "message", T: () => QualificationResult }
720
756
  ]);
721
757
  }
722
758
  create(value?: PartialMessage<QualificationShort>): QualificationShort {
@@ -725,6 +761,7 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
725
761
  message.job = "";
726
762
  message.weight = 0;
727
763
  message.closed = false;
764
+ message.draft = false;
728
765
  message.public = false;
729
766
  message.abbreviation = "";
730
767
  message.title = "";
@@ -740,8 +777,8 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
740
777
  while (reader.pos < end) {
741
778
  let [fieldNo, wireType] = reader.tag();
742
779
  switch (fieldNo) {
743
- case /* uint64 id */ 1:
744
- message.id = reader.uint64().toNumber();
780
+ case /* int64 id */ 1:
781
+ message.id = reader.int64().toNumber();
745
782
  break;
746
783
  case /* optional resources.timestamp.Timestamp created_at */ 2:
747
784
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -761,37 +798,40 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
761
798
  case /* bool closed */ 7:
762
799
  message.closed = reader.bool();
763
800
  break;
764
- case /* bool public */ 22:
801
+ case /* bool draft */ 8:
802
+ message.draft = reader.bool();
803
+ break;
804
+ case /* bool public */ 9:
765
805
  message.public = reader.bool();
766
806
  break;
767
- case /* string abbreviation */ 8:
807
+ case /* string abbreviation */ 10:
768
808
  message.abbreviation = reader.string();
769
809
  break;
770
- case /* string title */ 9:
810
+ case /* string title */ 11:
771
811
  message.title = reader.string();
772
812
  break;
773
- case /* optional string description */ 10:
813
+ case /* optional string description */ 12:
774
814
  message.description = reader.string();
775
815
  break;
776
- case /* optional int32 creator_id */ 12:
816
+ case /* optional int32 creator_id */ 14:
777
817
  message.creatorId = reader.int32();
778
818
  break;
779
- case /* optional resources.users.UserShort creator */ 13:
819
+ case /* optional resources.users.UserShort creator */ 15:
780
820
  message.creator = UserShort.internalBinaryRead(reader, reader.uint32(), options, message.creator);
781
821
  break;
782
- case /* string creator_job */ 14:
822
+ case /* string creator_job */ 16:
783
823
  message.creatorJob = reader.string();
784
824
  break;
785
- case /* repeated resources.qualifications.QualificationRequirement requirements */ 16:
825
+ case /* repeated resources.qualifications.QualificationRequirement requirements */ 18:
786
826
  message.requirements.push(QualificationRequirement.internalBinaryRead(reader, reader.uint32(), options));
787
827
  break;
788
- case /* resources.qualifications.QualificationExamMode exam_mode */ 18:
828
+ case /* resources.qualifications.QualificationExamMode exam_mode */ 21:
789
829
  message.examMode = reader.int32();
790
830
  break;
791
- case /* optional resources.qualifications.QualificationExamSettings exam_settings */ 19:
831
+ case /* optional resources.qualifications.QualificationExamSettings exam_settings */ 22:
792
832
  message.examSettings = QualificationExamSettings.internalBinaryRead(reader, reader.uint32(), options, message.examSettings);
793
833
  break;
794
- case /* optional resources.qualifications.QualificationResult result */ 21:
834
+ case /* optional resources.qualifications.QualificationResult result */ 24:
795
835
  message.result = QualificationResult.internalBinaryRead(reader, reader.uint32(), options, message.result);
796
836
  break;
797
837
  default:
@@ -806,9 +846,9 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
806
846
  return message;
807
847
  }
808
848
  internalBinaryWrite(message: QualificationShort, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
809
- /* uint64 id = 1; */
849
+ /* int64 id = 1; */
810
850
  if (message.id !== 0)
811
- writer.tag(1, WireType.Varint).uint64(message.id);
851
+ writer.tag(1, WireType.Varint).int64(message.id);
812
852
  /* optional resources.timestamp.Timestamp created_at = 2; */
813
853
  if (message.createdAt)
814
854
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
@@ -827,39 +867,42 @@ class QualificationShort$Type extends MessageType<QualificationShort> {
827
867
  /* bool closed = 7; */
828
868
  if (message.closed !== false)
829
869
  writer.tag(7, WireType.Varint).bool(message.closed);
830
- /* string abbreviation = 8; */
870
+ /* bool draft = 8; */
871
+ if (message.draft !== false)
872
+ writer.tag(8, WireType.Varint).bool(message.draft);
873
+ /* bool public = 9; */
874
+ if (message.public !== false)
875
+ writer.tag(9, WireType.Varint).bool(message.public);
876
+ /* string abbreviation = 10; */
831
877
  if (message.abbreviation !== "")
832
- writer.tag(8, WireType.LengthDelimited).string(message.abbreviation);
833
- /* string title = 9; */
878
+ writer.tag(10, WireType.LengthDelimited).string(message.abbreviation);
879
+ /* string title = 11; */
834
880
  if (message.title !== "")
835
- writer.tag(9, WireType.LengthDelimited).string(message.title);
836
- /* optional string description = 10; */
881
+ writer.tag(11, WireType.LengthDelimited).string(message.title);
882
+ /* optional string description = 12; */
837
883
  if (message.description !== undefined)
838
- writer.tag(10, WireType.LengthDelimited).string(message.description);
839
- /* optional int32 creator_id = 12; */
884
+ writer.tag(12, WireType.LengthDelimited).string(message.description);
885
+ /* optional int32 creator_id = 14; */
840
886
  if (message.creatorId !== undefined)
841
- writer.tag(12, WireType.Varint).int32(message.creatorId);
842
- /* optional resources.users.UserShort creator = 13; */
887
+ writer.tag(14, WireType.Varint).int32(message.creatorId);
888
+ /* optional resources.users.UserShort creator = 15; */
843
889
  if (message.creator)
844
- UserShort.internalBinaryWrite(message.creator, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
845
- /* string creator_job = 14; */
890
+ UserShort.internalBinaryWrite(message.creator, writer.tag(15, WireType.LengthDelimited).fork(), options).join();
891
+ /* string creator_job = 16; */
846
892
  if (message.creatorJob !== "")
847
- writer.tag(14, WireType.LengthDelimited).string(message.creatorJob);
848
- /* repeated resources.qualifications.QualificationRequirement requirements = 16; */
893
+ writer.tag(16, WireType.LengthDelimited).string(message.creatorJob);
894
+ /* repeated resources.qualifications.QualificationRequirement requirements = 18; */
849
895
  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; */
896
+ QualificationRequirement.internalBinaryWrite(message.requirements[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
897
+ /* resources.qualifications.QualificationExamMode exam_mode = 21; */
852
898
  if (message.examMode !== 0)
853
- writer.tag(18, WireType.Varint).int32(message.examMode);
854
- /* optional resources.qualifications.QualificationExamSettings exam_settings = 19; */
899
+ writer.tag(21, WireType.Varint).int32(message.examMode);
900
+ /* optional resources.qualifications.QualificationExamSettings exam_settings = 22; */
855
901
  if (message.examSettings)
856
- QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
857
- /* optional resources.qualifications.QualificationResult result = 21; */
902
+ QualificationExamSettings.internalBinaryWrite(message.examSettings, writer.tag(22, WireType.LengthDelimited).fork(), options).join();
903
+ /* optional resources.qualifications.QualificationResult result = 24; */
858
904
  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);
905
+ QualificationResult.internalBinaryWrite(message.result, writer.tag(24, WireType.LengthDelimited).fork(), options).join();
863
906
  let u = options.writeUnknownFields;
864
907
  if (u !== false)
865
908
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -874,11 +917,11 @@ export const QualificationShort = new QualificationShort$Type();
874
917
  class QualificationRequirement$Type extends MessageType<QualificationRequirement> {
875
918
  constructor() {
876
919
  super("resources.qualifications.QualificationRequirement", [
877
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
920
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
878
921
  { 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 }
922
+ { no: 3, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
923
+ { no: 4, name: "target_qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
924
+ { no: 5, name: "target_qualification", kind: "message", T: () => QualificationShort, options: { "tagger.tags": "alias:\"targetqualification\"" } }
882
925
  ]);
883
926
  }
884
927
  create(value?: PartialMessage<QualificationRequirement>): QualificationRequirement {
@@ -895,17 +938,17 @@ class QualificationRequirement$Type extends MessageType<QualificationRequirement
895
938
  while (reader.pos < end) {
896
939
  let [fieldNo, wireType] = reader.tag();
897
940
  switch (fieldNo) {
898
- case /* uint64 id */ 1:
899
- message.id = reader.uint64().toNumber();
941
+ case /* int64 id */ 1:
942
+ message.id = reader.int64().toNumber();
900
943
  break;
901
944
  case /* optional resources.timestamp.Timestamp created_at */ 2:
902
945
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
903
946
  break;
904
- case /* uint64 qualification_id */ 3:
905
- message.qualificationId = reader.uint64().toNumber();
947
+ case /* int64 qualification_id */ 3:
948
+ message.qualificationId = reader.int64().toNumber();
906
949
  break;
907
- case /* uint64 target_qualification_id */ 4:
908
- message.targetQualificationId = reader.uint64().toNumber();
950
+ case /* int64 target_qualification_id */ 4:
951
+ message.targetQualificationId = reader.int64().toNumber();
909
952
  break;
910
953
  case /* optional resources.qualifications.QualificationShort target_qualification */ 5:
911
954
  message.targetQualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.targetQualification);
@@ -922,18 +965,18 @@ class QualificationRequirement$Type extends MessageType<QualificationRequirement
922
965
  return message;
923
966
  }
924
967
  internalBinaryWrite(message: QualificationRequirement, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
925
- /* uint64 id = 1; */
968
+ /* int64 id = 1; */
926
969
  if (message.id !== 0)
927
- writer.tag(1, WireType.Varint).uint64(message.id);
970
+ writer.tag(1, WireType.Varint).int64(message.id);
928
971
  /* optional resources.timestamp.Timestamp created_at = 2; */
929
972
  if (message.createdAt)
930
973
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
931
- /* uint64 qualification_id = 3; */
974
+ /* int64 qualification_id = 3; */
932
975
  if (message.qualificationId !== 0)
933
- writer.tag(3, WireType.Varint).uint64(message.qualificationId);
934
- /* uint64 target_qualification_id = 4; */
976
+ writer.tag(3, WireType.Varint).int64(message.qualificationId);
977
+ /* int64 target_qualification_id = 4; */
935
978
  if (message.targetQualificationId !== 0)
936
- writer.tag(4, WireType.Varint).uint64(message.targetQualificationId);
979
+ writer.tag(4, WireType.Varint).int64(message.targetQualificationId);
937
980
  /* optional resources.qualifications.QualificationShort target_qualification = 5; */
938
981
  if (message.targetQualification)
939
982
  QualificationShort.internalBinaryWrite(message.targetQualification, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
@@ -951,9 +994,9 @@ export const QualificationRequirement = new QualificationRequirement$Type();
951
994
  class QualificationDiscordSettings$Type extends MessageType<QualificationDiscordSettings> {
952
995
  constructor() {
953
996
  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
- ]);
997
+ { no: 1, name: "role_name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } },
998
+ { no: 2, name: "role_format", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "64" } } } }
999
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
957
1000
  }
958
1001
  create(value?: PartialMessage<QualificationDiscordSettings>): QualificationDiscordSettings {
959
1002
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -1004,11 +1047,17 @@ export const QualificationDiscordSettings = new QualificationDiscordSettings$Typ
1004
1047
  class QualificationExamSettings$Type extends MessageType<QualificationExamSettings> {
1005
1048
  constructor() {
1006
1049
  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
- ]);
1050
+ { no: 1, name: "time", kind: "message", T: () => Duration, options: { "buf.validate.field": { required: true, duration: { lt: { seconds: "1036800" }, gte: { seconds: "300" } } } } },
1051
+ { no: 2, name: "auto_grade", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1052
+ { no: 3, name: "auto_grade_mode", kind: "enum", T: () => ["resources.qualifications.AutoGradeMode", AutoGradeMode, "AUTO_GRADE_MODE_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1053
+ { no: 4, name: "minimum_points", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
1054
+ ], { "codegen.dbscanner.dbscanner": { enabled: true } });
1009
1055
  }
1010
1056
  create(value?: PartialMessage<QualificationExamSettings>): QualificationExamSettings {
1011
1057
  const message = globalThis.Object.create((this.messagePrototype!));
1058
+ message.autoGrade = false;
1059
+ message.autoGradeMode = 0;
1060
+ message.minimumPoints = 0;
1012
1061
  if (value !== undefined)
1013
1062
  reflectionMergePartial<QualificationExamSettings>(this, message, value);
1014
1063
  return message;
@@ -1021,6 +1070,15 @@ class QualificationExamSettings$Type extends MessageType<QualificationExamSettin
1021
1070
  case /* google.protobuf.Duration time */ 1:
1022
1071
  message.time = Duration.internalBinaryRead(reader, reader.uint32(), options, message.time);
1023
1072
  break;
1073
+ case /* bool auto_grade */ 2:
1074
+ message.autoGrade = reader.bool();
1075
+ break;
1076
+ case /* resources.qualifications.AutoGradeMode auto_grade_mode */ 3:
1077
+ message.autoGradeMode = reader.int32();
1078
+ break;
1079
+ case /* int32 minimum_points */ 4:
1080
+ message.minimumPoints = reader.int32();
1081
+ break;
1024
1082
  default:
1025
1083
  let u = options.readUnknownField;
1026
1084
  if (u === "throw")
@@ -1036,6 +1094,15 @@ class QualificationExamSettings$Type extends MessageType<QualificationExamSettin
1036
1094
  /* google.protobuf.Duration time = 1; */
1037
1095
  if (message.time)
1038
1096
  Duration.internalBinaryWrite(message.time, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1097
+ /* bool auto_grade = 2; */
1098
+ if (message.autoGrade !== false)
1099
+ writer.tag(2, WireType.Varint).bool(message.autoGrade);
1100
+ /* resources.qualifications.AutoGradeMode auto_grade_mode = 3; */
1101
+ if (message.autoGradeMode !== 0)
1102
+ writer.tag(3, WireType.Varint).int32(message.autoGradeMode);
1103
+ /* int32 minimum_points = 4; */
1104
+ if (message.minimumPoints !== 0)
1105
+ writer.tag(4, WireType.Varint).int32(message.minimumPoints);
1039
1106
  let u = options.writeUnknownFields;
1040
1107
  if (u !== false)
1041
1108
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1052,16 +1119,16 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1052
1119
  super("resources.qualifications.QualificationRequest", [
1053
1120
  { no: 1, name: "created_at", kind: "message", T: () => Timestamp },
1054
1121
  { 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*/ },
1122
+ { 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
1123
  { 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 } } } },
1124
+ { no: 5, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } }, "tagger.tags": "sql:\"primary_key\"" } },
1125
+ { no: 6, name: "user", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"user\"" } },
1126
+ { 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, method: "StripTags" } } },
1127
+ { no: 8, name: "status", kind: "enum", opt: true, T: () => ["resources.qualifications.RequestStatus", RequestStatus, "REQUEST_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1061
1128
  { 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 },
1129
+ { 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, method: "StripTags" } } },
1130
+ { no: 11, name: "approver_id", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
1131
+ { no: 12, name: "approver", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"approver\"" } },
1065
1132
  { no: 13, name: "approver_job", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
1066
1133
  ]);
1067
1134
  }
@@ -1084,8 +1151,8 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1084
1151
  case /* optional resources.timestamp.Timestamp deleted_at */ 2:
1085
1152
  message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
1086
1153
  break;
1087
- case /* uint64 qualification_id */ 3:
1088
- message.qualificationId = reader.uint64().toNumber();
1154
+ case /* int64 qualification_id */ 3:
1155
+ message.qualificationId = reader.int64().toNumber();
1089
1156
  break;
1090
1157
  case /* optional resources.qualifications.QualificationShort qualification */ 4:
1091
1158
  message.qualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.qualification);
@@ -1135,9 +1202,9 @@ class QualificationRequest$Type extends MessageType<QualificationRequest> {
1135
1202
  /* optional resources.timestamp.Timestamp deleted_at = 2; */
1136
1203
  if (message.deletedAt)
1137
1204
  Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1138
- /* uint64 qualification_id = 3; */
1205
+ /* int64 qualification_id = 3; */
1139
1206
  if (message.qualificationId !== 0)
1140
- writer.tag(3, WireType.Varint).uint64(message.qualificationId);
1207
+ writer.tag(3, WireType.Varint).int64(message.qualificationId);
1141
1208
  /* optional resources.qualifications.QualificationShort qualification = 4; */
1142
1209
  if (message.qualification)
1143
1210
  QualificationShort.internalBinaryWrite(message.qualification, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
@@ -1182,19 +1249,19 @@ export const QualificationRequest = new QualificationRequest$Type();
1182
1249
  class QualificationResult$Type extends MessageType<QualificationResult> {
1183
1250
  constructor() {
1184
1251
  super("resources.qualifications.QualificationResult", [
1185
- { no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
1252
+ { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "tagger.tags": "sql:\"primary_key\" alias:\"id\"" } },
1186
1253
  { no: 2, name: "created_at", kind: "message", T: () => Timestamp },
1187
1254
  { 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*/ },
1255
+ { no: 4, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
1189
1256
  { 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" } } } }
1257
+ { no: 6, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
1258
+ { no: 7, name: "user", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"user\"" } },
1259
+ { no: 8, name: "status", kind: "enum", T: () => ["resources.qualifications.ResultStatus", ResultStatus, "RESULT_STATUS_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1260
+ { no: 9, name: "score", kind: "scalar", opt: true, T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { float: { lte: 1000, gte: 0 } } } },
1261
+ { no: 10, name: "summary", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
1262
+ { no: 11, name: "creator_id", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gt: 0 } } } },
1263
+ { no: 12, name: "creator", kind: "message", T: () => UserShort, options: { "tagger.tags": "alias:\"creator\"" } },
1264
+ { no: 13, name: "creator_job", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } } } }
1198
1265
  ]);
1199
1266
  }
1200
1267
  create(value?: PartialMessage<QualificationResult>): QualificationResult {
@@ -1215,8 +1282,8 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1215
1282
  while (reader.pos < end) {
1216
1283
  let [fieldNo, wireType] = reader.tag();
1217
1284
  switch (fieldNo) {
1218
- case /* uint64 id */ 1:
1219
- message.id = reader.uint64().toNumber();
1285
+ case /* int64 id */ 1:
1286
+ message.id = reader.int64().toNumber();
1220
1287
  break;
1221
1288
  case /* optional resources.timestamp.Timestamp created_at */ 2:
1222
1289
  message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
@@ -1224,8 +1291,8 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1224
1291
  case /* optional resources.timestamp.Timestamp deleted_at */ 3:
1225
1292
  message.deletedAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.deletedAt);
1226
1293
  break;
1227
- case /* uint64 qualification_id */ 4:
1228
- message.qualificationId = reader.uint64().toNumber();
1294
+ case /* int64 qualification_id */ 4:
1295
+ message.qualificationId = reader.int64().toNumber();
1229
1296
  break;
1230
1297
  case /* optional resources.qualifications.QualificationShort qualification */ 5:
1231
1298
  message.qualification = QualificationShort.internalBinaryRead(reader, reader.uint32(), options, message.qualification);
@@ -1266,18 +1333,18 @@ class QualificationResult$Type extends MessageType<QualificationResult> {
1266
1333
  return message;
1267
1334
  }
1268
1335
  internalBinaryWrite(message: QualificationResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1269
- /* uint64 id = 1; */
1336
+ /* int64 id = 1; */
1270
1337
  if (message.id !== 0)
1271
- writer.tag(1, WireType.Varint).uint64(message.id);
1338
+ writer.tag(1, WireType.Varint).int64(message.id);
1272
1339
  /* optional resources.timestamp.Timestamp created_at = 2; */
1273
1340
  if (message.createdAt)
1274
1341
  Timestamp.internalBinaryWrite(message.createdAt, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1275
1342
  /* optional resources.timestamp.Timestamp deleted_at = 3; */
1276
1343
  if (message.deletedAt)
1277
1344
  Timestamp.internalBinaryWrite(message.deletedAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1278
- /* uint64 qualification_id = 4; */
1345
+ /* int64 qualification_id = 4; */
1279
1346
  if (message.qualificationId !== 0)
1280
- writer.tag(4, WireType.Varint).uint64(message.qualificationId);
1347
+ writer.tag(4, WireType.Varint).int64(message.qualificationId);
1281
1348
  /* optional resources.qualifications.QualificationShort qualification = 5; */
1282
1349
  if (message.qualification)
1283
1350
  QualificationShort.internalBinaryWrite(message.qualification, writer.tag(5, WireType.LengthDelimited).fork(), options).join();