@nakafa/aksara-contracts 0.36.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.
Files changed (38) hide show
  1. package/dist/cache/content.d.ts +14 -36
  2. package/dist/cache/content.js +22 -64
  3. package/dist/math/base.d.ts +1 -2
  4. package/dist/math/base.js +9 -5
  5. package/dist/math/plane.d.ts +2 -4
  6. package/dist/math/plane.js +2 -3
  7. package/dist/math/space.d.ts +2 -4
  8. package/dist/math/space.js +2 -3
  9. package/dist/math/visual.d.ts +4 -8
  10. package/dist/preview/artifact.js +2 -2
  11. package/dist/projection/digest.d.ts +0 -36
  12. package/dist/projection/question.d.ts +1 -159
  13. package/dist/projection/question.js +15 -75
  14. package/dist/projection/spec.d.ts +1 -199
  15. package/dist/projection/spec.js +1 -8
  16. package/dist/projection/verify.d.ts +64 -100
  17. package/dist/release/current/evidence.d.ts +6 -21
  18. package/dist/release/current/state.d.ts +10 -35
  19. package/dist/release/hash.d.ts +0 -5
  20. package/dist/release/items.js +1 -2
  21. package/dist/release/lifecycle.d.ts +4 -14
  22. package/dist/release/rollback/spec.d.ts +12 -228
  23. package/dist/release/snapshot/scope.d.ts +3 -48
  24. package/dist/release/snapshot/scope.js +7 -69
  25. package/dist/release/snapshot/spec.js +2 -3
  26. package/dist/release/snapshot/verify.d.ts +31 -31
  27. package/dist/release/spec.d.ts +6 -21
  28. package/dist/release/verify.d.ts +0 -5
  29. package/dist/runtime/spec.d.ts +26 -41
  30. package/dist/runtime/verify.d.ts +44 -54
  31. package/dist/transport/batch.d.ts +0 -405
  32. package/dist/transport/batch.js +2 -14
  33. package/dist/transport/group.d.ts +33 -633
  34. package/dist/transport/group.js +1 -2
  35. package/dist/transport/request.d.ts +375 -1435
  36. package/dist/transport/response.d.ts +145 -503
  37. package/dist/tryout/catalog-hash.d.ts +18 -18
  38. package/package.json +1 -1
@@ -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<{
@@ -343,7 +343,7 @@ export declare const RollbackUpsertStateSchema: Schema.Struct<{
343
343
  }>;
344
344
  readonly sitemap: Schema.Literal<true>;
345
345
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
346
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
346
+ }>, Schema.Union<readonly [Schema.Struct<{
347
347
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
348
348
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
349
349
  readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -419,43 +419,7 @@ export declare const RollbackUpsertStateSchema: Schema.Struct<{
419
419
  readonly title: Schema.String;
420
420
  }>;
421
421
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
422
- }>]>, Schema.Union<readonly [Schema.Struct<{
423
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
424
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
425
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
426
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
427
- readonly questionNumber: Schema.Finite;
428
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
429
- readonly bodyKind: Schema.Literal<"question">;
430
- readonly kind: Schema.Literal<"question-body">;
431
- readonly metadata: Schema.Struct<{
432
- readonly authors: Schema.$Array<Schema.Struct<{
433
- readonly name: Schema.String;
434
- }>>;
435
- readonly date: Schema.String;
436
- readonly title: Schema.String;
437
- }>;
438
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
439
- readonly label: Schema.mutableKey<Schema.String>;
440
- readonly value: Schema.mutableKey<Schema.Boolean>;
441
- }>>>;
442
- }>, Schema.Struct<{
443
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
444
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
445
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
446
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
447
- readonly questionNumber: Schema.Finite;
448
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
449
- readonly bodyKind: Schema.Literal<"answer">;
450
- readonly kind: Schema.Literal<"question-body">;
451
- readonly metadata: Schema.Struct<{
452
- readonly authors: Schema.$Array<Schema.Struct<{
453
- readonly name: Schema.String;
454
- }>>;
455
- readonly date: Schema.String;
456
- readonly title: Schema.String;
457
- }>;
458
- }>]>]>]>;
422
+ }>]>]>;
459
423
  }>;
460
424
  export type RollbackUpsertState = typeof RollbackUpsertStateSchema.Type;
461
425
  /** Body-free state proving that one locale-specific head is absent. */
