@nakafa/aksara-contracts 4.1.3 → 6.0.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.
Files changed (59) hide show
  1. package/dist/artifact/integrity.d.ts +2 -2
  2. package/dist/artifact/limits.d.ts +1 -1
  3. package/dist/artifact/source.d.ts +1 -1
  4. package/dist/artifact/spec.d.ts +1 -1
  5. package/dist/artifact/verify.d.ts +1 -1
  6. package/dist/assessment/catalog.d.ts +66 -18
  7. package/dist/assessment/catalog.js +28 -8
  8. package/dist/assessment/snapshot.d.ts +100 -24
  9. package/dist/content.d.ts +7 -7
  10. package/dist/graph/family.d.ts +2 -2
  11. package/dist/graph/identity.d.ts +1 -1
  12. package/dist/locale.d.ts +21 -10
  13. package/dist/locale.js +24 -9
  14. package/dist/preview/artifact.d.ts +6 -6
  15. package/dist/preview/document.d.ts +13 -13
  16. package/dist/preview/spec.d.ts +49 -49
  17. package/dist/preview/target.d.ts +2 -2
  18. package/dist/program/curriculum.d.ts +2 -2
  19. package/dist/program/snapshot/hash.d.ts +6 -6
  20. package/dist/program/snapshot/row.d.ts +4 -4
  21. package/dist/program/spec.d.ts +2 -2
  22. package/dist/projection/article.d.ts +6 -6
  23. package/dist/projection/digest.d.ts +6 -6
  24. package/dist/projection/hash.d.ts +6 -6
  25. package/dist/projection/material.d.ts +6 -6
  26. package/dist/projection/page.d.ts +6 -6
  27. package/dist/projection/spec.d.ts +7 -7
  28. package/dist/projection/verify.d.ts +6 -6
  29. package/dist/quran/attribution.d.ts +4 -4
  30. package/dist/quran/identity.d.ts +7 -7
  31. package/dist/quran/identity.js +3 -3
  32. package/dist/quran/provenance.d.ts +12 -12
  33. package/dist/quran/snapshot/row/hash.d.ts +39 -39
  34. package/dist/quran/snapshot/row.d.ts +12 -12
  35. package/dist/quran/source.d.ts +7 -7
  36. package/dist/quran/spec.d.ts +1 -1
  37. package/dist/quran/spec.js +3 -3
  38. package/dist/release/canonical.d.ts +2 -2
  39. package/dist/release/digest.d.ts +2 -2
  40. package/dist/release/head.d.ts +9 -9
  41. package/dist/release/items.d.ts +2 -2
  42. package/dist/release/result/digest.d.ts +5 -5
  43. package/dist/release/rollback/digest.d.ts +4 -4
  44. package/dist/release/rollback/spec.d.ts +66 -66
  45. package/dist/release/route/digest.d.ts +2 -2
  46. package/dist/release/route/page.d.ts +4 -4
  47. package/dist/release/route/spec.d.ts +6 -6
  48. package/dist/release/route/verify.d.ts +2 -2
  49. package/dist/release/snapshot/data.d.ts +31 -12
  50. package/dist/release/snapshot/verify.d.ts +41 -22
  51. package/dist/release/spec.d.ts +6 -6
  52. package/dist/runtime/spec.d.ts +23 -23
  53. package/dist/runtime/verify.d.ts +14 -14
  54. package/dist/transport/batch.d.ts +22 -22
  55. package/dist/transport/group.d.ts +126 -69
  56. package/dist/transport/request.d.ts +396 -244
  57. package/dist/transport/response.d.ts +92 -92
  58. package/dist/transport/snapshot.d.ts +62 -24
  59. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { Effect } from "effect";
2
2
  import { ArtifactHashMismatchError, ArtifactTreeComponentUnlistedError, ArtifactVerificationDecodeError } from "#contracts/artifact/spec";
3
3
  /** Computes the immutable identity of one canonical compiled payload. */
