@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.
- package/buf/validate/validate.ts +11301 -0
- package/clients.ts +157 -154
- package/codegen/dbscanner/dbscanner.ts +91 -0
- package/codegen/perms/perms.ts +208 -0
- package/codegen/sanitizer/sanitizer.ts +80 -0
- package/google/protobuf/any.ts +4 -3
- package/google/protobuf/descriptor.ts +393 -239
- package/google/protobuf/duration.ts +4 -3
- package/google/protobuf/struct.ts +485 -0
- package/google/protobuf/timestamp.ts +4 -3
- package/package.json +3 -3
- package/perms.ts +85 -159
- package/resources/accounts/accounts.ts +26 -25
- package/resources/accounts/oauth2.ts +30 -29
- package/resources/audit/audit.ts +36 -35
- package/resources/calendar/access.ts +49 -48
- package/resources/calendar/calendar.ts +122 -126
- package/resources/centrum/access.ts +345 -0
- package/resources/centrum/attributes.ts +8 -11
- package/resources/centrum/dispatchers.ts +149 -0
- package/resources/centrum/dispatches.ts +252 -115
- package/resources/centrum/settings.ts +384 -34
- package/resources/centrum/units.ts +112 -92
- package/resources/centrum/units_access.ts +54 -55
- package/resources/clientconfig/clientconfig.ts +890 -0
- package/resources/collab/collab.ts +817 -0
- package/resources/common/content/content.ts +113 -30
- package/resources/common/cron/cron.ts +43 -31
- package/resources/common/database/database.ts +92 -35
- package/resources/common/error.ts +17 -16
- package/resources/common/grpcws/grpcws.ts +24 -23
- package/resources/common/i18n.ts +20 -24
- package/resources/common/id_mapping.ts +69 -0
- package/resources/common/tests/objects.ts +4 -3
- package/resources/common/uuid.ts +4 -3
- package/resources/discord/discord.ts +209 -0
- package/resources/documents/access.ts +52 -53
- package/resources/documents/activity.ts +235 -58
- package/resources/documents/category.ts +20 -27
- package/resources/documents/comment.ts +26 -25
- package/resources/documents/documents.ts +335 -262
- package/resources/documents/pins.ts +127 -0
- package/resources/documents/requests.ts +31 -30
- package/resources/documents/signoff.ts +55 -0
- package/resources/documents/state.ts +69 -0
- package/resources/documents/templates.ts +119 -136
- package/resources/documents/workflow.ts +35 -24
- package/resources/file/file.ts +152 -0
- package/{services/settings → resources/file}/filestore.ts +179 -165
- package/resources/file/meta.ts +148 -0
- package/resources/jobs/activity.ts +39 -42
- package/resources/jobs/colleagues.ts +67 -60
- package/resources/jobs/conduct.ts +29 -30
- package/resources/jobs/job_props.ts +46 -48
- package/resources/jobs/job_settings.ts +45 -52
- package/resources/jobs/jobs.ts +14 -13
- package/resources/jobs/labels.ts +21 -22
- package/resources/jobs/timeclock.ts +26 -25
- package/resources/laws/laws.ts +40 -49
- package/resources/livemap/coords.ts +81 -0
- package/resources/livemap/heatmap.ts +93 -0
- package/resources/livemap/{livemap.ts → marker_marker.ts} +43 -310
- package/resources/livemap/user_marker.ts +298 -0
- package/resources/mailer/access.ts +75 -74
- package/resources/mailer/email.ts +24 -27
- package/resources/mailer/events.ts +25 -24
- package/resources/mailer/message.ts +45 -50
- package/resources/mailer/settings.ts +12 -15
- package/resources/mailer/template.ts +25 -28
- package/resources/mailer/thread.ts +70 -71
- package/resources/notifications/client_view.ts +239 -0
- package/resources/notifications/events.ts +50 -101
- package/resources/notifications/notifications.ts +52 -57
- package/resources/permissions/attributes.ts +63 -206
- package/resources/permissions/events.ts +149 -0
- package/resources/permissions/permissions.ts +103 -34
- package/resources/qualifications/access.ts +27 -26
- package/resources/qualifications/exam.ts +188 -126
- package/resources/qualifications/qualifications.ts +370 -303
- package/resources/settings/banner.ts +14 -21
- package/resources/settings/config.ts +163 -79
- package/resources/settings/perms.ts +151 -0
- package/resources/settings/status.ts +533 -0
- package/resources/stats/stats.ts +3 -2
- package/resources/sync/activity.ts +24 -23
- package/resources/sync/data.ts +94 -26
- package/resources/timestamp/timestamp.ts +3 -2
- package/resources/{centrum/user_unit.ts → tracker/mapping.ts} +44 -44
- package/resources/userinfo/user_info.ts +464 -0
- package/resources/users/activity.ts +80 -85
- package/resources/users/labels.ts +18 -21
- package/resources/users/licenses.ts +9 -8
- package/resources/users/props.ts +61 -51
- package/resources/users/users.ts +100 -78
- package/resources/vehicles/activity.ts +231 -0
- package/resources/vehicles/props.ts +103 -0
- package/resources/vehicles/vehicles.ts +28 -15
- package/resources/wiki/access.ts +49 -48
- package/resources/wiki/activity.ts +133 -51
- package/resources/wiki/page.ts +134 -87
- package/services/auth/auth.client.ts +24 -27
- package/services/auth/auth.ts +222 -195
- package/services/calendar/calendar.client.ts +32 -91
- package/services/calendar/calendar.ts +110 -109
- package/services/centrum/centrum.client.ts +97 -137
- package/services/centrum/centrum.ts +701 -298
- package/services/citizens/citizens.client.ts +70 -39
- package/services/citizens/citizens.ts +183 -93
- package/services/completor/completor.client.ts +16 -35
- package/services/completor/completor.ts +65 -44
- package/services/documents/collab.client.ts +46 -0
- package/services/documents/collab.ts +13 -0
- package/services/documents/documents.client.ts +88 -217
- package/services/documents/documents.ts +490 -508
- package/services/filestore/filestore.client.ts +86 -0
- package/services/filestore/filestore.ts +262 -0
- package/services/jobs/conduct.client.ts +10 -25
- package/services/jobs/conduct.ts +36 -35
- package/services/jobs/jobs.client.ts +22 -61
- package/services/jobs/jobs.ts +108 -91
- package/services/jobs/timeclock.client.ts +8 -19
- package/services/jobs/timeclock.ts +47 -46
- package/services/livemap/livemap.client.ts +8 -19
- package/services/livemap/livemap.ts +290 -119
- package/services/mailer/mailer.client.ts +44 -127
- package/services/mailer/mailer.ts +213 -216
- package/services/notifications/notifications.client.ts +65 -0
- package/services/{notificator/notificator.ts → notifications/notifications.ts} +117 -74
- package/services/qualifications/qualifications.client.ts +46 -91
- package/services/qualifications/qualifications.ts +181 -175
- package/services/settings/accounts.client.ts +10 -25
- package/services/settings/accounts.ts +64 -41
- package/services/settings/config.client.ts +6 -13
- package/services/settings/config.ts +8 -7
- package/services/settings/cron.client.ts +4 -7
- package/services/settings/cron.ts +4 -3
- package/services/settings/laws.client.ts +10 -25
- package/services/settings/laws.ts +29 -28
- package/services/settings/settings.client.ts +57 -103
- package/services/settings/settings.ts +190 -607
- package/services/settings/system.client.ts +90 -0
- package/services/settings/system.ts +618 -0
- package/services/stats/stats.client.ts +4 -3
- package/services/stats/stats.ts +4 -3
- package/services/sync/sync.client.ts +16 -15
- package/services/sync/sync.ts +82 -52
- package/services/vehicles/vehicles.client.ts +17 -7
- package/services/vehicles/vehicles.ts +169 -24
- package/services/wiki/collab.client.ts +46 -0
- package/services/wiki/collab.ts +13 -0
- package/services/wiki/wiki.client.ts +28 -37
- package/services/wiki/wiki.ts +93 -63
- package/svcs.ts +79 -103
- package/resources/centrum/disponents.ts +0 -81
- package/resources/filestore/file.ts +0 -204
- package/resources/internet/access.ts +0 -358
- package/resources/internet/ads.ts +0 -257
- package/resources/internet/domain.ts +0 -328
- package/resources/internet/page.ts +0 -428
- package/resources/internet/search.ts +0 -128
- package/resources/livemap/tracker.ts +0 -81
- package/services/internet/ads.client.ts +0 -41
- package/services/internet/ads.ts +0 -145
- package/services/internet/domain.client.ts +0 -109
- package/services/internet/domain.ts +0 -658
- package/services/internet/internet.client.ts +0 -58
- package/services/internet/internet.ts +0 -268
- package/services/notificator/notificator.client.ts +0 -76
- package/services/settings/filestore.client.ts +0 -75
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.
|
|
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/exam.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,7 +11,7 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
10
11
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
11
12
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
12
13
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
13
|
-
import { File } from "../
|
|
14
|
+
import { File } from "../file/file";
|
|
14
15
|
import { Timestamp } from "../timestamp/timestamp";
|
|
15
16
|
// Exam / Questions
|
|
16
17
|
|
|
@@ -19,7 +20,7 @@ import { Timestamp } from "../timestamp/timestamp";
|
|
|
19
20
|
*/
|
|
20
21
|
export interface ExamQuestions {
|
|
21
22
|
/**
|
|
22
|
-
* @generated from protobuf field: repeated resources.qualifications.ExamQuestion questions = 1
|
|
23
|
+
* @generated from protobuf field: repeated resources.qualifications.ExamQuestion questions = 1
|
|
23
24
|
*/
|
|
24
25
|
questions: ExamQuestion[];
|
|
25
26
|
}
|
|
@@ -28,49 +29,47 @@ export interface ExamQuestions {
|
|
|
28
29
|
*/
|
|
29
30
|
export interface ExamQuestion {
|
|
30
31
|
/**
|
|
31
|
-
* @generated from protobuf field:
|
|
32
|
+
* @generated from protobuf field: int64 id = 1
|
|
32
33
|
*/
|
|
33
34
|
id: number;
|
|
34
35
|
/**
|
|
35
|
-
* @generated from protobuf field:
|
|
36
|
+
* @generated from protobuf field: int64 qualification_id = 2
|
|
36
37
|
*/
|
|
37
38
|
qualificationId: number;
|
|
38
39
|
/**
|
|
39
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3
|
|
40
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3
|
|
40
41
|
*/
|
|
41
42
|
createdAt?: Timestamp;
|
|
42
43
|
/**
|
|
43
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4
|
|
44
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp updated_at = 4
|
|
44
45
|
*/
|
|
45
46
|
updatedAt?: Timestamp;
|
|
46
47
|
/**
|
|
47
|
-
* @
|
|
48
|
-
*
|
|
49
|
-
* @generated from protobuf field: string title = 5;
|
|
48
|
+
* @generated from protobuf field: string title = 5
|
|
50
49
|
*/
|
|
51
50
|
title: string;
|
|
52
51
|
/**
|
|
53
|
-
* @
|
|
54
|
-
*
|
|
55
|
-
* @generated from protobuf field: optional string description = 6;
|
|
52
|
+
* @generated from protobuf field: optional string description = 6
|
|
56
53
|
*/
|
|
57
54
|
description?: string;
|
|
58
55
|
/**
|
|
59
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionData data = 7
|
|
56
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionData data = 7
|
|
60
57
|
*/
|
|
61
58
|
data?: ExamQuestionData;
|
|
62
59
|
/**
|
|
63
|
-
* @generated from protobuf field: optional resources.qualifications.ExamQuestionAnswerData answer = 8
|
|
60
|
+
* @generated from protobuf field: optional resources.qualifications.ExamQuestionAnswerData answer = 8
|
|
64
61
|
*/
|
|
65
62
|
answer?: ExamQuestionAnswerData;
|
|
66
63
|
/**
|
|
67
|
-
* @generated from protobuf field: optional int32 points = 9
|
|
64
|
+
* @generated from protobuf field: optional int32 points = 9
|
|
68
65
|
*/
|
|
69
66
|
points?: number;
|
|
67
|
+
/**
|
|
68
|
+
* @generated from protobuf field: int32 order = 10
|
|
69
|
+
*/
|
|
70
|
+
order: number;
|
|
70
71
|
}
|
|
71
72
|
/**
|
|
72
|
-
* @dbscanner: json
|
|
73
|
-
*
|
|
74
73
|
* @generated from protobuf message resources.qualifications.ExamQuestionData
|
|
75
74
|
*/
|
|
76
75
|
export interface ExamQuestionData {
|
|
@@ -80,37 +79,37 @@ export interface ExamQuestionData {
|
|
|
80
79
|
data: {
|
|
81
80
|
oneofKind: "separator";
|
|
82
81
|
/**
|
|
83
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionSeparator separator = 1
|
|
82
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionSeparator separator = 1
|
|
84
83
|
*/
|
|
85
84
|
separator: ExamQuestionSeparator;
|
|
86
85
|
} | {
|
|
87
86
|
oneofKind: "image";
|
|
88
87
|
/**
|
|
89
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionImage image = 6
|
|
88
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionImage image = 6
|
|
90
89
|
*/
|
|
91
90
|
image: ExamQuestionImage;
|
|
92
91
|
} | {
|
|
93
92
|
oneofKind: "yesno";
|
|
94
93
|
/**
|
|
95
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionYesNo yesno = 2
|
|
94
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionYesNo yesno = 2
|
|
96
95
|
*/
|
|
97
96
|
yesno: ExamQuestionYesNo;
|
|
98
97
|
} | {
|
|
99
98
|
oneofKind: "freeText";
|
|
100
99
|
/**
|
|
101
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionText free_text = 3
|
|
100
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionText free_text = 3
|
|
102
101
|
*/
|
|
103
102
|
freeText: ExamQuestionText;
|
|
104
103
|
} | {
|
|
105
104
|
oneofKind: "singleChoice";
|
|
106
105
|
/**
|
|
107
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionSingleChoice single_choice = 4
|
|
106
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionSingleChoice single_choice = 4
|
|
108
107
|
*/
|
|
109
108
|
singleChoice: ExamQuestionSingleChoice;
|
|
110
109
|
} | {
|
|
111
110
|
oneofKind: "multipleChoice";
|
|
112
111
|
/**
|
|
113
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestionMultipleChoice multiple_choice = 5
|
|
112
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestionMultipleChoice multiple_choice = 5
|
|
114
113
|
*/
|
|
115
114
|
multipleChoice: ExamQuestionMultipleChoice;
|
|
116
115
|
} | {
|
|
@@ -127,11 +126,11 @@ export interface ExamQuestionSeparator {
|
|
|
127
126
|
*/
|
|
128
127
|
export interface ExamQuestionImage {
|
|
129
128
|
/**
|
|
130
|
-
* @generated from protobuf field: resources.
|
|
129
|
+
* @generated from protobuf field: resources.file.File image = 1
|
|
131
130
|
*/
|
|
132
131
|
image?: File;
|
|
133
132
|
/**
|
|
134
|
-
* @generated from protobuf field: optional string alt = 2
|
|
133
|
+
* @generated from protobuf field: optional string alt = 2
|
|
135
134
|
*/
|
|
136
135
|
alt?: string;
|
|
137
136
|
}
|
|
@@ -145,11 +144,11 @@ export interface ExamQuestionYesNo {
|
|
|
145
144
|
*/
|
|
146
145
|
export interface ExamQuestionText {
|
|
147
146
|
/**
|
|
148
|
-
* @generated from protobuf field: int32 min_length = 1
|
|
147
|
+
* @generated from protobuf field: int32 min_length = 1
|
|
149
148
|
*/
|
|
150
149
|
minLength: number;
|
|
151
150
|
/**
|
|
152
|
-
* @generated from protobuf field: int32 max_length = 2
|
|
151
|
+
* @generated from protobuf field: int32 max_length = 2
|
|
153
152
|
*/
|
|
154
153
|
maxLength: number;
|
|
155
154
|
}
|
|
@@ -158,9 +157,7 @@ export interface ExamQuestionText {
|
|
|
158
157
|
*/
|
|
159
158
|
export interface ExamQuestionSingleChoice {
|
|
160
159
|
/**
|
|
161
|
-
* @
|
|
162
|
-
*
|
|
163
|
-
* @generated from protobuf field: repeated string choices = 1;
|
|
160
|
+
* @generated from protobuf field: repeated string choices = 1
|
|
164
161
|
*/
|
|
165
162
|
choices: string[];
|
|
166
163
|
}
|
|
@@ -169,26 +166,52 @@ export interface ExamQuestionSingleChoice {
|
|
|
169
166
|
*/
|
|
170
167
|
export interface ExamQuestionMultipleChoice {
|
|
171
168
|
/**
|
|
172
|
-
* @
|
|
173
|
-
*
|
|
174
|
-
* @generated from protobuf field: repeated string choices = 1;
|
|
169
|
+
* @generated from protobuf field: repeated string choices = 1
|
|
175
170
|
*/
|
|
176
171
|
choices: string[];
|
|
177
172
|
/**
|
|
178
|
-
* @generated from protobuf field: optional int32 limit = 2
|
|
173
|
+
* @generated from protobuf field: optional int32 limit = 2
|
|
179
174
|
*/
|
|
180
175
|
limit?: number;
|
|
181
176
|
}
|
|
182
177
|
/**
|
|
183
|
-
* @dbscanner: json
|
|
184
|
-
*
|
|
185
178
|
* @generated from protobuf message resources.qualifications.ExamQuestionAnswerData
|
|
186
179
|
*/
|
|
187
180
|
export interface ExamQuestionAnswerData {
|
|
188
181
|
/**
|
|
189
|
-
* @generated from protobuf field: string answer_key = 1
|
|
182
|
+
* @generated from protobuf field: string answer_key = 1
|
|
190
183
|
*/
|
|
191
184
|
answerKey: string;
|
|
185
|
+
/**
|
|
186
|
+
* @generated from protobuf oneof: answer
|
|
187
|
+
*/
|
|
188
|
+
answer: {
|
|
189
|
+
oneofKind: "yesno";
|
|
190
|
+
/**
|
|
191
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseYesNo yesno = 4
|
|
192
|
+
*/
|
|
193
|
+
yesno: ExamResponseYesNo;
|
|
194
|
+
} | {
|
|
195
|
+
oneofKind: "freeText";
|
|
196
|
+
/**
|
|
197
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseText free_text = 5
|
|
198
|
+
*/
|
|
199
|
+
freeText: ExamResponseText;
|
|
200
|
+
} | {
|
|
201
|
+
oneofKind: "singleChoice";
|
|
202
|
+
/**
|
|
203
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseSingleChoice single_choice = 6
|
|
204
|
+
*/
|
|
205
|
+
singleChoice: ExamResponseSingleChoice;
|
|
206
|
+
} | {
|
|
207
|
+
oneofKind: "multipleChoice";
|
|
208
|
+
/**
|
|
209
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseMultipleChoice multiple_choice = 7
|
|
210
|
+
*/
|
|
211
|
+
multipleChoice: ExamResponseMultipleChoice;
|
|
212
|
+
} | {
|
|
213
|
+
oneofKind: undefined;
|
|
214
|
+
};
|
|
192
215
|
}
|
|
193
216
|
// User Response
|
|
194
217
|
|
|
@@ -197,46 +220,44 @@ export interface ExamQuestionAnswerData {
|
|
|
197
220
|
*/
|
|
198
221
|
export interface ExamUser {
|
|
199
222
|
/**
|
|
200
|
-
* @generated from protobuf field:
|
|
223
|
+
* @generated from protobuf field: int64 qualification_id = 1
|
|
201
224
|
*/
|
|
202
225
|
qualificationId: number;
|
|
203
226
|
/**
|
|
204
|
-
* @generated from protobuf field: int32 user_id = 2
|
|
227
|
+
* @generated from protobuf field: int32 user_id = 2
|
|
205
228
|
*/
|
|
206
229
|
userId: number;
|
|
207
230
|
/**
|
|
208
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3
|
|
231
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3
|
|
209
232
|
*/
|
|
210
233
|
createdAt?: Timestamp;
|
|
211
234
|
/**
|
|
212
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp started_at = 4
|
|
235
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp started_at = 4
|
|
213
236
|
*/
|
|
214
237
|
startedAt?: Timestamp;
|
|
215
238
|
/**
|
|
216
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp ends_at = 5
|
|
239
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp ends_at = 5
|
|
217
240
|
*/
|
|
218
241
|
endsAt?: Timestamp;
|
|
219
242
|
/**
|
|
220
|
-
* @generated from protobuf field: optional resources.timestamp.Timestamp ended_at = 6
|
|
243
|
+
* @generated from protobuf field: optional resources.timestamp.Timestamp ended_at = 6
|
|
221
244
|
*/
|
|
222
245
|
endedAt?: Timestamp;
|
|
223
246
|
}
|
|
224
247
|
/**
|
|
225
|
-
* @dbscanner: json
|
|
226
|
-
*
|
|
227
248
|
* @generated from protobuf message resources.qualifications.ExamResponses
|
|
228
249
|
*/
|
|
229
250
|
export interface ExamResponses {
|
|
230
251
|
/**
|
|
231
|
-
* @generated from protobuf field:
|
|
252
|
+
* @generated from protobuf field: int64 qualification_id = 1
|
|
232
253
|
*/
|
|
233
254
|
qualificationId: number;
|
|
234
255
|
/**
|
|
235
|
-
* @generated from protobuf field: int32 user_id = 2
|
|
256
|
+
* @generated from protobuf field: int32 user_id = 2
|
|
236
257
|
*/
|
|
237
258
|
userId: number;
|
|
238
259
|
/**
|
|
239
|
-
* @generated from protobuf field: repeated resources.qualifications.ExamResponse responses = 3
|
|
260
|
+
* @generated from protobuf field: repeated resources.qualifications.ExamResponse responses = 3
|
|
240
261
|
*/
|
|
241
262
|
responses: ExamResponse[];
|
|
242
263
|
}
|
|
@@ -245,19 +266,19 @@ export interface ExamResponses {
|
|
|
245
266
|
*/
|
|
246
267
|
export interface ExamResponse {
|
|
247
268
|
/**
|
|
248
|
-
* @generated from protobuf field:
|
|
269
|
+
* @generated from protobuf field: int64 question_id = 1
|
|
249
270
|
*/
|
|
250
271
|
questionId: number;
|
|
251
272
|
/**
|
|
252
|
-
* @generated from protobuf field: int32 user_id = 2
|
|
273
|
+
* @generated from protobuf field: int32 user_id = 2
|
|
253
274
|
*/
|
|
254
275
|
userId: number;
|
|
255
276
|
/**
|
|
256
|
-
* @generated from protobuf field: resources.qualifications.ExamQuestion question = 3
|
|
277
|
+
* @generated from protobuf field: resources.qualifications.ExamQuestion question = 3
|
|
257
278
|
*/
|
|
258
279
|
question?: ExamQuestion;
|
|
259
280
|
/**
|
|
260
|
-
* @generated from protobuf field: resources.qualifications.ExamResponseData response = 4
|
|
281
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseData response = 4
|
|
261
282
|
*/
|
|
262
283
|
response?: ExamResponseData;
|
|
263
284
|
}
|
|
@@ -271,31 +292,31 @@ export interface ExamResponseData {
|
|
|
271
292
|
response: {
|
|
272
293
|
oneofKind: "separator";
|
|
273
294
|
/**
|
|
274
|
-
* @generated from protobuf field: resources.qualifications.ExamResponseSeparator separator = 3
|
|
295
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseSeparator separator = 3
|
|
275
296
|
*/
|
|
276
297
|
separator: ExamResponseSeparator;
|
|
277
298
|
} | {
|
|
278
299
|
oneofKind: "yesno";
|
|
279
300
|
/**
|
|
280
|
-
* @generated from protobuf field: resources.qualifications.ExamResponseYesNo yesno = 4
|
|
301
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseYesNo yesno = 4
|
|
281
302
|
*/
|
|
282
303
|
yesno: ExamResponseYesNo;
|
|
283
304
|
} | {
|
|
284
305
|
oneofKind: "freeText";
|
|
285
306
|
/**
|
|
286
|
-
* @generated from protobuf field: resources.qualifications.ExamResponseText free_text = 5
|
|
307
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseText free_text = 5
|
|
287
308
|
*/
|
|
288
309
|
freeText: ExamResponseText;
|
|
289
310
|
} | {
|
|
290
311
|
oneofKind: "singleChoice";
|
|
291
312
|
/**
|
|
292
|
-
* @generated from protobuf field: resources.qualifications.ExamResponseSingleChoice single_choice = 6
|
|
313
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseSingleChoice single_choice = 6
|
|
293
314
|
*/
|
|
294
315
|
singleChoice: ExamResponseSingleChoice;
|
|
295
316
|
} | {
|
|
296
317
|
oneofKind: "multipleChoice";
|
|
297
318
|
/**
|
|
298
|
-
* @generated from protobuf field: resources.qualifications.ExamResponseMultipleChoice multiple_choice = 7
|
|
319
|
+
* @generated from protobuf field: resources.qualifications.ExamResponseMultipleChoice multiple_choice = 7
|
|
299
320
|
*/
|
|
300
321
|
multipleChoice: ExamResponseMultipleChoice;
|
|
301
322
|
} | {
|
|
@@ -312,7 +333,7 @@ export interface ExamResponseSeparator {
|
|
|
312
333
|
*/
|
|
313
334
|
export interface ExamResponseYesNo {
|
|
314
335
|
/**
|
|
315
|
-
* @generated from protobuf field: bool value = 1
|
|
336
|
+
* @generated from protobuf field: bool value = 1
|
|
316
337
|
*/
|
|
317
338
|
value: boolean;
|
|
318
339
|
}
|
|
@@ -321,9 +342,7 @@ export interface ExamResponseYesNo {
|
|
|
321
342
|
*/
|
|
322
343
|
export interface ExamResponseText {
|
|
323
344
|
/**
|
|
324
|
-
* @
|
|
325
|
-
*
|
|
326
|
-
* @generated from protobuf field: string text = 1;
|
|
345
|
+
* @generated from protobuf field: string text = 1
|
|
327
346
|
*/
|
|
328
347
|
text: string; // 0.5 Megabyte
|
|
329
348
|
}
|
|
@@ -332,9 +351,7 @@ export interface ExamResponseText {
|
|
|
332
351
|
*/
|
|
333
352
|
export interface ExamResponseSingleChoice {
|
|
334
353
|
/**
|
|
335
|
-
* @
|
|
336
|
-
*
|
|
337
|
-
* @generated from protobuf field: string choice = 1;
|
|
354
|
+
* @generated from protobuf field: string choice = 1
|
|
338
355
|
*/
|
|
339
356
|
choice: string;
|
|
340
357
|
}
|
|
@@ -343,20 +360,16 @@ export interface ExamResponseSingleChoice {
|
|
|
343
360
|
*/
|
|
344
361
|
export interface ExamResponseMultipleChoice {
|
|
345
362
|
/**
|
|
346
|
-
* @
|
|
347
|
-
*
|
|
348
|
-
* @generated from protobuf field: repeated string choices = 1;
|
|
363
|
+
* @generated from protobuf field: repeated string choices = 1
|
|
349
364
|
*/
|
|
350
365
|
choices: string[];
|
|
351
366
|
}
|
|
352
367
|
/**
|
|
353
|
-
* @dbscanner: json
|
|
354
|
-
*
|
|
355
368
|
* @generated from protobuf message resources.qualifications.ExamGrading
|
|
356
369
|
*/
|
|
357
370
|
export interface ExamGrading {
|
|
358
371
|
/**
|
|
359
|
-
* @generated from protobuf field: repeated resources.qualifications.ExamGradingResponse responses = 1
|
|
372
|
+
* @generated from protobuf field: repeated resources.qualifications.ExamGradingResponse responses = 1
|
|
360
373
|
*/
|
|
361
374
|
responses: ExamGradingResponse[];
|
|
362
375
|
}
|
|
@@ -365,15 +378,15 @@ export interface ExamGrading {
|
|
|
365
378
|
*/
|
|
366
379
|
export interface ExamGradingResponse {
|
|
367
380
|
/**
|
|
368
|
-
* @generated from protobuf field:
|
|
381
|
+
* @generated from protobuf field: int64 question_id = 1
|
|
369
382
|
*/
|
|
370
383
|
questionId: number;
|
|
371
384
|
/**
|
|
372
|
-
* @generated from protobuf field: float points = 2
|
|
385
|
+
* @generated from protobuf field: float points = 2
|
|
373
386
|
*/
|
|
374
387
|
points: number;
|
|
375
388
|
/**
|
|
376
|
-
* @generated from protobuf field: optional bool checked = 3
|
|
389
|
+
* @generated from protobuf field: optional bool checked = 3
|
|
377
390
|
*/
|
|
378
391
|
checked?: boolean;
|
|
379
392
|
}
|
|
@@ -381,7 +394,7 @@ export interface ExamGradingResponse {
|
|
|
381
394
|
class ExamQuestions$Type extends MessageType<ExamQuestions> {
|
|
382
395
|
constructor() {
|
|
383
396
|
super("resources.qualifications.ExamQuestions", [
|
|
384
|
-
{ no: 1, name: "questions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExamQuestion, options: { "validate.
|
|
397
|
+
{ no: 1, name: "questions", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExamQuestion, options: { "buf.validate.field": { repeated: { maxItems: "100" } } } }
|
|
385
398
|
]);
|
|
386
399
|
}
|
|
387
400
|
create(value?: PartialMessage<ExamQuestions>): ExamQuestions {
|
|
@@ -428,15 +441,16 @@ export const ExamQuestions = new ExamQuestions$Type();
|
|
|
428
441
|
class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
429
442
|
constructor() {
|
|
430
443
|
super("resources.qualifications.ExamQuestion", [
|
|
431
|
-
{ no: 1, name: "id", kind: "scalar", T:
|
|
432
|
-
{ no: 2, name: "qualification_id", kind: "scalar", T:
|
|
444
|
+
{ no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
445
|
+
{ no: 2, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
433
446
|
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
434
447
|
{ no: 4, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
435
|
-
{ no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
436
|
-
{ no: 6, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
437
|
-
{ no: 7, name: "data", kind: "message", T: () => ExamQuestionData, options: { "validate.
|
|
448
|
+
{ no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
449
|
+
{ no: 6, name: "description", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "1024" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
450
|
+
{ no: 7, name: "data", kind: "message", T: () => ExamQuestionData, options: { "buf.validate.field": { required: true } } },
|
|
438
451
|
{ no: 8, name: "answer", kind: "message", T: () => ExamQuestionAnswerData },
|
|
439
|
-
{ no: 9, name: "points", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
452
|
+
{ no: 9, name: "points", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { gte: 0 } } } },
|
|
453
|
+
{ no: 10, name: "order", kind: "scalar", T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 1000, gte: 0 } } } }
|
|
440
454
|
]);
|
|
441
455
|
}
|
|
442
456
|
create(value?: PartialMessage<ExamQuestion>): ExamQuestion {
|
|
@@ -444,6 +458,7 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
444
458
|
message.id = 0;
|
|
445
459
|
message.qualificationId = 0;
|
|
446
460
|
message.title = "";
|
|
461
|
+
message.order = 0;
|
|
447
462
|
if (value !== undefined)
|
|
448
463
|
reflectionMergePartial<ExamQuestion>(this, message, value);
|
|
449
464
|
return message;
|
|
@@ -453,11 +468,11 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
453
468
|
while (reader.pos < end) {
|
|
454
469
|
let [fieldNo, wireType] = reader.tag();
|
|
455
470
|
switch (fieldNo) {
|
|
456
|
-
case /*
|
|
457
|
-
message.id = reader.
|
|
471
|
+
case /* int64 id */ 1:
|
|
472
|
+
message.id = reader.int64().toNumber();
|
|
458
473
|
break;
|
|
459
|
-
case /*
|
|
460
|
-
message.qualificationId = reader.
|
|
474
|
+
case /* int64 qualification_id */ 2:
|
|
475
|
+
message.qualificationId = reader.int64().toNumber();
|
|
461
476
|
break;
|
|
462
477
|
case /* optional resources.timestamp.Timestamp created_at */ 3:
|
|
463
478
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -480,6 +495,9 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
480
495
|
case /* optional int32 points */ 9:
|
|
481
496
|
message.points = reader.int32();
|
|
482
497
|
break;
|
|
498
|
+
case /* int32 order */ 10:
|
|
499
|
+
message.order = reader.int32();
|
|
500
|
+
break;
|
|
483
501
|
default:
|
|
484
502
|
let u = options.readUnknownField;
|
|
485
503
|
if (u === "throw")
|
|
@@ -492,12 +510,12 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
492
510
|
return message;
|
|
493
511
|
}
|
|
494
512
|
internalBinaryWrite(message: ExamQuestion, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
495
|
-
/*
|
|
513
|
+
/* int64 id = 1; */
|
|
496
514
|
if (message.id !== 0)
|
|
497
|
-
writer.tag(1, WireType.Varint).
|
|
498
|
-
/*
|
|
515
|
+
writer.tag(1, WireType.Varint).int64(message.id);
|
|
516
|
+
/* int64 qualification_id = 2; */
|
|
499
517
|
if (message.qualificationId !== 0)
|
|
500
|
-
writer.tag(2, WireType.Varint).
|
|
518
|
+
writer.tag(2, WireType.Varint).int64(message.qualificationId);
|
|
501
519
|
/* optional resources.timestamp.Timestamp created_at = 3; */
|
|
502
520
|
if (message.createdAt)
|
|
503
521
|
Timestamp.internalBinaryWrite(message.createdAt, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
@@ -519,6 +537,9 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
519
537
|
/* optional int32 points = 9; */
|
|
520
538
|
if (message.points !== undefined)
|
|
521
539
|
writer.tag(9, WireType.Varint).int32(message.points);
|
|
540
|
+
/* int32 order = 10; */
|
|
541
|
+
if (message.order !== 0)
|
|
542
|
+
writer.tag(10, WireType.Varint).int32(message.order);
|
|
522
543
|
let u = options.writeUnknownFields;
|
|
523
544
|
if (u !== false)
|
|
524
545
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -539,7 +560,7 @@ class ExamQuestionData$Type extends MessageType<ExamQuestionData> {
|
|
|
539
560
|
{ no: 3, name: "free_text", kind: "message", oneof: "data", T: () => ExamQuestionText },
|
|
540
561
|
{ no: 4, name: "single_choice", kind: "message", oneof: "data", T: () => ExamQuestionSingleChoice },
|
|
541
562
|
{ no: 5, name: "multiple_choice", kind: "message", oneof: "data", T: () => ExamQuestionMultipleChoice }
|
|
542
|
-
]);
|
|
563
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
543
564
|
}
|
|
544
565
|
create(value?: PartialMessage<ExamQuestionData>): ExamQuestionData {
|
|
545
566
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
@@ -672,7 +693,7 @@ class ExamQuestionImage$Type extends MessageType<ExamQuestionImage> {
|
|
|
672
693
|
constructor() {
|
|
673
694
|
super("resources.qualifications.ExamQuestionImage", [
|
|
674
695
|
{ no: 1, name: "image", kind: "message", T: () => File },
|
|
675
|
-
{ no: 2, name: "alt", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
696
|
+
{ no: 2, name: "alt", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "128" } } } }
|
|
676
697
|
]);
|
|
677
698
|
}
|
|
678
699
|
create(value?: PartialMessage<ExamQuestionImage>): ExamQuestionImage {
|
|
@@ -686,7 +707,7 @@ class ExamQuestionImage$Type extends MessageType<ExamQuestionImage> {
|
|
|
686
707
|
while (reader.pos < end) {
|
|
687
708
|
let [fieldNo, wireType] = reader.tag();
|
|
688
709
|
switch (fieldNo) {
|
|
689
|
-
case /* resources.
|
|
710
|
+
case /* resources.file.File image */ 1:
|
|
690
711
|
message.image = File.internalBinaryRead(reader, reader.uint32(), options, message.image);
|
|
691
712
|
break;
|
|
692
713
|
case /* optional string alt */ 2:
|
|
@@ -704,7 +725,7 @@ class ExamQuestionImage$Type extends MessageType<ExamQuestionImage> {
|
|
|
704
725
|
return message;
|
|
705
726
|
}
|
|
706
727
|
internalBinaryWrite(message: ExamQuestionImage, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
707
|
-
/* resources.
|
|
728
|
+
/* resources.file.File image = 1; */
|
|
708
729
|
if (message.image)
|
|
709
730
|
File.internalBinaryWrite(message.image, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
710
731
|
/* optional string alt = 2; */
|
|
@@ -817,7 +838,7 @@ export const ExamQuestionText = new ExamQuestionText$Type();
|
|
|
817
838
|
class ExamQuestionSingleChoice$Type extends MessageType<ExamQuestionSingleChoice> {
|
|
818
839
|
constructor() {
|
|
819
840
|
super("resources.qualifications.ExamQuestionSingleChoice", [
|
|
820
|
-
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
841
|
+
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "10" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
821
842
|
]);
|
|
822
843
|
}
|
|
823
844
|
create(value?: PartialMessage<ExamQuestionSingleChoice>): ExamQuestionSingleChoice {
|
|
@@ -864,8 +885,8 @@ export const ExamQuestionSingleChoice = new ExamQuestionSingleChoice$Type();
|
|
|
864
885
|
class ExamQuestionMultipleChoice$Type extends MessageType<ExamQuestionMultipleChoice> {
|
|
865
886
|
constructor() {
|
|
866
887
|
super("resources.qualifications.ExamQuestionMultipleChoice", [
|
|
867
|
-
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
868
|
-
{ no: 2, name: "limit", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "validate.
|
|
888
|
+
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "10" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } },
|
|
889
|
+
{ no: 2, name: "limit", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { int32: { lte: 10, gte: 0 } } } }
|
|
869
890
|
]);
|
|
870
891
|
}
|
|
871
892
|
create(value?: PartialMessage<ExamQuestionMultipleChoice>): ExamQuestionMultipleChoice {
|
|
@@ -918,12 +939,17 @@ export const ExamQuestionMultipleChoice = new ExamQuestionMultipleChoice$Type();
|
|
|
918
939
|
class ExamQuestionAnswerData$Type extends MessageType<ExamQuestionAnswerData> {
|
|
919
940
|
constructor() {
|
|
920
941
|
super("resources.qualifications.ExamQuestionAnswerData", [
|
|
921
|
-
{ no: 1, name: "answer_key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
922
|
-
|
|
942
|
+
{ no: 1, name: "answer_key", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "1024" } } } },
|
|
943
|
+
{ no: 4, name: "yesno", kind: "message", oneof: "answer", T: () => ExamResponseYesNo },
|
|
944
|
+
{ no: 5, name: "free_text", kind: "message", oneof: "answer", T: () => ExamResponseText },
|
|
945
|
+
{ no: 6, name: "single_choice", kind: "message", oneof: "answer", T: () => ExamResponseSingleChoice },
|
|
946
|
+
{ no: 7, name: "multiple_choice", kind: "message", oneof: "answer", T: () => ExamResponseMultipleChoice }
|
|
947
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
923
948
|
}
|
|
924
949
|
create(value?: PartialMessage<ExamQuestionAnswerData>): ExamQuestionAnswerData {
|
|
925
950
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
926
951
|
message.answerKey = "";
|
|
952
|
+
message.answer = { oneofKind: undefined };
|
|
927
953
|
if (value !== undefined)
|
|
928
954
|
reflectionMergePartial<ExamQuestionAnswerData>(this, message, value);
|
|
929
955
|
return message;
|
|
@@ -936,6 +962,30 @@ class ExamQuestionAnswerData$Type extends MessageType<ExamQuestionAnswerData> {
|
|
|
936
962
|
case /* string answer_key */ 1:
|
|
937
963
|
message.answerKey = reader.string();
|
|
938
964
|
break;
|
|
965
|
+
case /* resources.qualifications.ExamResponseYesNo yesno */ 4:
|
|
966
|
+
message.answer = {
|
|
967
|
+
oneofKind: "yesno",
|
|
968
|
+
yesno: ExamResponseYesNo.internalBinaryRead(reader, reader.uint32(), options, (message.answer as any).yesno)
|
|
969
|
+
};
|
|
970
|
+
break;
|
|
971
|
+
case /* resources.qualifications.ExamResponseText free_text */ 5:
|
|
972
|
+
message.answer = {
|
|
973
|
+
oneofKind: "freeText",
|
|
974
|
+
freeText: ExamResponseText.internalBinaryRead(reader, reader.uint32(), options, (message.answer as any).freeText)
|
|
975
|
+
};
|
|
976
|
+
break;
|
|
977
|
+
case /* resources.qualifications.ExamResponseSingleChoice single_choice */ 6:
|
|
978
|
+
message.answer = {
|
|
979
|
+
oneofKind: "singleChoice",
|
|
980
|
+
singleChoice: ExamResponseSingleChoice.internalBinaryRead(reader, reader.uint32(), options, (message.answer as any).singleChoice)
|
|
981
|
+
};
|
|
982
|
+
break;
|
|
983
|
+
case /* resources.qualifications.ExamResponseMultipleChoice multiple_choice */ 7:
|
|
984
|
+
message.answer = {
|
|
985
|
+
oneofKind: "multipleChoice",
|
|
986
|
+
multipleChoice: ExamResponseMultipleChoice.internalBinaryRead(reader, reader.uint32(), options, (message.answer as any).multipleChoice)
|
|
987
|
+
};
|
|
988
|
+
break;
|
|
939
989
|
default:
|
|
940
990
|
let u = options.readUnknownField;
|
|
941
991
|
if (u === "throw")
|
|
@@ -951,6 +1001,18 @@ class ExamQuestionAnswerData$Type extends MessageType<ExamQuestionAnswerData> {
|
|
|
951
1001
|
/* string answer_key = 1; */
|
|
952
1002
|
if (message.answerKey !== "")
|
|
953
1003
|
writer.tag(1, WireType.LengthDelimited).string(message.answerKey);
|
|
1004
|
+
/* resources.qualifications.ExamResponseYesNo yesno = 4; */
|
|
1005
|
+
if (message.answer.oneofKind === "yesno")
|
|
1006
|
+
ExamResponseYesNo.internalBinaryWrite(message.answer.yesno, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1007
|
+
/* resources.qualifications.ExamResponseText free_text = 5; */
|
|
1008
|
+
if (message.answer.oneofKind === "freeText")
|
|
1009
|
+
ExamResponseText.internalBinaryWrite(message.answer.freeText, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1010
|
+
/* resources.qualifications.ExamResponseSingleChoice single_choice = 6; */
|
|
1011
|
+
if (message.answer.oneofKind === "singleChoice")
|
|
1012
|
+
ExamResponseSingleChoice.internalBinaryWrite(message.answer.singleChoice, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1013
|
+
/* resources.qualifications.ExamResponseMultipleChoice multiple_choice = 7; */
|
|
1014
|
+
if (message.answer.oneofKind === "multipleChoice")
|
|
1015
|
+
ExamResponseMultipleChoice.internalBinaryWrite(message.answer.multipleChoice, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
954
1016
|
let u = options.writeUnknownFields;
|
|
955
1017
|
if (u !== false)
|
|
956
1018
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -965,7 +1027,7 @@ export const ExamQuestionAnswerData = new ExamQuestionAnswerData$Type();
|
|
|
965
1027
|
class ExamUser$Type extends MessageType<ExamUser> {
|
|
966
1028
|
constructor() {
|
|
967
1029
|
super("resources.qualifications.ExamUser", [
|
|
968
|
-
{ no: 1, name: "qualification_id", kind: "scalar", T:
|
|
1030
|
+
{ no: 1, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
969
1031
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
970
1032
|
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
971
1033
|
{ no: 4, name: "started_at", kind: "message", T: () => Timestamp },
|
|
@@ -986,8 +1048,8 @@ class ExamUser$Type extends MessageType<ExamUser> {
|
|
|
986
1048
|
while (reader.pos < end) {
|
|
987
1049
|
let [fieldNo, wireType] = reader.tag();
|
|
988
1050
|
switch (fieldNo) {
|
|
989
|
-
case /*
|
|
990
|
-
message.qualificationId = reader.
|
|
1051
|
+
case /* int64 qualification_id */ 1:
|
|
1052
|
+
message.qualificationId = reader.int64().toNumber();
|
|
991
1053
|
break;
|
|
992
1054
|
case /* int32 user_id */ 2:
|
|
993
1055
|
message.userId = reader.int32();
|
|
@@ -1016,9 +1078,9 @@ class ExamUser$Type extends MessageType<ExamUser> {
|
|
|
1016
1078
|
return message;
|
|
1017
1079
|
}
|
|
1018
1080
|
internalBinaryWrite(message: ExamUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1019
|
-
/*
|
|
1081
|
+
/* int64 qualification_id = 1; */
|
|
1020
1082
|
if (message.qualificationId !== 0)
|
|
1021
|
-
writer.tag(1, WireType.Varint).
|
|
1083
|
+
writer.tag(1, WireType.Varint).int64(message.qualificationId);
|
|
1022
1084
|
/* int32 user_id = 2; */
|
|
1023
1085
|
if (message.userId !== 0)
|
|
1024
1086
|
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
@@ -1048,10 +1110,10 @@ export const ExamUser = new ExamUser$Type();
|
|
|
1048
1110
|
class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
1049
1111
|
constructor() {
|
|
1050
1112
|
super("resources.qualifications.ExamResponses", [
|
|
1051
|
-
{ no: 1, name: "qualification_id", kind: "scalar", T:
|
|
1113
|
+
{ no: 1, name: "qualification_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
1052
1114
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1053
|
-
{ no: 3, name: "responses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExamResponse, options: { "validate.
|
|
1054
|
-
]);
|
|
1115
|
+
{ no: 3, name: "responses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExamResponse, options: { "buf.validate.field": { repeated: { maxItems: "100" } } } }
|
|
1116
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
1055
1117
|
}
|
|
1056
1118
|
create(value?: PartialMessage<ExamResponses>): ExamResponses {
|
|
1057
1119
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
@@ -1067,8 +1129,8 @@ class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
|
1067
1129
|
while (reader.pos < end) {
|
|
1068
1130
|
let [fieldNo, wireType] = reader.tag();
|
|
1069
1131
|
switch (fieldNo) {
|
|
1070
|
-
case /*
|
|
1071
|
-
message.qualificationId = reader.
|
|
1132
|
+
case /* int64 qualification_id */ 1:
|
|
1133
|
+
message.qualificationId = reader.int64().toNumber();
|
|
1072
1134
|
break;
|
|
1073
1135
|
case /* int32 user_id */ 2:
|
|
1074
1136
|
message.userId = reader.int32();
|
|
@@ -1088,9 +1150,9 @@ class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
|
1088
1150
|
return message;
|
|
1089
1151
|
}
|
|
1090
1152
|
internalBinaryWrite(message: ExamResponses, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1091
|
-
/*
|
|
1153
|
+
/* int64 qualification_id = 1; */
|
|
1092
1154
|
if (message.qualificationId !== 0)
|
|
1093
|
-
writer.tag(1, WireType.Varint).
|
|
1155
|
+
writer.tag(1, WireType.Varint).int64(message.qualificationId);
|
|
1094
1156
|
/* int32 user_id = 2; */
|
|
1095
1157
|
if (message.userId !== 0)
|
|
1096
1158
|
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
@@ -1111,7 +1173,7 @@ export const ExamResponses = new ExamResponses$Type();
|
|
|
1111
1173
|
class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
1112
1174
|
constructor() {
|
|
1113
1175
|
super("resources.qualifications.ExamResponse", [
|
|
1114
|
-
{ no: 1, name: "question_id", kind: "scalar", T:
|
|
1176
|
+
{ no: 1, name: "question_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
1115
1177
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1116
1178
|
{ no: 3, name: "question", kind: "message", T: () => ExamQuestion },
|
|
1117
1179
|
{ no: 4, name: "response", kind: "message", T: () => ExamResponseData }
|
|
@@ -1130,8 +1192,8 @@ class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
|
1130
1192
|
while (reader.pos < end) {
|
|
1131
1193
|
let [fieldNo, wireType] = reader.tag();
|
|
1132
1194
|
switch (fieldNo) {
|
|
1133
|
-
case /*
|
|
1134
|
-
message.questionId = reader.
|
|
1195
|
+
case /* int64 question_id */ 1:
|
|
1196
|
+
message.questionId = reader.int64().toNumber();
|
|
1135
1197
|
break;
|
|
1136
1198
|
case /* int32 user_id */ 2:
|
|
1137
1199
|
message.userId = reader.int32();
|
|
@@ -1154,9 +1216,9 @@ class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
|
1154
1216
|
return message;
|
|
1155
1217
|
}
|
|
1156
1218
|
internalBinaryWrite(message: ExamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1157
|
-
/*
|
|
1219
|
+
/* int64 question_id = 1; */
|
|
1158
1220
|
if (message.questionId !== 0)
|
|
1159
|
-
writer.tag(1, WireType.Varint).
|
|
1221
|
+
writer.tag(1, WireType.Varint).int64(message.questionId);
|
|
1160
1222
|
/* int32 user_id = 2; */
|
|
1161
1223
|
if (message.userId !== 0)
|
|
1162
1224
|
writer.tag(2, WireType.Varint).int32(message.userId);
|
|
@@ -1355,7 +1417,7 @@ export const ExamResponseYesNo = new ExamResponseYesNo$Type();
|
|
|
1355
1417
|
class ExamResponseText$Type extends MessageType<ExamResponseText> {
|
|
1356
1418
|
constructor() {
|
|
1357
1419
|
super("resources.qualifications.ExamResponseText", [
|
|
1358
|
-
{ no: 1, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
1420
|
+
{ no: 1, name: "text", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxBytes: "500000" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
1359
1421
|
]);
|
|
1360
1422
|
}
|
|
1361
1423
|
create(value?: PartialMessage<ExamResponseText>): ExamResponseText {
|
|
@@ -1402,7 +1464,7 @@ export const ExamResponseText = new ExamResponseText$Type();
|
|
|
1402
1464
|
class ExamResponseSingleChoice$Type extends MessageType<ExamResponseSingleChoice> {
|
|
1403
1465
|
constructor() {
|
|
1404
1466
|
super("resources.qualifications.ExamResponseSingleChoice", [
|
|
1405
|
-
{ no: 1, name: "choice", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
1467
|
+
{ no: 1, name: "choice", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "512" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
1406
1468
|
]);
|
|
1407
1469
|
}
|
|
1408
1470
|
create(value?: PartialMessage<ExamResponseSingleChoice>): ExamResponseSingleChoice {
|
|
@@ -1449,7 +1511,7 @@ export const ExamResponseSingleChoice = new ExamResponseSingleChoice$Type();
|
|
|
1449
1511
|
class ExamResponseMultipleChoice$Type extends MessageType<ExamResponseMultipleChoice> {
|
|
1450
1512
|
constructor() {
|
|
1451
1513
|
super("resources.qualifications.ExamResponseMultipleChoice", [
|
|
1452
|
-
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.
|
|
1514
|
+
{ no: 1, name: "choices", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { repeated: { maxItems: "10" } }, "codegen.sanitizer.sanitizer": { enabled: true, method: "StripTags" } } }
|
|
1453
1515
|
]);
|
|
1454
1516
|
}
|
|
1455
1517
|
create(value?: PartialMessage<ExamResponseMultipleChoice>): ExamResponseMultipleChoice {
|
|
@@ -1496,8 +1558,8 @@ export const ExamResponseMultipleChoice = new ExamResponseMultipleChoice$Type();
|
|
|
1496
1558
|
class ExamGrading$Type extends MessageType<ExamGrading> {
|
|
1497
1559
|
constructor() {
|
|
1498
1560
|
super("resources.qualifications.ExamGrading", [
|
|
1499
|
-
{ no: 1, name: "responses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExamGradingResponse, options: { "validate.
|
|
1500
|
-
]);
|
|
1561
|
+
{ no: 1, name: "responses", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ExamGradingResponse, options: { "buf.validate.field": { repeated: { maxItems: "100" } } } }
|
|
1562
|
+
], { "codegen.dbscanner.dbscanner": { enabled: true } });
|
|
1501
1563
|
}
|
|
1502
1564
|
create(value?: PartialMessage<ExamGrading>): ExamGrading {
|
|
1503
1565
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
@@ -1543,8 +1605,8 @@ export const ExamGrading = new ExamGrading$Type();
|
|
|
1543
1605
|
class ExamGradingResponse$Type extends MessageType<ExamGradingResponse> {
|
|
1544
1606
|
constructor() {
|
|
1545
1607
|
super("resources.qualifications.ExamGradingResponse", [
|
|
1546
|
-
{ no: 1, name: "question_id", kind: "scalar", T:
|
|
1547
|
-
{ no: 2, name: "points", kind: "scalar", T: 2 /*ScalarType.FLOAT*/, options: { "validate.
|
|
1608
|
+
{ no: 1, name: "question_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
1609
|
+
{ no: 2, name: "points", kind: "scalar", T: 2 /*ScalarType.FLOAT*/, options: { "buf.validate.field": { float: { lte: 1000, gte: 0 } } } },
|
|
1548
1610
|
{ no: 3, name: "checked", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
1549
1611
|
]);
|
|
1550
1612
|
}
|
|
@@ -1561,8 +1623,8 @@ class ExamGradingResponse$Type extends MessageType<ExamGradingResponse> {
|
|
|
1561
1623
|
while (reader.pos < end) {
|
|
1562
1624
|
let [fieldNo, wireType] = reader.tag();
|
|
1563
1625
|
switch (fieldNo) {
|
|
1564
|
-
case /*
|
|
1565
|
-
message.questionId = reader.
|
|
1626
|
+
case /* int64 question_id */ 1:
|
|
1627
|
+
message.questionId = reader.int64().toNumber();
|
|
1566
1628
|
break;
|
|
1567
1629
|
case /* float points */ 2:
|
|
1568
1630
|
message.points = reader.float();
|
|
@@ -1582,9 +1644,9 @@ class ExamGradingResponse$Type extends MessageType<ExamGradingResponse> {
|
|
|
1582
1644
|
return message;
|
|
1583
1645
|
}
|
|
1584
1646
|
internalBinaryWrite(message: ExamGradingResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1585
|
-
/*
|
|
1647
|
+
/* int64 question_id = 1; */
|
|
1586
1648
|
if (message.questionId !== 0)
|
|
1587
|
-
writer.tag(1, WireType.Varint).
|
|
1649
|
+
writer.tag(1, WireType.Varint).int64(message.questionId);
|
|
1588
1650
|
/* float points = 2; */
|
|
1589
1651
|
if (message.points !== 0)
|
|
1590
1652
|
writer.tag(2, WireType.Bit32).float(message.points);
|