@altnovatrail/spec 0.12.0 → 0.14.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,296 @@
1
+ // Code generated by tools/types from legal/schemas; DO NOT EDIT.
2
+
3
+ /**
4
+ * The types of the legal texts, version 1 of the part, generated from the schemas in legal/schemas
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
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.
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+
17
+ // The types of legal.schema.json.
18
+
19
+ /**
20
+ * Legal is the type of legal.schema.json.
21
+ *
22
+ * The passport of the legal texts, legal/legal.yaml (section 4 of the legal text): the texts, their
23
+ * versions with their status, date and summary, and the sets of texts of the samples page.
24
+ */
25
+ export interface Legal {
26
+ /**
27
+ * The version of the part, the integer in legal/VERSION.
28
+ */
29
+ readonly format: number;
30
+ /**
31
+ * The texts, by their IDs.
32
+ */
33
+ readonly texts: Readonly<Record<ID, Text>>;
34
+ /**
35
+ * The sets of texts of the samples page, by their IDs.
36
+ */
37
+ readonly sets: Readonly<Record<SetID, Set>>;
38
+ }
39
+
40
+ /**
41
+ * ID is the type of legal.schema.json#/$defs/id.
42
+ *
43
+ * The ID of a text or of a set: lower-case Latin letters and digits in words joined by hyphens,
44
+ * beginning with a letter.
45
+ */
46
+ export type ID = string;
47
+
48
+ /**
49
+ * Text is the type of legal.schema.json#/$defs/text.
50
+ */
51
+ export interface Text {
52
+ /**
53
+ * Where the text is shown: app, on its pages and consents; samples_page, the notice of a set of
54
+ * texts; form, a form a person signs outside every screen.
55
+ */
56
+ readonly place: TextPlace;
57
+ /**
58
+ * The versions of the text, from 1 on, in order.
59
+ */
60
+ readonly versions: readonly TextVersion[];
61
+ }
62
+
63
+ /**
64
+ * TextPlace is the type of legal.schema.json#/$defs/text/properties/place.
65
+ *
66
+ * Where the text is shown: app, on its pages and consents; samples_page, the notice of a set of
67
+ * texts; form, a form a person signs outside every screen.
68
+ */
69
+ export type TextPlace = "app" | "samples_page" | "form";
70
+
71
+ /**
72
+ * TextVersion is the type of legal.schema.json#/$defs/text_version.
73
+ */
74
+ export interface TextVersion {
75
+ /**
76
+ * The gist of the version in each language of the interface, by the language's tag: what a screen
77
+ * in that language shows beside the English text in force. A self-hosted copy writes both too:
78
+ * one build of app serves every copy.
79
+ */
80
+ readonly summary: Gist;
81
+ /**
82
+ * The number of the version.
83
+ */
84
+ readonly version: number;
85
+ /**
86
+ * draft, shown to nobody and free to change; or in_force, approved by the author and never
87
+ * changed again.
88
+ */
89
+ readonly status: StatusStatus;
90
+ /**
91
+ * The date the author approved the version, YYYY-MM-DD. Only a version in force has it, and it
92
+ * always has it.
93
+ */
94
+ readonly in_force_since?: string;
95
+ }
96
+
97
+ /**
98
+ * Status is the type of legal.schema.json#/$defs/status.
99
+ */
100
+ export interface Status {
101
+ /**
102
+ * The number of the version.
103
+ */
104
+ readonly version: number;
105
+ /**
106
+ * draft, shown to nobody and free to change; or in_force, approved by the author and never
107
+ * changed again.
108
+ */
109
+ readonly status: StatusStatus;
110
+ /**
111
+ * The date the author approved the version, YYYY-MM-DD. Only a version in force has it, and it
112
+ * always has it.
113
+ */
114
+ readonly in_force_since?: string;
115
+ }
116
+
117
+ /**
118
+ * StatusStatus is the type of legal.schema.json#/$defs/status/properties/status.
119
+ *
120
+ * draft, shown to nobody and free to change; or in_force, approved by the author and never changed
121
+ * again.
122
+ */
123
+ export type StatusStatus = "draft" | "in_force";
124
+
125
+ /**
126
+ * Gist is the type of legal.schema.json#/$defs/text_version/properties/summary.
127
+ *
128
+ * The gist of the version in each language of the interface, by the language's tag: what a screen
129
+ * in that language shows beside the English text in force. A self-hosted copy writes both too: one
130
+ * build of app serves every copy.
131
+ */
132
+ export interface Gist {
133
+ /**
134
+ * The gist in English.
135
+ */
136
+ readonly en: Summary;
137
+ /**
138
+ * The gist in Russian.
139
+ */
140
+ readonly ru: Summary;
141
+ }
142
+
143
+ /**
144
+ * Summary is the type of legal.schema.json#/$defs/summary.
145
+ */
146
+ export type Summary = string;
147
+
148
+ /**
149
+ * SetID is the type of legal.schema.json#/$defs/set_id.
150
+ *
151
+ * The ID of a set: as the ID of a text, of at most 24 characters, so that the set's ID and version
152
+ * joined by a hyphen fit the 32 characters of a sample's text_set_version.
153
+ */
154
+ export type SetID = string;
155
+
156
+ /**
157
+ * Set is the type of legal.schema.json#/$defs/set.
158
+ */
159
+ export interface Set {
160
+ /**
161
+ * The versions of the set, from 1 on, in order.
162
+ */
163
+ readonly versions: readonly SetVersion[];
164
+ }
165
+
166
+ /**
167
+ * SetVersion is the type of legal.schema.json#/$defs/set_version.
168
+ */
169
+ export interface SetVersion {
170
+ /**
171
+ * The notice the samples page shows before writing.
172
+ */
173
+ readonly notice: TextRef;
174
+ /**
175
+ * The form a person signs outside the page, before the first sample.
176
+ */
177
+ readonly form: TextRef;
178
+ /**
179
+ * The number of the version.
180
+ */
181
+ readonly version: number;
182
+ /**
183
+ * draft, shown to nobody and free to change; or in_force, approved by the author and never
184
+ * changed again.
185
+ */
186
+ readonly status: StatusStatus;
187
+ /**
188
+ * The date the author approved the version, YYYY-MM-DD. Only a version in force has it, and it
189
+ * always has it.
190
+ */
191
+ readonly in_force_since?: string;
192
+ }
193
+
194
+ /**
195
+ * TextRef is the type of legal.schema.json#/$defs/text_ref.
196
+ */
197
+ export interface TextRef {
198
+ /**
199
+ * The ID of the text.
200
+ */
201
+ readonly text: ID;
202
+ /**
203
+ * The version of the text.
204
+ */
205
+ readonly version: number;
206
+ }
207
+
208
+ // The types of reading-vector.schema.json.
209
+
210
+ /**
211
+ * ReadingVector is the type of reading-vector.schema.json.
212
+ *
213
+ * A test vector of reading (section 7 of the legal text): parts, each perhaps with the part of the
214
+ * release before, and what section 5 gives. A reader implements section 5 and gets exactly this.
215
+ */
216
+ export interface ReadingVector {
217
+ /**
218
+ * The parts.
219
+ */
220
+ readonly cases: readonly Case[];
221
+ }
222
+
223
+ /**
224
+ * Case is the type of reading-vector.schema.json#/$defs/case.
225
+ */
226
+ export interface Case {
227
+ /**
228
+ * The part of the release before, which legal.in-force-unchanged reads. Left out when that
229
+ * release has no legal/.
230
+ */
231
+ readonly previous?: Part;
232
+ /**
233
+ * What the reader gives a part it accepts. Left out when it refuses the part.
234
+ */
235
+ readonly current?: Current;
236
+ /**
237
+ * The step that refuses the part: the schema, or the ID of the rule. Left out when the reader
238
+ * accepts it.
239
+ */
240
+ readonly refused_by?: CaseRefusedBy;
241
+ /**
242
+ * Every name that step gives, in the order of code units.
243
+ */
244
+ readonly names?: readonly string[];
245
+ /**
246
+ * The passport as YAML reads it: any value, not only one the schema accepts.
247
+ */
248
+ readonly passport: unknown;
249
+ /**
250
+ * The files under texts/, by their paths from the part.
251
+ */
252
+ readonly files: Readonly<Record<string, string>>;
253
+ }
254
+
255
+ /**
256
+ * Part is the type of reading-vector.schema.json#/$defs/part.
257
+ */
258
+ export interface Part {
259
+ /**
260
+ * The passport as YAML reads it: any value, not only one the schema accepts.
261
+ */
262
+ readonly passport: unknown;
263
+ /**
264
+ * The files under texts/, by their paths from the part.
265
+ */
266
+ readonly files: Readonly<Record<string, string>>;
267
+ }
268
+
269
+ /**
270
+ * Current is the type of reading-vector.schema.json#/$defs/case/properties/current.
271
+ *
272
+ * What the reader gives a part it accepts. Left out when it refuses the part.
273
+ */
274
+ export interface Current {
275
+ /**
276
+ * The current version of every text that has one.
277
+ */
278
+ readonly texts: Versions;
279
+ /**
280
+ * The current version of every set that has one.
281
+ */
282
+ readonly sets: Versions;
283
+ }
284
+
285
+ /**
286
+ * Versions is the type of reading-vector.schema.json#/$defs/versions.
287
+ */
288
+ export type Versions = Readonly<Record<string, number>>;
289
+
290
+ /**
291
+ * CaseRefusedBy is the type of reading-vector.schema.json#/$defs/case/properties/refused_by.
292
+ *
293
+ * The step that refuses the part: the schema, or the ID of the rule. Left out when the reader
294
+ * accepts it.
295
+ */
296
+ export type CaseRefusedBy = "schema" | "legal.files" | "legal.versions" | "legal.set-texts" | "legal.markdown" | "legal.in-force-unchanged";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@altnovatrail/spec",
3
- "version": "0.12.0",
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.",
3
+ "version": "0.14.0",
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": {
7
7
  "type": "git",
@@ -26,6 +26,15 @@
26
26
  "./deploymentv1": {
27
27
  "types": "./deploymentv1/index.d.ts"
28
28
  },
29
+ "./legalv1": {
30
+ "types": "./legalv1/index.d.ts"
31
+ },
32
+ "./consentagev1": {
33
+ "types": "./consentagev1/index.d.ts"
34
+ },
35
+ "./exportv1": {
36
+ "types": "./exportv1/index.d.ts"
37
+ },
29
38
  "./package.json": "./package.json"
30
39
  },
31
40
  "files": [
@@ -33,7 +42,10 @@
33
42
  "canvas",
34
43
  "admissionv0",
35
44
  "format",
36
- "deploymentv1"
45
+ "deploymentv1",
46
+ "legalv1",
47
+ "consentagev1",
48
+ "exportv1"
37
49
  ],
38
50
  "sideEffects": false
39
51
  }