4
4
  export declare const hashCompiledContentPayload: (payload: {
5
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
5
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
6
6
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
7
7
  readonly compilerVersion: "0.2.0";
8
8
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -27,7 +27,7 @@ export declare const verifySignedContentArtifactIntegrity: (input: unknown) => E
27
27
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
28
28
  readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
29
29
  readonly payload: {
30
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
30
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
31
31
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
32
32
  readonly compilerVersion: "0.2.0";
33
33
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -5,7 +5,7 @@ export declare const validateArtifactByteIntegrity: (artifact: {
5
5
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
6
6
  readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
7
7
  readonly payload: {
8
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
8
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
9
9
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
10
10
  readonly compilerVersion: "0.2.0";
11
11
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -2,7 +2,7 @@ import { Effect } from "effect";
2
2
  import { ArtifactSourceHashMismatchError } from "#contracts/artifact/spec";
3
3
  /** Verifies that sourceHash identifies the complete authenticated raw MDX. */
4
4
  export declare const verifyCompiledContentSourceHash: (payload: {
5
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
5
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
6
6
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
7
7
  readonly compilerVersion: "0.2.0";
8
8
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -5,7 +5,7 @@ export declare const ArtifactVerificationRequestSchema: Schema.Struct<{
5
5
  readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
6
6
  readonly keyId: Schema.brand<Schema.String, "@NakafaAI/AksaraSigningKeyId">;
7
7
  readonly payload: Schema.Struct<{
8
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
8
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
9
9
  readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
10
10
  readonly compilerVersion: Schema.Literal<"0.2.0">;
11
11
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -5,7 +5,7 @@ export declare const verifySignedContentArtifact: (input: unknown) => Effect.Eff
5
5
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
6
6
  readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
7
7
  readonly payload: {
8
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
8
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
9
9
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
10
10
  readonly compilerVersion: "0.2.0";
11
11
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -2,10 +2,11 @@ import { Schema } from "effect";
2
2
  /** Bounded authored revision shared by one catalog source hierarchy. */
3
3
  export declare const CatalogRevisionSchema: Schema.Trimmed;
4
4
  /**
5
- * Navigation role of one track: one exam `year`, one `subject`, or the sets of
6
- * one `institution`, such as a Studienkolleg.
5
+ * The one axis by which an exam divides its tracks into groups: the `year` of
6
+ * a sitting (SNBT), the school `grade` a test is set for (TKA), or the
7
+ * `institution` that sets it, such as a Studienkolleg.
7
8
  */
8
- export declare const TrackKindSchema: Schema.Literals<readonly ["institution", "subject", "year"]>;
9
+ export declare const GroupAxisSchema: Schema.Literals<readonly ["grade", "institution", "year"]>;
9
10
  /**
10
11
  * Public route behavior of one section: `visible` sections have a page of
11
12
  * their own, and an `internal-entry` section is entered from its set.
@@ -13,7 +14,7 @@ export declare const TrackKindSchema: Schema.Literals<readonly ["institution", "
13
14
  export declare const SectionVisibilitySchema: Schema.Literals<readonly ["internal-entry", "visible"]>;
14
15
  /** One localized country of the catalog. */
15
16
  export declare const CatalogCountrySchema: Schema.Struct<{
16
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
17
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
17
18
  readonly description: Schema.optionalKey<Schema.String>;
18
19
  readonly graph: Schema.Struct<{
19
20
  readonly alignmentId: Schema.String;
@@ -30,9 +31,9 @@ export declare const CatalogCountrySchema: Schema.Struct<{
30
31
  readonly order: Schema.Int;
31
32
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
32
33
  }>;
33
- /** One localized exam of a country. */
34
+ /** One localized exam of a country, and the axis that divides its tracks into groups. */
34
35
  export declare const CatalogExamSchema: Schema.Struct<{
35
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
36
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
36
37
  readonly description: Schema.optionalKey<Schema.String>;
37
38
  readonly graph: Schema.Struct<{
38
39
  readonly alignmentId: Schema.String;
@@ -45,13 +46,39 @@ export declare const CatalogExamSchema: Schema.Struct<{
45
46
  readonly title: Schema.String;
46
47
  readonly countryKey: Schema.String;
47
48
  readonly examKey: Schema.String;
49
+ readonly groupAxis: Schema.Literals<readonly ["grade", "institution", "year"]>;
48
50
  readonly kind: Schema.Literal<"exam">;
49
51
  readonly order: Schema.Int;
50
52
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
51
53
  }>;
52
- /** One localized track of an exam: a year, a subject, or an institution. */
54
+ /** One localized group of an exam on its axis: a year, a grade, or an institution. */
55
+ export declare const CatalogGroupSchema: Schema.Struct<{
56
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
57
+ readonly description: Schema.optionalKey<Schema.String>;
58
+ readonly graph: Schema.Struct<{
59
+ readonly alignmentId: Schema.String;
60
+ readonly assetId: Schema.String;
61
+ readonly conceptId: Schema.String;
62
+ readonly learningObjectId: Schema.String;
63
+ readonly lensId: Schema.String;
64
+ }>;
65
+ readonly sourceRevision: Schema.Trimmed;
66
+ readonly title: Schema.String;
67
+ readonly countryKey: Schema.String;
68
+ readonly examKey: Schema.String;
69
+ readonly groupKey: Schema.String;
70
+ readonly kind: Schema.Literal<"group">;
71
+ readonly order: Schema.Int;
72
+ readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
73
+ }>;
74
+ /**
75
+ * One localized track of an exam, in the group that holds it: one paper
76
+ * format with its sets, such as a subject or a year's test. A track key is
77
+ * unique within its exam, so the rows of a track and of its sets name the
78
+ * track without its group.
79
+ */
53
80
  export declare const CatalogTrackSchema: Schema.Struct<{
54
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
81
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
55
82
  readonly description: Schema.optionalKey<Schema.String>;
56
83
  readonly graph: Schema.Struct<{
57
84
  readonly alignmentId: Schema.String;
@@ -65,10 +92,10 @@ export declare const CatalogTrackSchema: Schema.Struct<{
65
92
  readonly countryKey: Schema.String;
66
93
  readonly examKey: Schema.String;
67
94
  readonly trackKey: Schema.String;
95
+ readonly groupKey: Schema.String;
68
96
  readonly kind: Schema.Literal<"track">;
69
97
  readonly order: Schema.Int;
70
98
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
71
- readonly trackKind: Schema.Literals<readonly ["institution", "subject", "year"]>;
72
99
  }>;
73
100
  /**
74
101
  * One localized set of a track, and the paper a learner sits for it, by
@@ -76,7 +103,7 @@ export declare const CatalogTrackSchema: Schema.Struct<{
76
103
  * that section.
77
104
  */
78
105
  export declare const CatalogSetSchema: Schema.Struct<{
79
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
106
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
80
107
  readonly description: Schema.optionalKey<Schema.String>;
81
108
  readonly graph: Schema.Struct<{
82
109
  readonly alignmentId: Schema.String;
@@ -106,7 +133,7 @@ export declare const CatalogSetSchema: Schema.Struct<{
106
133
  * its items, and its scoring, and the paper owns its places.
107
134
  */
108
135
  export declare const CatalogSectionSchema: Schema.Struct<{
109
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
136
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
110
137
  readonly description: Schema.optionalKey<Schema.String>;
111
138
  readonly graph: Schema.Struct<{
112
139
  readonly alignmentId: Schema.String;
@@ -129,7 +156,7 @@ export declare const CatalogSectionSchema: Schema.Struct<{
129
156
  }>;
130
157
  /** One row of the catalog, the navigation of the public try-outs. */
131
158
  export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
132
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
159
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
133
160
  readonly description: Schema.optionalKey<Schema.String>;
134
161
  readonly graph: Schema.Struct<{
135
162
  readonly alignmentId: Schema.String;
@@ -146,7 +173,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
146
173
  readonly order: Schema.Int;
147
174
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
148
175
  }>, Schema.Struct<{
149
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
176
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
150
177
  readonly description: Schema.optionalKey<Schema.String>;
151
178
  readonly graph: Schema.Struct<{
152
179
  readonly alignmentId: Schema.String;
@@ -159,11 +186,30 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
159
186
  readonly title: Schema.String;
160
187
  readonly countryKey: Schema.String;
161
188
  readonly examKey: Schema.String;
189
+ readonly groupAxis: Schema.Literals<readonly ["grade", "institution", "year"]>;
162
190
  readonly kind: Schema.Literal<"exam">;
163
191
  readonly order: Schema.Int;
164
192
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
165
193
  }>, Schema.Struct<{
166
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
194
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
195
+ readonly description: Schema.optionalKey<Schema.String>;
196
+ readonly graph: Schema.Struct<{
197
+ readonly alignmentId: Schema.String;
198
+ readonly assetId: Schema.String;
199
+ readonly conceptId: Schema.String;
200
+ readonly learningObjectId: Schema.String;
201
+ readonly lensId: Schema.String;
202
+ }>;
203
+ readonly sourceRevision: Schema.Trimmed;
204
+ readonly title: Schema.String;
205
+ readonly countryKey: Schema.String;
206
+ readonly examKey: Schema.String;
207
+ readonly groupKey: Schema.String;
208
+ readonly kind: Schema.Literal<"group">;
209
+ readonly order: Schema.Int;
210
+ readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
211
+ }>, Schema.Struct<{
212
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
167
213
  readonly description: Schema.optionalKey<Schema.String>;
168
214
  readonly graph: Schema.Struct<{
169
215
  readonly alignmentId: Schema.String;
@@ -177,12 +223,12 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
177
223
  readonly countryKey: Schema.String;
178
224
  readonly examKey: Schema.String;
179
225
  readonly trackKey: Schema.String;
226
+ readonly groupKey: Schema.String;
180
227
  readonly kind: Schema.Literal<"track">;
181
228
  readonly order: Schema.Int;
182
229
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
183
- readonly trackKind: Schema.Literals<readonly ["institution", "subject", "year"]>;
184
230
  }>, Schema.Struct<{
185
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
231
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
186
232
  readonly description: Schema.optionalKey<Schema.String>;
187
233
  readonly graph: Schema.Struct<{
188
234
  readonly alignmentId: Schema.String;
@@ -206,7 +252,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
206
252
  }>;
207
253
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
208
254
  }>, Schema.Struct<{
209
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
255
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
210
256
  readonly description: Schema.optionalKey<Schema.String>;
211
257
  readonly graph: Schema.Struct<{
212
258
  readonly alignmentId: Schema.String;
@@ -230,6 +276,8 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
230
276
  export type CatalogRow = typeof CatalogRowSchema.Type;
231
277
  /**
232
278
  * The identity of one catalog row, unique within a snapshot: its locale, its
233
- * kind, and the keys of its node and of every node above it.
279
+ * kind, and the keys of its node and of every node above it. A group names
280
+ * its own key; a track is unique within its exam, so a track and the rows
281
+ * under it leave their group out.
234
282
  */
235
283
  export declare function catalogRowIdentity(row: CatalogRow): string;
@@ -8,12 +8,13 @@ const PositiveCountSchema = Schema.Int.check(Schema.isGreaterThan(0));
8
8
  /** Bounded authored revision shared by one catalog source hierarchy. */
9
9
  export const CatalogRevisionSchema = Schema.Trimmed.check(Schema.isNonEmpty(), Schema.isMaxLength(128));
10
10
  /**
11
- * Navigation role of one track: one exam `year`, one `subject`, or the sets of
12
- * one `institution`, such as a Studienkolleg.
11
+ * The one axis by which an exam divides its tracks into groups: the `year` of
12
+ * a sitting (SNBT), the school `grade` a test is set for (TKA), or the
13
+ * `institution` that sets it, such as a Studienkolleg.
13
14
  */
14
- export const TrackKindSchema = Schema.Literals([
15
+ export const GroupAxisSchema = Schema.Literals([
16
+ "grade",
15
17
  "institution",
16
- "subject",
17
18
  "year",
18
19
  ]);
19
20
  /**
@@ -34,6 +35,7 @@ const LocalizedFields = {
34
35
  };
35
36
  const CountryFields = { countryKey: KebabKeySchema };
36
37
  const ExamFields = { ...CountryFields, examKey: KebabKeySchema };
38
+ const GroupFields = { ...ExamFields, groupKey: KebabKeySchema };
37
39
  const TrackFields = { ...ExamFields, trackKey: KebabKeySchema };
38
40
  const SetFields = { ...TrackFields, setKey: KebabKeySchema };
39
41
  /** One localized country of the catalog. */
@@ -45,22 +47,36 @@ export const CatalogCountrySchema = Schema.Struct({
45
47
  order: PositiveCountSchema,
46
48
  publicPath: PublicPathSchema,
47
49
  });
48
- /** One localized exam of a country. */
50
+ /** One localized exam of a country, and the axis that divides its tracks into groups. */
49
51
  export const CatalogExamSchema = Schema.Struct({
50
52
  ...LocalizedFields,
51
53
  ...ExamFields,
54
+ groupAxis: GroupAxisSchema,
52
55
  kind: Schema.Literal("exam"),
53
56
  order: PositiveCountSchema,
54
57
  publicPath: PublicPathSchema,
55
58
  });
56
- /** One localized track of an exam: a year, a subject, or an institution. */
59
+ /** One localized group of an exam on its axis: a year, a grade, or an institution. */
60
+ export const CatalogGroupSchema = Schema.Struct({
61
+ ...LocalizedFields,
62
+ ...GroupFields,
63
+ kind: Schema.Literal("group"),
64
+ order: PositiveCountSchema,
65
+ publicPath: PublicPathSchema,
66
+ });
67
+ /**
68
+ * One localized track of an exam, in the group that holds it: one paper
69
+ * format with its sets, such as a subject or a year's test. A track key is
70
+ * unique within its exam, so the rows of a track and of its sets name the
71
+ * track without its group.
72
+ */
57
73
  export const CatalogTrackSchema = Schema.Struct({
58
74
  ...LocalizedFields,
59
75
  ...TrackFields,
76
+ groupKey: KebabKeySchema,
60
77
  kind: Schema.Literal("track"),
61
78
  order: PositiveCountSchema,
62
79
  publicPath: PublicPathSchema,
63
- trackKind: TrackKindSchema,
64
80
  });
65
81
  /**
66
82
  * One localized set of a track, and the paper a learner sits for it, by
@@ -94,13 +110,16 @@ export const CatalogSectionSchema = Schema.Struct({
94
110
  export const CatalogRowSchema = Schema.Union([
95
111
  CatalogCountrySchema,
96
112
  CatalogExamSchema,
113
+ CatalogGroupSchema,
97
114
  CatalogTrackSchema,
98
115
  CatalogSetSchema,
99
116
  CatalogSectionSchema,
100
117
  ]);
101
118
  /**
102
119
  * The identity of one catalog row, unique within a snapshot: its locale, its
103
- * kind, and the keys of its node and of every node above it.
120
+ * kind, and the keys of its node and of every node above it. A group names
121
+ * its own key; a track is unique within its exam, so a track and the rows
122
+ * under it leave their group out.
104
123
  */
105
124
  export function catalogRowIdentity(row) {
106
125
  return Arr.join([
@@ -108,6 +127,7 @@ export function catalogRowIdentity(row) {
108
127
  row.kind,
109
128
  row.countryKey,
110
129
  "examKey" in row ? row.examKey : "",
130
+ row.kind === "group" ? row.groupKey : "",
111
131
  "trackKey" in row ? row.trackKey : "",
112
132
  "setKey" in row ? row.setKey : "",
113
133
  "sectionKey" in row ? row.sectionKey : "",
@@ -9,7 +9,7 @@ export declare const ASSESSMENT_SNAPSHOT_FORMAT = "assessment-snapshot";
9
9
  export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
10
10
  readonly kind: Schema.Literal<"catalog">;
11
11
  readonly row: Schema.Union<readonly [Schema.Struct<{
12
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
12
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
13
13
  readonly description: Schema.optionalKey<Schema.String>;
14
14
  readonly graph: Schema.Struct<{
15
15
  readonly alignmentId: Schema.String;
@@ -26,7 +26,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
26
26
  readonly order: Schema.Int;
27
27
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
28
28
  }>, Schema.Struct<{
29
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
29
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
30
30
  readonly description: Schema.optionalKey<Schema.String>;
31
31
  readonly graph: Schema.Struct<{
32
32
  readonly alignmentId: Schema.String;
@@ -39,11 +39,30 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
39
39
  readonly title: Schema.String;
40
40
  readonly countryKey: Schema.String;
41
41
  readonly examKey: Schema.String;
42
+ readonly groupAxis: Schema.Literals<readonly ["grade", "institution", "year"]>;
42
43
  readonly kind: Schema.Literal<"exam">;
43
44
  readonly order: Schema.Int;
44
45
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
45
46
  }>, Schema.Struct<{
46
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
47
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
48
+ readonly description: Schema.optionalKey<Schema.String>;
49
+ readonly graph: Schema.Struct<{
50
+ readonly alignmentId: Schema.String;
51
+ readonly assetId: Schema.String;
52
+ readonly conceptId: Schema.String;
53
+ readonly learningObjectId: Schema.String;
54
+ readonly lensId: Schema.String;
55
+ }>;
56
+ readonly sourceRevision: Schema.Trimmed;
57
+ readonly title: Schema.String;
58
+ readonly countryKey: Schema.String;
59
+ readonly examKey: Schema.String;
60
+ readonly groupKey: Schema.String;
61
+ readonly kind: Schema.Literal<"group">;
62
+ readonly order: Schema.Int;
63
+ readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
64
+ }>, Schema.Struct<{
65
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
47
66
  readonly description: Schema.optionalKey<Schema.String>;
48
67
  readonly graph: Schema.Struct<{
49
68
  readonly alignmentId: Schema.String;
@@ -57,12 +76,12 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
57
76
  readonly countryKey: Schema.String;
58
77
  readonly examKey: Schema.String;
59
78
  readonly trackKey: Schema.String;
79
+ readonly groupKey: Schema.String;
60
80
  readonly kind: Schema.Literal<"track">;
61
81
  readonly order: Schema.Int;
62
82
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
63
- readonly trackKind: Schema.Literals<readonly ["institution", "subject", "year"]>;
64
83
  }>, Schema.Struct<{
65
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
84
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
66
85
  readonly description: Schema.optionalKey<Schema.String>;
67
86
  readonly graph: Schema.Struct<{
68
87
  readonly alignmentId: Schema.String;
@@ -86,7 +105,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
86
105
  }>;
87
106
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
88
107
  }>, Schema.Struct<{
89
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
108
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
90
109
  readonly description: Schema.optionalKey<Schema.String>;
91
110
  readonly graph: Schema.Struct<{
92
111
  readonly alignmentId: Schema.String;
@@ -591,7 +610,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
591
610
  readonly row: Schema.Union<readonly [Schema.Struct<{
592
611
  readonly kind: Schema.Literal<"catalog">;
593
612
  readonly row: Schema.Union<readonly [Schema.Struct<{
594
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
613
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
595
614
  readonly description: Schema.optionalKey<Schema.String>;
596
615
  readonly graph: Schema.Struct<{
597
616
  readonly alignmentId: Schema.String;
@@ -608,7 +627,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
608
627
  readonly order: Schema.Int;
609
628
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
610
629
  }>, Schema.Struct<{
611
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
630
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
612
631
  readonly description: Schema.optionalKey<Schema.String>;
613
632
  readonly graph: Schema.Struct<{
614
633
  readonly alignmentId: Schema.String;
@@ -621,11 +640,30 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
621
640
  readonly title: Schema.String;
622
641
  readonly countryKey: Schema.String;
623
642
  readonly examKey: Schema.String;
643
+ readonly groupAxis: Schema.Literals<readonly ["grade", "institution", "year"]>;
624
644
  readonly kind: Schema.Literal<"exam">;
625
645
  readonly order: Schema.Int;
626
646
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
627
647
  }>, Schema.Struct<{
628
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
648
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
649
+ readonly description: Schema.optionalKey<Schema.String>;
650
+ readonly graph: Schema.Struct<{
651
+ readonly alignmentId: Schema.String;
652
+ readonly assetId: Schema.String;
653
+ readonly conceptId: Schema.String;
654
+ readonly learningObjectId: Schema.String;
655
+ readonly lensId: Schema.String;
656
+ }>;
657
+ readonly sourceRevision: Schema.Trimmed;
658
+ readonly title: Schema.String;
659
+ readonly countryKey: Schema.String;
660
+ readonly examKey: Schema.String;
661
+ readonly groupKey: Schema.String;
662
+ readonly kind: Schema.Literal<"group">;
663
+ readonly order: Schema.Int;
664
+ readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
665
+ }>, Schema.Struct<{
666
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
629
667
  readonly description: Schema.optionalKey<Schema.String>;
630
668
  readonly graph: Schema.Struct<{
631
669
  readonly alignmentId: Schema.String;
@@ -639,12 +677,12 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
639
677
  readonly countryKey: Schema.String;
640
678
  readonly examKey: Schema.String;
641
679
  readonly trackKey: Schema.String;
680
+ readonly groupKey: Schema.String;
642
681
  readonly kind: Schema.Literal<"track">;
643
682
  readonly order: Schema.Int;
644
683
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
645
- readonly trackKind: Schema.Literals<readonly ["institution", "subject", "year"]>;
646
684
  }>, Schema.Struct<{
647
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
685
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
648
686
  readonly description: Schema.optionalKey<Schema.String>;
649
687
  readonly graph: Schema.Struct<{
650
688
  readonly alignmentId: Schema.String;
@@ -668,7 +706,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
668
706
  }>;
669
707
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
670
708
  }>, Schema.Struct<{
671
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
709
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
672
710
  readonly description: Schema.optionalKey<Schema.String>;
673
711
  readonly graph: Schema.Struct<{
674
712
  readonly alignmentId: Schema.String;
@@ -1227,7 +1265,7 @@ export declare const AssessmentRowOrder: Order.Order<AssessmentRow>;
1227
1265
  export declare const hashAssessmentRow: (row: {
1228
1266
  readonly kind: "catalog";
1229
1267
  readonly row: {
1230
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1268
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1231
1269
  readonly description?: string;
1232
1270
  readonly graph: {
1233
1271
  readonly alignmentId: string;
@@ -1244,7 +1282,7 @@ export declare const hashAssessmentRow: (row: {
1244
1282
  readonly order: number;
1245
1283
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1246
1284
  } | {
1247
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1285
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1248
1286
  readonly description?: string;
1249
1287
  readonly graph: {
1250
1288
  readonly alignmentId: string;
@@ -1257,11 +1295,30 @@ export declare const hashAssessmentRow: (row: {
1257
1295
  readonly title: string;
1258
1296
  readonly countryKey: string;
1259
1297
  readonly examKey: string;
1298
+ readonly groupAxis: "grade" | "institution" | "year";
1260
1299
  readonly kind: "exam";
1261
1300
  readonly order: number;
1262
1301
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1263
1302
  } | {
1264
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1303
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1304
+ readonly description?: string;
1305
+ readonly graph: {
1306
+ readonly alignmentId: string;
1307
+ readonly assetId: string;
1308
+ readonly conceptId: string;
1309
+ readonly learningObjectId: string;
1310
+ readonly lensId: string;
1311
+ };
1312
+ readonly sourceRevision: string;
1313
+ readonly title: string;
1314
+ readonly countryKey: string;
1315
+ readonly examKey: string;
1316
+ readonly groupKey: string;
1317
+ readonly kind: "group";
1318
+ readonly order: number;
1319
+ readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1320
+ } | {
1321
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1265
1322
  readonly description?: string;
1266
1323
  readonly graph: {
1267
1324
  readonly alignmentId: string;
@@ -1275,12 +1332,12 @@ export declare const hashAssessmentRow: (row: {
1275
1332
  readonly countryKey: string;
1276
1333
  readonly examKey: string;
1277
1334
  readonly trackKey: string;
1335
+ readonly groupKey: string;
1278
1336
  readonly kind: "track";
1279
1337
  readonly order: number;
1280
1338
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1281
- readonly trackKind: "institution" | "subject" | "year";
1282
1339
  } | {
1283
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1340
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1284
1341
  readonly description?: string;
1285
1342
  readonly graph: {
1286
1343
  readonly alignmentId: string;
@@ -1304,7 +1361,7 @@ export declare const hashAssessmentRow: (row: {
1304
1361
  };
1305
1362
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1306
1363
  } | {
1307
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1364
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1308
1365
  readonly description?: string;
1309
1366
  readonly graph: {
1310
1367
  readonly alignmentId: string;
@@ -2488,7 +2545,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2488
2545
  readonly row: {
2489
2546
  readonly kind: "catalog";
2490
2547
  readonly row: {
2491
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2548
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2492
2549
  readonly description?: string;
2493
2550
  readonly graph: {
2494
2551
  readonly alignmentId: string;
@@ -2505,7 +2562,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2505
2562
  readonly order: number;
2506
2563
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2507
2564
  } | {
2508
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2565
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2509
2566
  readonly description?: string;
2510
2567
  readonly graph: {
2511
2568
  readonly alignmentId: string;
@@ -2518,11 +2575,30 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2518
2575
  readonly title: string;
2519
2576
  readonly countryKey: string;
2520
2577
  readonly examKey: string;
2578
+ readonly groupAxis: "grade" | "institution" | "year";
2521
2579
  readonly kind: "exam";
2522
2580
  readonly order: number;
2523
2581
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2524
2582
  } | {
2525
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2583
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2584
+ readonly description?: string;
2585
+ readonly graph: {
2586
+ readonly alignmentId: string;
2587
+ readonly assetId: string;
2588
+ readonly conceptId: string;
2589
+ readonly learningObjectId: string;
2590
+ readonly lensId: string;
2591
+ };
2592
+ readonly sourceRevision: string;
2593
+ readonly title: string;
2594
+ readonly countryKey: string;
2595
+ readonly examKey: string;
2596
+ readonly groupKey: string;
2597
+ readonly kind: "group";
2598
+ readonly order: number;
2599
+ readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2600
+ } | {
2601
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2526
2602
  readonly description?: string;
2527
2603
  readonly graph: {
2528
2604
  readonly alignmentId: string;
@@ -2536,12 +2612,12 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2536
2612
  readonly countryKey: string;
2537
2613
  readonly examKey: string;
2538
2614
  readonly trackKey: string;
2615
+ readonly groupKey: string;
2539
2616
  readonly kind: "track";
2540
2617
  readonly order: number;
2541
2618
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2542
- readonly trackKind: "institution" | "subject" | "year";
2543
2619
  } | {
2544
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2620
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2545
2621
  readonly description?: string;
2546
2622
  readonly graph: {
2547
2623
  readonly alignmentId: string;
@@ -2565,7 +2641,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2565
2641
  };
2566
2642
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2567
2643
  } | {
2568
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2644
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2569
2645
  readonly description?: string;
2570
2646
  readonly graph: {
2571
2647
  readonly alignmentId: string;