@nakafa/aksara-contracts 0.37.0 → 0.38.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.
@@ -83,204 +83,6 @@ export declare const ContentProjectionSchema: Schema.Union<readonly [Schema.Stru
83
83
  }>;
84
84
  readonly sitemap: Schema.Literal<true>;
85
85
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
86
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
87
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
88
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
89
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
90
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
91
- readonly questionNumber: Schema.Finite;
92
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
93
- readonly bodyKind: Schema.Literal<"question">;
94
- readonly blueprint: Schema.optionalKey<Schema.Struct<{
95
- readonly cognitiveLevel: Schema.String;
96
- readonly contentDomain: Schema.String;
97
- readonly topic: Schema.String;
98
- }>>;
99
- readonly kind: Schema.Literal<"question-body">;
100
- readonly metadata: Schema.Struct<{
101
- readonly dateModified: Schema.optionalKey<Schema.String>;
102
- readonly datePublished: Schema.String;
103
- readonly authors: Schema.$Array<Schema.Struct<{
104
- readonly name: Schema.String;
105
- }>>;
106
- readonly title: Schema.String;
107
- }>;
108
- readonly stimulusKey: Schema.optionalKey<Schema.String>;
109
- readonly response: Schema.Union<readonly [Schema.Struct<{
110
- readonly categories: Schema.$Array<Schema.Struct<{
111
- readonly categoryKey: Schema.String;
112
- readonly label: Schema.String;
113
- readonly order: Schema.Int;
114
- }>>;
115
- readonly kind: Schema.Literal<"category">;
116
- readonly statements: Schema.$Array<Schema.Struct<{
117
- readonly correctCategoryKey: Schema.String;
118
- readonly label: Schema.String;
119
- readonly order: Schema.Int;
120
- readonly statementKey: Schema.String;
121
- }>>;
122
- }>, Schema.Struct<{
123
- readonly kind: Schema.Literal<"multiple-choice">;
124
- readonly options: Schema.$Array<Schema.Struct<{
125
- readonly isCorrect: Schema.Boolean;
126
- readonly label: Schema.String;
127
- readonly optionKey: Schema.String;
128
- readonly order: Schema.Int;
129
- }>>;
130
- }>, Schema.Struct<{
131
- readonly kind: Schema.Literal<"single-choice">;
132
- readonly options: Schema.$Array<Schema.Struct<{
133
- readonly isCorrect: Schema.Boolean;
134
- readonly label: Schema.String;
135
- readonly optionKey: Schema.String;
136
- readonly order: Schema.Int;
137
- }>>;
138
- }>]>;
139
- }>, Schema.Struct<{
140
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
141
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
142
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
143
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
144
- readonly questionNumber: Schema.Finite;
145
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
146
- readonly bodyKind: Schema.Literal<"answer">;
147
- readonly blueprint: Schema.optionalKey<Schema.Struct<{
148
- readonly cognitiveLevel: Schema.String;
149
- readonly contentDomain: Schema.String;
150
- readonly topic: Schema.String;
151
- }>>;
152
- readonly kind: Schema.Literal<"question-body">;
153
- readonly metadata: Schema.Struct<{
154
- readonly dateModified: Schema.optionalKey<Schema.String>;
155
- readonly datePublished: Schema.String;
156
- readonly authors: Schema.$Array<Schema.Struct<{
157
- readonly name: Schema.String;
158
- }>>;
159
- readonly title: Schema.String;
160
- }>;
161
- readonly stimulusKey: Schema.optionalKey<Schema.String>;
162
- }>]>, Schema.Union<readonly [Schema.Struct<{
163
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
164
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
165
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
166
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
167
- readonly questionNumber: Schema.Finite;
168
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
169
- readonly bodyKind: Schema.Literal<"question">;
170
- readonly kind: Schema.Literal<"question-body">;
171
- readonly metadata: Schema.Struct<{
172
- readonly authors: Schema.$Array<Schema.Struct<{
173
- readonly name: Schema.String;
174
- }>>;
175
- readonly date: Schema.String;
176
- readonly title: Schema.String;
177
- }>;
178
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
179
- readonly label: Schema.mutableKey<Schema.String>;
180
- readonly value: Schema.mutableKey<Schema.Boolean>;
181
- }>>>;
182
- }>, Schema.Struct<{
183
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
184
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
185
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
186
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
187
- readonly questionNumber: Schema.Finite;
188
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
189
- readonly bodyKind: Schema.Literal<"answer">;
190
- readonly kind: Schema.Literal<"question-body">;
191
- readonly metadata: Schema.Struct<{
192
- readonly authors: Schema.$Array<Schema.Struct<{
193
- readonly name: Schema.String;
194
- }>>;
195
- readonly date: Schema.String;
196
- readonly title: Schema.String;
197
- }>;
198
- }>]>]>]>;
199
- export type ContentProjection = typeof ContentProjectionSchema.Type;
200
- /** Current projection vocabulary accepted for newly staged content. */
201
- export declare const CurrentContentProjectionSchema: Schema.Union<readonly [Schema.Struct<{
202
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
203
- readonly articleRouteSlug: Schema.brand<Schema.String, "@NakafaAI/AksaraArticleRouteSlug">;
204
- readonly articleSlug: Schema.brand<Schema.String, "@NakafaAI/AksaraArticleSlug">;
205
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
206
- readonly category: Schema.brand<Schema.String, "@NakafaAI/AksaraArticleCategory">;
207
- readonly categoryRouteSlug: Schema.brand<Schema.String, "@NakafaAI/AksaraArticleRouteSlug">;
208
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
209
- readonly graph: Schema.Struct<{
210
- readonly alignmentId: Schema.String;
211
- readonly assetId: Schema.String;
212
- readonly conceptId: Schema.String;
213
- readonly learningObjectId: Schema.String;
214
- readonly lensId: Schema.String;
215
- }>;
216
- readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
217
- readonly categoryTitle: Schema.Trimmed;
218
- readonly kind: Schema.Literal<"article">;
219
- readonly metadata: Schema.Struct<{
220
- readonly dateModified: Schema.optionalKey<Schema.String>;
221
- readonly datePublished: Schema.String;
222
- readonly authors: Schema.$Array<Schema.Struct<{
223
- readonly name: Schema.String;
224
- }>>;
225
- readonly description: Schema.optional<Schema.String>;
226
- readonly title: Schema.String;
227
- }>;
228
- readonly official: Schema.Boolean;
229
- readonly parentPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
230
- readonly references: Schema.$Array<Schema.Struct<{
231
- readonly authors: Schema.String;
232
- readonly citation: Schema.optional<Schema.String>;
233
- readonly details: Schema.optional<Schema.String>;
234
- readonly publication: Schema.optional<Schema.String>;
235
- readonly title: Schema.String;
236
- readonly url: Schema.optional<Schema.String>;
237
- readonly year: Schema.Finite;
238
- }>>;
239
- readonly sitemap: Schema.Literal<true>;
240
- }>, Schema.Struct<{
241
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
242
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
243
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
244
- readonly graph: Schema.Struct<{
245
- readonly alignmentId: Schema.String;
246
- readonly assetId: Schema.String;
247
- readonly conceptId: Schema.String;
248
- readonly learningObjectId: Schema.String;
249
- readonly lensId: Schema.String;
250
- }>;
251
- readonly materialKey: Schema.brand<Schema.String, "@NakafaAI/AksaraMaterialKey">;
252
- readonly order: Schema.Finite;
253
- readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
254
- readonly sectionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraMaterialSection">;
255
- readonly kind: Schema.Literal<"subject-lesson">;
256
- readonly metadata: Schema.Struct<{
257
- readonly dateModified: Schema.optionalKey<Schema.String>;
258
- readonly datePublished: Schema.String;
259
- readonly authors: Schema.$Array<Schema.Struct<{
260
- readonly name: Schema.String;
261
- }>>;
262
- readonly description: Schema.optional<Schema.String>;
263
- readonly subject: Schema.optional<Schema.String>;
264
- readonly title: Schema.String;
265
- }>;
266
- readonly parentPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
267
- readonly sitemap: Schema.Literal<true>;
268
- readonly topicTitle: Schema.String;
269
- }>, Schema.Struct<{
270
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
271
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
272
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
273
- readonly pageKey: Schema.brand<Schema.String, "@NakafaAI/AksaraPageKey">;
274
- readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
275
- readonly kind: Schema.Literal<"public-page">;
276
- readonly metadata: Schema.Struct<{
277
- readonly dateModified: Schema.optionalKey<Schema.String>;
278
- readonly datePublished: Schema.String;
279
- readonly description: Schema.Trimmed;
280
- readonly title: Schema.Trimmed;
281
- }>;
282
- readonly sitemap: Schema.Literal<true>;
283
- readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
284
86
  }>, Schema.Union<readonly [Schema.Struct<{
285
87
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
286
88
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -358,7 +160,7 @@ export declare const CurrentContentProjectionSchema: Schema.Union<readonly [Sche
358
160
  }>;
359
161
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
360
162
  }>]>]>;
