@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.
- package/novatrail/api/v1/account_pb.d.ts +1563 -0
- package/novatrail/api/v1/account_pb.js +406 -0
- package/novatrail/api/v1/attempt_pb.d.ts +75 -2
- package/novatrail/api/v1/attempt_pb.js +16 -4
- package/novatrail/api/v1/cause_pb.d.ts +376 -11
- package/novatrail/api/v1/cause_pb.js +55 -3
- package/novatrail/api/v1/learning_pb.d.ts +754 -0
- package/novatrail/api/v1/learning_pb.js +171 -0
- package/novatrail/api/v1/module_pb.d.ts +320 -0
- package/novatrail/api/v1/module_pb.js +102 -0
- package/novatrail/api/v1/package_pb.d.ts +401 -0
- package/novatrail/api/v1/package_pb.js +133 -0
- package/novatrail/api/v1/progress_pb.d.ts +623 -0
- package/novatrail/api/v1/progress_pb.js +143 -0
- package/package.json +21 -1
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// The causes of the contract between `app` and `api`: one list for its refusals and for the
|
|
6
6
|
// outcomes of its calls of AI, the refusal that a method's error carries, and the outcome that its
|
|
7
|
-
// answer carries
|
|
8
|
-
//
|
|
7
|
+
// answer carries; and the values that come both in answers and in the data of a refusal: why an
|
|
8
|
+
// attempt was closed, how a lesson run ended, and the engine's choice. What they mean, and how
|
|
9
|
+
// `app` reads a cause it does not know, are the rules of contracts/README.md, section 15.
|
|
9
10
|
|
|
10
11
|
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
11
12
|
import type { Message } from "@bufbuild/protobuf";
|
|
@@ -58,6 +59,40 @@ export declare type Refusal = Message<"novatrail.api.v1.Refusal"> & {
|
|
|
58
59
|
*/
|
|
59
60
|
value: number;
|
|
60
61
|
case: "wrongAnswers";
|
|
62
|
+
} | {
|
|
63
|
+
/**
|
|
64
|
+
* Beside `CAUSE_PIN_LOCKED`: when the input of the PIN opens.
|
|
65
|
+
*
|
|
66
|
+
* @generated from field: google.protobuf.Timestamp locked_until = 5;
|
|
67
|
+
*/
|
|
68
|
+
value: Timestamp;
|
|
69
|
+
case: "lockedUntil";
|
|
70
|
+
} | {
|
|
71
|
+
/**
|
|
72
|
+
* Beside `CAUSE_FRESH_SIGN_IN_NEEDED`: how old a sign-in may be, in seconds.
|
|
73
|
+
*
|
|
74
|
+
* @generated from field: int32 max_auth_age_seconds = 6;
|
|
75
|
+
*/
|
|
76
|
+
value: number;
|
|
77
|
+
case: "maxAuthAgeSeconds";
|
|
78
|
+
} | {
|
|
79
|
+
/**
|
|
80
|
+
* Beside `CAUSE_RUN_ENDED`: how the lesson run ended, and the engine's choice when this request
|
|
81
|
+
* ended it.
|
|
82
|
+
*
|
|
83
|
+
* @generated from field: novatrail.api.v1.RunEnd run_end = 7;
|
|
84
|
+
*/
|
|
85
|
+
value: RunEnd;
|
|
86
|
+
case: "runEnd";
|
|
87
|
+
} | {
|
|
88
|
+
/**
|
|
89
|
+
* Beside `CAUSE_SEGMENTS_NOT_ENDED` and `CAUSE_SEGMENT_UNAVAILABLE`: the task segments of the
|
|
90
|
+
* lesson run that have ended.
|
|
91
|
+
*
|
|
92
|
+
* @generated from field: novatrail.api.v1.EndedSegments ended_segments = 8;
|
|
93
|
+
*/
|
|
94
|
+
value: EndedSegments;
|
|
95
|
+
case: "endedSegments";
|
|
61
96
|
} | { case: undefined; value?: undefined };
|
|
62
97
|
};
|
|
63
98
|
|
|
@@ -68,7 +103,8 @@ export declare type Refusal = Message<"novatrail.api.v1.Refusal"> & {
|
|
|
68
103
|
export declare const RefusalSchema: GenMessage<Refusal>;
|
|
69
104
|
|
|
70
105
|
/**
|
|
71
|
-
* An outcome: what a call of AI came to when the answer holds no reading, or no words, of AI
|
|
106
|
+
* An outcome: what a call of AI came to when the answer holds no reading, or no words, of AI; and
|
|
107
|
+
* why the engine's choice gives nothing, when the AI that checks the tasks is closed to the learner.
|
|
72
108
|
*
|
|
73
109
|
* @generated from message novatrail.api.v1.Outcome
|
|
74
110
|
*/
|
|
@@ -77,7 +113,9 @@ export declare type Outcome = Message<"novatrail.api.v1.Outcome"> & {
|
|
|
77
113
|
* The outcome: `CAUSE_AI_FAILURE`, `CAUSE_QUOTA`, `CAUSE_PLATFORM_LIMIT`,
|
|
78
114
|
* `CAUSE_NOT_ADMITTED`, `CAUSE_LIMIT_REACHED`, `CAUSE_KEY_REFUSED` or `CAUSE_NO_OTHER_WORDS`.
|
|
79
115
|
* "Explain differently" makes no call without the reserve of the quota: there the quota, the limit
|
|
80
|
-
* of platform AI and no admission are refusals, and the right to it on the rung stays.
|
|
116
|
+
* of platform AI and no admission are refusals, and the right to it on the rung stays. Beside an
|
|
117
|
+
* engine's choice that gives nothing: `CAUSE_QUOTA`, `CAUSE_PLATFORM_LIMIT` or
|
|
118
|
+
* `CAUSE_NOT_ADMITTED`.
|
|
81
119
|
*
|
|
82
120
|
* @generated from field: novatrail.api.v1.Cause cause = 1;
|
|
83
121
|
*/
|
|
@@ -131,6 +169,96 @@ export declare type OwnKeyLimit = Message<"novatrail.api.v1.OwnKeyLimit"> & {
|
|
|
131
169
|
*/
|
|
132
170
|
export declare const OwnKeyLimitSchema: GenMessage<OwnKeyLimit>;
|
|
133
171
|
|
|
172
|
+
/**
|
|
173
|
+
* The engine's choice: what the learner is given next — a lesson, or a task outside a lesson — or
|
|
174
|
+
* that there is nothing to give (concepts 12). A choice begins nothing: `app` opens a lesson by
|
|
175
|
+
* `OpenLesson` and begins a task by `BeginAttempt`, each naming the choice. Its reason code, which
|
|
176
|
+
* the adult sees, is RUN.md's T65.
|
|
177
|
+
*
|
|
178
|
+
* @generated from message novatrail.api.v1.EngineChoice
|
|
179
|
+
*/
|
|
180
|
+
export declare type EngineChoice = Message<"novatrail.api.v1.EngineChoice"> & {
|
|
181
|
+
/**
|
|
182
|
+
* The ID of the choice: empty beside `CHOICE_KIND_NOTHING`.
|
|
183
|
+
*
|
|
184
|
+
* @generated from field: string choice_id = 1;
|
|
185
|
+
*/
|
|
186
|
+
choiceId: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* What the choice gives.
|
|
190
|
+
*
|
|
191
|
+
* @generated from field: novatrail.api.v1.ChoiceKind kind = 2;
|
|
192
|
+
*/
|
|
193
|
+
kind: ChoiceKind;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Beside `CHOICE_KIND_NOTHING`, when the AI that checks the tasks is closed to the learner and no
|
|
197
|
+
* task that a tap checks is left: `CAUSE_QUOTA`, with when the next family day begins,
|
|
198
|
+
* `CAUSE_PLATFORM_LIMIT` or `CAUSE_NOT_ADMITTED`. Absent when there is nothing to give for
|
|
199
|
+
* another reason, such as no module connected with a current version.
|
|
200
|
+
*
|
|
201
|
+
* @generated from field: novatrail.api.v1.Outcome outcome = 3;
|
|
202
|
+
*/
|
|
203
|
+
outcome?: Outcome | undefined;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Describes the message novatrail.api.v1.EngineChoice.
|
|
208
|
+
* Use `create(EngineChoiceSchema)` to create a new message.
|
|
209
|
+
*/
|
|
210
|
+
export declare const EngineChoiceSchema: GenMessage<EngineChoice>;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* How a lesson run ended.
|
|
214
|
+
*
|
|
215
|
+
* @generated from message novatrail.api.v1.RunEnd
|
|
216
|
+
*/
|
|
217
|
+
export declare type RunEnd = Message<"novatrail.api.v1.RunEnd"> & {
|
|
218
|
+
/**
|
|
219
|
+
* Why it ended.
|
|
220
|
+
*
|
|
221
|
+
* @generated from field: novatrail.api.v1.RunEndReason reason = 1;
|
|
222
|
+
*/
|
|
223
|
+
reason: RunEndReason;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The engine's choice that the end gave: when the request that carries it ended the run — "lesson
|
|
227
|
+
* done", or a request that found the run's package no longer given, the lesson unsuitable, or the
|
|
228
|
+
* run abandoned —, and on a repeat of the "lesson done" that ended it. Absent when the run had
|
|
229
|
+
* ended before by anything else, such as a job of the operator: `app` then asks `ChooseNext`.
|
|
230
|
+
*
|
|
231
|
+
* @generated from field: novatrail.api.v1.EngineChoice choice = 2;
|
|
232
|
+
*/
|
|
233
|
+
choice?: EngineChoice | undefined;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Describes the message novatrail.api.v1.RunEnd.
|
|
238
|
+
* Use `create(RunEndSchema)` to create a new message.
|
|
239
|
+
*/
|
|
240
|
+
export declare const RunEndSchema: GenMessage<RunEnd>;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* The task segments of a lesson run that have ended.
|
|
244
|
+
*
|
|
245
|
+
* @generated from message novatrail.api.v1.EndedSegments
|
|
246
|
+
*/
|
|
247
|
+
export declare type EndedSegments = Message<"novatrail.api.v1.EndedSegments"> & {
|
|
248
|
+
/**
|
|
249
|
+
* Their places among the segments of the lesson, from 1, in order.
|
|
250
|
+
*
|
|
251
|
+
* @generated from field: repeated int32 places = 1;
|
|
252
|
+
*/
|
|
253
|
+
places: number[];
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Describes the message novatrail.api.v1.EndedSegments.
|
|
258
|
+
* Use `create(EndedSegmentsSchema)` to create a new message.
|
|
259
|
+
*/
|
|
260
|
+
export declare const EndedSegmentsSchema: GenMessage<EndedSegments>;
|
|
261
|
+
|
|
134
262
|
/**
|
|
135
263
|
* Why a request was refused, or what a call of AI in it came to: one list for the whole contract
|
|
136
264
|
* (R17 api). A refusal comes as the detail `Refusal` of an error of Connect, with the code that the
|
|
@@ -150,14 +278,18 @@ export enum Cause {
|
|
|
150
278
|
|
|
151
279
|
/**
|
|
152
280
|
* The profile named is not one of the account's, or there is no such profile. Code `not_found`.
|
|
281
|
+
* On `DeleteProfile` it means that the profile is deleted already.
|
|
153
282
|
*
|
|
154
283
|
* @generated from enum value: CAUSE_NO_PROFILE = 1;
|
|
155
284
|
*/
|
|
156
285
|
NO_PROFILE = 1,
|
|
157
286
|
|
|
158
287
|
/**
|
|
159
|
-
* The profile has no attempt
|
|
160
|
-
*
|
|
288
|
+
* The profile has no attempt, lesson run or engine's choice with the ID named, no module
|
|
289
|
+
* connected with the ID named, and no skill by the full ID named in the current version of a
|
|
290
|
+
* module connected to it; or the account has no consent with the ID named; or the pinned index
|
|
291
|
+
* of `api` has no module with the ID named. Another profile's, or another account's, is the
|
|
292
|
+
* same. Code `not_found`.
|
|
161
293
|
*
|
|
162
294
|
* @generated from enum value: CAUSE_NOT_FOUND = 2;
|
|
163
295
|
*/
|
|
@@ -173,7 +305,8 @@ export enum Cause {
|
|
|
173
305
|
ATTEMPT_CLOSED = 3,
|
|
174
306
|
|
|
175
307
|
/**
|
|
176
|
-
* The idempotency key was sent with another method or another
|
|
308
|
+
* The idempotency key was sent with another method, another attempt or another request. Code
|
|
309
|
+
* `invalid_argument`.
|
|
177
310
|
*
|
|
178
311
|
* @generated from enum value: CAUSE_KEY_ALREADY_USED = 4;
|
|
179
312
|
*/
|
|
@@ -188,16 +321,17 @@ export enum Cause {
|
|
|
188
321
|
STILL_GOING = 5,
|
|
189
322
|
|
|
190
323
|
/**
|
|
191
|
-
* The learner's own key
|
|
192
|
-
* `invalid_argument`.
|
|
324
|
+
* The learner's own key, or the provider of one at the beginning of an attempt, came with a
|
|
325
|
+
* profile whose age category is not `adult`. Code `invalid_argument`.
|
|
193
326
|
*
|
|
194
327
|
* @generated from enum value: CAUSE_KEY_NOT_FOR_PROFILE = 6;
|
|
195
328
|
*/
|
|
196
329
|
KEY_NOT_FOR_PROFILE = 6,
|
|
197
330
|
|
|
198
331
|
/**
|
|
199
|
-
* The quota of platform AI for the family day is spent
|
|
200
|
-
*
|
|
332
|
+
* The quota of platform AI for the family day is spent; at the beginning of an attempt on a task
|
|
333
|
+
* that platform AI checks, what is left of it is not enough for a typical task. A refusal holds
|
|
334
|
+
* when the next family day begins; so does an outcome. Code `resource_exhausted`.
|
|
201
335
|
*
|
|
202
336
|
* @generated from enum value: CAUSE_QUOTA = 7;
|
|
203
337
|
*/
|
|
@@ -312,6 +446,146 @@ export enum Cause {
|
|
|
312
446
|
* @generated from enum value: CAUSE_NOT_CURRENT = 21;
|
|
313
447
|
*/
|
|
314
448
|
NOT_CURRENT = 21,
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* The user of the sign-in service has no account: no invite code was redeemed, and the account
|
|
452
|
+
* was not created. Such a user may only create the account. Code `permission_denied`.
|
|
453
|
+
*
|
|
454
|
+
* @generated from enum value: CAUSE_NO_ACCESS = 22;
|
|
455
|
+
*/
|
|
456
|
+
NO_ACCESS = 22,
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* The account is no longer there: it is being deleted or was deleted, or the sign-in service has
|
|
460
|
+
* no such user. `app` erases everything of the account on the device and signs out, without
|
|
461
|
+
* refreshing the token. Code `unauthenticated`.
|
|
462
|
+
*
|
|
463
|
+
* @generated from enum value: CAUSE_ACCOUNT_GONE = 23;
|
|
464
|
+
*/
|
|
465
|
+
ACCOUNT_GONE = 23,
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* The action needs a fresh sign-in, and the sign-in of the token is older than the refusal allows.
|
|
469
|
+
* The refusal holds how old a sign-in may be, in seconds. Code `unauthenticated`.
|
|
470
|
+
*
|
|
471
|
+
* @generated from enum value: CAUSE_FRESH_SIGN_IN_NEEDED = 24;
|
|
472
|
+
*/
|
|
473
|
+
FRESH_SIGN_IN_NEEDED = 24,
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* The invite code is not valid, or was redeemed already. Code `invalid_argument`.
|
|
477
|
+
*
|
|
478
|
+
* @generated from enum value: CAUSE_CODE_NOT_ACCEPTED = 25;
|
|
479
|
+
*/
|
|
480
|
+
CODE_NOT_ACCEPTED = 25,
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* What the request creates is there already: the account of the user, the owner's profile, the
|
|
484
|
+
* profile of a consent, or the attempt of an engine's choice of a task. Code `already_exists`.
|
|
485
|
+
*
|
|
486
|
+
* @generated from enum value: CAUSE_ALREADY_EXISTS = 26;
|
|
487
|
+
*/
|
|
488
|
+
ALREADY_EXISTS = 26,
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* The deployment does not take learners from the country named (privacy 9, П-2). Code
|
|
492
|
+
* `failed_precondition`.
|
|
493
|
+
*
|
|
494
|
+
* @generated from enum value: CAUSE_COUNTRY_NOT_ACCEPTED = 27;
|
|
495
|
+
*/
|
|
496
|
+
COUNTRY_NOT_ACCEPTED = 27,
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* The consent is not confirmed: a child's profile asked for by a consent that still waits, or a
|
|
500
|
+
* learning request of a profile without consent. Code `failed_precondition`.
|
|
501
|
+
*
|
|
502
|
+
* @generated from enum value: CAUSE_NO_CONSENT = 28;
|
|
503
|
+
*/
|
|
504
|
+
NO_CONSENT = 28,
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* The input of the PIN is closed after too many wrong PINs. The refusal holds when it opens. Code
|
|
508
|
+
* `resource_exhausted`.
|
|
509
|
+
*
|
|
510
|
+
* @generated from enum value: CAUSE_PIN_LOCKED = 29;
|
|
511
|
+
*/
|
|
512
|
+
PIN_LOCKED = 29,
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* The PIN is set already: it is changed by the PIN before it, or by a fresh sign-in. Code
|
|
516
|
+
* `failed_precondition`.
|
|
517
|
+
*
|
|
518
|
+
* @generated from enum value: CAUSE_PIN_ALREADY_SET = 30;
|
|
519
|
+
*/
|
|
520
|
+
PIN_ALREADY_SET = 30,
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* The account has no PIN yet: it is set first. Code `failed_precondition`.
|
|
524
|
+
*
|
|
525
|
+
* @generated from enum value: CAUSE_NO_PIN = 31;
|
|
526
|
+
*/
|
|
527
|
+
NO_PIN = 31,
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* An open view asked for by the digest of a package whose version the image of `api` no longer
|
|
531
|
+
* gives: its index marks the version withdrawn, or the version's module format is out of the
|
|
532
|
+
* window of formats that `api` reads. `app` asks `CheckPackages` about the digests it keeps,
|
|
533
|
+
* and erases what it keeps of the version. An attempt or a lesson run on such a version is closed
|
|
534
|
+
* or ended `unchecked` instead. Code `failed_precondition`.
|
|
535
|
+
*
|
|
536
|
+
* @generated from enum value: CAUSE_VERSION_NOT_GIVEN = 32;
|
|
537
|
+
*/
|
|
538
|
+
VERSION_NOT_GIVEN = 32,
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* The index of the image of `api` does not know the package digest: a deployment is going on,
|
|
542
|
+
* and a repeat reaches the new image. Code `unavailable`.
|
|
543
|
+
*
|
|
544
|
+
* @generated from enum value: CAUSE_PACKAGE_UNKNOWN = 33;
|
|
545
|
+
*/
|
|
546
|
+
PACKAGE_UNKNOWN = 33,
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* The module has no current version for the learner — none at all, or one whose audience the
|
|
550
|
+
* learner is not in — or its current version has no lesson or task by the ID named. Code
|
|
551
|
+
* `failed_precondition`.
|
|
552
|
+
*
|
|
553
|
+
* @generated from enum value: CAUSE_NO_CURRENT_VERSION = 34;
|
|
554
|
+
*/
|
|
555
|
+
NO_CURRENT_VERSION = 34,
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* The lesson, one of its tasks, or the task does not suit the age category of the profile. Code
|
|
559
|
+
* `failed_precondition`.
|
|
560
|
+
*
|
|
561
|
+
* @generated from enum value: CAUSE_NOT_SUITABLE = 35;
|
|
562
|
+
*/
|
|
563
|
+
NOT_SUITABLE = 35,
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* The lesson run has ended. The refusal holds how it ended, and the engine's choice when this
|
|
567
|
+
* request ended it. Code `failed_precondition`.
|
|
568
|
+
*
|
|
569
|
+
* @generated from enum value: CAUSE_RUN_ENDED = 36;
|
|
570
|
+
*/
|
|
571
|
+
RUN_ENDED = 36,
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* "Lesson done" while a task segment of the lesson has not ended. The refusal holds the places
|
|
575
|
+
* of the task segments that have ended. Code `failed_precondition`.
|
|
576
|
+
*
|
|
577
|
+
* @generated from enum value: CAUSE_SEGMENTS_NOT_ENDED = 37;
|
|
578
|
+
*/
|
|
579
|
+
SEGMENTS_NOT_ENDED = 37,
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* An attempt asked for on a segment out of order: a task segment before it has not ended, or it
|
|
583
|
+
* has ended itself. The refusal holds the places of the task segments that have ended. Code
|
|
584
|
+
* `failed_precondition`.
|
|
585
|
+
*
|
|
586
|
+
* @generated from enum value: CAUSE_SEGMENT_UNAVAILABLE = 38;
|
|
587
|
+
*/
|
|
588
|
+
SEGMENT_UNAVAILABLE = 38,
|
|
315
589
|
}
|
|
316
590
|
|
|
317
591
|
/**
|
|
@@ -436,3 +710,94 @@ export enum CloseReason {
|
|
|
436
710
|
*/
|
|
437
711
|
export declare const CloseReasonSchema: GenEnum<CloseReason>;
|
|
438
712
|
|
|
713
|
+
/**
|
|
714
|
+
* What an engine's choice gives. A kind its build does not know `app` reads as
|
|
715
|
+
* `CHOICE_KIND_NOTHING`.
|
|
716
|
+
*
|
|
717
|
+
* @generated from enum novatrail.api.v1.ChoiceKind
|
|
718
|
+
*/
|
|
719
|
+
export enum ChoiceKind {
|
|
720
|
+
/**
|
|
721
|
+
* Not named: never sent.
|
|
722
|
+
*
|
|
723
|
+
* @generated from enum value: CHOICE_KIND_UNSPECIFIED = 0;
|
|
724
|
+
*/
|
|
725
|
+
UNSPECIFIED = 0,
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* A lesson: `app` opens it by `OpenLesson`. It may be the lesson of a run that is open.
|
|
729
|
+
*
|
|
730
|
+
* @generated from enum value: CHOICE_KIND_LESSON = 1;
|
|
731
|
+
*/
|
|
732
|
+
LESSON = 1,
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* A task outside a lesson: `app` begins it by `BeginAttempt`.
|
|
736
|
+
*
|
|
737
|
+
* @generated from enum value: CHOICE_KIND_TASK = 2;
|
|
738
|
+
*/
|
|
739
|
+
TASK = 2,
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Nothing to give.
|
|
743
|
+
*
|
|
744
|
+
* @generated from enum value: CHOICE_KIND_NOTHING = 3;
|
|
745
|
+
*/
|
|
746
|
+
NOTHING = 3,
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Describes the enum novatrail.api.v1.ChoiceKind.
|
|
751
|
+
*/
|
|
752
|
+
export declare const ChoiceKindSchema: GenEnum<ChoiceKind>;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Why a lesson run ended (concepts 5). A reason its build does not know `app` reads as an end other
|
|
756
|
+
* than `RUN_END_REASON_PASSED`, and erases the state of the lesson as at every end.
|
|
757
|
+
*
|
|
758
|
+
* @generated from enum novatrail.api.v1.RunEndReason
|
|
759
|
+
*/
|
|
760
|
+
export enum RunEndReason {
|
|
761
|
+
/**
|
|
762
|
+
* Not ended: the run is open.
|
|
763
|
+
*
|
|
764
|
+
* @generated from enum value: RUN_END_REASON_UNSPECIFIED = 0;
|
|
765
|
+
*/
|
|
766
|
+
UNSPECIFIED = 0,
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* The lesson is done: "lesson done" came once every task segment had ended.
|
|
770
|
+
*
|
|
771
|
+
* @generated from enum value: RUN_END_REASON_PASSED = 1;
|
|
772
|
+
*/
|
|
773
|
+
PASSED = 1,
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Unchecked: the run's version of the module is no longer given, withdrawn or out of the window
|
|
777
|
+
* of formats that `api` reads, or an attempt of the run was closed `CLOSE_REASON_UNCHECKED`.
|
|
778
|
+
*
|
|
779
|
+
* @generated from enum value: RUN_END_REASON_UNCHECKED = 2;
|
|
780
|
+
*/
|
|
781
|
+
UNCHECKED = 2,
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Not suitable: the module is no longer connected or has no current version for the learner, or
|
|
785
|
+
* the lesson or one of its tasks no longer suits the age category of the profile.
|
|
786
|
+
*
|
|
787
|
+
* @generated from enum value: RUN_END_REASON_NOT_SUITABLE = 3;
|
|
788
|
+
*/
|
|
789
|
+
NOT_SUITABLE = 3,
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Abandoned: no request on the run or its attempts for 30 days.
|
|
793
|
+
*
|
|
794
|
+
* @generated from enum value: RUN_END_REASON_ABANDONED = 4;
|
|
795
|
+
*/
|
|
796
|
+
ABANDONED = 4,
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Describes the enum novatrail.api.v1.RunEndReason.
|
|
801
|
+
*/
|
|
802
|
+
export declare const RunEndReasonSchema: GenEnum<RunEndReason>;
|
|
803
|
+
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
// The causes of the contract between `app` and `api`: one list for its refusals and for the
|
|
6
6
|
// outcomes of its calls of AI, the refusal that a method's error carries, and the outcome that its
|
|
7
|
-
// answer carries
|
|
8
|
-
//
|
|
7
|
+
// answer carries; and the values that come both in answers and in the data of a refusal: why an
|
|
8
|
+
// attempt was closed, how a lesson run ended, and the engine's choice. What they mean, and how
|
|
9
|
+
// `app` reads a cause it does not know, are the rules of contracts/README.md, section 15.
|
|
9
10
|
|
|
10
11
|
import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
|
|
11
12
|
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
@@ -14,7 +15,7 @@ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
|
14
15
|
* Describes the file novatrail/api/v1/cause.proto.
|
|
15
16
|
*/
|
|
16
17
|
export const file_novatrail_api_v1_cause = /*@__PURE__*/
|
|
17
|
-
fileDesc("
|
|
18
|
+
fileDesc("Ch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VfS0lORF9UQVNLEAISFwoTQ0hPSUNFX0tJTkRfTk9USElORxADKqYBCgxSdW5FbmRSZWFzb24SHgoaUlVOX0VORF9SRUFTT05fVU5TUEVDSUZJRUQQABIZChVSVU5fRU5EX1JFQVNPTl9QQVNTRUQQARIcChhSVU5fRU5EX1JFQVNPTl9VTkNIRUNLRUQQAhIfChtSVU5fRU5EX1JFQVNPTl9OT1RfU1VJVEFCTEUQAxIcChhSVU5fRU5EX1JFQVNPTl9BQkFORE9ORUQQBELDAQoUY29tLm5vdmF0cmFpbC5hcGkudjFCCkNhdXNlUHJvdG9QAVo9Z2l0aHViLmNvbS9hbHRub3ZhdHJhaWwvc3BlYy9jb250cmFjdHMvbm92YXRyYWlsL2FwaS92MTthcGl2MaICA05BWKoCEE5vdmF0cmFpbC5BcGkuVjHKAhBOb3ZhdHJhaWxcQXBpXFYx4gIcTm92YXRyYWlsXEFwaVxWMVxHUEJNZXRhZGF0YeoCEk5vdmF0cmFpbDo6QXBpOjpWMWIGcHJvdG8z", [file_google_protobuf_timestamp]);
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Describes the message novatrail.api.v1.Refusal.
|
|
@@ -37,6 +38,27 @@ export const OutcomeSchema = /*@__PURE__*/
|
|
|
37
38
|
export const OwnKeyLimitSchema = /*@__PURE__*/
|
|
38
39
|
messageDesc(file_novatrail_api_v1_cause, 2);
|
|
39
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Describes the message novatrail.api.v1.EngineChoice.
|
|
43
|
+
* Use `create(EngineChoiceSchema)` to create a new message.
|
|
44
|
+
*/
|
|
45
|
+
export const EngineChoiceSchema = /*@__PURE__*/
|
|
46
|
+
messageDesc(file_novatrail_api_v1_cause, 3);
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Describes the message novatrail.api.v1.RunEnd.
|
|
50
|
+
* Use `create(RunEndSchema)` to create a new message.
|
|
51
|
+
*/
|
|
52
|
+
export const RunEndSchema = /*@__PURE__*/
|
|
53
|
+
messageDesc(file_novatrail_api_v1_cause, 4);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Describes the message novatrail.api.v1.EndedSegments.
|
|
57
|
+
* Use `create(EndedSegmentsSchema)` to create a new message.
|
|
58
|
+
*/
|
|
59
|
+
export const EndedSegmentsSchema = /*@__PURE__*/
|
|
60
|
+
messageDesc(file_novatrail_api_v1_cause, 5);
|
|
61
|
+
|
|
40
62
|
/**
|
|
41
63
|
* Describes the enum novatrail.api.v1.Cause.
|
|
42
64
|
*/
|
|
@@ -84,3 +106,33 @@ export const CloseReasonSchema = /*@__PURE__*/
|
|
|
84
106
|
export const CloseReason = /*@__PURE__*/
|
|
85
107
|
tsEnum(CloseReasonSchema);
|
|
86
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Describes the enum novatrail.api.v1.ChoiceKind.
|
|
111
|
+
*/
|
|
112
|
+
export const ChoiceKindSchema = /*@__PURE__*/
|
|
113
|
+
enumDesc(file_novatrail_api_v1_cause, 3);
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* What an engine's choice gives. A kind its build does not know `app` reads as
|
|
117
|
+
* `CHOICE_KIND_NOTHING`.
|
|
118
|
+
*
|
|
119
|
+
* @generated from enum novatrail.api.v1.ChoiceKind
|
|
120
|
+
*/
|
|
121
|
+
export const ChoiceKind = /*@__PURE__*/
|
|
122
|
+
tsEnum(ChoiceKindSchema);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Describes the enum novatrail.api.v1.RunEndReason.
|
|
126
|
+
*/
|
|
127
|
+
export const RunEndReasonSchema = /*@__PURE__*/
|
|
128
|
+
enumDesc(file_novatrail_api_v1_cause, 4);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Why a lesson run ended (concepts 5). A reason its build does not know `app` reads as an end other
|
|
132
|
+
* than `RUN_END_REASON_PASSED`, and erases the state of the lesson as at every end.
|
|
133
|
+
*
|
|
134
|
+
* @generated from enum novatrail.api.v1.RunEndReason
|
|
135
|
+
*/
|
|
136
|
+
export const RunEndReason = /*@__PURE__*/
|
|
137
|
+
tsEnum(RunEndReasonSchema);
|
|
138
|
+
|