@fivenet-app/gen 0.9.3 → 0.9.5-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clients.ts +150 -0
- package/google/protobuf/any.ts +10 -6
- package/google/protobuf/descriptor.ts +1255 -76
- package/google/protobuf/duration.ts +1 -2
- package/google/protobuf/timestamp.ts +3 -6
- package/package.json +5 -1
- package/perms.ts +9 -1
- package/resources/accounts/accounts.ts +9 -9
- package/resources/accounts/oauth2.ts +17 -17
- package/resources/calendar/access.ts +33 -33
- package/resources/calendar/calendar.ts +51 -49
- package/resources/centrum/access.ts +57 -42
- package/resources/centrum/attributes.ts +182 -0
- package/resources/centrum/dispatches.ts +73 -71
- package/resources/centrum/disponents.ts +81 -0
- package/resources/centrum/settings.ts +5 -1
- package/resources/centrum/units.ts +49 -49
- package/resources/centrum/user_unit.ts +104 -0
- package/resources/common/content/content.ts +47 -26
- package/resources/common/cron/cron.ts +37 -1
- package/resources/common/database/database.ts +37 -19
- package/resources/common/error.ts +1 -1
- package/resources/common/grpcws/grpcws.ts +59 -33
- package/resources/common/i18n.ts +4 -1
- package/resources/common/tests/objects.ts +82 -0
- package/resources/common/uuid.ts +1 -1
- package/resources/documents/access.ts +37 -35
- package/resources/documents/activity.ts +19 -17
- package/resources/documents/category.ts +9 -9
- package/resources/documents/comment.ts +17 -17
- package/resources/documents/documents.ts +89 -89
- package/resources/documents/requests.ts +17 -17
- package/resources/documents/templates.ts +50 -35
- package/resources/documents/workflow.ts +3 -1
- package/resources/filestore/file.ts +1 -1
- package/resources/internet/access.ts +358 -0
- package/resources/internet/ads.ts +9 -9
- package/resources/internet/domain.ts +216 -24
- package/resources/internet/page.ts +215 -23
- package/resources/internet/search.ts +42 -18
- package/resources/jobs/activity.ts +11 -9
- package/resources/jobs/colleagues.ts +1 -1
- package/resources/jobs/conduct.ts +9 -9
- package/resources/jobs/labels.ts +9 -9
- package/resources/jobs/timeclock.ts +7 -3
- package/resources/laws/laws.ts +25 -25
- package/resources/livemap/livemap.ts +314 -295
- package/resources/livemap/tracker.ts +1 -1
- package/resources/mailer/access.ts +57 -57
- package/resources/mailer/email.ts +9 -9
- package/resources/mailer/events.ts +19 -19
- package/resources/mailer/message.ts +151 -45
- package/resources/mailer/settings.ts +9 -9
- package/resources/mailer/template.ts +17 -17
- package/resources/mailer/thread.ts +57 -57
- package/resources/notifications/events.ts +112 -3
- package/resources/notifications/notifications.ts +23 -21
- package/resources/permissions/permissions.ts +67 -65
- package/resources/qualifications/access.ts +33 -24
- package/resources/qualifications/exam.ts +226 -44
- package/resources/qualifications/qualifications.ts +99 -71
- package/resources/rector/audit.ts +17 -17
- package/resources/rector/banner.ts +133 -0
- package/resources/rector/config.ts +84 -17
- package/resources/stats/stats.ts +1 -1
- package/resources/sync/activity.ts +93 -15
- package/resources/sync/data.ts +143 -11
- package/resources/timestamp/timestamp.ts +1 -1
- package/resources/users/activity.ts +995 -37
- package/resources/users/job_props.ts +6 -709
- package/resources/users/job_settings.ts +765 -0
- package/resources/users/jobs.ts +1 -1
- package/resources/users/labels.ts +11 -9
- package/resources/users/licenses.ts +148 -0
- package/resources/users/props.ts +1 -1
- package/resources/users/users.ts +2 -137
- package/resources/vehicles/vehicles.ts +38 -5
- package/resources/wiki/access.ts +34 -38
- package/resources/wiki/activity.ts +19 -17
- package/resources/wiki/page.ts +29 -29
- package/services/auth/auth.client.ts +7 -1
- package/services/auth/auth.ts +110 -33
- package/services/calendar/calendar.client.ts +1 -1
- package/services/calendar/calendar.ts +98 -59
- package/services/centrum/centrum.client.ts +1 -1
- package/services/centrum/centrum.ts +268 -125
- package/services/citizenstore/citizenstore.client.ts +1 -1
- package/services/citizenstore/citizenstore.ts +25 -2
- package/services/completor/completor.client.ts +1 -1
- package/services/completor/completor.ts +15 -2
- package/services/dmv/vehicles.client.ts +1 -1
- package/services/dmv/vehicles.ts +13 -2
- package/services/docstore/docstore.client.ts +1 -1
- package/services/docstore/docstore.ts +491 -296
- package/services/internet/ads.client.ts +1 -1
- package/services/internet/ads.ts +1 -1
- package/services/internet/domain.client.ts +109 -0
- package/services/internet/domain.ts +658 -0
- package/services/internet/internet.client.ts +1 -1
- package/services/internet/internet.ts +15 -4
- package/services/jobs/conduct.client.ts +1 -1
- package/services/jobs/conduct.ts +30 -17
- package/services/jobs/jobs.client.ts +1 -1
- package/services/jobs/jobs.ts +43 -17
- package/services/jobs/timeclock.client.ts +1 -1
- package/services/jobs/timeclock.ts +20 -20
- package/services/livemapper/livemap.client.ts +1 -1
- package/services/livemapper/livemap.ts +137 -35
- package/services/mailer/mailer.client.ts +1 -1
- package/services/mailer/mailer.ts +216 -164
- package/services/notificator/notificator.client.ts +1 -1
- package/services/notificator/notificator.ts +30 -17
- package/services/qualifications/qualifications.client.ts +3 -3
- package/services/qualifications/qualifications.ts +190 -115
- package/services/rector/config.client.ts +1 -1
- package/services/rector/config.ts +16 -3
- package/services/rector/filestore.client.ts +1 -1
- package/services/rector/filestore.ts +15 -2
- package/services/rector/laws.client.ts +1 -1
- package/services/rector/laws.ts +45 -19
- package/services/rector/rector.client.ts +1 -1
- package/services/rector/rector.ts +135 -70
- package/services/stats/stats.client.ts +1 -1
- package/services/stats/stats.ts +16 -3
- package/services/sync/sync.client.ts +43 -3
- package/services/sync/sync.ts +301 -34
- package/services/wiki/wiki.client.ts +1 -1
- package/services/wiki/wiki.ts +39 -26
- package/svcs.ts +17 -1
- package/resources/centrum/general.ts +0 -231
- package/resources/common/access/dummy.ts +0 -309
- package/resources/internet/internet.ts +0 -344
- package/resources/mailer/user.ts +0 -93
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
1
|
+
// @generated by protobuf-ts 2.9.6 with parameter optimize_speed,long_type_number,force_server_none
|
|
2
2
|
// @generated from protobuf file "resources/qualifications/exam.proto" (package "resources.qualifications", syntax proto3)
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
@@ -28,13 +28,13 @@ export interface ExamQuestions {
|
|
|
28
28
|
*/
|
|
29
29
|
export interface ExamQuestion {
|
|
30
30
|
/**
|
|
31
|
-
* @generated from protobuf field: uint64 id = 1
|
|
31
|
+
* @generated from protobuf field: uint64 id = 1;
|
|
32
32
|
*/
|
|
33
|
-
id:
|
|
33
|
+
id: number;
|
|
34
34
|
/**
|
|
35
|
-
* @generated from protobuf field: uint64 qualification_id = 2
|
|
35
|
+
* @generated from protobuf field: uint64 qualification_id = 2;
|
|
36
36
|
*/
|
|
37
|
-
qualificationId:
|
|
37
|
+
qualificationId: number;
|
|
38
38
|
/**
|
|
39
39
|
* @generated from protobuf field: optional resources.timestamp.Timestamp created_at = 3;
|
|
40
40
|
*/
|
|
@@ -69,6 +69,8 @@ export interface ExamQuestion {
|
|
|
69
69
|
points?: number;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
+
* @dbscanner: json
|
|
73
|
+
*
|
|
72
74
|
* @generated from protobuf message resources.qualifications.ExamQuestionData
|
|
73
75
|
*/
|
|
74
76
|
export interface ExamQuestionData {
|
|
@@ -178,6 +180,8 @@ export interface ExamQuestionMultipleChoice {
|
|
|
178
180
|
limit?: number;
|
|
179
181
|
}
|
|
180
182
|
/**
|
|
183
|
+
* @dbscanner: json
|
|
184
|
+
*
|
|
181
185
|
* @generated from protobuf message resources.qualifications.ExamQuestionAnswerData
|
|
182
186
|
*/
|
|
183
187
|
export interface ExamQuestionAnswerData {
|
|
@@ -193,9 +197,9 @@ export interface ExamQuestionAnswerData {
|
|
|
193
197
|
*/
|
|
194
198
|
export interface ExamUser {
|
|
195
199
|
/**
|
|
196
|
-
* @generated from protobuf field: uint64 qualification_id = 1
|
|
200
|
+
* @generated from protobuf field: uint64 qualification_id = 1;
|
|
197
201
|
*/
|
|
198
|
-
qualificationId:
|
|
202
|
+
qualificationId: number;
|
|
199
203
|
/**
|
|
200
204
|
* @generated from protobuf field: int32 user_id = 2;
|
|
201
205
|
*/
|
|
@@ -218,13 +222,15 @@ export interface ExamUser {
|
|
|
218
222
|
endedAt?: Timestamp;
|
|
219
223
|
}
|
|
220
224
|
/**
|
|
225
|
+
* @dbscanner: json
|
|
226
|
+
*
|
|
221
227
|
* @generated from protobuf message resources.qualifications.ExamResponses
|
|
222
228
|
*/
|
|
223
229
|
export interface ExamResponses {
|
|
224
230
|
/**
|
|
225
|
-
* @generated from protobuf field: uint64 qualification_id = 1
|
|
231
|
+
* @generated from protobuf field: uint64 qualification_id = 1;
|
|
226
232
|
*/
|
|
227
|
-
qualificationId:
|
|
233
|
+
qualificationId: number;
|
|
228
234
|
/**
|
|
229
235
|
* @generated from protobuf field: int32 user_id = 2;
|
|
230
236
|
*/
|
|
@@ -239,9 +245,9 @@ export interface ExamResponses {
|
|
|
239
245
|
*/
|
|
240
246
|
export interface ExamResponse {
|
|
241
247
|
/**
|
|
242
|
-
* @generated from protobuf field: uint64 question_id = 1
|
|
248
|
+
* @generated from protobuf field: uint64 question_id = 1;
|
|
243
249
|
*/
|
|
244
|
-
questionId:
|
|
250
|
+
questionId: number;
|
|
245
251
|
/**
|
|
246
252
|
* @generated from protobuf field: int32 user_id = 2;
|
|
247
253
|
*/
|
|
@@ -343,6 +349,34 @@ export interface ExamResponseMultipleChoice {
|
|
|
343
349
|
*/
|
|
344
350
|
choices: string[];
|
|
345
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* @dbscanner: json
|
|
354
|
+
*
|
|
355
|
+
* @generated from protobuf message resources.qualifications.ExamGrading
|
|
356
|
+
*/
|
|
357
|
+
export interface ExamGrading {
|
|
358
|
+
/**
|
|
359
|
+
* @generated from protobuf field: repeated resources.qualifications.ExamGradingResponse responses = 1;
|
|
360
|
+
*/
|
|
361
|
+
responses: ExamGradingResponse[];
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* @generated from protobuf message resources.qualifications.ExamGradingResponse
|
|
365
|
+
*/
|
|
366
|
+
export interface ExamGradingResponse {
|
|
367
|
+
/**
|
|
368
|
+
* @generated from protobuf field: uint64 question_id = 1;
|
|
369
|
+
*/
|
|
370
|
+
questionId: number;
|
|
371
|
+
/**
|
|
372
|
+
* @generated from protobuf field: float points = 2;
|
|
373
|
+
*/
|
|
374
|
+
points: number;
|
|
375
|
+
/**
|
|
376
|
+
* @generated from protobuf field: optional bool checked = 3;
|
|
377
|
+
*/
|
|
378
|
+
checked?: boolean;
|
|
379
|
+
}
|
|
346
380
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
347
381
|
class ExamQuestions$Type extends MessageType<ExamQuestions> {
|
|
348
382
|
constructor() {
|
|
@@ -394,8 +428,8 @@ export const ExamQuestions = new ExamQuestions$Type();
|
|
|
394
428
|
class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
395
429
|
constructor() {
|
|
396
430
|
super("resources.qualifications.ExamQuestion", [
|
|
397
|
-
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
398
|
-
{ no: 2, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
431
|
+
{ no: 1, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
432
|
+
{ no: 2, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
399
433
|
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
400
434
|
{ no: 4, name: "updated_at", kind: "message", T: () => Timestamp },
|
|
401
435
|
{ no: 5, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "3", maxLen: "512" } } } },
|
|
@@ -407,8 +441,8 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
407
441
|
}
|
|
408
442
|
create(value?: PartialMessage<ExamQuestion>): ExamQuestion {
|
|
409
443
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
410
|
-
message.id =
|
|
411
|
-
message.qualificationId =
|
|
444
|
+
message.id = 0;
|
|
445
|
+
message.qualificationId = 0;
|
|
412
446
|
message.title = "";
|
|
413
447
|
if (value !== undefined)
|
|
414
448
|
reflectionMergePartial<ExamQuestion>(this, message, value);
|
|
@@ -419,11 +453,11 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
419
453
|
while (reader.pos < end) {
|
|
420
454
|
let [fieldNo, wireType] = reader.tag();
|
|
421
455
|
switch (fieldNo) {
|
|
422
|
-
case /* uint64 id
|
|
423
|
-
message.id = reader.uint64().
|
|
456
|
+
case /* uint64 id */ 1:
|
|
457
|
+
message.id = reader.uint64().toNumber();
|
|
424
458
|
break;
|
|
425
|
-
case /* uint64 qualification_id
|
|
426
|
-
message.qualificationId = reader.uint64().
|
|
459
|
+
case /* uint64 qualification_id */ 2:
|
|
460
|
+
message.qualificationId = reader.uint64().toNumber();
|
|
427
461
|
break;
|
|
428
462
|
case /* optional resources.timestamp.Timestamp created_at */ 3:
|
|
429
463
|
message.createdAt = Timestamp.internalBinaryRead(reader, reader.uint32(), options, message.createdAt);
|
|
@@ -458,11 +492,11 @@ class ExamQuestion$Type extends MessageType<ExamQuestion> {
|
|
|
458
492
|
return message;
|
|
459
493
|
}
|
|
460
494
|
internalBinaryWrite(message: ExamQuestion, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
461
|
-
/* uint64 id = 1
|
|
462
|
-
if (message.id !==
|
|
495
|
+
/* uint64 id = 1; */
|
|
496
|
+
if (message.id !== 0)
|
|
463
497
|
writer.tag(1, WireType.Varint).uint64(message.id);
|
|
464
|
-
/* uint64 qualification_id = 2
|
|
465
|
-
if (message.qualificationId !==
|
|
498
|
+
/* uint64 qualification_id = 2; */
|
|
499
|
+
if (message.qualificationId !== 0)
|
|
466
500
|
writer.tag(2, WireType.Varint).uint64(message.qualificationId);
|
|
467
501
|
/* optional resources.timestamp.Timestamp created_at = 3; */
|
|
468
502
|
if (message.createdAt)
|
|
@@ -607,7 +641,20 @@ class ExamQuestionSeparator$Type extends MessageType<ExamQuestionSeparator> {
|
|
|
607
641
|
return message;
|
|
608
642
|
}
|
|
609
643
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionSeparator): ExamQuestionSeparator {
|
|
610
|
-
|
|
644
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
645
|
+
while (reader.pos < end) {
|
|
646
|
+
let [fieldNo, wireType] = reader.tag();
|
|
647
|
+
switch (fieldNo) {
|
|
648
|
+
default:
|
|
649
|
+
let u = options.readUnknownField;
|
|
650
|
+
if (u === "throw")
|
|
651
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
652
|
+
let d = reader.skip(wireType);
|
|
653
|
+
if (u !== false)
|
|
654
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return message;
|
|
611
658
|
}
|
|
612
659
|
internalBinaryWrite(message: ExamQuestionSeparator, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
613
660
|
let u = options.writeUnknownFields;
|
|
@@ -685,7 +732,20 @@ class ExamQuestionYesNo$Type extends MessageType<ExamQuestionYesNo> {
|
|
|
685
732
|
return message;
|
|
686
733
|
}
|
|
687
734
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamQuestionYesNo): ExamQuestionYesNo {
|
|
688
|
-
|
|
735
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
736
|
+
while (reader.pos < end) {
|
|
737
|
+
let [fieldNo, wireType] = reader.tag();
|
|
738
|
+
switch (fieldNo) {
|
|
739
|
+
default:
|
|
740
|
+
let u = options.readUnknownField;
|
|
741
|
+
if (u === "throw")
|
|
742
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
743
|
+
let d = reader.skip(wireType);
|
|
744
|
+
if (u !== false)
|
|
745
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
return message;
|
|
689
749
|
}
|
|
690
750
|
internalBinaryWrite(message: ExamQuestionYesNo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
691
751
|
let u = options.writeUnknownFields;
|
|
@@ -905,7 +965,7 @@ export const ExamQuestionAnswerData = new ExamQuestionAnswerData$Type();
|
|
|
905
965
|
class ExamUser$Type extends MessageType<ExamUser> {
|
|
906
966
|
constructor() {
|
|
907
967
|
super("resources.qualifications.ExamUser", [
|
|
908
|
-
{ no: 1, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
968
|
+
{ no: 1, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
909
969
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
910
970
|
{ no: 3, name: "created_at", kind: "message", T: () => Timestamp },
|
|
911
971
|
{ no: 4, name: "started_at", kind: "message", T: () => Timestamp },
|
|
@@ -915,7 +975,7 @@ class ExamUser$Type extends MessageType<ExamUser> {
|
|
|
915
975
|
}
|
|
916
976
|
create(value?: PartialMessage<ExamUser>): ExamUser {
|
|
917
977
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
918
|
-
message.qualificationId =
|
|
978
|
+
message.qualificationId = 0;
|
|
919
979
|
message.userId = 0;
|
|
920
980
|
if (value !== undefined)
|
|
921
981
|
reflectionMergePartial<ExamUser>(this, message, value);
|
|
@@ -926,8 +986,8 @@ class ExamUser$Type extends MessageType<ExamUser> {
|
|
|
926
986
|
while (reader.pos < end) {
|
|
927
987
|
let [fieldNo, wireType] = reader.tag();
|
|
928
988
|
switch (fieldNo) {
|
|
929
|
-
case /* uint64 qualification_id
|
|
930
|
-
message.qualificationId = reader.uint64().
|
|
989
|
+
case /* uint64 qualification_id */ 1:
|
|
990
|
+
message.qualificationId = reader.uint64().toNumber();
|
|
931
991
|
break;
|
|
932
992
|
case /* int32 user_id */ 2:
|
|
933
993
|
message.userId = reader.int32();
|
|
@@ -956,8 +1016,8 @@ class ExamUser$Type extends MessageType<ExamUser> {
|
|
|
956
1016
|
return message;
|
|
957
1017
|
}
|
|
958
1018
|
internalBinaryWrite(message: ExamUser, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
959
|
-
/* uint64 qualification_id = 1
|
|
960
|
-
if (message.qualificationId !==
|
|
1019
|
+
/* uint64 qualification_id = 1; */
|
|
1020
|
+
if (message.qualificationId !== 0)
|
|
961
1021
|
writer.tag(1, WireType.Varint).uint64(message.qualificationId);
|
|
962
1022
|
/* int32 user_id = 2; */
|
|
963
1023
|
if (message.userId !== 0)
|
|
@@ -988,14 +1048,14 @@ export const ExamUser = new ExamUser$Type();
|
|
|
988
1048
|
class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
989
1049
|
constructor() {
|
|
990
1050
|
super("resources.qualifications.ExamResponses", [
|
|
991
|
-
{ no: 1, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
1051
|
+
{ no: 1, name: "qualification_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
992
1052
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
993
1053
|
{ no: 3, name: "responses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ExamResponse, options: { "validate.rules": { repeated: { maxItems: "50" } } } }
|
|
994
1054
|
]);
|
|
995
1055
|
}
|
|
996
1056
|
create(value?: PartialMessage<ExamResponses>): ExamResponses {
|
|
997
1057
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
998
|
-
message.qualificationId =
|
|
1058
|
+
message.qualificationId = 0;
|
|
999
1059
|
message.userId = 0;
|
|
1000
1060
|
message.responses = [];
|
|
1001
1061
|
if (value !== undefined)
|
|
@@ -1007,8 +1067,8 @@ class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
|
1007
1067
|
while (reader.pos < end) {
|
|
1008
1068
|
let [fieldNo, wireType] = reader.tag();
|
|
1009
1069
|
switch (fieldNo) {
|
|
1010
|
-
case /* uint64 qualification_id
|
|
1011
|
-
message.qualificationId = reader.uint64().
|
|
1070
|
+
case /* uint64 qualification_id */ 1:
|
|
1071
|
+
message.qualificationId = reader.uint64().toNumber();
|
|
1012
1072
|
break;
|
|
1013
1073
|
case /* int32 user_id */ 2:
|
|
1014
1074
|
message.userId = reader.int32();
|
|
@@ -1028,8 +1088,8 @@ class ExamResponses$Type extends MessageType<ExamResponses> {
|
|
|
1028
1088
|
return message;
|
|
1029
1089
|
}
|
|
1030
1090
|
internalBinaryWrite(message: ExamResponses, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1031
|
-
/* uint64 qualification_id = 1
|
|
1032
|
-
if (message.qualificationId !==
|
|
1091
|
+
/* uint64 qualification_id = 1; */
|
|
1092
|
+
if (message.qualificationId !== 0)
|
|
1033
1093
|
writer.tag(1, WireType.Varint).uint64(message.qualificationId);
|
|
1034
1094
|
/* int32 user_id = 2; */
|
|
1035
1095
|
if (message.userId !== 0)
|
|
@@ -1051,7 +1111,7 @@ export const ExamResponses = new ExamResponses$Type();
|
|
|
1051
1111
|
class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
1052
1112
|
constructor() {
|
|
1053
1113
|
super("resources.qualifications.ExamResponse", [
|
|
1054
|
-
{ no: 1, name: "question_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/ },
|
|
1114
|
+
{ no: 1, name: "question_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
1055
1115
|
{ no: 2, name: "user_id", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1056
1116
|
{ no: 3, name: "question", kind: "message", T: () => ExamQuestion },
|
|
1057
1117
|
{ no: 4, name: "response", kind: "message", T: () => ExamResponseData }
|
|
@@ -1059,7 +1119,7 @@ class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
|
1059
1119
|
}
|
|
1060
1120
|
create(value?: PartialMessage<ExamResponse>): ExamResponse {
|
|
1061
1121
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1062
|
-
message.questionId =
|
|
1122
|
+
message.questionId = 0;
|
|
1063
1123
|
message.userId = 0;
|
|
1064
1124
|
if (value !== undefined)
|
|
1065
1125
|
reflectionMergePartial<ExamResponse>(this, message, value);
|
|
@@ -1070,8 +1130,8 @@ class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
|
1070
1130
|
while (reader.pos < end) {
|
|
1071
1131
|
let [fieldNo, wireType] = reader.tag();
|
|
1072
1132
|
switch (fieldNo) {
|
|
1073
|
-
case /* uint64 question_id
|
|
1074
|
-
message.questionId = reader.uint64().
|
|
1133
|
+
case /* uint64 question_id */ 1:
|
|
1134
|
+
message.questionId = reader.uint64().toNumber();
|
|
1075
1135
|
break;
|
|
1076
1136
|
case /* int32 user_id */ 2:
|
|
1077
1137
|
message.userId = reader.int32();
|
|
@@ -1094,8 +1154,8 @@ class ExamResponse$Type extends MessageType<ExamResponse> {
|
|
|
1094
1154
|
return message;
|
|
1095
1155
|
}
|
|
1096
1156
|
internalBinaryWrite(message: ExamResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1097
|
-
/* uint64 question_id = 1
|
|
1098
|
-
if (message.questionId !==
|
|
1157
|
+
/* uint64 question_id = 1; */
|
|
1158
|
+
if (message.questionId !== 0)
|
|
1099
1159
|
writer.tag(1, WireType.Varint).uint64(message.questionId);
|
|
1100
1160
|
/* int32 user_id = 2; */
|
|
1101
1161
|
if (message.userId !== 0)
|
|
@@ -1218,7 +1278,20 @@ class ExamResponseSeparator$Type extends MessageType<ExamResponseSeparator> {
|
|
|
1218
1278
|
return message;
|
|
1219
1279
|
}
|
|
1220
1280
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamResponseSeparator): ExamResponseSeparator {
|
|
1221
|
-
|
|
1281
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1282
|
+
while (reader.pos < end) {
|
|
1283
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1284
|
+
switch (fieldNo) {
|
|
1285
|
+
default:
|
|
1286
|
+
let u = options.readUnknownField;
|
|
1287
|
+
if (u === "throw")
|
|
1288
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1289
|
+
let d = reader.skip(wireType);
|
|
1290
|
+
if (u !== false)
|
|
1291
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
return message;
|
|
1222
1295
|
}
|
|
1223
1296
|
internalBinaryWrite(message: ExamResponseSeparator, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1224
1297
|
let u = options.writeUnknownFields;
|
|
@@ -1419,3 +1492,112 @@ class ExamResponseMultipleChoice$Type extends MessageType<ExamResponseMultipleCh
|
|
|
1419
1492
|
* @generated MessageType for protobuf message resources.qualifications.ExamResponseMultipleChoice
|
|
1420
1493
|
*/
|
|
1421
1494
|
export const ExamResponseMultipleChoice = new ExamResponseMultipleChoice$Type();
|
|
1495
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1496
|
+
class ExamGrading$Type extends MessageType<ExamGrading> {
|
|
1497
|
+
constructor() {
|
|
1498
|
+
super("resources.qualifications.ExamGrading", [
|
|
1499
|
+
{ no: 1, name: "responses", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ExamGradingResponse, options: { "validate.rules": { repeated: { maxItems: "50" } } } }
|
|
1500
|
+
]);
|
|
1501
|
+
}
|
|
1502
|
+
create(value?: PartialMessage<ExamGrading>): ExamGrading {
|
|
1503
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1504
|
+
message.responses = [];
|
|
1505
|
+
if (value !== undefined)
|
|
1506
|
+
reflectionMergePartial<ExamGrading>(this, message, value);
|
|
1507
|
+
return message;
|
|
1508
|
+
}
|
|
1509
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamGrading): ExamGrading {
|
|
1510
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1511
|
+
while (reader.pos < end) {
|
|
1512
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1513
|
+
switch (fieldNo) {
|
|
1514
|
+
case /* repeated resources.qualifications.ExamGradingResponse responses */ 1:
|
|
1515
|
+
message.responses.push(ExamGradingResponse.internalBinaryRead(reader, reader.uint32(), options));
|
|
1516
|
+
break;
|
|
1517
|
+
default:
|
|
1518
|
+
let u = options.readUnknownField;
|
|
1519
|
+
if (u === "throw")
|
|
1520
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1521
|
+
let d = reader.skip(wireType);
|
|
1522
|
+
if (u !== false)
|
|
1523
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
return message;
|
|
1527
|
+
}
|
|
1528
|
+
internalBinaryWrite(message: ExamGrading, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1529
|
+
/* repeated resources.qualifications.ExamGradingResponse responses = 1; */
|
|
1530
|
+
for (let i = 0; i < message.responses.length; i++)
|
|
1531
|
+
ExamGradingResponse.internalBinaryWrite(message.responses[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1532
|
+
let u = options.writeUnknownFields;
|
|
1533
|
+
if (u !== false)
|
|
1534
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1535
|
+
return writer;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamGrading
|
|
1540
|
+
*/
|
|
1541
|
+
export const ExamGrading = new ExamGrading$Type();
|
|
1542
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1543
|
+
class ExamGradingResponse$Type extends MessageType<ExamGradingResponse> {
|
|
1544
|
+
constructor() {
|
|
1545
|
+
super("resources.qualifications.ExamGradingResponse", [
|
|
1546
|
+
{ no: 1, name: "question_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 2 /*LongType.NUMBER*/ },
|
|
1547
|
+
{ no: 2, name: "points", kind: "scalar", T: 2 /*ScalarType.FLOAT*/, options: { "validate.rules": { float: { lte: 1000, gte: 0 } } } },
|
|
1548
|
+
{ no: 3, name: "checked", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
|
|
1549
|
+
]);
|
|
1550
|
+
}
|
|
1551
|
+
create(value?: PartialMessage<ExamGradingResponse>): ExamGradingResponse {
|
|
1552
|
+
const message = globalThis.Object.create((this.messagePrototype!));
|
|
1553
|
+
message.questionId = 0;
|
|
1554
|
+
message.points = 0;
|
|
1555
|
+
if (value !== undefined)
|
|
1556
|
+
reflectionMergePartial<ExamGradingResponse>(this, message, value);
|
|
1557
|
+
return message;
|
|
1558
|
+
}
|
|
1559
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ExamGradingResponse): ExamGradingResponse {
|
|
1560
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1561
|
+
while (reader.pos < end) {
|
|
1562
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1563
|
+
switch (fieldNo) {
|
|
1564
|
+
case /* uint64 question_id */ 1:
|
|
1565
|
+
message.questionId = reader.uint64().toNumber();
|
|
1566
|
+
break;
|
|
1567
|
+
case /* float points */ 2:
|
|
1568
|
+
message.points = reader.float();
|
|
1569
|
+
break;
|
|
1570
|
+
case /* optional bool checked */ 3:
|
|
1571
|
+
message.checked = reader.bool();
|
|
1572
|
+
break;
|
|
1573
|
+
default:
|
|
1574
|
+
let u = options.readUnknownField;
|
|
1575
|
+
if (u === "throw")
|
|
1576
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1577
|
+
let d = reader.skip(wireType);
|
|
1578
|
+
if (u !== false)
|
|
1579
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
return message;
|
|
1583
|
+
}
|
|
1584
|
+
internalBinaryWrite(message: ExamGradingResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1585
|
+
/* uint64 question_id = 1; */
|
|
1586
|
+
if (message.questionId !== 0)
|
|
1587
|
+
writer.tag(1, WireType.Varint).uint64(message.questionId);
|
|
1588
|
+
/* float points = 2; */
|
|
1589
|
+
if (message.points !== 0)
|
|
1590
|
+
writer.tag(2, WireType.Bit32).float(message.points);
|
|
1591
|
+
/* optional bool checked = 3; */
|
|
1592
|
+
if (message.checked !== undefined)
|
|
1593
|
+
writer.tag(3, WireType.Varint).bool(message.checked);
|
|
1594
|
+
let u = options.writeUnknownFields;
|
|
1595
|
+
if (u !== false)
|
|
1596
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1597
|
+
return writer;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* @generated MessageType for protobuf message resources.qualifications.ExamGradingResponse
|
|
1602
|
+
*/
|
|
1603
|
+
export const ExamGradingResponse = new ExamGradingResponse$Type();
|