@altnovatrail/contracts 0.8.1 → 0.8.3

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,754 @@
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/api/v1/learning.proto (package novatrail.api.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The way from a module to a task in the contract between `app` and `api`: the engine's choice, the
6
+ // beginning of an attempt and the open attempt, and lessons, which `api` leads by lesson runs. What
7
+ // each message means is the rule of contracts/README.md, section 15.
8
+
9
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
10
+ import type { Message } from "@bufbuild/protobuf";
11
+ import type { EngineChoice, RunEnd } from "./cause_pb.js";
12
+ import type { OpenView } from "./package_pb.js";
13
+ import type { ItemVerdict, RungHint, SubmissionEnd } from "./attempt_pb.js";
14
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
15
+
16
+ /**
17
+ * Describes the file novatrail/api/v1/learning.proto.
18
+ */
19
+ export declare const file_novatrail_api_v1_learning: GenFile;
20
+
21
+ /**
22
+ * "Something else".
23
+ *
24
+ * @generated from message novatrail.api.v1.ChooseNextRequest
25
+ */
26
+ export declare type ChooseNextRequest = Message<"novatrail.api.v1.ChooseNextRequest"> & {
27
+ /**
28
+ * The profile.
29
+ *
30
+ * @generated from field: string profile_id = 1;
31
+ */
32
+ profileId: string;
33
+
34
+ /**
35
+ * The idempotency key of this action of the learner.
36
+ *
37
+ * @generated from field: string idempotency_key = 2;
38
+ */
39
+ idempotencyKey: string;
40
+
41
+ /**
42
+ * The full ID of the skill that the learner chose on the skill map, "novatrail/olympiad-math/
43
+ * skill/counting-gaps": empty when the engine leads.
44
+ *
45
+ * @generated from field: string skill = 3;
46
+ */
47
+ skill: string;
48
+ };
49
+
50
+ /**
51
+ * Describes the message novatrail.api.v1.ChooseNextRequest.
52
+ * Use `create(ChooseNextRequestSchema)` to create a new message.
53
+ */
54
+ export declare const ChooseNextRequestSchema: GenMessage<ChooseNextRequest>;
55
+
56
+ /**
57
+ * The engine's choice.
58
+ *
59
+ * @generated from message novatrail.api.v1.ChooseNextResponse
60
+ */
61
+ export declare type ChooseNextResponse = Message<"novatrail.api.v1.ChooseNextResponse"> & {
62
+ /**
63
+ * The choice.
64
+ *
65
+ * @generated from field: novatrail.api.v1.EngineChoice choice = 1;
66
+ */
67
+ choice?: EngineChoice | undefined;
68
+ };
69
+
70
+ /**
71
+ * Describes the message novatrail.api.v1.ChooseNextResponse.
72
+ * Use `create(ChooseNextResponseSchema)` to create a new message.
73
+ */
74
+ export declare const ChooseNextResponseSchema: GenMessage<ChooseNextResponse>;
75
+
76
+ /**
77
+ * The beginning of an attempt.
78
+ *
79
+ * @generated from message novatrail.api.v1.BeginAttemptRequest
80
+ */
81
+ export declare type BeginAttemptRequest = Message<"novatrail.api.v1.BeginAttemptRequest"> & {
82
+ /**
83
+ * The profile.
84
+ *
85
+ * @generated from field: string profile_id = 1;
86
+ */
87
+ profileId: string;
88
+
89
+ /**
90
+ * The idempotency key of this action of the learner.
91
+ *
92
+ * @generated from field: string idempotency_key = 2;
93
+ */
94
+ idempotencyKey: string;
95
+
96
+ /**
97
+ * What the attempt begins by.
98
+ *
99
+ * @generated from oneof novatrail.api.v1.BeginAttemptRequest.start
100
+ */
101
+ start: {
102
+ /**
103
+ * An engine's choice of a task, `CHOICE_KIND_TASK`: the task, on the current version of its
104
+ * module.
105
+ *
106
+ * @generated from field: string choice_id = 3;
107
+ */
108
+ value: string;
109
+ case: "choiceId";
110
+ } | {
111
+ /**
112
+ * A task segment of an open lesson run, on the run's package: every task segment before it has
113
+ * ended, and it has not.
114
+ *
115
+ * @generated from field: novatrail.api.v1.SegmentPlace segment = 4;
116
+ */
117
+ value: SegmentPlace;
118
+ case: "segment";
119
+ } | {
120
+ /**
121
+ * The same task again, outside a lesson, on the current version of its module: the ID of an
122
+ * earlier attempt of it, open or closed. A template gives a new seed, and maybe another
123
+ * instance.
124
+ *
125
+ * @generated from field: string previous_attempt_id = 5;
126
+ */
127
+ value: string;
128
+ case: "previousAttemptId";
129
+ } | { case: undefined; value?: undefined };
130
+
131
+ /**
132
+ * The provider of the learner's own key, by its code in the admission table, without the key:
133
+ * with a profile of its owner that checks the task by its own key, so that `api` chooses the
134
+ * route to AI for the checks of the beginning, and checks no quota. Empty when platform AI checks
135
+ * it. Each later request on the attempt that calls AI goes by the `own_key` it carries, or on
136
+ * platform AI without one, and meets the quota there as an outcome (R84).
137
+ *
138
+ * @generated from field: string own_key_provider = 6;
139
+ */
140
+ ownKeyProvider: string;
141
+ };
142
+
143
+ /**
144
+ * Describes the message novatrail.api.v1.BeginAttemptRequest.
145
+ * Use `create(BeginAttemptRequestSchema)` to create a new message.
146
+ */
147
+ export declare const BeginAttemptRequestSchema: GenMessage<BeginAttemptRequest>;
148
+
149
+ /**
150
+ * The attempt begun.
151
+ *
152
+ * @generated from message novatrail.api.v1.BeginAttemptResponse
153
+ */
154
+ export declare type BeginAttemptResponse = Message<"novatrail.api.v1.BeginAttemptResponse"> & {
155
+ /**
156
+ * The attempt.
157
+ *
158
+ * @generated from field: novatrail.api.v1.AttemptStart attempt = 1;
159
+ */
160
+ attempt?: AttemptStart | undefined;
161
+ };
162
+
163
+ /**
164
+ * Describes the message novatrail.api.v1.BeginAttemptResponse.
165
+ * Use `create(BeginAttemptResponseSchema)` to create a new message.
166
+ */
167
+ export declare const BeginAttemptResponseSchema: GenMessage<BeginAttemptResponse>;
168
+
169
+ /**
170
+ * A task segment of a lesson run.
171
+ *
172
+ * @generated from message novatrail.api.v1.SegmentPlace
173
+ */
174
+ export declare type SegmentPlace = Message<"novatrail.api.v1.SegmentPlace"> & {
175
+ /**
176
+ * The lesson run.
177
+ *
178
+ * @generated from field: string lesson_run_id = 1;
179
+ */
180
+ lessonRunId: string;
181
+
182
+ /**
183
+ * The segment's place among the segments of the lesson, from 1: a segment has no ID.
184
+ *
185
+ * @generated from field: int32 segment = 2;
186
+ */
187
+ segment: number;
188
+ };
189
+
190
+ /**
191
+ * Describes the message novatrail.api.v1.SegmentPlace.
192
+ * Use `create(SegmentPlaceSchema)` to create a new message.
193
+ */
194
+ export declare const SegmentPlaceSchema: GenMessage<SegmentPlace>;
195
+
196
+ /**
197
+ * An attempt as it begins: what `app` shows the task by.
198
+ *
199
+ * @generated from message novatrail.api.v1.AttemptStart
200
+ */
201
+ export declare type AttemptStart = Message<"novatrail.api.v1.AttemptStart"> & {
202
+ /**
203
+ * The ID of the attempt.
204
+ *
205
+ * @generated from field: string attempt_id = 1;
206
+ */
207
+ attemptId: string;
208
+
209
+ /**
210
+ * The open view of the task, of the instance when the task is a template.
211
+ *
212
+ * @generated from field: novatrail.api.v1.OpenView task = 2;
213
+ */
214
+ task?: OpenView | undefined;
215
+
216
+ /**
217
+ * The digest of the package the attempt goes on, by which `app` takes the open views of its
218
+ * manifest, technique catalog and solving steps.
219
+ *
220
+ * @generated from field: string package_digest = 3;
221
+ */
222
+ packageDigest: string;
223
+
224
+ /**
225
+ * The task segment, when the attempt is one of a lesson run; absent outside a lesson.
226
+ *
227
+ * @generated from field: novatrail.api.v1.SegmentPlace segment = 4;
228
+ */
229
+ segment?: SegmentPlace | undefined;
230
+ };
231
+
232
+ /**
233
+ * Describes the message novatrail.api.v1.AttemptStart.
234
+ * Use `create(AttemptStartSchema)` to create a new message.
235
+ */
236
+ export declare const AttemptStartSchema: GenMessage<AttemptStart>;
237
+
238
+ /**
239
+ * A request for the open attempt.
240
+ *
241
+ * @generated from message novatrail.api.v1.GetOpenAttemptRequest
242
+ */
243
+ export declare type GetOpenAttemptRequest = Message<"novatrail.api.v1.GetOpenAttemptRequest"> & {
244
+ /**
245
+ * The profile.
246
+ *
247
+ * @generated from field: string profile_id = 1;
248
+ */
249
+ profileId: string;
250
+
251
+ /**
252
+ * The attempt.
253
+ *
254
+ * @generated from field: string attempt_id = 2;
255
+ */
256
+ attemptId: string;
257
+ };
258
+
259
+ /**
260
+ * Describes the message novatrail.api.v1.GetOpenAttemptRequest.
261
+ * Use `create(GetOpenAttemptRequestSchema)` to create a new message.
262
+ */
263
+ export declare const GetOpenAttemptRequestSchema: GenMessage<GetOpenAttemptRequest>;
264
+
265
+ /**
266
+ * The open attempt.
267
+ *
268
+ * @generated from message novatrail.api.v1.GetOpenAttemptResponse
269
+ */
270
+ export declare type GetOpenAttemptResponse = Message<"novatrail.api.v1.GetOpenAttemptResponse"> & {
271
+ /**
272
+ * The attempt.
273
+ *
274
+ * @generated from field: novatrail.api.v1.OpenAttempt attempt = 1;
275
+ */
276
+ attempt?: OpenAttempt | undefined;
277
+ };
278
+
279
+ /**
280
+ * Describes the message novatrail.api.v1.GetOpenAttemptResponse.
281
+ * Use `create(GetOpenAttemptResponseSchema)` to create a new message.
282
+ */
283
+ export declare const GetOpenAttemptResponseSchema: GenMessage<GetOpenAttemptResponse>;
284
+
285
+ /**
286
+ * An open attempt, as the server keeps it: what lets the learner go on with it.
287
+ *
288
+ * @generated from message novatrail.api.v1.OpenAttempt
289
+ */
290
+ export declare type OpenAttempt = Message<"novatrail.api.v1.OpenAttempt"> & {
291
+ /**
292
+ * The attempt, as it began.
293
+ *
294
+ * @generated from field: novatrail.api.v1.AttemptStart start = 1;
295
+ */
296
+ start?: AttemptStart | undefined;
297
+
298
+ /**
299
+ * The verdict of every item at the last submission with a verdict, in the task's order, and what
300
+ * was read: empty before the first one, and on a task with a rubric.
301
+ *
302
+ * @generated from field: repeated novatrail.api.v1.ItemVerdict items = 2;
303
+ */
304
+ items: ItemVerdict[];
305
+
306
+ /**
307
+ * How many wrong answers the attempt has.
308
+ *
309
+ * @generated from field: int32 wrong_answers = 3;
310
+ */
311
+ wrongAnswers: number;
312
+
313
+ /**
314
+ * The current rung and the words the attempt keeps for it, or its fallback text: absent before
315
+ * the first wrong answer.
316
+ *
317
+ * @generated from field: novatrail.api.v1.RungHint rung = 4;
318
+ */
319
+ rung?: RungHint | undefined;
320
+
321
+ /**
322
+ * Whether "explain differently" was asked for on the current rung.
323
+ *
324
+ * @generated from field: bool explained_differently = 5;
325
+ */
326
+ explainedDifferently: boolean;
327
+
328
+ /**
329
+ * The IDs of the techniques given at a step, local IDs of the technique catalog.
330
+ *
331
+ * @generated from field: repeated string step_technique_ids = 6;
332
+ */
333
+ stepTechniqueIds: string[];
334
+
335
+ /**
336
+ * The IDs of the techniques given on request.
337
+ *
338
+ * @generated from field: repeated string requested_technique_ids = 7;
339
+ */
340
+ requestedTechniqueIds: string[];
341
+
342
+ /**
343
+ * On a task with a rubric: each submission, in order, with how it ended and when, without the
344
+ * text read and the words of the feedback, which are nowhere on the server (R87).
345
+ *
346
+ * @generated from field: repeated novatrail.api.v1.EssaySubmission essay_submissions = 8;
347
+ */
348
+ essaySubmissions: EssaySubmission[];
349
+ };
350
+
351
+ /**
352
+ * Describes the message novatrail.api.v1.OpenAttempt.
353
+ * Use `create(OpenAttemptSchema)` to create a new message.
354
+ */
355
+ export declare const OpenAttemptSchema: GenMessage<OpenAttempt>;
356
+
357
+ /**
358
+ * A submission of an essay as the server keeps it.
359
+ *
360
+ * @generated from message novatrail.api.v1.EssaySubmission
361
+ */
362
+ export declare type EssaySubmission = Message<"novatrail.api.v1.EssaySubmission"> & {
363
+ /**
364
+ * When it came.
365
+ *
366
+ * @generated from field: google.protobuf.Timestamp submitted_at = 1;
367
+ */
368
+ submittedAt?: Timestamp | undefined;
369
+
370
+ /**
371
+ * How it ended.
372
+ *
373
+ * @generated from field: novatrail.api.v1.SubmissionEnd end = 2;
374
+ */
375
+ end: SubmissionEnd;
376
+ };
377
+
378
+ /**
379
+ * Describes the message novatrail.api.v1.EssaySubmission.
380
+ * Use `create(EssaySubmissionSchema)` to create a new message.
381
+ */
382
+ export declare const EssaySubmissionSchema: GenMessage<EssaySubmission>;
383
+
384
+ /**
385
+ * The opening of the lesson of an engine's choice.
386
+ *
387
+ * @generated from message novatrail.api.v1.OpenLessonRequest
388
+ */
389
+ export declare type OpenLessonRequest = Message<"novatrail.api.v1.OpenLessonRequest"> & {
390
+ /**
391
+ * The profile.
392
+ *
393
+ * @generated from field: string profile_id = 1;
394
+ */
395
+ profileId: string;
396
+
397
+ /**
398
+ * The engine's choice of the lesson, `CHOICE_KIND_LESSON`.
399
+ *
400
+ * @generated from field: string choice_id = 2;
401
+ */
402
+ choiceId: string;
403
+ };
404
+
405
+ /**
406
+ * Describes the message novatrail.api.v1.OpenLessonRequest.
407
+ * Use `create(OpenLessonRequestSchema)` to create a new message.
408
+ */
409
+ export declare const OpenLessonRequestSchema: GenMessage<OpenLessonRequest>;
410
+
411
+ /**
412
+ * The lesson opened.
413
+ *
414
+ * @generated from message novatrail.api.v1.OpenLessonResponse
415
+ */
416
+ export declare type OpenLessonResponse = Message<"novatrail.api.v1.OpenLessonResponse"> & {
417
+ /**
418
+ * The lesson run.
419
+ *
420
+ * @generated from field: novatrail.api.v1.LessonRun run = 1;
421
+ */
422
+ run?: LessonRun | undefined;
423
+ };
424
+
425
+ /**
426
+ * Describes the message novatrail.api.v1.OpenLessonResponse.
427
+ * Use `create(OpenLessonResponseSchema)` to create a new message.
428
+ */
429
+ export declare const OpenLessonResponseSchema: GenMessage<OpenLessonResponse>;
430
+
431
+ /**
432
+ * A request for an open lesson run.
433
+ *
434
+ * @generated from message novatrail.api.v1.GetLessonRunRequest
435
+ */
436
+ export declare type GetLessonRunRequest = Message<"novatrail.api.v1.GetLessonRunRequest"> & {
437
+ /**
438
+ * The profile.
439
+ *
440
+ * @generated from field: string profile_id = 1;
441
+ */
442
+ profileId: string;
443
+
444
+ /**
445
+ * The lesson run.
446
+ *
447
+ * @generated from field: string lesson_run_id = 2;
448
+ */
449
+ lessonRunId: string;
450
+ };
451
+
452
+ /**
453
+ * Describes the message novatrail.api.v1.GetLessonRunRequest.
454
+ * Use `create(GetLessonRunRequestSchema)` to create a new message.
455
+ */
456
+ export declare const GetLessonRunRequestSchema: GenMessage<GetLessonRunRequest>;
457
+
458
+ /**
459
+ * The open lesson run.
460
+ *
461
+ * @generated from message novatrail.api.v1.GetLessonRunResponse
462
+ */
463
+ export declare type GetLessonRunResponse = Message<"novatrail.api.v1.GetLessonRunResponse"> & {
464
+ /**
465
+ * The lesson run.
466
+ *
467
+ * @generated from field: novatrail.api.v1.LessonRun run = 1;
468
+ */
469
+ run?: LessonRun | undefined;
470
+ };
471
+
472
+ /**
473
+ * Describes the message novatrail.api.v1.GetLessonRunResponse.
474
+ * Use `create(GetLessonRunResponseSchema)` to create a new message.
475
+ */
476
+ export declare const GetLessonRunResponseSchema: GenMessage<GetLessonRunResponse>;
477
+
478
+ /**
479
+ * An open lesson run: what `app` leads the lesson by.
480
+ *
481
+ * @generated from message novatrail.api.v1.LessonRun
482
+ */
483
+ export declare type LessonRun = Message<"novatrail.api.v1.LessonRun"> & {
484
+ /**
485
+ * The ID of the run, which every answer about the lesson, an attempt of its segment, and "lesson
486
+ * done" name.
487
+ *
488
+ * @generated from field: string lesson_run_id = 1;
489
+ */
490
+ lessonRunId: string;
491
+
492
+ /**
493
+ * The open view of the lesson, whole: its title and its segments, without its skills and age
494
+ * categories.
495
+ *
496
+ * @generated from field: novatrail.api.v1.OpenView lesson = 2;
497
+ */
498
+ lesson?: OpenView | undefined;
499
+
500
+ /**
501
+ * The digest of the package the run goes on.
502
+ *
503
+ * @generated from field: string package_digest = 3;
504
+ */
505
+ packageDigest: string;
506
+
507
+ /**
508
+ * The places of the task segments that have ended, in order.
509
+ *
510
+ * @generated from field: repeated int32 ended_segments = 4;
511
+ */
512
+ endedSegments: number[];
513
+
514
+ /**
515
+ * The open attempt of a segment of the run, when there is one: `app` opens the lesson at the
516
+ * later of it and the place it keeps.
517
+ *
518
+ * @generated from field: novatrail.api.v1.OpenAttemptRef open_attempt = 5;
519
+ */
520
+ openAttempt?: OpenAttemptRef | undefined;
521
+ };
522
+
523
+ /**
524
+ * Describes the message novatrail.api.v1.LessonRun.
525
+ * Use `create(LessonRunSchema)` to create a new message.
526
+ */
527
+ export declare const LessonRunSchema: GenMessage<LessonRun>;
528
+
529
+ /**
530
+ * "Lesson done".
531
+ *
532
+ * @generated from message novatrail.api.v1.CompleteLessonRequest
533
+ */
534
+ export declare type CompleteLessonRequest = Message<"novatrail.api.v1.CompleteLessonRequest"> & {
535
+ /**
536
+ * The profile.
537
+ *
538
+ * @generated from field: string profile_id = 1;
539
+ */
540
+ profileId: string;
541
+
542
+ /**
543
+ * The lesson run.
544
+ *
545
+ * @generated from field: string lesson_run_id = 2;
546
+ */
547
+ lessonRunId: string;
548
+ };
549
+
550
+ /**
551
+ * Describes the message novatrail.api.v1.CompleteLessonRequest.
552
+ * Use `create(CompleteLessonRequestSchema)` to create a new message.
553
+ */
554
+ export declare const CompleteLessonRequestSchema: GenMessage<CompleteLessonRequest>;
555
+
556
+ /**
557
+ * The lesson run ended "passed".
558
+ *
559
+ * @generated from message novatrail.api.v1.CompleteLessonResponse
560
+ */
561
+ export declare type CompleteLessonResponse = Message<"novatrail.api.v1.CompleteLessonResponse"> & {
562
+ /**
563
+ * How the run ended, `RUN_END_REASON_PASSED`, and the engine's choice.
564
+ *
565
+ * @generated from field: novatrail.api.v1.RunEnd end = 1;
566
+ */
567
+ end?: RunEnd | undefined;
568
+ };
569
+
570
+ /**
571
+ * Describes the message novatrail.api.v1.CompleteLessonResponse.
572
+ * Use `create(CompleteLessonResponseSchema)` to create a new message.
573
+ */
574
+ export declare const CompleteLessonResponseSchema: GenMessage<CompleteLessonResponse>;
575
+
576
+ /**
577
+ * The open attempt of a profile, as the list of profiles names it.
578
+ *
579
+ * @generated from message novatrail.api.v1.OpenAttemptRef
580
+ */
581
+ export declare type OpenAttemptRef = Message<"novatrail.api.v1.OpenAttemptRef"> & {
582
+ /**
583
+ * The attempt, which `GetOpenAttempt` gives.
584
+ *
585
+ * @generated from field: string attempt_id = 1;
586
+ */
587
+ attemptId: string;
588
+
589
+ /**
590
+ * Its task segment, when it is an attempt of a lesson run; absent outside a lesson.
591
+ *
592
+ * @generated from field: novatrail.api.v1.SegmentPlace segment = 2;
593
+ */
594
+ segment?: SegmentPlace | undefined;
595
+ };
596
+
597
+ /**
598
+ * Describes the message novatrail.api.v1.OpenAttemptRef.
599
+ * Use `create(OpenAttemptRefSchema)` to create a new message.
600
+ */
601
+ export declare const OpenAttemptRefSchema: GenMessage<OpenAttemptRef>;
602
+
603
+ /**
604
+ * An open lesson run of a profile, as the list of profiles names it: what a device that keeps no
605
+ * state of the lesson finds it by.
606
+ *
607
+ * @generated from message novatrail.api.v1.LessonRunRef
608
+ */
609
+ export declare type LessonRunRef = Message<"novatrail.api.v1.LessonRunRef"> & {
610
+ /**
611
+ * The lesson run, which `GetLessonRun` gives.
612
+ *
613
+ * @generated from field: string lesson_run_id = 1;
614
+ */
615
+ lessonRunId: string;
616
+
617
+ /**
618
+ * The full ID of the lesson, "novatrail/olympiad-math/lesson/counting-gaps-1".
619
+ *
620
+ * @generated from field: string lesson = 2;
621
+ */
622
+ lesson: string;
623
+
624
+ /**
625
+ * The digest of the package the run goes on.
626
+ *
627
+ * @generated from field: string package_digest = 3;
628
+ */
629
+ packageDigest: string;
630
+ };
631
+
632
+ /**
633
+ * Describes the message novatrail.api.v1.LessonRunRef.
634
+ * Use `create(LessonRunRefSchema)` to create a new message.
635
+ */
636
+ export declare const LessonRunRefSchema: GenMessage<LessonRunRef>;
637
+
638
+ /**
639
+ * The way from a module to a task, from a learner's session: each method is a learning request,
640
+ * with the right `can_learn`. Every method carries the token of the sign-in service and may get the
641
+ * refusals of every request with a token, which the comment of `AccountService` names with what
642
+ * `app` does on each; a profile that is not the account's gets `CAUSE_NO_PROFILE`, a request of a
643
+ * profile whose consent is not confirmed `CAUSE_NO_CONSENT`, and a request whose form the contract
644
+ * refuses the code `invalid_argument` with no `Refusal`. A profile has one open attempt: a new one
645
+ * closes the one before `CLOSE_REASON_LEFT`. A lesson run goes on the package it began on, and
646
+ * every attempt of its task segments too. `app` keeps the place in a lesson and the state of its
647
+ * demos by the key "lesson's full ID, package digest", beside the ID of the run: the state of
648
+ * another run under the same key it drops, and it erases the state of the lesson at every end of
649
+ * the run, in an answer or in a refusal.
650
+ *
651
+ * @generated from service novatrail.api.v1.LearningService
652
+ */
653
+ export declare const LearningService: GenService<{
654
+ /**
655
+ * "Something else": the engine's choice of what comes next, outside a lesson or in place of one,
656
+ * when the learner asks for it, or when nothing is open. It closes the open attempt
657
+ * `CLOSE_REASON_LEFT`, and `app` warns beforehand that the attempt cannot be gone back to. The
658
+ * choice gives a lesson or a task, or nothing, with the outcome that says why. Refusals:
659
+ * `CAUSE_NOT_FOUND`, a skill named that no module connected has, `CAUSE_KEY_ALREADY_USED` and
660
+ * `CAUSE_STILL_GOING`. A repeat with the same idempotency key gets the same choice.
661
+ *
662
+ * @generated from rpc novatrail.api.v1.LearningService.ChooseNext
663
+ */
664
+ chooseNext: {
665
+ methodKind: "unary";
666
+ input: typeof ChooseNextRequestSchema;
667
+ output: typeof ChooseNextResponseSchema;
668
+ },
669
+ /**
670
+ * Begins an attempt: by an engine's choice of a task, on a task segment of a lesson run, or the
671
+ * same task again. It closes the open attempt `CLOSE_REASON_LEFT`. A choice begins one attempt:
672
+ * once it has, another request by it gets `CAUSE_ALREADY_EXISTS`, and `app` reads the open
673
+ * attempt of the profile; a choice of a lesson gets `invalid_argument`. An attempt on a segment
674
+ * of a run whose package the image no longer gives ends the run `RUN_END_REASON_UNCHECKED` and
675
+ * gets `CAUSE_RUN_ENDED`, and `app` then asks `CheckPackages`. The answer is the attempt with
676
+ * the open view of its task, of an instance when the task is a template; the seed of the attempt
677
+ * never goes to the device. Refusals: `CAUSE_QUOTA`, `CAUSE_PLATFORM_LIMIT` and
678
+ * `CAUSE_NOT_ADMITTED`, when platform AI checks the task, and a lesson run stays open on them;
679
+ * `CAUSE_NOT_SUITABLE`, `CAUSE_NO_CURRENT_VERSION`, `CAUSE_PACKAGE_UNKNOWN`,
680
+ * `CAUSE_RUN_ENDED`, `CAUSE_SEGMENT_UNAVAILABLE`, `CAUSE_ALREADY_EXISTS`,
681
+ * `CAUSE_KEY_NOT_FOR_PROFILE`, `CAUSE_NOT_FOUND`, `CAUSE_KEY_ALREADY_USED` and
682
+ * `CAUSE_STILL_GOING`. A repeat with the same idempotency key gets the same attempt and its open
683
+ * view.
684
+ *
685
+ * @generated from rpc novatrail.api.v1.LearningService.BeginAttempt
686
+ */
687
+ beginAttempt: {
688
+ methodKind: "unary";
689
+ input: typeof BeginAttemptRequestSchema;
690
+ output: typeof BeginAttemptResponseSchema;
691
+ },
692
+ /**
693
+ * The open attempt, by which the learner goes on with it, on another device too, with a clean
694
+ * sheet: the strokes stay on the device that wrote them. Refusals: `CAUSE_NOT_FOUND`,
695
+ * `CAUSE_ATTEMPT_CLOSED` with its close reason, and `CAUSE_PACKAGE_UNKNOWN`. It repeats by the
696
+ * state of the attempt.
697
+ *
698
+ * @generated from rpc novatrail.api.v1.LearningService.GetOpenAttempt
699
+ */
700
+ getOpenAttempt: {
701
+ methodKind: "unary";
702
+ input: typeof GetOpenAttemptRequestSchema;
703
+ output: typeof GetOpenAttemptResponseSchema;
704
+ },
705
+ /**
706
+ * Opens the lesson of an engine's choice: the open run of the lesson, when the profile has one,
707
+ * or else a new run on the package of the module's current version. A choice opens one run: once
708
+ * it has ended, the choice gets `CAUSE_RUN_ENDED`, and a new run takes a new choice. Before the
709
+ * answer `api` checks that the module is connected and has a current version for the learner,
710
+ * and that the lesson and each of its tasks suit the age category of the profile — on the
711
+ * package of the run when it is open; a run that fails ends `RUN_END_REASON_NOT_SUITABLE`, and
712
+ * a run whose package the image no longer gives `RUN_END_REASON_UNCHECKED`, after which `app`
713
+ * asks `CheckPackages`. A choice of a task gets `invalid_argument`. Refusals:
714
+ * `CAUSE_NOT_SUITABLE`, `CAUSE_NO_CURRENT_VERSION`, `CAUSE_PACKAGE_UNKNOWN`,
715
+ * `CAUSE_RUN_ENDED` and `CAUSE_NOT_FOUND`. It carries no idempotency key: it repeats by the
716
+ * state of the run.
717
+ *
718
+ * @generated from rpc novatrail.api.v1.LearningService.OpenLesson
719
+ */
720
+ openLesson: {
721
+ methodKind: "unary";
722
+ input: typeof OpenLessonRequestSchema;
723
+ output: typeof OpenLessonResponseSchema;
724
+ },
725
+ /**
726
+ * An open lesson run again, by its ID: after a restart, and on another device. `api` checks it as
727
+ * `OpenLesson` does. Refusals: `CAUSE_RUN_ENDED`, with how the run ended, and the engine's choice
728
+ * when this request ended it; `CAUSE_NOT_FOUND` and `CAUSE_PACKAGE_UNKNOWN`. It repeats by the
729
+ * state of the run.
730
+ *
731
+ * @generated from rpc novatrail.api.v1.LearningService.GetLessonRun
732
+ */
733
+ getLessonRun: {
734
+ methodKind: "unary";
735
+ input: typeof GetLessonRunRequestSchema;
736
+ output: typeof GetLessonRunResponseSchema;
737
+ },
738
+ /**
739
+ * "Lesson done": `app` sends it when the learner presses "Continue" on the last segment, and
740
+ * repeats it until `api` answers. It ends the run `RUN_END_REASON_PASSED` once every task segment
741
+ * has ended, and the answer holds the engine's choice; a repeat on a run that ended so gets the
742
+ * same answer. Refusals: `CAUSE_SEGMENTS_NOT_ENDED`, with the places of the task segments that
743
+ * have ended, `CAUSE_RUN_ENDED` with another reason, and `CAUSE_NOT_FOUND`. It carries no
744
+ * idempotency key: it repeats by the state of the run.
745
+ *
746
+ * @generated from rpc novatrail.api.v1.LearningService.CompleteLesson
747
+ */
748
+ completeLesson: {
749
+ methodKind: "unary";
750
+ input: typeof CompleteLessonRequestSchema;
751
+ output: typeof CompleteLessonResponseSchema;
752
+ },
753
+ }>;
754
+