@@ -586,7 +550,7 @@ export declare const RollbackStateSchema: Schema.Union<readonly [Schema.Struct<{
586
550
  }>;
587
551
  readonly sitemap: Schema.Literal<true>;
588
552
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
589
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
553
+ }>, Schema.Union<readonly [Schema.Struct<{
590
554
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
591
555
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
592
556
  readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -662,43 +626,7 @@ export declare const RollbackStateSchema: Schema.Union<readonly [Schema.Struct<{
662
626
  readonly title: Schema.String;
663
627
  }>;
664
628
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
665
- }>]>, Schema.Union<readonly [Schema.Struct<{
666
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
667
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
668
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
669
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
670
- readonly questionNumber: Schema.Finite;
671
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
672
- readonly bodyKind: Schema.Literal<"question">;
673
- readonly kind: Schema.Literal<"question-body">;
674
- readonly metadata: Schema.Struct<{
675
- readonly authors: Schema.$Array<Schema.Struct<{
676
- readonly name: Schema.String;
677
- }>>;
678
- readonly date: Schema.String;
679
- readonly title: Schema.String;
680
- }>;
681
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
682
- readonly label: Schema.mutableKey<Schema.String>;
683
- readonly value: Schema.mutableKey<Schema.Boolean>;
684
- }>>>;
685
- }>, Schema.Struct<{
686
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
687
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
688
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
689
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
690
- readonly questionNumber: Schema.Finite;
691
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
692
- readonly bodyKind: Schema.Literal<"answer">;
693
- readonly kind: Schema.Literal<"question-body">;
694
- readonly metadata: Schema.Struct<{
695
- readonly authors: Schema.$Array<Schema.Struct<{
696
- readonly name: Schema.String;
697
- }>>;
698
- readonly date: Schema.String;
699
- readonly title: Schema.String;
700
- }>;
701
- }>]>]>]>;
629
+ }>]>]>;
702
630
  }>, Schema.Struct<{
703
631
  readonly change: Schema.Struct<{
704
632
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
@@ -827,7 +755,7 @@ export declare const RollbackRecordSchema: Schema.Struct<{
827
755
  }>;
828
756
  readonly sitemap: Schema.Literal<true>;
829
757
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
830
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
758
+ }>, Schema.Union<readonly [Schema.Struct<{
831
759
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
832
760
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
833
761
  readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -903,43 +831,7 @@ export declare const RollbackRecordSchema: Schema.Struct<{
903
831
  readonly title: Schema.String;
904
832
  }>;
905
833
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
906
- }>]>, Schema.Union<readonly [Schema.Struct<{
907
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
908
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
909
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
910
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
911
- readonly questionNumber: Schema.Finite;
912
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
913
- readonly bodyKind: Schema.Literal<"question">;
914
- readonly kind: Schema.Literal<"question-body">;
915
- readonly metadata: Schema.Struct<{
916
- readonly authors: Schema.$Array<Schema.Struct<{
917
- readonly name: Schema.String;
918
- }>>;
919
- readonly date: Schema.String;
920
- readonly title: Schema.String;
921
- }>;
922
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
923
- readonly label: Schema.mutableKey<Schema.String>;
924
- readonly value: Schema.mutableKey<Schema.Boolean>;
925
- }>>>;
926
- }>, Schema.Struct<{
927
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
928
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
929
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
930
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
931
- readonly questionNumber: Schema.Finite;
932
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
933
- readonly bodyKind: Schema.Literal<"answer">;
934
- readonly kind: Schema.Literal<"question-body">;
935
- readonly metadata: Schema.Struct<{
936
- readonly authors: Schema.$Array<Schema.Struct<{
937
- readonly name: Schema.String;
938
- }>>;
939
- readonly date: Schema.String;
940
- readonly title: Schema.String;
941
- }>;
942
- }>]>]>]>;
834
+ }>]>]>;
943
835
  }>, Schema.Struct<{
944
836
  readonly change: Schema.Struct<{
945
837
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
@@ -1066,7 +958,7 @@ export declare const RollbackRecordSchema: Schema.Struct<{
1066
958
  }>;
1067
959
  readonly sitemap: Schema.Literal<true>;
1068
960
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
1069
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
961
+ }>, Schema.Union<readonly [Schema.Struct<{
1070
962
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1071
963
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1072
964
  readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -1142,43 +1034,7 @@ export declare const RollbackRecordSchema: Schema.Struct<{
1142
1034
  readonly title: Schema.String;
1143
1035
  }>;
1144
1036
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
1145
- }>]>, Schema.Union<readonly [Schema.Struct<{
1146
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1147
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1148
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1149
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
1150
- readonly questionNumber: Schema.Finite;
1151
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
1152
- readonly bodyKind: Schema.Literal<"question">;
1153
- readonly kind: Schema.Literal<"question-body">;
1154
- readonly metadata: Schema.Struct<{
1155
- readonly authors: Schema.$Array<Schema.Struct<{
1156
- readonly name: Schema.String;
1157
- }>>;
1158
- readonly date: Schema.String;
1159
- readonly title: Schema.String;
1160
- }>;
1161
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
1162
- readonly label: Schema.mutableKey<Schema.String>;
1163
- readonly value: Schema.mutableKey<Schema.Boolean>;
1164
- }>>>;
1165
- }>, Schema.Struct<{
1166
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1167
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1168
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1169
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
1170
- readonly questionNumber: Schema.Finite;
1171
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
1172
- readonly bodyKind: Schema.Literal<"answer">;
1173
- readonly kind: Schema.Literal<"question-body">;
1174
- readonly metadata: Schema.Struct<{
1175
- readonly authors: Schema.$Array<Schema.Struct<{
1176
- readonly name: Schema.String;
1177
- }>>;
1178
- readonly date: Schema.String;
1179
- readonly title: Schema.String;
1180
- }>;
1181
- }>]>]>]>;
1037
+ }>]>]>;
1182
1038
  }>, Schema.Struct<{
1183
1039
  readonly change: Schema.Struct<{
1184
1040
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
@@ -1319,7 +1175,7 @@ export declare const RollbackPageSchema: Schema.Struct<{
1319
1175
  }>;
1320
1176
  readonly sitemap: Schema.Literal<true>;
1321
1177
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
1322
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1178
+ }>, Schema.Union<readonly [Schema.Struct<{
1323
1179
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1324
1180
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1325
1181
  readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -1395,43 +1251,7 @@ export declare const RollbackPageSchema: Schema.Struct<{
1395
1251
  readonly title: Schema.String;
1396
1252
  }>;
1397
1253
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
1398
- }>]>, Schema.Union<readonly [Schema.Struct<{
1399
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1400
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1401
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1402
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
1403
- readonly questionNumber: Schema.Finite;
1404
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
1405
- readonly bodyKind: Schema.Literal<"question">;
1406
- readonly kind: Schema.Literal<"question-body">;
1407
- readonly metadata: Schema.Struct<{
1408
- readonly authors: Schema.$Array<Schema.Struct<{
1409
- readonly name: Schema.String;
1410
- }>>;
1411
- readonly date: Schema.String;
1412
- readonly title: Schema.String;
1413
- }>;
1414
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
1415
- readonly label: Schema.mutableKey<Schema.String>;
1416
- readonly value: Schema.mutableKey<Schema.Boolean>;
1417
- }>>>;
1418
- }>, Schema.Struct<{
1419
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1420
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1421
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1422
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
1423
- readonly questionNumber: Schema.Finite;
1424
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
1425
- readonly bodyKind: Schema.Literal<"answer">;
1426
- readonly kind: Schema.Literal<"question-body">;
1427
- readonly metadata: Schema.Struct<{
1428
- readonly authors: Schema.$Array<Schema.Struct<{
1429
- readonly name: Schema.String;
1430
- }>>;
1431
- readonly date: Schema.String;
1432
- readonly title: Schema.String;
1433
- }>;
1434
- }>]>]>]>;
1254
+ }>]>]>;
1435
1255
  }>, Schema.Struct<{
1436
1256
  readonly change: Schema.Struct<{
1437
1257
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
@@ -1558,7 +1378,7 @@ export declare const RollbackPageSchema: Schema.Struct<{
1558
1378
  }>;
1559
1379
  readonly sitemap: Schema.Literal<true>;
1560
1380
  readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
1561
- }>, Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1381
+ }>, Schema.Union<readonly [Schema.Struct<{
1562
1382
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1563
1383
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1564
1384
  readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -1634,43 +1454,7 @@ export declare const RollbackPageSchema: Schema.Struct<{
1634
1454
  readonly title: Schema.String;
1635
1455
  }>;
1636
1456
  readonly stimulusKey: Schema.optionalKey<Schema.String>;
1637
- }>]>, Schema.Union<readonly [Schema.Struct<{
1638
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1639
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1640
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1641
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
1642
- readonly questionNumber: Schema.Finite;
1643
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
1644
- readonly bodyKind: Schema.Literal<"question">;
1645
- readonly kind: Schema.Literal<"question-body">;
1646
- readonly metadata: Schema.Struct<{
1647
- readonly authors: Schema.$Array<Schema.Struct<{
1648
- readonly name: Schema.String;
1649
- }>>;
1650
- readonly date: Schema.String;
1651
- readonly title: Schema.String;
1652
- }>;
1653
- readonly choices: Schema.mutable<Schema.$Array<Schema.Struct<{
1654
- readonly label: Schema.mutableKey<Schema.String>;
1655
- readonly value: Schema.mutableKey<Schema.Boolean>;
1656
- }>>>;
1657
- }>, Schema.Struct<{
1658
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
1659
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1660
- readonly peerContentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
1661
- readonly questionKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionKey">;
1662
- readonly questionNumber: Schema.Finite;
1663
- readonly setKey: Schema.brand<Schema.String, "@NakafaAI/AksaraQuestionSetKey">;
1664
- readonly bodyKind: Schema.Literal<"answer">;
1665
- readonly kind: Schema.Literal<"question-body">;
1666
- readonly metadata: Schema.Struct<{
1667
- readonly authors: Schema.$Array<Schema.Struct<{
1668
- readonly name: Schema.String;
1669
- }>>;
1670
- readonly date: Schema.String;
1671
- readonly title: Schema.String;
1672
- }>;
1673
- }>]>]>]>;
1457
+ }>]>]>;
1674
1458
  }>, Schema.Struct<{
1675
1459
  readonly change: Schema.Struct<{
1676
1460
  readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
@@ -1,60 +1,15 @@
1
- import { Effect, Schema } from "effect";
1
+ import { Schema } from "effect";
2
2
  /** Fixed structured families selected by the one global release pointer. */
3
3
  export declare const ContentSnapshotKindSchema: Schema.Literals<readonly ["program", "quran", "tryout"]>;
4
4
  export type ContentSnapshotKind = typeof ContentSnapshotKindSchema.Type;
5
- /** Authenticates exact content selection retained by predecessor releases. */
6
- export declare const PredecessorContentPublicationIdentitySchema: Schema.Struct<{
7
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
8
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
9
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
10
- }>;
11
- export type PredecessorContentPublicationIdentity = typeof PredecessorContentPublicationIdentitySchema.Type;
12
- /** Content and structured families authenticated from any signed release. */
5
+ /** Whole content and structured families authenticated by one signed release. */
13
6
  export declare const PublicationScopeSchema: Schema.Struct<{
14
- content: Schema.optional<Schema.$Array<Schema.Struct<{
15
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
16
- readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
17
- readonly family: Schema.Literals<readonly ["article", "material", "page", "question"]>;
18
- }>>>;
19
- families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
20
- snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
21
- }>;
22
- export type PublicationScope = typeof PublicationScopeSchema.Type;
23
- /** Whole-family scope accepted when preparing a new Git release. */
24
- export declare const GitPublicationScopeSchema: Schema.Struct<{
25
7
  readonly families: Schema.$Array<Schema.Literals<readonly ["article", "material", "page", "question"]>>;
26
8
  readonly snapshots: Schema.$Array<Schema.Literals<readonly ["program", "quran", "tryout"]>>;
27
9
  }>;
28
- export type GitPublicationScope = typeof GitPublicationScopeSchema.Type;
29
- declare const GitPublicationScopeError_base: Schema.Class<GitPublicationScopeError, Schema.TaggedStruct<"GitPublicationScopeError", {}>, import("effect/Cause").YieldableError>;
30
- /** New Git release preparation received predecessor-only exact selection. */
31
- export declare class GitPublicationScopeError extends GitPublicationScopeError_base {
32
- }
33
- /** Rejects predecessor-only fields before any new release work begins. */
34
- export declare const verifyGitPublicationScope: (scope: {
35
- readonly content?: readonly {
36
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
37
- readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
38
- readonly family: "article" | "material" | "page" | "question";
39
- }[] | undefined;
40
- readonly families: readonly ("article" | "material" | "page" | "question")[];
41
- readonly snapshots: readonly ("program" | "quran" | "tryout")[];
42
- }) => Effect.Effect<{
43
- readonly families: readonly ("article" | "material" | "page" | "question")[];
44
- readonly snapshots: readonly ("program" | "quran" | "tryout")[];
45
- }, GitPublicationScopeError, never>;
46
- /** Checks whether one body transition is authorized by the signed scope. */
47
- export declare function publicationScopeSelectsContent(scope: PublicationScope, identity: PredecessorContentPublicationIdentity): boolean;
48
- /** Checks whether one structured family may be replaced by this release. */
49
- export declare function publicationScopeSelectsSnapshot(scope: PublicationScope, family: ContentSnapshotKind): boolean;
10
+ export type PublicationScope = typeof PublicationScopeSchema.Type;
50
11
  /** Serializes one publication scope with stable signed field order. */
51
12
  export declare function canonicalizePublicationScope(scope: PublicationScope): {
52
- content?: {
53
- artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
54
- contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
55
- family: "article" | "material" | "page" | "question";
56
- }[];
57
13
  families: ("article" | "material" | "page" | "question")[];
58
14
  snapshots: ("program" | "quran" | "tryout")[];
59
15
  };
60
- export {};