@altnovatrail/spec 0.14.0 → 0.15.1

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/README.md CHANGED
@@ -18,6 +18,8 @@ From 0.11.0 on, it holds the types of the deployment configuration too: the file
18
18
 
19
19
  From 0.13.0 on, it holds the types of the legal texts' passport too, `legal/legal.yaml`: each text of the platform — the privacy policy, the terms of use, the consents and the forms —, where it is shown, its versions with their status, the date each came into force and its gist in each language of the interface, and the sets of texts of the samples page ([the part's text](https://github.com/altnovatrail/spec/blob/main/legal/README.md)). The words of each version are a Markdown file of their own, `legal/texts/<id>/<n>.md`, which no type holds. They are generated from the part's schemas, `legal/schemas`, as the format's are.
20
20
 
21
+ From 0.15.0 on, `@altnovatrail/spec/legalv2` takes the place of `@altnovatrail/spec/legalv1`: the types of the part's version 2, whose version of a text may name its `translations` into languages of the interface other than English, each a Markdown file of its own, `texts/<id>/<n>.<tag>.md`, with no force of its own. A consumer of 0.14 that imports `legalv1` imports `legalv2` from 0.15 on.
22
+
21
23
  From 0.14.0 on, it holds the types of the table of the age of digital consent too, `consent-age/consent-age.yaml`: for each country, by its code of ISO 3166-1 alpha-2, the age from which a learner gives consent themselves, from the day it applies, with the law and the provision that set it, a quote of the provision, its source and the date it was read ([the part's text](https://github.com/altnovatrail/spec/blob/main/consent-age/README.md)). `Country` is the 249 codes ISO 3166-1 assigns officially, which a screen may take as the countries it offers. They are generated from the part's schemas, `consent-age/schemas`, as the format's are.
22
24
 
23
25
  From 0.14.0 on, it holds the types of the files of an export too: the file the owner of an account gets of a profile or of the whole account — its manifest, the account, a profile with every record of it and what a device holds of it ([the part's text](https://github.com/altnovatrail/spec/blob/main/export/README.md)). A field that holds the JSON of a message of protobuf, or a value of `<novatrail-canvas>`, is `unknown`. They are generated from the part's schemas, `export/schemas`, as the format's are.
@@ -44,7 +46,7 @@ function show(task: open.Task, manifest: open.Manifest) {
44
46
  - **`@altnovatrail/spec/formatv0/open`** holds the open view of each part, which is what the learner's app gets ([the format's text](https://github.com/altnovatrail/spec/blob/main/format/README.md#6-open-fields), section 6). Each type keeps its name from `formatv0` and only the fields marked `x-open`, so an open view has no check, no template and no solver.
45
47
  - **`@altnovatrail/spec/admissionv0`** holds the types of the admission table's major version 0: the table, with its providers, deployment facts, rules of capabilities and cells, and the test vectors of the admission function's answers.
46
48
  - **`@altnovatrail/spec/deploymentv1`** holds the types of the deployment configuration's version 1: the file, `Deployment`, and the test vectors of reading it, `ReadingVector`, whose file is any JSON value, `unknown`. A type gives the shape alone: a reader checks the file against its schema and then against the rules of reading, section 5 of the format's text.
47
- - **`@altnovatrail/spec/legalv1`** holds the types of version 1 of the legal texts: the passport, `Legal`, with each `Text` and its `TextVersion`, each `Set` and its `SetVersion`, and the test vectors of reading the part, `ReadingVector`, whose passport is any JSON value, `unknown`. A type gives the shape alone: a reader checks the passport against its schema and then the part against the rules of reading, section 5 of the part's text.
49
+ - **`@altnovatrail/spec/legalv2`** holds the types of version 2 of the legal texts: the passport, `Legal`, with each `Text` and its `TextVersion` with its `translations`, each `Set` and its `SetVersion`, and the test vectors of reading the part, `ReadingVector`, whose passport is any JSON value, `unknown`. A type gives the shape alone: a reader checks the passport against its schema and then the part against the rules of reading, section 5 of the part's text.
48
50
  - **`@altnovatrail/spec/consentagev1`** holds the types of version 1 of the table of the age of digital consent: the table, `ConsentAge`, with each country's `Entry`, the `Country` codes, and the test vectors of reading the table, `ReadingVector`, whose table is any JSON value, `unknown`, and of the category, `CategoryVector`. A type gives the shape alone: a reader checks the table against its schema and then against the rules of reading, section 5 of the part's text, and computes a learner's category as the part's text says.
49
51
  - **`@altnovatrail/spec/exportv1`** holds the types of version 1 of the format of the export: `Manifest`, `Account`, `Profile` with its `Attempt`, `Submission`, `Choice`, `EvidenceEntry` and `StateEntry`, `Device`, and the test vectors of reading an export, `ReadingVector`. A type gives the shape alone: a reader checks each file against its schema and then the export against the rules of reading, section 5 of the part's text.
50
52
  - **`@altnovatrail/spec/exportv1`** holds the types of version 1 of the format of the export: `Manifest`, `Account`, `Profile` with its `Attempt`, `Submission`, `Choice`, `EvidenceEntry` and `StateEntry`, `Device`, and the test vectors of reading an export, `ReadingVector`. A type gives the shape alone: a reader checks each file against its schema and then the export against the rules of reading, section 5 of the part's text.
@@ -1,15 +1,15 @@
1
1
  // Code generated by tools/types from legal/schemas; DO NOT EDIT.
2
2
 
3
3
  /**
4
- * The types of the legal texts, version 1 of the part, generated from the schemas in legal/schemas
4
+ * The types of the legal texts, version 2 of the part, generated from the schemas in legal/schemas
5
5
  * by tools/types (R72, R73 and R130 in spec's docs/decisions.md): the same types as the Go package
6
- * legalv1, by the same names — the passport legal/legal.yaml, with the texts, their versions and
6
+ * legalv2, by the same names — the passport legal/legal.yaml, with the texts, their versions and
7
7
  * the sets of texts of the samples page, and the vectors of reading. The words of a version are a
8
- * file of their own, texts/<id>/<n>.md, which no type holds. A vector's passport is any JSON value,
9
- * unknown, as a reader gets it. The schemas decide what is valid: a type gives the shape of a value
10
- * alone, and code that reads a value from elsewhere checks it against its schema first, and then
11
- * against the rules of reading (legal/README.md, section 5). A field the object always holds is
12
- * required; any other is optional.
8
+ * file of their own, texts/<id>/<n>.md, and those of its translations too, texts/<id>/<n>.<tag>.md,
9
+ * which no type holds. A vector's passport is any JSON value, unknown, as a reader gets it. The
10
+ * schemas decide what is valid: a type gives the shape of a value alone, and code that reads a
11
+ * value from elsewhere checks it against its schema first, and then against the rules of reading
12
+ * (legal/README.md, section 5). A field the object always holds is required; any other is optional.
13
13
  *
14
14
  * @packageDocumentation
15
15
  */
@@ -78,6 +78,13 @@ export interface TextVersion {
78
78
  * one build of app serves every copy.
79
79
  */
80
80
  readonly summary: Gist;
81
+ /**
82
+ * The languages of the interface other than English that the version has a translation in: a file
83
+ * of its own, texts/<id>/<n>.<tag>.md, with no force of its own, which a screen in that language
84
+ * shows beside the English text in force. A version in force keeps its translations as it keeps
85
+ * its file.
86
+ */
87
+ readonly translations?: readonly TextVersionTranslations[];
81
88
  /**
82
89
  * The number of the version.
83
90
  */
@@ -145,6 +152,14 @@ export interface Gist {
145
152
  */
146
153
  export type Summary = string;
147
154
 
155
+ /**
156
+ * TextVersionTranslations is the type of
157
+ * legal.schema.json#/$defs/text_version/properties/translations/items.
158
+ *
159
+ * The tag of a language of the interface other than English.
160
+ */
161
+ export type TextVersionTranslations = "ru";
162
+
148
163
  /**
149
164
  * SetID is the type of legal.schema.json#/$defs/set_id.
150
165
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altnovatrail/spec",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "The types of NovaTrail's module format for TypeScript, generated from its schemas: the parts of a module and their open views, the canonical view, the inventory, the module index and the test vectors. And the types of the element <novatrail-canvas>, the contract of the canvas and the app. And the types of the admission table, which says which AI provider may serve which age category. And the numbers and widths of the workbook's page and its test vectors, as JSON, by which a canvas lays the page out. And the types of the deployment configuration, the file /deployment.json that the app reads at its start. And the types of the legal texts' passport, which names each text, its versions and the sets of texts of the samples page. And the types of the table of the age of digital consent, which gives each country's age with the law that sets it. And the types of the files of an export, the file the owner of an account gets of a profile or of the account.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -26,8 +26,8 @@
26
26
  "./deploymentv1": {
27
27
  "types": "./deploymentv1/index.d.ts"
28
28
  },
29
- "./legalv1": {
30
- "types": "./legalv1/index.d.ts"
29
+ "./legalv2": {
30
+ "types": "./legalv2/index.d.ts"
31
31
  },
32
32
  "./consentagev1": {
33
33
  "types": "./consentagev1/index.d.ts"
@@ -43,7 +43,7 @@
43
43
  "admissionv0",
44
44
  "format",
45
45
  "deploymentv1",
46
- "legalv1",
46
+ "legalv2",
47
47
  "consentagev1",
48
48
  "exportv1"
49
49
  ],