@altnovatrail/spec 0.13.0 → 0.15.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.
@@ -0,0 +1,1388 @@
1
+ // Code generated by tools/types from export/schemas; DO NOT EDIT.
2
+
3
+ /**
4
+ * The types of the format of the export, version 1 of the part, generated from the schemas in
5
+ * export/schemas by tools/types (R72, R73 and R135 in spec's docs/decisions.md): the same types as
6
+ * the Go package exportv1, by the same names — the files of an export, the manifest, the account, a
7
+ * profile with every record of it and what a device holds of it, and the vectors of reading. A
8
+ * field that holds the JSON of a message of protobuf, or a value as the element <novatrail-canvas>
9
+ * gives it, is any JSON value, unknown, as a reader gets it. The schemas decide what is valid: a
10
+ * type gives the shape of a value alone, and code that reads a value from elsewhere checks it
11
+ * against its schema first, and then against the rules of reading (export/README.md, section 5). A
12
+ * field the object always holds is required; any other is optional.
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+
17
+ // The types of account.schema.json.
18
+
19
+ /**
20
+ * Account is the type of account.schema.json.
21
+ *
22
+ * The account in an export of the account, api/account.json (section 4 of the text of the part):
23
+ * its fields that are no secret, its consents and its counters of quota.
24
+ */
25
+ export interface Account {
26
+ /**
27
+ * The version of the part, the integer in export/VERSION.
28
+ */
29
+ readonly format: number;
30
+ /**
31
+ * The ID of the account in api, never the sign-in service's UID.
32
+ */
33
+ readonly account_id: ID;
34
+ /**
35
+ * When the owner stated they are 18 or older; the column is a timestamptz, the documents say a
36
+ * date.
37
+ */
38
+ readonly adult_stated_at: Time;
39
+ /**
40
+ * The account's tariff, taken from its invite code, which sets the quota ceilings.
41
+ */
42
+ readonly tariff: string;
43
+ /**
44
+ * The family's clock offset from UTC in minutes, -720 to 840 in steps of 15; absent before the
45
+ * first request on platform AI.
46
+ */
47
+ readonly utc_offset_minutes?: number;
48
+ /**
49
+ * The end of the family's current quota day.
50
+ */
51
+ readonly day_ends_at?: Time;
52
+ /**
53
+ * The date of the last request with the account's token, by which an idle account is deleted
54
+ * after 12 months.
55
+ */
56
+ readonly last_request_on: Day;
57
+ /**
58
+ * The IDs of the account's profiles, each with its file in profiles/.
59
+ */
60
+ readonly profile_ids: readonly ID[];
61
+ /**
62
+ * Every consent of the account, in full: the minimal record left after a deletion is none (R117).
63
+ */
64
+ readonly consents: readonly Consent[];
65
+ /**
66
+ * The account's own quota counters; a profile's go in its profile part.
67
+ */
68
+ readonly quota_counters: readonly QuotaCounter[];
69
+ }
70
+
71
+ // The types of common.schema.json.
72
+
73
+ /**
74
+ * ID is the type of common.schema.json#/$defs/id.
75
+ *
76
+ * An ID, as api or app gives it.
77
+ */
78
+ export type ID = string;
79
+
80
+ /**
81
+ * Time is the type of common.schema.json#/$defs/time.
82
+ *
83
+ * A time, RFC 3339 in UTC.
84
+ */
85
+ export type Time = string;
86
+
87
+ /**
88
+ * Day is the type of common.schema.json#/$defs/day.
89
+ *
90
+ * A day, YYYY-MM-DD.
91
+ */
92
+ export type Day = string;
93
+
94
+ /**
95
+ * Consent is the type of common.schema.json#/$defs/consent.
96
+ */
97
+ export interface Consent {
98
+ /**
99
+ * The ID of the consent record, which the minimal record keeps after deletion.
100
+ */
101
+ readonly consent_id: ID;
102
+ /**
103
+ * Who gave the consent: the owner of the account of their own profile, by the statement that they
104
+ * are 18 or older; a parent, by the signed form; or the learner themselves, from the age of
105
+ * digital consent of their country (R116).
106
+ */
107
+ readonly giver: ConsentGiver;
108
+ /**
109
+ * Where the consent stands.
110
+ */
111
+ readonly state: ConsentState;
112
+ /**
113
+ * Beside a parent's consent, and only there: the code of the request, which the signed form names
114
+ * — ten characters of Crockford's base32 in two groups of five.
115
+ */
116
+ readonly request_code?: string;
117
+ /**
118
+ * Beside a parent's consent: where the scan of the signed form stands — none sent; sent, and
119
+ * checked by the operator or accepted once the consent is confirmed; or not accepted, so that a
120
+ * new one is sent.
121
+ */
122
+ readonly form?: ConsentForm;
123
+ /**
124
+ * The age category the consent was given for.
125
+ */
126
+ readonly age_category: AgeCategory;
127
+ /**
128
+ * The learner's country, ISO 3166-1 alpha-2.
129
+ */
130
+ readonly country: string;
131
+ /**
132
+ * How the consent was checked: the owner's dated statement for an adult, the signed form (and
133
+ * later a card transaction) for a child.
134
+ */
135
+ readonly method?: string;
136
+ /**
137
+ * When the consent was recorded.
138
+ */
139
+ readonly requested_at: Time;
140
+ /**
141
+ * When the consent was confirmed; absent while it waits.
142
+ */
143
+ readonly confirmed_at?: Time;
144
+ /**
145
+ * The versions of the legal texts the person saw when they gave the consent — privacy-policy and
146
+ * terms-of-use of the owner's, parent-consent of a parent's, teen-consent of the learner's own —,
147
+ * each that had a version in force (R130); empty when none had.
148
+ */
149
+ readonly texts: readonly TextRef[];
150
+ }
151
+
152
+ /**
153
+ * ConsentGiver is the type of common.schema.json#/$defs/consent/properties/giver.
154
+ *
155
+ * Who gave the consent: the owner of the account of their own profile, by the statement that they
156
+ * are 18 or older; a parent, by the signed form; or the learner themselves, from the age of digital
157
+ * consent of their country (R116).
158
+ */
159
+ export type ConsentGiver = "owner" | "parent" | "learner";
160
+
161
+ /**
162
+ * ConsentState is the type of common.schema.json#/$defs/consent/properties/state.
163
+ *
164
+ * Where the consent stands.
165
+ */
166
+ export type ConsentState = "waiting" | "confirmed";
167
+
168
+ /**
169
+ * ConsentForm is the type of common.schema.json#/$defs/consent/properties/form.
170
+ *
171
+ * Beside a parent's consent: where the scan of the signed form stands — none sent; sent, and
172
+ * checked by the operator or accepted once the consent is confirmed; or not accepted, so that a new
173
+ * one is sent.
174
+ */
175
+ export type ConsentForm = "not_sent" | "sent" | "not_accepted";
176
+
177
+ /**
178
+ * AgeCategory is the type of common.schema.json#/$defs/age_category.
179
+ *
180
+ * An age category, by its code (R46).
181
+ */
182
+ export type AgeCategory = "under_13" | "from_13_to_consent" | "from_consent_to_18" | "adult";
183
+
184
+ /**
185
+ * TextRef is the type of common.schema.json#/$defs/text_ref.
186
+ */
187
+ export interface TextRef {
188
+ /**
189
+ * The ID of the text in the passport of the legal texts, such as parent-consent.
190
+ */
191
+ readonly id: string;
192
+ /**
193
+ * The number of its version, from 1.
194
+ */
195
+ readonly version: number;
196
+ }
197
+
198
+ /**
199
+ * QuotaCounter is the type of common.schema.json#/$defs/quota_counter.
200
+ */
201
+ export interface QuotaCounter {
202
+ /**
203
+ * The beginning of the family day, the counter's key (not a date: an offset change can repeat a
204
+ * date).
205
+ */
206
+ readonly day_start: Time;
207
+ /**
208
+ * Spent that day; the source keeps US dollars by tutor's estimate, here as integer micro-dollars.
209
+ */
210
+ readonly spent_micro_usd: number;
211
+ /**
212
+ * In reserve that day, in integer micro-dollars of the dollars the source keeps.
213
+ */
214
+ readonly reserved_micro_usd: number;
215
+ }
216
+
217
+ // The types of device.schema.json.
218
+
219
+ /**
220
+ * Device is the type of device.schema.json.
221
+ *
222
+ * What this device holds of a profile, device/<id>.json (section 4 of the text of the part): its
223
+ * unfinished attempts with their history, its essays and its places in lessons.
224
+ */
225
+ export interface Device {
226
+ /**
227
+ * The version of the part, the integer in export/VERSION.
228
+ */
229
+ readonly format: number;
230
+ /**
231
+ * The ID of the profile.
232
+ */
233
+ readonly profile_id: ID;
234
+ /**
235
+ * The unfinished attempts this device holds.
236
+ */
237
+ readonly attempts: readonly DeviceAttempt[];
238
+ /**
239
+ * The essays this device holds, with what was read and the feedback.
240
+ */
241
+ readonly essays: readonly DeviceEssay[];
242
+ /**
243
+ * The places in the unfinished lessons.
244
+ */
245
+ readonly lessons: readonly DeviceLesson[];
246
+ }
247
+
248
+ /**
249
+ * DeviceAttempt is the type of device.schema.json#/$defs/device_attempt.
250
+ */
251
+ export interface DeviceAttempt {
252
+ /**
253
+ * The unfinished attempt, by its ID in api.
254
+ */
255
+ readonly attempt_id: ID;
256
+ /**
257
+ * The history of writing as the canvas gave it: write/erase/clear/undo events with t; strokes
258
+ * with id, kind and points x, y, t, p.
259
+ */
260
+ readonly history: unknown;
261
+ /**
262
+ * Each submission's context (SheetSubmission or WorkbookSubmission, as the canvas gave it) and
263
+ * the history length when it was sent; the PNG work is not exported.
264
+ */
265
+ readonly submissions: readonly DeviceAttemptSubmission[];
266
+ /**
267
+ * The attempt's mode, the step's place, the ticks of the chips and the technique IDs received.
268
+ */
269
+ readonly step_state?: DeviceAttemptStepState;
270
+ }
271
+
272
+ /**
273
+ * DeviceAttemptSubmission is the type of device.schema.json#/$defs/device_attempt_submission.
274
+ */
275
+ export interface DeviceAttemptSubmission {
276
+ /**
277
+ * The context of the submission, as the element <novatrail-canvas> gave it, in its own names.
278
+ */
279
+ readonly context: unknown;
280
+ /**
281
+ * How many events of the history the submission covers.
282
+ */
283
+ readonly history_length: number;
284
+ }
285
+
286
+ /**
287
+ * DeviceAttemptStepState is the type of device.schema.json#/$defs/device_attempt_step_state.
288
+ */
289
+ export interface DeviceAttemptStepState {
290
+ /**
291
+ * The mode of the attempt.
292
+ */
293
+ readonly mode: DeviceAttemptStepStateMode;
294
+ /**
295
+ * The place of the step.
296
+ */
297
+ readonly step: number;
298
+ /**
299
+ * The ticks of what is given and what is to be found, as app keeps them.
300
+ */
301
+ readonly ticks: unknown;
302
+ /**
303
+ * The IDs of the techniques the learner got.
304
+ */
305
+ readonly technique_ids: readonly string[];
306
+ }
307
+
308
+ /**
309
+ * DeviceAttemptStepStateMode is the type of
310
+ * device.schema.json#/$defs/device_attempt_step_state/properties/mode.
311
+ *
312
+ * The mode of the attempt.
313
+ */
314
+ export type DeviceAttemptStepStateMode = "by_steps" | "self";
315
+
316
+ /**
317
+ * DeviceEssay is the type of device.schema.json#/$defs/device_essay.
318
+ */
319
+ export interface DeviceEssay {
320
+ /**
321
+ * The essay's attempt, finished or not.
322
+ */
323
+ readonly attempt_id: ID;
324
+ /**
325
+ * Whether the module version was withdrawn, so the essay goes without the task's statement.
326
+ */
327
+ readonly module_version_withdrawn: boolean;
328
+ /**
329
+ * The history of writing of the essay.
330
+ */
331
+ readonly history: unknown;
332
+ /**
333
+ * What was read of the essay.
334
+ */
335
+ readonly text?: string;
336
+ /**
337
+ * The rubric feedback's words.
338
+ */
339
+ readonly feedback?: string;
340
+ }
341
+
342
+ /**
343
+ * DeviceLesson is the type of device.schema.json#/$defs/device_lesson.
344
+ */
345
+ export interface DeviceLesson {
346
+ /**
347
+ * The lesson's full ID, part of the key.
348
+ */
349
+ readonly lesson: string;
350
+ /**
351
+ * The package digest, the rest of the key.
352
+ */
353
+ readonly package_digest: string;
354
+ /**
355
+ * The run the state belongs to.
356
+ */
357
+ readonly lesson_run_id: ID;
358
+ /**
359
+ * The segment the learner has reached, from 1.
360
+ */
361
+ readonly place: number;
362
+ /**
363
+ * The demo state of each worked example, {opened, hidden}, by segment place.
364
+ */
365
+ readonly demo_states: readonly DeviceLessonDemoState[];
366
+ }
367
+
368
+ /**
369
+ * DeviceLessonDemoState is the type of device.schema.json#/$defs/device_lesson_demo_state.
370
+ */
371
+ export interface DeviceLessonDemoState {
372
+ /**
373
+ * The number of the segment of the lesson.
374
+ */
375
+ readonly segment: number;
376
+ /**
377
+ * The state of showing of the segment, as the element gave it, in its own names.
378
+ */
379
+ readonly demo_state: unknown;
380
+ }
381
+
382
+ // The types of manifest.schema.json.
383
+
384
+ /**
385
+ * Manifest is the type of manifest.schema.json.
386
+ *
387
+ * The manifest of an export, manifest.json, which app writes (section 4 of the text of the part).
388
+ */
389
+ export interface Manifest {
390
+ /**
391
+ * The version of the part, the integer in export/VERSION.
392
+ */
393
+ readonly format: number;
394
+ /**
395
+ * What the export holds: one profile, or the account and every profile of it.
396
+ */
397
+ readonly scope: ManifestScope;
398
+ /**
399
+ * When app built the export.
400
+ */
401
+ readonly built_at: Time;
402
+ /**
403
+ * The version of the build of app that built the export.
404
+ */
405
+ readonly app_version: string;
406
+ /**
407
+ * The version of the format that the method of api named for its part, export_format_version, as
408
+ * the string it gave.
409
+ */
410
+ readonly api_format: string;
411
+ }
412
+
413
+ /**
414
+ * ManifestScope is the type of manifest.schema.json#/properties/scope.
415
+ *
416
+ * What the export holds: one profile, or the account and every profile of it.
417
+ */
418
+ export type ManifestScope = "profile" | "account";
419
+
420
+ // The types of profile.schema.json.
421
+
422
+ /**
423
+ * Profile is the type of profile.schema.json.
424
+ *
425
+ * A profile and every record of it, api/profiles/<id>.json (section 4 of the text of the part).
426
+ */
427
+ export interface Profile {
428
+ /**
429
+ * The version of the part, the integer in export/VERSION.
430
+ */
431
+ readonly format: number;
432
+ /**
433
+ * The ID of the profile.
434
+ */
435
+ readonly profile_id: ID;
436
+ /**
437
+ * Whether this is the profile of the account's owner.
438
+ */
439
+ readonly owner: boolean;
440
+ /**
441
+ * The pseudonym the owner made up for the learner, never a real name.
442
+ */
443
+ readonly pseudonym: string;
444
+ /**
445
+ * The code of a picture of app's set; empty when none was chosen.
446
+ */
447
+ readonly avatar: string;
448
+ /**
449
+ * The learner's age category.
450
+ */
451
+ readonly age_category: AgeCategory;
452
+ /**
453
+ * The learner's country, ISO 3166-1 alpha-2.
454
+ */
455
+ readonly country: string;
456
+ /**
457
+ * The day the age was given; absent on the owner's profile, which asks no age.
458
+ */
459
+ readonly age_stated_on?: Day;
460
+ /**
461
+ * The country's age of digital consent, 13 to 18, that the category was given by (consent-age
462
+ * calls it `applied`); absent where no age was given.
463
+ */
464
+ readonly consent_age?: number;
465
+ /**
466
+ * How the platform speaks and shows: today only the voicing, on or off, and its speed.
467
+ */
468
+ readonly presentation_style: ProfilePresentationStyle;
469
+ /**
470
+ * The default mode of the screen of a task.
471
+ */
472
+ readonly default_mode: ProfileDefaultMode;
473
+ /**
474
+ * The interface language, a BCP 47 tag; absent when none is set.
475
+ */
476
+ readonly interface_language?: string;
477
+ /**
478
+ * The grade, 1 to 12, when a module asks for it.
479
+ */
480
+ readonly grade?: number;
481
+ /**
482
+ * A child's setting: the solution is shown by an action of an adult; always false at adult.
483
+ */
484
+ readonly ask_before_showing: boolean;
485
+ /**
486
+ * The date of the last learning request or adult action on the profile, by which an idle profile
487
+ * is deleted after 12 months.
488
+ */
489
+ readonly active_on: Day;
490
+ /**
491
+ * The profile's consent record, whole.
492
+ */
493
+ readonly consent: Consent;
494
+ /**
495
+ * The modules connected to the profile.
496
+ */
497
+ readonly connected_modules: readonly ConnectedModule[];
498
+ /**
499
+ * The profile's lesson runs, open and ended.
500
+ */
501
+ readonly lesson_runs: readonly LessonRun[];
502
+ /**
503
+ * The profile's attempts, open and closed.
504
+ */
505
+ readonly attempts: readonly Attempt[];
506
+ /**
507
+ * The engine's choices for the profile.
508
+ */
509
+ readonly choices: readonly Choice[];
510
+ /**
511
+ * The whole evidence log, in the order of seq.
512
+ */
513
+ readonly evidence: readonly EvidenceEntry[];
514
+ /**
515
+ * The current state of the learner model.
516
+ */
517
+ readonly state: StateEntry;
518
+ /**
519
+ * Artefacts kept on the server; empty while storage is off.
520
+ */
521
+ readonly artefacts: readonly Artefact[];
522
+ /**
523
+ * Whether the storage of the profile's works on the server is on (R113).
524
+ */
525
+ readonly work_storage: boolean;
526
+ /**
527
+ * Each time the storage of works was switched on, by whom, by which version of storage-consent,
528
+ * and when it was switched off: the records live as long as the profile (R131; R136).
529
+ */
530
+ readonly storage_consents: readonly StorageConsent[];
531
+ /**
532
+ * The reports of a problem with the tutor's words of the profile's attempts that api keeps: until
533
+ * the operator reviewed them, and for a year after (R123; R136).
534
+ */
535
+ readonly problem_reports: readonly ProblemReport[];
536
+ /**
537
+ * The profile's quota counters.
538
+ */
539
+ readonly quota_counters: readonly QuotaCounter[];
540
+ }
541
+
542
+ /**
543
+ * ProfilePresentationStyle is the type of profile.schema.json#/$defs/profile_presentation_style.
544
+ */
545
+ export interface ProfilePresentationStyle {
546
+ /**
547
+ * The voicing: whether it is on, and its speed.
548
+ */
549
+ readonly voicing: ProfilePresentationStyleVoicing;
550
+ }
551
+
552
+ /**
553
+ * ProfilePresentationStyleVoicing is the type of
554
+ * profile.schema.json#/$defs/profile_presentation_style_voicing.
555
+ */
556
+ export interface ProfilePresentationStyleVoicing {
557
+ /**
558
+ * Whether the voicing is on.
559
+ */
560
+ readonly enabled: boolean;
561
+ /**
562
+ * The speed of the voicing.
563
+ */
564
+ readonly speed: ProfilePresentationStyleVoicingSpeed;
565
+ }
566
+
567
+ /**
568
+ * ProfilePresentationStyleVoicingSpeed is the type of
569
+ * profile.schema.json#/$defs/profile_presentation_style_voicing/properties/speed.
570
+ *
571
+ * The speed of the voicing.
572
+ */
573
+ export type ProfilePresentationStyleVoicingSpeed = "normal" | "slow";
574
+
575
+ /**
576
+ * ProfileDefaultMode is the type of profile.schema.json#/properties/default_mode.
577
+ *
578
+ * The default mode of the screen of a task.
579
+ */
580
+ export type ProfileDefaultMode = "by_steps" | "self";
581
+
582
+ /**
583
+ * ConnectedModule is the type of profile.schema.json#/$defs/connected_module.
584
+ */
585
+ export interface ConnectedModule {
586
+ /**
587
+ * The module's ID, 1 to 128 characters.
588
+ */
589
+ readonly module_id: string;
590
+ /**
591
+ * When the module was connected; no version is kept.
592
+ */
593
+ readonly connected_at: Time;
594
+ }
595
+
596
+ /**
597
+ * LessonRun is the type of profile.schema.json#/$defs/lesson_run.
598
+ */
599
+ export interface LessonRun {
600
+ /**
601
+ * The ID of the run.
602
+ */
603
+ readonly lesson_run_id: ID;
604
+ /**
605
+ * The lesson's full ID (lesson_id in the database).
606
+ */
607
+ readonly lesson: string;
608
+ /**
609
+ * The module's ID.
610
+ */
611
+ readonly module_id: string;
612
+ /**
613
+ * The module's version, so the export reads without the index.
614
+ */
615
+ readonly module_version: string;
616
+ /**
617
+ * The digest of the package the run goes on.
618
+ */
619
+ readonly package_digest: string;
620
+ /**
621
+ * The engine's lesson choice that opened the run.
622
+ */
623
+ readonly choice_id: ID;
624
+ /**
625
+ * When the run began (started_at in the database).
626
+ */
627
+ readonly begun_at: Time;
628
+ /**
629
+ * The time of the last action on the run or its attempts.
630
+ */
631
+ readonly last_action_at: Time;
632
+ /**
633
+ * Why the run ended; absent while open.
634
+ */
635
+ readonly end_reason?: LessonRunEndReason;
636
+ /**
637
+ * When it ended; absent while open.
638
+ */
639
+ readonly ended_at?: Time;
640
+ }
641
+
642
+ /**
643
+ * LessonRunEndReason is the type of profile.schema.json#/$defs/lesson_run/properties/end_reason.
644
+ *
645
+ * Why the run ended; absent while open.
646
+ */
647
+ export type LessonRunEndReason = "passed" | "unchecked" | "not_suitable" | "abandoned";
648
+
649
+ /**
650
+ * Attempt is the type of profile.schema.json#/$defs/attempt.
651
+ */
652
+ export interface Attempt {
653
+ /**
654
+ * The ID of the attempt.
655
+ */
656
+ readonly attempt_id: ID;
657
+ /**
658
+ * The digest of the attempt's module package, sha256:<64 hex>.
659
+ */
660
+ readonly package_digest: string;
661
+ /**
662
+ * The module's ID.
663
+ */
664
+ readonly module_id: string;
665
+ /**
666
+ * The module's version X.Y.Z, so the export reads without the index.
667
+ */
668
+ readonly module_version: string;
669
+ /**
670
+ * The module format version the verdict repeats by, MAJOR.MINOR.
671
+ */
672
+ readonly module_format_version: string;
673
+ /**
674
+ * The module-kit version the verdict repeats by.
675
+ */
676
+ readonly module_kit_version: string;
677
+ /**
678
+ * The task's full ID; the database keeps the module ID and the local ID apart.
679
+ */
680
+ readonly task: string;
681
+ /**
682
+ * The instance the seed chose, when the task is a template; the seed itself is not exported.
683
+ */
684
+ readonly instance?: number;
685
+ /**
686
+ * The engine's task choice the attempt began by; one of choice_id, segment, previous_attempt_id.
687
+ */
688
+ readonly choice_id?: ID;
689
+ /**
690
+ * The task segment of a lesson run the attempt is, the segment's place from 1.
691
+ */
692
+ readonly segment?: AttemptSegment;
693
+ /**
694
+ * The earlier attempt of the same task that this one began again from.
695
+ */
696
+ readonly previous_attempt_id?: ID;
697
+ /**
698
+ * When the attempt began (started_at in the database).
699
+ */
700
+ readonly begun_at: Time;
701
+ /**
702
+ * The time of the last action on the attempt.
703
+ */
704
+ readonly last_action_at: Time;
705
+ /**
706
+ * Why the attempt was closed; absent while it is open.
707
+ */
708
+ readonly close_reason?: AttemptCloseReason;
709
+ /**
710
+ * When it was closed; absent while it is open.
711
+ */
712
+ readonly closed_at?: Time;
713
+ /**
714
+ * How many wrong answers the attempt has.
715
+ */
716
+ readonly wrong_answers: number;
717
+ /**
718
+ * The technique IDs given at a solving step.
719
+ */
720
+ readonly step_technique_ids: readonly string[];
721
+ /**
722
+ * When the task's techniques were first given at a step.
723
+ */
724
+ readonly step_techniques_at?: Time;
725
+ /**
726
+ * The technique IDs given on request.
727
+ */
728
+ readonly requested_technique_ids: readonly string[];
729
+ /**
730
+ * The leading question a hint asked for gave (format 0.4); absent when none was given.
731
+ */
732
+ readonly requested_leading_question?: string;
733
+ /**
734
+ * The full IDs of the traps the program found in the attempt's wrong values.
735
+ */
736
+ readonly traps: readonly string[];
737
+ /**
738
+ * The hint ladder's rungs given, with their source.
739
+ */
740
+ readonly rungs: readonly Rung[];
741
+ /**
742
+ * Whether the tutor's words after a correct answer were given.
743
+ */
744
+ readonly correct_answer_words_given: boolean;
745
+ /**
746
+ * When the solution was shown.
747
+ */
748
+ readonly solution_shown_at?: Time;
749
+ /**
750
+ * Per item, the facts the evidence also carries; needed in the attempt for an attempt with no
751
+ * evidence.
752
+ */
753
+ readonly items?: readonly AttemptItem[];
754
+ /**
755
+ * Each submission with a verdict, in order.
756
+ */
757
+ readonly submissions: readonly Submission[];
758
+ /**
759
+ * On a task with a rubric, each submission in order; such an attempt has no ladder fields.
760
+ */
761
+ readonly essay_submissions?: readonly RubricSubmission[];
762
+ }
763
+
764
+ /**
765
+ * AttemptSegment is the type of profile.schema.json#/$defs/attempt_segment.
766
+ */
767
+ export interface AttemptSegment {
768
+ /**
769
+ * The ID of the run of the lesson.
770
+ */
771
+ readonly lesson_run_id: ID;
772
+ /**
773
+ * The number of the segment of the lesson.
774
+ */
775
+ readonly segment: number;
776
+ }
777
+
778
+ /**
779
+ * AttemptCloseReason is the type of profile.schema.json#/$defs/attempt/properties/close_reason.
780
+ *
781
+ * Why the attempt was closed; absent while it is open.
782
+ */
783
+ export type AttemptCloseReason = "correct" | "solution_shown" | "left" | "abandoned" | "unchecked" | "not_suitable" | "done";
784
+
785
+ /**
786
+ * Rung is the type of profile.schema.json#/$defs/rung.
787
+ */
788
+ export interface Rung {
789
+ /**
790
+ * The rung, 1 to 3.
791
+ */
792
+ readonly rung: number;
793
+ /**
794
+ * Whether its words came from the model or are the fallback text.
795
+ */
796
+ readonly source: RungSource;
797
+ /**
798
+ * The rung's words; present only while the attempt is open, deleted at close.
799
+ */
800
+ readonly words?: string;
801
+ /**
802
+ * Whether the learner asked to explain this rung differently.
803
+ */
804
+ readonly explained_differently: boolean;
805
+ /**
806
+ * The source of the other words, beside explained_differently.
807
+ */
808
+ readonly explained_differently_source?: RungExplainedDifferentlySource;
809
+ }
810
+
811
+ /**
812
+ * RungSource is the type of profile.schema.json#/$defs/rung/properties/source.
813
+ *
814
+ * Whether its words came from the model or are the fallback text.
815
+ */
816
+ export type RungSource = "model" | "fallback";
817
+
818
+ /**
819
+ * RungExplainedDifferentlySource is the type of
820
+ * profile.schema.json#/$defs/rung/properties/explained_differently_source.
821
+ *
822
+ * The source of the other words, beside explained_differently.
823
+ */
824
+ export type RungExplainedDifferentlySource = "model" | "fallback";
825
+
826
+ /**
827
+ * AttemptItem is the type of profile.schema.json#/$defs/attempt_item.
828
+ */
829
+ export interface AttemptItem {
830
+ /**
831
+ * The number of the item in the task.
832
+ */
833
+ readonly place: number;
834
+ /**
835
+ * Whether the item was submitted.
836
+ */
837
+ readonly submitted: boolean;
838
+ /**
839
+ * Why each submission of the item got no verdict.
840
+ */
841
+ readonly unverdicted_reasons: readonly AttemptItemUnverdictedReasons[];
842
+ /**
843
+ * The item's first verdict.
844
+ */
845
+ readonly first_verdict: AttemptItemFirstVerdict;
846
+ /**
847
+ * The wrong answers before the submission that gave the first verdict.
848
+ */
849
+ readonly wrong_answers_before_first_verdict: number;
850
+ /**
851
+ * The item's verdict at the end.
852
+ */
853
+ readonly final_verdict: AttemptItemFinalVerdict;
854
+ /**
855
+ * The wrong answers before the first correct one.
856
+ */
857
+ readonly wrong_answers_before_first_correct: number;
858
+ }
859
+
860
+ /**
861
+ * AttemptItemUnverdictedReasons is the type of
862
+ * profile.schema.json#/$defs/attempt_item/properties/unverdicted_reasons/items.
863
+ *
864
+ * Why each submission of the item got no verdict: one of them.
865
+ */
866
+ export type AttemptItemUnverdictedReasons = "unreadable_blank" | "unreadable_other" | "unchecked";
867
+
868
+ /**
869
+ * AttemptItemFirstVerdict is the type of
870
+ * profile.schema.json#/$defs/attempt_item/properties/first_verdict.
871
+ *
872
+ * The item's first verdict.
873
+ */
874
+ export type AttemptItemFirstVerdict = "correct" | "not_yet" | "unreadable" | "unchecked";
875
+
876
+ /**
877
+ * AttemptItemFinalVerdict is the type of
878
+ * profile.schema.json#/$defs/attempt_item/properties/final_verdict.
879
+ *
880
+ * The item's verdict at the end.
881
+ */
882
+ export type AttemptItemFinalVerdict = "correct" | "not_yet" | "unreadable" | "unchecked";
883
+
884
+ /**
885
+ * Submission is the type of profile.schema.json#/$defs/submission.
886
+ */
887
+ export interface Submission {
888
+ /**
889
+ * The submission's place among the attempt's, from 1.
890
+ */
891
+ readonly number: number;
892
+ /**
893
+ * When it came.
894
+ */
895
+ readonly submitted_at: Time;
896
+ /**
897
+ * The verdict of every item and answer slot and what was read, as ItemVerdict/AnswerSlotVerdict
898
+ * hold them.
899
+ */
900
+ readonly items: readonly SubmissionItem[];
901
+ /**
902
+ * The observation merged from the two readings; absent when only taps were sent.
903
+ */
904
+ readonly observation?: unknown;
905
+ /**
906
+ * The options tapped, beside the observation.
907
+ */
908
+ readonly tapped_choices: readonly SubmissionTappedChoice[];
909
+ /**
910
+ * The attempt's wrong answers including this submission.
911
+ */
912
+ readonly wrong_answers: number;
913
+ /**
914
+ * What a call of AI came to when slots got unchecked by it (a Cause of the contract).
915
+ */
916
+ readonly outcome?: SubmissionOutcome;
917
+ }
918
+
919
+ /**
920
+ * SubmissionItem is the type of profile.schema.json#/$defs/submission_item.
921
+ */
922
+ export interface SubmissionItem {
923
+ /**
924
+ * The verdict.
925
+ */
926
+ readonly verdict: SubmissionItemVerdict;
927
+ /**
928
+ * The verdict of each answer slot.
929
+ */
930
+ readonly answer_slots: readonly SubmissionItemAnswerSlot[];
931
+ }
932
+
933
+ /**
934
+ * SubmissionItemVerdict is the type of
935
+ * profile.schema.json#/$defs/submission_item/properties/verdict.
936
+ *
937
+ * The verdict.
938
+ */
939
+ export type SubmissionItemVerdict = "correct" | "not_yet" | "unreadable" | "unchecked";
940
+
941
+ /**
942
+ * SubmissionItemAnswerSlot is the type of profile.schema.json#/$defs/submission_item_answer_slot.
943
+ */
944
+ export interface SubmissionItemAnswerSlot {
945
+ /**
946
+ * The place of the answer slot, the JSON of novatrail.observation.v1.AnswerSlotPlace by
947
+ * protobuf's JSON mapping with the names of the .proto fields.
948
+ */
949
+ readonly answer_slot: unknown;
950
+ /**
951
+ * The verdict.
952
+ */
953
+ readonly verdict: SubmissionItemAnswerSlotVerdict;
954
+ /**
955
+ * Why the answer slot could not be read.
956
+ */
957
+ readonly reason?: SubmissionItemAnswerSlotReason;
958
+ /**
959
+ * The value, as written.
960
+ */
961
+ readonly value?: string;
962
+ }
963
+
964
+ /**
965
+ * SubmissionItemAnswerSlotVerdict is the type of
966
+ * profile.schema.json#/$defs/submission_item_answer_slot/properties/verdict.
967
+ *
968
+ * The verdict.
969
+ */
970
+ export type SubmissionItemAnswerSlotVerdict = "correct" | "not_yet" | "unreadable" | "unchecked";
971
+
972
+ /**
973
+ * SubmissionItemAnswerSlotReason is the type of
974
+ * profile.schema.json#/$defs/submission_item_answer_slot/properties/reason.
975
+ *
976
+ * Why the answer slot could not be read.
977
+ */
978
+ export type SubmissionItemAnswerSlotReason = "blank" | "notation" | "illegible" | "ambiguous" | "no_final_answer" | "several_final_answers";
979
+
980
+ /**
981
+ * SubmissionTappedChoice is the type of profile.schema.json#/$defs/submission_tapped_choice.
982
+ */
983
+ export interface SubmissionTappedChoice {
984
+ /**
985
+ * The place of the answer slot, the JSON of novatrail.observation.v1.AnswerSlotPlace by
986
+ * protobuf's JSON mapping with the names of the .proto fields.
987
+ */
988
+ readonly answer_slot: unknown;
989
+ /**
990
+ * The value, as written.
991
+ */
992
+ readonly value: string;
993
+ }
994
+
995
+ /**
996
+ * SubmissionOutcome is the type of profile.schema.json#/$defs/submission_outcome.
997
+ */
998
+ export interface SubmissionOutcome {
999
+ /**
1000
+ * The cause of the outcome, by its code.
1001
+ */
1002
+ readonly cause: string;
1003
+ }
1004
+
1005
+ /**
1006
+ * RubricSubmission is the type of profile.schema.json#/$defs/rubric_submission.
1007
+ */
1008
+ export interface RubricSubmission {
1009
+ /**
1010
+ * When the submission came.
1011
+ */
1012
+ readonly submitted_at: Time;
1013
+ /**
1014
+ * How it ended.
1015
+ */
1016
+ readonly end: RubricSubmissionEnd;
1017
+ /**
1018
+ * Beside feedback, the mark of each criterion, by its number in the rubric (its index, from 1).
1019
+ */
1020
+ readonly criterion_marks?: readonly RubricSubmissionCriterionMarks[];
1021
+ /**
1022
+ * Beside feedback, whether the words were the model's or the phrase 'no feedback this time'.
1023
+ */
1024
+ readonly feedback_source?: RubricSubmissionFeedbackSource;
1025
+ }
1026
+
1027
+ /**
1028
+ * RubricSubmissionEnd is the type of profile.schema.json#/$defs/rubric_submission/properties/end.
1029
+ *
1030
+ * How it ended.
1031
+ */
1032
+ export type RubricSubmissionEnd = "feedback" | "unreadable" | "unchecked";
1033
+
1034
+ /**
1035
+ * RubricSubmissionCriterionMarks is the type of
1036
+ * profile.schema.json#/$defs/rubric_submission/properties/criterion_marks/items.
1037
+ *
1038
+ * Beside feedback, the mark of each criterion, by its number in the rubric (its index, from 1): one
1039
+ * of them.
1040
+ */
1041
+ export type RubricSubmissionCriterionMarks = "met" | "not_met" | "not_assessed";
1042
+
1043
+ /**
1044
+ * RubricSubmissionFeedbackSource is the type of
1045
+ * profile.schema.json#/$defs/rubric_submission/properties/feedback_source.
1046
+ *
1047
+ * Beside feedback, whether the words were the model's or the phrase 'no feedback this time'.
1048
+ */
1049
+ export type RubricSubmissionFeedbackSource = "model" | "no_feedback";
1050
+
1051
+ /**
1052
+ * Choice is the type of profile.schema.json#/$defs/choice.
1053
+ */
1054
+ export interface Choice {
1055
+ /**
1056
+ * The ID of the choice.
1057
+ */
1058
+ readonly choice_id: ID;
1059
+ /**
1060
+ * What the choice gave; a choice of nothing is not stored.
1061
+ */
1062
+ readonly kind: ChoiceKind;
1063
+ /**
1064
+ * When the choice was made, by which a replay restores the runs and closed attempts it saw.
1065
+ */
1066
+ readonly chosen_at: Time;
1067
+ /**
1068
+ * The task's full ID, beside kind task; no version, the attempt takes the current one.
1069
+ */
1070
+ readonly task?: string;
1071
+ /**
1072
+ * The lesson's full ID, beside kind lesson.
1073
+ */
1074
+ readonly lesson?: string;
1075
+ /**
1076
+ * The reason code, from the closed list ReasonCode.
1077
+ */
1078
+ readonly reason_code: ChoiceReasonCode;
1079
+ /**
1080
+ * The version of engine that chose.
1081
+ */
1082
+ readonly engine_version: string;
1083
+ /**
1084
+ * The version of learner-model that computed the state.
1085
+ */
1086
+ readonly learner_model_version: string;
1087
+ /**
1088
+ * The digests of every graph learner-model and the engine got, each marked whether it is an
1089
+ * engine module, connected and suitable.
1090
+ */
1091
+ readonly package_digests: readonly ChoicePackageDigest[];
1092
+ /**
1093
+ * The modules release pinned when the choice was made.
1094
+ */
1095
+ readonly modules_release: string;
1096
+ /**
1097
+ * The number of the last evidence of the log the choice was made by.
1098
+ */
1099
+ readonly last_evidence_seq: number;
1100
+ /**
1101
+ * The grade by which the model took the starting point of modules without evidence.
1102
+ */
1103
+ readonly grade?: number;
1104
+ /**
1105
+ * Whether the pool was limited to tasks checked without AI.
1106
+ */
1107
+ readonly pool_without_ai: boolean;
1108
+ /**
1109
+ * The full ID of the skill chosen on the skill map; absent when the engine leads.
1110
+ */
1111
+ readonly skill?: string;
1112
+ /**
1113
+ * The profile's age category at the time of the choice.
1114
+ */
1115
+ readonly age_category: AgeCategory;
1116
+ /**
1117
+ * The engine's seed; empty while the engine takes no randomness, as now.
1118
+ */
1119
+ readonly seed?: string;
1120
+ }
1121
+
1122
+ /**
1123
+ * ChoiceKind is the type of profile.schema.json#/$defs/choice/properties/kind.
1124
+ *
1125
+ * What the choice gave; a choice of nothing is not stored.
1126
+ */
1127
+ export type ChoiceKind = "task" | "lesson";
1128
+
1129
+ /**
1130
+ * ChoiceReasonCode is the type of profile.schema.json#/$defs/choice/properties/reason_code.
1131
+ *
1132
+ * The reason code, from the closed list ReasonCode.
1133
+ */
1134
+ export type ChoiceReasonCode = "consolidation" | "new_skill" | "queue" | "repetition" | "probe" | "skill_chosen" | "author_order" | "open_run" | "rotation";
1135
+
1136
+ /**
1137
+ * ChoicePackageDigest is the type of profile.schema.json#/$defs/choice_package_digest.
1138
+ */
1139
+ export interface ChoicePackageDigest {
1140
+ /**
1141
+ * The digest of a package, sha256:<64 hex>.
1142
+ */
1143
+ readonly package_digest: string;
1144
+ /**
1145
+ * Whether the module is a module of the engine.
1146
+ */
1147
+ readonly engine_module: boolean;
1148
+ }
1149
+
1150
+ /**
1151
+ * EvidenceEntry is the type of profile.schema.json#/$defs/evidence_entry.
1152
+ */
1153
+ export interface EvidenceEntry {
1154
+ /**
1155
+ * The number in the profile's log, from 1.
1156
+ */
1157
+ readonly seq: number;
1158
+ /**
1159
+ * The attempt the evidence is of; one per attempt.
1160
+ */
1161
+ readonly attempt_id: ID;
1162
+ /**
1163
+ * The digest of the attempt's package, by which wrong_key versions are filtered.
1164
+ */
1165
+ readonly package_digest: string;
1166
+ /**
1167
+ * The module's ID.
1168
+ */
1169
+ readonly module_id: string;
1170
+ /**
1171
+ * When the evidence was appended.
1172
+ */
1173
+ readonly recorded_at: Time;
1174
+ /**
1175
+ * The evidence itself, as learner-model's message.
1176
+ */
1177
+ readonly evidence: unknown;
1178
+ }
1179
+
1180
+ /**
1181
+ * StateEntry is the type of profile.schema.json#/$defs/state_entry.
1182
+ */
1183
+ export interface StateEntry {
1184
+ /**
1185
+ * The state of the learner model, the fold of the log.
1186
+ */
1187
+ readonly state: unknown;
1188
+ /**
1189
+ * The version of learner-model that computed it.
1190
+ */
1191
+ readonly learner_model_version: string;
1192
+ /**
1193
+ * The modules release of the cache's mark.
1194
+ */
1195
+ readonly modules_release: string;
1196
+ /**
1197
+ * The window of module format versions of the cache's mark.
1198
+ */
1199
+ readonly format_window: string;
1200
+ /**
1201
+ * The number of the last evidence counted.
1202
+ */
1203
+ readonly last_seq: number;
1204
+ /**
1205
+ * For each module of the log, the version whose graph the state was computed by; module_version
1206
+ * absent when the module has no current version and its evidence waits.
1207
+ */
1208
+ readonly modules: readonly StateEntryModule[];
1209
+ }
1210
+
1211
+ /**
1212
+ * StateEntryModule is the type of profile.schema.json#/$defs/state_entry_module.
1213
+ */
1214
+ export interface StateEntryModule {
1215
+ /**
1216
+ * The module's ID.
1217
+ */
1218
+ readonly module_id: string;
1219
+ /**
1220
+ * The version of the module whose graph the state was computed by; left out when the module has
1221
+ * no current version and its evidence waits.
1222
+ */
1223
+ readonly module_version?: string;
1224
+ }
1225
+
1226
+ /**
1227
+ * Artefact is the type of profile.schema.json#/$defs/artefact.
1228
+ */
1229
+ export interface Artefact {
1230
+ /**
1231
+ * What the artefact is: an essay, a drawing or a recording.
1232
+ */
1233
+ readonly kind: ArtefactKind;
1234
+ /**
1235
+ * The attempt whose work it is.
1236
+ */
1237
+ readonly attempt_id?: ID;
1238
+ /**
1239
+ * The text of an essay.
1240
+ */
1241
+ readonly text?: string;
1242
+ }
1243
+
1244
+ /**
1245
+ * ArtefactKind is the type of profile.schema.json#/$defs/artefact/properties/kind.
1246
+ *
1247
+ * What the artefact is: an essay, a drawing or a recording.
1248
+ */
1249
+ export type ArtefactKind = "essay" | "drawing" | "recording";
1250
+
1251
+ /**
1252
+ * StorageConsent is the type of profile.schema.json#/$defs/storage_consent.
1253
+ */
1254
+ export interface StorageConsent {
1255
+ /**
1256
+ * Who switched it on: whoever consents for the learner.
1257
+ */
1258
+ readonly giver: StorageConsentGiver;
1259
+ /**
1260
+ * When it was switched on.
1261
+ */
1262
+ readonly given_at: Time;
1263
+ /**
1264
+ * When it was switched off; absent while it is on.
1265
+ */
1266
+ readonly withdrawn_at?: Time;
1267
+ /**
1268
+ * The version of storage-consent the person read; empty when it had no version in force.
1269
+ */
1270
+ readonly texts: readonly TextRef[];
1271
+ }
1272
+
1273
+ /**
1274
+ * StorageConsentGiver is the type of profile.schema.json#/$defs/storage_consent/properties/giver.
1275
+ *
1276
+ * Who switched it on: whoever consents for the learner.
1277
+ */
1278
+ export type StorageConsentGiver = "owner" | "parent" | "learner";
1279
+
1280
+ /**
1281
+ * ProblemReport is the type of profile.schema.json#/$defs/problem_report.
1282
+ */
1283
+ export interface ProblemReport {
1284
+ /**
1285
+ * The ID of the report.
1286
+ */
1287
+ readonly report_id: ID;
1288
+ /**
1289
+ * The attempt whose tutor's words it is about.
1290
+ */
1291
+ readonly attempt_id: ID;
1292
+ /**
1293
+ * The answer that brought the words: a rung's, explain differently, after a correct answer, or
1294
+ * the feedback of an essay.
1295
+ */
1296
+ readonly reply: ProblemReportReply;
1297
+ /**
1298
+ * Beside a rung and explain differently: the rung.
1299
+ */
1300
+ readonly rung?: number;
1301
+ /**
1302
+ * The tutor's words as app showed them.
1303
+ */
1304
+ readonly words: string;
1305
+ /**
1306
+ * The word of the closed set the person picked.
1307
+ */
1308
+ readonly kind: ProblemReportKind;
1309
+ /**
1310
+ * What the person wrote beside it; empty when nothing.
1311
+ */
1312
+ readonly text: string;
1313
+ /**
1314
+ * When it came.
1315
+ */
1316
+ readonly reported_at: Time;
1317
+ /**
1318
+ * When the operator reviews it by: 3 days after it came.
1319
+ */
1320
+ readonly review_by: Time;
1321
+ /**
1322
+ * When the operator reviewed it; absent until then.
1323
+ */
1324
+ readonly reviewed_at?: Time;
1325
+ }
1326
+
1327
+ /**
1328
+ * ProblemReportReply is the type of profile.schema.json#/$defs/problem_report/properties/reply.
1329
+ *
1330
+ * The answer that brought the words: a rung's, explain differently, after a correct answer, or the
1331
+ * feedback of an essay.
1332
+ */
1333
+ export type ProblemReportReply = "rung" | "explained_differently" | "correct_answer" | "essay_feedback";
1334
+
1335
+ /**
1336
+ * ProblemReportKind is the type of profile.schema.json#/$defs/problem_report/properties/kind.
1337
+ *
1338
+ * The word of the closed set the person picked.
1339
+ */
1340
+ export type ProblemReportKind = "wrong" | "unclear" | "not_for_age" | "harmful" | "personal" | "other";
1341
+
1342
+ // The types of reading-vector.schema.json.
1343
+
1344
+ /**
1345
+ * ReadingVector is the type of reading-vector.schema.json.
1346
+ *
1347
+ * A test vector of reading (section 7 of the text of the part): exports, unpacked, and what section
1348
+ * 5 gives. A reader implements section 5 and gets exactly this.
1349
+ */
1350
+ export interface ReadingVector {
1351
+ /**
1352
+ * The exports.
1353
+ */
1354
+ readonly cases: readonly Case[];
1355
+ }
1356
+
1357
+ /**
1358
+ * Case is the type of reading-vector.schema.json#/$defs/case.
1359
+ */
1360
+ export interface Case {
1361
+ /**
1362
+ * The files of the export, a map from each file's path — those of api.zip under api/ — to the
1363
+ * file: a file of JSON as its value, a .proto file as its text. Any JSON value, as a reader of
1364
+ * the vector gets it.
1365
+ */
1366
+ readonly files: unknown;
1367
+ /**
1368
+ * The reader accepts the export. Left out when it refuses it.
1369
+ */
1370
+ readonly accepted?: boolean;
1371
+ /**
1372
+ * The step that refuses the export: the schema, or the ID of the rule. Left out when the reader
1373
+ * accepts it.
1374
+ */
1375
+ readonly refused_by?: CaseRefusedBy;
1376
+ /**
1377
+ * Every name that step gives, in the order of code units.
1378
+ */
1379
+ readonly names?: readonly string[];
1380
+ }
1381
+
1382
+ /**
1383
+ * CaseRefusedBy is the type of reading-vector.schema.json#/$defs/case/properties/refused_by.
1384
+ *
1385
+ * The step that refuses the export: the schema, or the ID of the rule. Left out when the reader
1386
+ * accepts it.
1387
+ */
1388
+ export type CaseRefusedBy = "schema" | "export.files" | "export.scope" | "export.profiles" | "export.proto";