361
- export type CurrentContentProjection = typeof CurrentContentProjectionSchema.Type;
163
+ export type ContentProjection = typeof ContentProjectionSchema.Type;
362
164
  /** Public-route projections accepted by Nakafa's path-based runtime seam. */
363
165
  export declare const RoutedContentProjectionSchema: Schema.Union<readonly [Schema.Struct<{
364
166
  readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
@@ -2,16 +2,9 @@ import { Match, Schema } from "effect";
2
2
  import { ArticleProjectionSchema, canonicalizeArticleProjection, } from "#contracts/projection/article";
3
3
  import { canonicalizeMaterialProjection, MaterialLessonProjectionSchema, } from "#contracts/projection/material";
4
4
  import { canonicalizePublicPageProjection, PublicPageProjectionSchema, } from "#contracts/projection/page";
5
- import { canonicalizeQuestionProjection, QuestionBodyProjectionSchema, ReadableQuestionBodyProjectionSchema, } from "#contracts/projection/question";
5
+ import { canonicalizeQuestionProjection, QuestionBodyProjectionSchema, } from "#contracts/projection/question";
6
6
  /** Complete projection vocabulary backed by implemented content families. */
7
7
  export const ContentProjectionSchema = Schema.Union([
8
- ArticleProjectionSchema,
9
- MaterialLessonProjectionSchema,
10
- PublicPageProjectionSchema,
11
- ReadableQuestionBodyProjectionSchema,
12
- ]);
13
- /** Current projection vocabulary accepted for newly staged content. */
14
- export const CurrentContentProjectionSchema = Schema.Union([
15
8
  ArticleProjectionSchema,
16
9
  MaterialLessonProjectionSchema,
17
10
  PublicPageProjectionSchema,
@@ -117,42 +117,6 @@ export declare function decodeContentProjections<E, R>(projections: Stream.Strea
117
117
  readonly title: string;
118
118
  };
119
119
  readonly stimulusKey?: string;
120
- } | {
121
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
122
- readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
123
- readonly peerContentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
124
- readonly questionKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraQuestionKey">;
125
- readonly questionNumber: number;
126
- readonly setKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraQuestionSetKey">;
127
- readonly bodyKind: "question";
128
- readonly kind: "question-body";
129
- readonly metadata: {
130
- readonly authors: readonly {
131
- readonly name: string;
132
- }[];
133
- readonly date: string;
134
- readonly title: string;
135
- };
136
- readonly choices: {
137
- label: string;
138
- value: boolean;
139
- }[];
140
- } | {
141
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
142
- readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
143
- readonly peerContentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
144
- readonly questionKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraQuestionKey">;
145
- readonly questionNumber: number;
146
- readonly setKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraQuestionSetKey">;
147
- readonly bodyKind: "answer";
148
- readonly kind: "question-body";
149
- readonly metadata: {
150
- readonly authors: readonly {
151
- readonly name: string;
152
- }[];
153
- readonly date: string;
154
- readonly title: string;
155
- };
156
120
  } | {
157
121
  readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
158
122
  readonly articleRouteSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleRouteSlug">;
@@ -34,13 +34,8 @@ export declare const ActiveContentReleaseSchema: Schema.Struct<{
34
34
  readonly routeCount: Schema.Finite;
35
35
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
36
36
  readonly scope: Schema.Struct<{
37
- content: Schema.optional<Schema.$Array<Schema.Struct<{
38
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
39
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
40
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
41
- }>>>;
42
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
43
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
37
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
38
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
44
39
  }>;
45
40
  readonly snapshots: Schema.Struct<{
46
41
  readonly program: Schema.Struct<{
@@ -174,13 +169,8 @@ export declare const ActiveRollbackContentReleaseSchema: Schema.refine<ActiveRol
174
169
  readonly routeCount: Schema.Finite;
175
170
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
176
171
  readonly scope: Schema.Struct<{
177
- content: Schema.optional<Schema.$Array<Schema.Struct<{
178
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
179
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
180
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
181
- }>>>;
182
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
183
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
172
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
173
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
184
174
  }>;
185
175
  readonly snapshots: Schema.Struct<{
186
176
  readonly program: Schema.Struct<{
@@ -315,13 +305,8 @@ export declare const RecoveryLookupSchema: Schema.Union<readonly [Schema.Struct<
315
305
  readonly routeCount: Schema.Finite;
316
306
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
317
307
  readonly scope: Schema.Struct<{
318
- content: Schema.optional<Schema.$Array<Schema.Struct<{
319
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
320
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
321
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
322
- }>>>;
323
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
324
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
308
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
309
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
325
310
  }>;
326
311
  readonly snapshots: Schema.Struct<{
327
312
  readonly program: Schema.Struct<{
@@ -32,13 +32,8 @@ export declare const StagedContentReleaseSchema: Schema.Struct<{
32
32
  readonly routeCount: Schema.Finite;
33
33
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
34
34
  readonly scope: Schema.Struct<{
35
- content: Schema.optional<Schema.$Array<Schema.Struct<{
36
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
37
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
38
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
39
- }>>>;
40
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
41
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
35
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
36
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
42
37
  }>;
43
38
  readonly snapshots: Schema.Struct<{
44
39
  readonly program: Schema.Struct<{
@@ -134,13 +129,8 @@ export declare const StagedRollbackContentReleaseSchema: Schema.refine<StagedRol
134
129
  readonly routeCount: Schema.Finite;
135
130
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
136
131
  readonly scope: Schema.Struct<{
137
- content: Schema.optional<Schema.$Array<Schema.Struct<{
138
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
139
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
140
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
141
- }>>>;
142
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
143
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
132
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
133
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
144
134
  }>;
145
135
  readonly snapshots: Schema.Struct<{
146
136
  readonly program: Schema.Struct<{
@@ -234,13 +224,8 @@ export declare const ContentReleaseCurrentSchema: Schema.Struct<{
234
224
  readonly routeCount: Schema.Finite;
235
225
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
236
226
  readonly scope: Schema.Struct<{
237
- content: Schema.optional<Schema.$Array<Schema.Struct<{
238
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
239
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
240
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
241
- }>>>;
242
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
243
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
227
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
228
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
244
229
  }>;
245
230
  readonly snapshots: Schema.Struct<{
246
231
  readonly program: Schema.Struct<{
@@ -370,13 +355,8 @@ export declare const ContentReleaseCurrentSchema: Schema.Struct<{
370
355
  readonly routeCount: Schema.Finite;
371
356
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
372
357
  readonly scope: Schema.Struct<{
373
- content: Schema.optional<Schema.$Array<Schema.Struct<{
374
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
375
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
376
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
377
- }>>>;
378
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
379
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
358
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
359
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
380
360
  }>;
381
361
  readonly snapshots: Schema.Struct<{
382
362
  readonly program: Schema.Struct<{
@@ -468,13 +448,8 @@ export declare const ContentReleaseCurrentSchema: Schema.Struct<{
468
448
  readonly routeCount: Schema.Finite;
469
449
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
470
450
  readonly scope: Schema.Struct<{
471
- content: Schema.optional<Schema.$Array<Schema.Struct<{
472
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
473
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
474
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
475
- }>>>;
476
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
477
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
451
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
452
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
478
453
  }>;
479
454
  readonly snapshots: Schema.Struct<{
480
455
  readonly program: Schema.Struct<{
@@ -34,11 +34,6 @@ export declare const hashContentReleaseManifest: (manifest: {
34
34
  readonly routeCount: number;
35
35
  readonly routeDigest: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
36
36
  readonly scope: {
37
- readonly content?: readonly {
38
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
39
- readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
40
- readonly family: "article" | "material" | "page" | "question";
41
- }[] | undefined;
42
37
  readonly families: readonly ("article" | "material" | "page" | "question")[];
43
38
  readonly snapshots: readonly ("program" | "quran" | "tryout")[];
44
39
  };
@@ -2,7 +2,6 @@ import { Effect, Schema, Stream } from "effect";
2
2
  import { compareContentHeads } from "#contracts/content";
3
3
  import { ReleaseIdSchema, Sha256HashSchema } from "#contracts/ids";
4
4
  import { digestItems } from "#contracts/release/digest";
5
- import { publicationScopeSelectsContent } from "#contracts/release/snapshot/scope";
6
5
  import { ContentReleaseItemSchema, } from "#contracts/release/spec";
7
6
  const ItemCountSchema = Schema.Finite.pipe(Schema.check(Schema.isInt()), Schema.check(Schema.isGreaterThanOrEqualTo(0)));
8
7
  /** One release item failed strict wire decoding. */
@@ -52,7 +51,7 @@ function validateItemIdentity(manifest, item, expectedIndex) {
52
51
  expectedIndex,
53
52
  }));
54
53
  }
55
- if (!publicationScopeSelectsContent(manifest.scope, item.change)) {
54
+ if (!manifest.scope.families.includes(item.change.family)) {
56
55
  return Effect.fail(new ReleaseItemScopeError({ itemOffset: expectedIndex }));
57
56
  }
58
57
  return Effect.void;
@@ -40,13 +40,8 @@ export declare const ContentReleaseBundleSchema: Schema.Struct<{
40
40
  readonly routeCount: Schema.Finite;
41
41
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
42
42
  readonly scope: Schema.Struct<{
43
- content: Schema.optional<Schema.$Array<Schema.Struct<{
44
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
45
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
46
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
47
- }>>>;
48
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
49
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
43
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
44
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
50
45
  }>;
51
46
  readonly snapshots: Schema.Struct<{
52
47
  readonly program: Schema.Struct<{
@@ -143,13 +138,8 @@ export declare const RollbackContentReleaseBundleSchema: Schema.refine<RollbackC
143
138
  readonly routeCount: Schema.Finite;
144
139
  readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
145
140
  readonly scope: Schema.Struct<{
146
- content: Schema.optional<Schema.$Array<Schema.Struct<{
147
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
148
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
149
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
150
- }>>>;
151
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
152
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
141
+ readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
142
+ readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
153
143
  }>;
154
144
  readonly snapshots: Schema.Struct<{
155
145
  readonly program: Schema.Struct<{