@altnovatrail/contracts 0.8.0 → 0.8.2
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 +1547 -0
- package/novatrail/api/v1/account_pb.js +405 -0
- package/novatrail/api/v1/attempt_pb.d.ts +1409 -0
- package/novatrail/api/v1/attempt_pb.js +293 -0
- package/novatrail/api/v1/cause_pb.d.ts +535 -0
- package/novatrail/api/v1/cause_pb.js +86 -0
- package/package.json +13 -1
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
|
|
2
|
+
// @generated from file novatrail/api/v1/cause.proto (package novatrail.api.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
// The causes of the contract between `app` and `api`: one list for its refusals and for the
|
|
6
|
+
// outcomes of its calls of AI, the refusal that a method's error carries, and the outcome that its
|
|
7
|
+
// answer carries. What they mean, and how `app` reads a cause it does not know, are the rules of
|
|
8
|
+
// contracts/README.md, section 15.
|
|
9
|
+
|
|
10
|
+
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
11
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
12
|
+
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Describes the file novatrail/api/v1/cause.proto.
|
|
16
|
+
*/
|
|
17
|
+
export declare const file_novatrail_api_v1_cause: GenFile;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A refusal: the detail of an error of Connect when the request was not done.
|
|
21
|
+
*
|
|
22
|
+
* @generated from message novatrail.api.v1.Refusal
|
|
23
|
+
*/
|
|
24
|
+
export declare type Refusal = Message<"novatrail.api.v1.Refusal"> & {
|
|
25
|
+
/**
|
|
26
|
+
* Why the request was refused.
|
|
27
|
+
*
|
|
28
|
+
* @generated from field: novatrail.api.v1.Cause cause = 1;
|
|
29
|
+
*/
|
|
30
|
+
cause: Cause;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* What the cause tells beside it, when it tells anything.
|
|
34
|
+
*
|
|
35
|
+
* @generated from oneof novatrail.api.v1.Refusal.data
|
|
36
|
+
*/
|
|
37
|
+
data: {
|
|
38
|
+
/**
|
|
39
|
+
* Beside `CAUSE_ATTEMPT_CLOSED`: the close reason of the attempt.
|
|
40
|
+
*
|
|
41
|
+
* @generated from field: novatrail.api.v1.CloseReason close_reason = 2;
|
|
42
|
+
*/
|
|
43
|
+
value: CloseReason;
|
|
44
|
+
case: "closeReason";
|
|
45
|
+
} | {
|
|
46
|
+
/**
|
|
47
|
+
* Beside `CAUSE_QUOTA`: when the next family day begins.
|
|
48
|
+
*
|
|
49
|
+
* @generated from field: google.protobuf.Timestamp next_family_day = 3;
|
|
50
|
+
*/
|
|
51
|
+
value: Timestamp;
|
|
52
|
+
case: "nextFamilyDay";
|
|
53
|
+
} | {
|
|
54
|
+
/**
|
|
55
|
+
* Beside `CAUSE_NOT_CURRENT`: how many wrong answers the attempt has.
|
|
56
|
+
*
|
|
57
|
+
* @generated from field: int32 wrong_answers = 4;
|
|
58
|
+
*/
|
|
59
|
+
value: number;
|
|
60
|
+
case: "wrongAnswers";
|
|
61
|
+
} | {
|
|
62
|
+
/**
|
|
63
|
+
* Beside `CAUSE_PIN_LOCKED`: when the input of the PIN opens.
|
|
64
|
+
*
|
|
65
|
+
* @generated from field: google.protobuf.Timestamp locked_until = 5;
|
|
66
|
+
*/
|
|
67
|
+
value: Timestamp;
|
|
68
|
+
case: "lockedUntil";
|
|
69
|
+
} | {
|
|
70
|
+
/**
|
|
71
|
+
* Beside `CAUSE_FRESH_SIGN_IN_NEEDED`: how old a sign-in may be, in seconds.
|
|
72
|
+
*
|
|
73
|
+
* @generated from field: int32 max_auth_age_seconds = 6;
|
|
74
|
+
*/
|
|
75
|
+
value: number;
|
|
76
|
+
case: "maxAuthAgeSeconds";
|
|
77
|
+
} | { case: undefined; value?: undefined };
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Describes the message novatrail.api.v1.Refusal.
|
|
82
|
+
* Use `create(RefusalSchema)` to create a new message.
|
|
83
|
+
*/
|
|
84
|
+
export declare const RefusalSchema: GenMessage<Refusal>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* An outcome: what a call of AI came to when the answer holds no reading, or no words, of AI.
|
|
88
|
+
*
|
|
89
|
+
* @generated from message novatrail.api.v1.Outcome
|
|
90
|
+
*/
|
|
91
|
+
export declare type Outcome = Message<"novatrail.api.v1.Outcome"> & {
|
|
92
|
+
/**
|
|
93
|
+
* The outcome: `CAUSE_AI_FAILURE`, `CAUSE_QUOTA`, `CAUSE_PLATFORM_LIMIT`,
|
|
94
|
+
* `CAUSE_NOT_ADMITTED`, `CAUSE_LIMIT_REACHED`, `CAUSE_KEY_REFUSED` or `CAUSE_NO_OTHER_WORDS`.
|
|
95
|
+
* "Explain differently" makes no call without the reserve of the quota: there the quota, the limit
|
|
96
|
+
* of platform AI and no admission are refusals, and the right to it on the rung stays.
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: novatrail.api.v1.Cause cause = 1;
|
|
99
|
+
*/
|
|
100
|
+
cause: Cause;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Beside `CAUSE_QUOTA`: when the next family day begins.
|
|
104
|
+
*
|
|
105
|
+
* @generated from field: google.protobuf.Timestamp next_family_day = 2;
|
|
106
|
+
*/
|
|
107
|
+
nextFamilyDay?: Timestamp | undefined;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Beside `CAUSE_LIMIT_REACHED`: which limit of the own key ran out.
|
|
111
|
+
*
|
|
112
|
+
* @generated from field: novatrail.api.v1.OwnKeyLimit own_key_limit = 3;
|
|
113
|
+
*/
|
|
114
|
+
ownKeyLimit?: OwnKeyLimit | undefined;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Describes the message novatrail.api.v1.Outcome.
|
|
119
|
+
* Use `create(OutcomeSchema)` to create a new message.
|
|
120
|
+
*/
|
|
121
|
+
export declare const OutcomeSchema: GenMessage<Outcome>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The limit of the learner's own key that ran out at its provider (R55 tutor).
|
|
125
|
+
*
|
|
126
|
+
* @generated from message novatrail.api.v1.OwnKeyLimit
|
|
127
|
+
*/
|
|
128
|
+
export declare type OwnKeyLimit = Message<"novatrail.api.v1.OwnKeyLimit"> & {
|
|
129
|
+
/**
|
|
130
|
+
* Which limit ran out.
|
|
131
|
+
*
|
|
132
|
+
* @generated from field: novatrail.api.v1.LimitCause cause = 1;
|
|
133
|
+
*/
|
|
134
|
+
cause: LimitCause;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* When access comes back: only when the provider says so.
|
|
138
|
+
*
|
|
139
|
+
* @generated from field: google.protobuf.Timestamp access_returns = 2;
|
|
140
|
+
*/
|
|
141
|
+
accessReturns?: Timestamp | undefined;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Describes the message novatrail.api.v1.OwnKeyLimit.
|
|
146
|
+
* Use `create(OwnKeyLimitSchema)` to create a new message.
|
|
147
|
+
*/
|
|
148
|
+
export declare const OwnKeyLimitSchema: GenMessage<OwnKeyLimit>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Why a request was refused, or what a call of AI in it came to: one list for the whole contract
|
|
152
|
+
* (R17 api). A refusal comes as the detail `Refusal` of an error of Connect, with the code that the
|
|
153
|
+
* comment of each method gives it; an outcome comes in the answer, as `Outcome`. A cause that the
|
|
154
|
+
* build of `app` does not know it reads by the code of the error, or as a call of AI that gave
|
|
155
|
+
* nothing. A verdict's reason is no cause: it is the module format's and the observation's.
|
|
156
|
+
*
|
|
157
|
+
* @generated from enum novatrail.api.v1.Cause
|
|
158
|
+
*/
|
|
159
|
+
export enum Cause {
|
|
160
|
+
/**
|
|
161
|
+
* No cause: never sent.
|
|
162
|
+
*
|
|
163
|
+
* @generated from enum value: CAUSE_UNSPECIFIED = 0;
|
|
164
|
+
*/
|
|
165
|
+
UNSPECIFIED = 0,
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The profile named is not one of the account's, or there is no such profile. Code `not_found`.
|
|
169
|
+
* On `DeleteProfile` it means that the profile is deleted already.
|
|
170
|
+
*
|
|
171
|
+
* @generated from enum value: CAUSE_NO_PROFILE = 1;
|
|
172
|
+
*/
|
|
173
|
+
NO_PROFILE = 1,
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The profile has no attempt with the ID named, or the account no consent with the ID named;
|
|
177
|
+
* another profile's, or another account's, is the same. Code `not_found`.
|
|
178
|
+
*
|
|
179
|
+
* @generated from enum value: CAUSE_NOT_FOUND = 2;
|
|
180
|
+
*/
|
|
181
|
+
NOT_FOUND = 2,
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The attempt is closed, and the request acts on an open one. The refusal holds the close reason
|
|
185
|
+
* of the attempt. Code `failed_precondition`. An essay whose attempt was closed while its
|
|
186
|
+
* submission went is no refusal: its answer says so by a field of its own.
|
|
187
|
+
*
|
|
188
|
+
* @generated from enum value: CAUSE_ATTEMPT_CLOSED = 3;
|
|
189
|
+
*/
|
|
190
|
+
ATTEMPT_CLOSED = 3,
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The idempotency key was sent with another method, another attempt or another request. Code
|
|
194
|
+
* `invalid_argument`.
|
|
195
|
+
*
|
|
196
|
+
* @generated from enum value: CAUSE_KEY_ALREADY_USED = 4;
|
|
197
|
+
*/
|
|
198
|
+
KEY_ALREADY_USED = 4,
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The request with this idempotency key is still going; its repeat waits for it. Code
|
|
202
|
+
* `unavailable`.
|
|
203
|
+
*
|
|
204
|
+
* @generated from enum value: CAUSE_STILL_GOING = 5;
|
|
205
|
+
*/
|
|
206
|
+
STILL_GOING = 5,
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The learner's own key came with a profile whose age category is not `adult`. Code
|
|
210
|
+
* `invalid_argument`.
|
|
211
|
+
*
|
|
212
|
+
* @generated from enum value: CAUSE_KEY_NOT_FOR_PROFILE = 6;
|
|
213
|
+
*/
|
|
214
|
+
KEY_NOT_FOR_PROFILE = 6,
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The quota of platform AI for the family day is spent. A refusal holds when the next family day
|
|
218
|
+
* begins; so does an outcome. Code `resource_exhausted`.
|
|
219
|
+
*
|
|
220
|
+
* @generated from enum value: CAUSE_QUOTA = 7;
|
|
221
|
+
*/
|
|
222
|
+
QUOTA = 7,
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Platform AI is out of what its provider allows the platform. Code `resource_exhausted`.
|
|
226
|
+
*
|
|
227
|
+
* @generated from enum value: CAUSE_PLATFORM_LIMIT = 8;
|
|
228
|
+
*/
|
|
229
|
+
PLATFORM_LIMIT = 8,
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The admission function admits no call of AI for this learner and this capability of AI. Code
|
|
233
|
+
* `failed_precondition`.
|
|
234
|
+
*
|
|
235
|
+
* @generated from enum value: CAUSE_NOT_ADMITTED = 9;
|
|
236
|
+
*/
|
|
237
|
+
NOT_ADMITTED = 9,
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* AI failed: an error, a refusal of the provider, a timeout. An outcome alone.
|
|
241
|
+
*
|
|
242
|
+
* @generated from enum value: CAUSE_AI_FAILURE = 10;
|
|
243
|
+
*/
|
|
244
|
+
AI_FAILURE = 10,
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The limit of the learner's own key ran out at its provider. The outcome holds why, and when
|
|
248
|
+
* access comes back if the provider says so. An outcome alone: the call does not move to
|
|
249
|
+
* platform AI.
|
|
250
|
+
*
|
|
251
|
+
* @generated from enum value: CAUSE_LIMIT_REACHED = 11;
|
|
252
|
+
*/
|
|
253
|
+
LIMIT_REACHED = 11,
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The provider refused the learner's own key: it is not valid, or it was revoked. An outcome
|
|
257
|
+
* alone: the call does not move to platform AI.
|
|
258
|
+
*
|
|
259
|
+
* @generated from enum value: CAUSE_KEY_REFUSED = 12;
|
|
260
|
+
*/
|
|
261
|
+
KEY_REFUSED = 12,
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* A learning request to show the solution, while the child's setting "ask before showing" is on:
|
|
265
|
+
* the solution is shown by an action of an adult. Code `permission_denied`.
|
|
266
|
+
*
|
|
267
|
+
* @generated from enum value: CAUSE_ADULT_NEEDED = 13;
|
|
268
|
+
*/
|
|
269
|
+
ADULT_NEEDED = 13,
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* A child asks for the solution before the fourth wrong answer. Code `failed_precondition`.
|
|
273
|
+
*
|
|
274
|
+
* @generated from enum value: CAUSE_LADDER_NOT_PASSED = 14;
|
|
275
|
+
*/
|
|
276
|
+
LADDER_NOT_PASSED = 14,
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The task has nothing to show by this request: a task with a rubric, which "Done" ends. Code
|
|
280
|
+
* `failed_precondition`.
|
|
281
|
+
*
|
|
282
|
+
* @generated from enum value: CAUSE_NO_SHOWING = 15;
|
|
283
|
+
*/
|
|
284
|
+
NO_SHOWING = 15,
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The attempt has no rung: no wrong answer yet, or a task with a rubric. Code
|
|
288
|
+
* `failed_precondition`.
|
|
289
|
+
*
|
|
290
|
+
* @generated from enum value: CAUSE_NO_RUNG = 16;
|
|
291
|
+
*/
|
|
292
|
+
NO_RUNG = 16,
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* "Explain differently" was asked for once on this rung already. Code `failed_precondition`.
|
|
296
|
+
*
|
|
297
|
+
* @generated from enum value: CAUSE_ALREADY_ASKED = 17;
|
|
298
|
+
*/
|
|
299
|
+
ALREADY_ASKED = 17,
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* "Explain differently" was called and gave the words the learner reads already: the right to it
|
|
303
|
+
* on this rung is spent. An outcome alone.
|
|
304
|
+
*
|
|
305
|
+
* @generated from enum value: CAUSE_NO_OTHER_WORDS = 18;
|
|
306
|
+
*/
|
|
307
|
+
NO_OTHER_WORDS = 18,
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* The words asked for are not given: the words after a correct answer on an attempt that no
|
|
311
|
+
* correct answer closed, a second time, or once the profile began another attempt; the words of a
|
|
312
|
+
* rung from the fourth wrong answer on, where no rung is new. Code `failed_precondition`.
|
|
313
|
+
*
|
|
314
|
+
* @generated from enum value: CAUSE_NO_MORE_WORDS = 19;
|
|
315
|
+
*/
|
|
316
|
+
NO_MORE_WORDS = 19,
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* "Done" before the attempt's first submission. Code `failed_precondition`.
|
|
320
|
+
*
|
|
321
|
+
* @generated from enum value: CAUSE_NO_SUBMISSION = 20;
|
|
322
|
+
*/
|
|
323
|
+
NO_SUBMISSION = 20,
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* The words of a rung, or "explain differently", asked for a wrong answer that is not the
|
|
327
|
+
* attempt's last: another submission came meanwhile. The refusal holds how many wrong answers the attempt has. Code
|
|
328
|
+
* `failed_precondition`.
|
|
329
|
+
*
|
|
330
|
+
* @generated from enum value: CAUSE_NOT_CURRENT = 21;
|
|
331
|
+
*/
|
|
332
|
+
NOT_CURRENT = 21,
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* The user of the sign-in service has no account: no invite code was redeemed, and the account
|
|
336
|
+
* was not created. Such a user may only create the account. Code `permission_denied`.
|
|
337
|
+
*
|
|
338
|
+
* @generated from enum value: CAUSE_NO_ACCESS = 22;
|
|
339
|
+
*/
|
|
340
|
+
NO_ACCESS = 22,
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* The account is no longer there: it is being deleted or was deleted, or the sign-in service has
|
|
344
|
+
* no such user. `app` erases everything of the account on the device and signs out, without
|
|
345
|
+
* refreshing the token. Code `unauthenticated`.
|
|
346
|
+
*
|
|
347
|
+
* @generated from enum value: CAUSE_ACCOUNT_GONE = 23;
|
|
348
|
+
*/
|
|
349
|
+
ACCOUNT_GONE = 23,
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The action needs a fresh sign-in, and the sign-in of the token is older than the refusal allows.
|
|
353
|
+
* The refusal holds how old a sign-in may be, in seconds. Code `unauthenticated`.
|
|
354
|
+
*
|
|
355
|
+
* @generated from enum value: CAUSE_FRESH_SIGN_IN_NEEDED = 24;
|
|
356
|
+
*/
|
|
357
|
+
FRESH_SIGN_IN_NEEDED = 24,
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* The invite code is not valid, or was redeemed already. Code `invalid_argument`.
|
|
361
|
+
*
|
|
362
|
+
* @generated from enum value: CAUSE_CODE_NOT_ACCEPTED = 25;
|
|
363
|
+
*/
|
|
364
|
+
CODE_NOT_ACCEPTED = 25,
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* What the request creates is there already: the account of the user, the owner's profile, or
|
|
368
|
+
* the profile of a consent. Code `already_exists`.
|
|
369
|
+
*
|
|
370
|
+
* @generated from enum value: CAUSE_ALREADY_EXISTS = 26;
|
|
371
|
+
*/
|
|
372
|
+
ALREADY_EXISTS = 26,
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* The deployment does not take learners from the country named (privacy 9, П-2). Code
|
|
376
|
+
* `failed_precondition`.
|
|
377
|
+
*
|
|
378
|
+
* @generated from enum value: CAUSE_COUNTRY_NOT_ACCEPTED = 27;
|
|
379
|
+
*/
|
|
380
|
+
COUNTRY_NOT_ACCEPTED = 27,
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The consent is not confirmed: a child's profile asked for by a consent that still waits, or a
|
|
384
|
+
* learning request of a profile without consent. Code `failed_precondition`.
|
|
385
|
+
*
|
|
386
|
+
* @generated from enum value: CAUSE_NO_CONSENT = 28;
|
|
387
|
+
*/
|
|
388
|
+
NO_CONSENT = 28,
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* The input of the PIN is closed after too many wrong PINs. The refusal holds when it opens. Code
|
|
392
|
+
* `resource_exhausted`.
|
|
393
|
+
*
|
|
394
|
+
* @generated from enum value: CAUSE_PIN_LOCKED = 29;
|
|
395
|
+
*/
|
|
396
|
+
PIN_LOCKED = 29,
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The PIN is set already: it is changed by the PIN before it, or by a fresh sign-in. Code
|
|
400
|
+
* `failed_precondition`.
|
|
401
|
+
*
|
|
402
|
+
* @generated from enum value: CAUSE_PIN_ALREADY_SET = 30;
|
|
403
|
+
*/
|
|
404
|
+
PIN_ALREADY_SET = 30,
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The account has no PIN yet: it is set first. Code `failed_precondition`.
|
|
408
|
+
*
|
|
409
|
+
* @generated from enum value: CAUSE_NO_PIN = 31;
|
|
410
|
+
*/
|
|
411
|
+
NO_PIN = 31,
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Describes the enum novatrail.api.v1.Cause.
|
|
416
|
+
*/
|
|
417
|
+
export declare const CauseSchema: GenEnum<Cause>;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Which limit of the learner's own key ran out at its provider.
|
|
421
|
+
*
|
|
422
|
+
* @generated from enum novatrail.api.v1.LimitCause
|
|
423
|
+
*/
|
|
424
|
+
export enum LimitCause {
|
|
425
|
+
/**
|
|
426
|
+
* Not named: the provider said no more than that a limit ran out.
|
|
427
|
+
*
|
|
428
|
+
* @generated from enum value: LIMIT_CAUSE_UNSPECIFIED = 0;
|
|
429
|
+
*/
|
|
430
|
+
UNSPECIFIED = 0,
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* The limit of spending that the owner of the key set at the provider.
|
|
434
|
+
*
|
|
435
|
+
* @generated from enum value: LIMIT_CAUSE_LIMIT = 1;
|
|
436
|
+
*/
|
|
437
|
+
LIMIT = 1,
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* The ceiling of the provider's tier that the key's account is on.
|
|
441
|
+
*
|
|
442
|
+
* @generated from enum value: LIMIT_CAUSE_TIER = 2;
|
|
443
|
+
*/
|
|
444
|
+
TIER = 2,
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* The balance of the key's account is spent.
|
|
448
|
+
*
|
|
449
|
+
* @generated from enum value: LIMIT_CAUSE_BALANCE = 3;
|
|
450
|
+
*/
|
|
451
|
+
BALANCE = 3,
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* A payment of the key's account did not go through.
|
|
455
|
+
*
|
|
456
|
+
* @generated from enum value: LIMIT_CAUSE_PAYMENT = 4;
|
|
457
|
+
*/
|
|
458
|
+
PAYMENT = 4,
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Describes the enum novatrail.api.v1.LimitCause.
|
|
463
|
+
*/
|
|
464
|
+
export declare const LimitCauseSchema: GenEnum<LimitCause>;
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Why an attempt was closed (architecture 3.5 api). An attempt that is not closed waits, whatever
|
|
468
|
+
* its submissions came to.
|
|
469
|
+
*
|
|
470
|
+
* @generated from enum novatrail.api.v1.CloseReason
|
|
471
|
+
*/
|
|
472
|
+
export enum CloseReason {
|
|
473
|
+
/**
|
|
474
|
+
* Not closed: the attempt is open.
|
|
475
|
+
*
|
|
476
|
+
* @generated from enum value: CLOSE_REASON_UNSPECIFIED = 0;
|
|
477
|
+
*/
|
|
478
|
+
UNSPECIFIED = 0,
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* A submission whose every item is correct.
|
|
482
|
+
*
|
|
483
|
+
* @generated from enum value: CLOSE_REASON_CORRECT = 1;
|
|
484
|
+
*/
|
|
485
|
+
CORRECT = 1,
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* The solution was shown.
|
|
489
|
+
*
|
|
490
|
+
* @generated from enum value: CLOSE_REASON_SOLUTION_SHOWN = 2;
|
|
491
|
+
*/
|
|
492
|
+
SOLUTION_SHOWN = 2,
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* The learner left it, beginning another attempt.
|
|
496
|
+
*
|
|
497
|
+
* @generated from enum value: CLOSE_REASON_LEFT = 3;
|
|
498
|
+
*/
|
|
499
|
+
LEFT = 3,
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* The attempt was abandoned: no action on it for 7 days.
|
|
503
|
+
*
|
|
504
|
+
* @generated from enum value: CLOSE_REASON_ABANDONED = 4;
|
|
505
|
+
*/
|
|
506
|
+
ABANDONED = 4,
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Its version of the module is no longer given: withdrawn, or out of the window of formats that
|
|
510
|
+
* `api` reads.
|
|
511
|
+
*
|
|
512
|
+
* @generated from enum value: CLOSE_REASON_UNCHECKED = 5;
|
|
513
|
+
*/
|
|
514
|
+
UNCHECKED = 5,
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* The run of the lesson the attempt was in ended as not suitable while the attempt was open.
|
|
518
|
+
*
|
|
519
|
+
* @generated from enum value: CLOSE_REASON_NOT_SUITABLE = 6;
|
|
520
|
+
*/
|
|
521
|
+
NOT_SUITABLE = 6,
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* The learner pressed "Done" on a task with a rubric.
|
|
525
|
+
*
|
|
526
|
+
* @generated from enum value: CLOSE_REASON_DONE = 7;
|
|
527
|
+
*/
|
|
528
|
+
DONE = 7,
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Describes the enum novatrail.api.v1.CloseReason.
|
|
533
|
+
*/
|
|
534
|
+
export declare const CloseReasonSchema: GenEnum<CloseReason>;
|
|
535
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
|
|
2
|
+
// @generated from file novatrail/api/v1/cause.proto (package novatrail.api.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
// The causes of the contract between `app` and `api`: one list for its refusals and for the
|
|
6
|
+
// outcomes of its calls of AI, the refusal that a method's error carries, and the outcome that its
|
|
7
|
+
// answer carries. What they mean, and how `app` reads a cause it does not know, are the rules of
|
|
8
|
+
// contracts/README.md, section 15.
|
|
9
|
+
|
|
10
|
+
import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
|
|
11
|
+
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Describes the file novatrail/api/v1/cause.proto.
|
|
15
|
+
*/
|
|
16
|
+
export const file_novatrail_api_v1_cause = /*@__PURE__*/
|
|
17
|
+
fileDesc("Chxub3ZhdHJhaWwvYXBpL3YxL2NhdXNlLnByb3RvEhBub3ZhdHJhaWwuYXBpLnYxIpQCCgdSZWZ1c2FsEiYKBWNhdXNlGAEgASgOMhcubm92YXRyYWlsLmFwaS52MS5DYXVzZRI1CgxjbG9zZV9yZWFzb24YAiABKA4yHS5ub3ZhdHJhaWwuYXBpLnYxLkNsb3NlUmVhc29uSAASNQoPbmV4dF9mYW1pbHlfZGF5GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgAEhcKDXdyb25nX2Fuc3dlcnMYBCABKAVIABIyCgxsb2NrZWRfdW50aWwYBSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wSAASHgoUbWF4X2F1dGhfYWdlX3NlY29uZHMYBiABKAVIAEIGCgRkYXRhIpwBCgdPdXRjb21lEiYKBWNhdXNlG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Rh6gISTm92YXRyYWlsOjpBcGk6OlYxYgZwcm90bzM", [file_google_protobuf_timestamp]);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Describes the message novatrail.api.v1.Refusal.
|
|
21
|
+
* Use `create(RefusalSchema)` to create a new message.
|
|
22
|
+
*/
|
|
23
|
+
export const RefusalSchema = /*@__PURE__*/
|
|
24
|
+
messageDesc(file_novatrail_api_v1_cause, 0);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message novatrail.api.v1.Outcome.
|
|
28
|
+
* Use `create(OutcomeSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export const OutcomeSchema = /*@__PURE__*/
|
|
31
|
+
messageDesc(file_novatrail_api_v1_cause, 1);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Describes the message novatrail.api.v1.OwnKeyLimit.
|
|
35
|
+
* Use `create(OwnKeyLimitSchema)` to create a new message.
|
|
36
|
+
*/
|
|
37
|
+
export const OwnKeyLimitSchema = /*@__PURE__*/
|
|
38
|
+
messageDesc(file_novatrail_api_v1_cause, 2);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Describes the enum novatrail.api.v1.Cause.
|
|
42
|
+
*/
|
|
43
|
+
export const CauseSchema = /*@__PURE__*/
|
|
44
|
+
enumDesc(file_novatrail_api_v1_cause, 0);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Why a request was refused, or what a call of AI in it came to: one list for the whole contract
|
|
48
|
+
* (R17 api). A refusal comes as the detail `Refusal` of an error of Connect, with the code that the
|
|
49
|
+
* comment of each method gives it; an outcome comes in the answer, as `Outcome`. A cause that the
|
|
50
|
+
* build of `app` does not know it reads by the code of the error, or as a call of AI that gave
|
|
51
|
+
* nothing. A verdict's reason is no cause: it is the module format's and the observation's.
|
|
52
|
+
*
|
|
53
|
+
* @generated from enum novatrail.api.v1.Cause
|
|
54
|
+
*/
|
|
55
|
+
export const Cause = /*@__PURE__*/
|
|
56
|
+
tsEnum(CauseSchema);
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Describes the enum novatrail.api.v1.LimitCause.
|
|
60
|
+
*/
|
|
61
|
+
export const LimitCauseSchema = /*@__PURE__*/
|
|
62
|
+
enumDesc(file_novatrail_api_v1_cause, 1);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Which limit of the learner's own key ran out at its provider.
|
|
66
|
+
*
|
|
67
|
+
* @generated from enum novatrail.api.v1.LimitCause
|
|
68
|
+
*/
|
|
69
|
+
export const LimitCause = /*@__PURE__*/
|
|
70
|
+
tsEnum(LimitCauseSchema);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Describes the enum novatrail.api.v1.CloseReason.
|
|
74
|
+
*/
|
|
75
|
+
export const CloseReasonSchema = /*@__PURE__*/
|
|
76
|
+
enumDesc(file_novatrail_api_v1_cause, 2);
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Why an attempt was closed (architecture 3.5 api). An attempt that is not closed waits, whatever
|
|
80
|
+
* its submissions came to.
|
|
81
|
+
*
|
|
82
|
+
* @generated from enum novatrail.api.v1.CloseReason
|
|
83
|
+
*/
|
|
84
|
+
export const CloseReason = /*@__PURE__*/
|
|
85
|
+
tsEnum(CloseReasonSchema);
|
|
86
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@altnovatrail/contracts",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "The code of NovaTrail's API contracts for TypeScript, which protoc-gen-es generates from their protobuf files: the messages and enums of each contract, with their descriptors, for @bufbuild/protobuf and Connect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,6 +9,18 @@
|
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
|
+
"./novatrail/api/v1/account_pb.js": {
|
|
13
|
+
"types": "./novatrail/api/v1/account_pb.d.ts",
|
|
14
|
+
"default": "./novatrail/api/v1/account_pb.js"
|
|
15
|
+
},
|
|
16
|
+
"./novatrail/api/v1/attempt_pb.js": {
|
|
17
|
+
"types": "./novatrail/api/v1/attempt_pb.d.ts",
|
|
18
|
+
"default": "./novatrail/api/v1/attempt_pb.js"
|
|
19
|
+
},
|
|
20
|
+
"./novatrail/api/v1/cause_pb.js": {
|
|
21
|
+
"types": "./novatrail/api/v1/cause_pb.d.ts",
|
|
22
|
+
"default": "./novatrail/api/v1/cause_pb.js"
|
|
23
|
+
},
|
|
12
24
|
"./novatrail/eval/v1/report_pb.js": {
|
|
13
25
|
"types": "./novatrail/eval/v1/report_pb.d.ts",
|
|
14
26
|
"default": "./novatrail/eval/v1/report_pb.js"
|