@nakafa/aksara-contracts 0.48.3 → 0.48.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content.d.ts +2 -2
- package/dist/content.js +2 -1
- package/dist/date.js +5 -5
- package/dist/delivery.d.ts +3 -0
- package/dist/delivery.js +5 -0
- package/dist/math/base.d.ts +3 -0
- package/dist/math/base.js +2 -0
- package/dist/math/collision.js +2 -1
- package/dist/math/coordinate.d.ts +3 -3
- package/dist/math/coordinate.js +3 -2
- package/dist/math/extent.js +2 -2
- package/dist/math/intersection.d.ts +2 -1
- package/dist/math/intersection.js +1 -0
- package/dist/math/object.d.ts +24 -0
- package/dist/math/object.js +27 -0
- package/dist/math/plane.js +16 -24
- package/dist/math/precision.d.ts +2 -2
- package/dist/math/space.js +14 -22
- package/dist/projection/verify.d.ts +114 -114
- package/dist/projection/verify.js +9 -16
- package/dist/question/response.d.ts +20 -0
- package/dist/question/response.js +6 -3
- package/dist/quran/provenance.js +1 -1
- package/dist/quran/snapshot/row.d.ts +2 -0
- package/dist/quran/snapshot/row.js +3 -1
- package/dist/release/head.js +15 -33
- package/dist/release/items.js +14 -18
- package/dist/release/mismatch.d.ts +12 -0
- package/dist/release/mismatch.js +14 -0
- package/dist/release/result/digest.js +8 -17
- package/dist/release/rollback/digest.js +3 -10
- package/dist/release/route/verify.d.ts +1 -1
- package/dist/release/route/verify.js +8 -11
- package/dist/release/snapshot/evidence/requirement.d.ts +2 -1
- package/dist/release/snapshot/evidence/requirement.js +2 -1
- package/dist/release/snapshot/evidence/tryout.js +3 -3
- package/dist/release/snapshot/spec.d.ts +4 -1
- package/dist/release/snapshot/spec.js +6 -1
- package/dist/release/snapshot/verify.d.ts +52 -52
- package/dist/runtime/protected/spec.js +3 -2
- package/dist/runtime/spec.d.ts +23 -23
- package/dist/runtime/verify.d.ts +30 -30
- package/dist/signature/spec.d.ts +1 -1
- package/dist/signature/spec.js +1 -1
- package/dist/transport/group.js +2 -5
- package/dist/transport/request.d.ts +4442 -4442
- package/dist/transport/response.d.ts +56 -56
- package/dist/transport/response.js +22 -105
- package/dist/transport/success.d.ts +12 -0
- package/dist/transport/success.js +13 -0
- package/dist/tryout/catalog.d.ts +2 -0
- package/dist/tryout/catalog.js +5 -1
- package/dist/tryout/hash/catalog.d.ts +23 -23
- package/package.json +1 -1
|
@@ -5292,6 +5292,21 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5292
5292
|
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
5293
5293
|
};
|
|
5294
5294
|
readonly projection: {
|
|
5295
|
+
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
5296
|
+
readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
|
|
5297
|
+
readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
|
|
5298
|
+
readonly pageKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPageKey">;
|
|
5299
|
+
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
5300
|
+
readonly kind: "public-page";
|
|
5301
|
+
readonly metadata: {
|
|
5302
|
+
readonly dateModified?: string;
|
|
5303
|
+
readonly datePublished: string;
|
|
5304
|
+
readonly description: string;
|
|
5305
|
+
readonly title: string;
|
|
5306
|
+
};
|
|
5307
|
+
readonly sitemap: true;
|
|
5308
|
+
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
5309
|
+
} | {
|
|
5295
5310
|
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
5296
5311
|
readonly articleRouteSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleRouteSlug">;
|
|
5297
5312
|
readonly articleSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleSlug">;
|
|
@@ -5360,21 +5375,6 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5360
5375
|
readonly parentPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
5361
5376
|
readonly sitemap: true;
|
|
5362
5377
|
readonly topicTitle: string;
|
|
5363
|
-
} | {
|
|
5364
|
-
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
5365
|
-
readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
|
|
5366
|
-
readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
|
|
5367
|
-
readonly pageKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPageKey">;
|
|
5368
|
-
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
5369
|
-
readonly kind: "public-page";
|
|
5370
|
-
readonly metadata: {
|
|
5371
|
-
readonly dateModified?: string;
|
|
5372
|
-
readonly datePublished: string;
|
|
5373
|
-
readonly description: string;
|
|
5374
|
-
readonly title: string;
|
|
5375
|
-
};
|
|
5376
|
-
readonly sitemap: true;
|
|
5377
|
-
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
5378
5378
|
} | {
|
|
5379
5379
|
readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
|
|
5380
5380
|
readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
|
|
@@ -5399,12 +5399,17 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5399
5399
|
};
|
|
5400
5400
|
readonly stimulusKey?: string;
|
|
5401
5401
|
readonly response: {
|
|
5402
|
-
readonly
|
|
5403
|
-
|
|
5404
|
-
readonly
|
|
5402
|
+
readonly categories: readonly {
|
|
5403
|
+
readonly categoryKey: string;
|
|
5404
|
+
readonly label: string;
|
|
5405
|
+
readonly order: number;
|
|
5406
|
+
}[];
|
|
5407
|
+
readonly kind: "category";
|
|
5408
|
+
readonly statements: readonly {
|
|
5409
|
+
readonly correctCategoryKey: string;
|
|
5405
5410
|
readonly label: string;
|
|
5406
|
-
readonly optionKey: string;
|
|
5407
5411
|
readonly order: number;
|
|
5412
|
+
readonly statementKey: string;
|
|
5408
5413
|
}[];
|
|
5409
5414
|
} | {
|
|
5410
5415
|
readonly kind: "multiple-choice";
|
|
@@ -5415,17 +5420,12 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5415
5420
|
readonly order: number;
|
|
5416
5421
|
}[];
|
|
5417
5422
|
} | {
|
|
5418
|
-
readonly
|
|
5419
|
-
|
|
5420
|
-
readonly
|
|
5421
|
-
readonly order: number;
|
|
5422
|
-
}[];
|
|
5423
|
-
readonly kind: "category";
|
|
5424
|
-
readonly statements: readonly {
|
|
5425
|
-
readonly correctCategoryKey: string;
|
|
5423
|
+
readonly kind: "single-choice";
|
|
5424
|
+
readonly options: readonly {
|
|
5425
|
+
readonly isCorrect: boolean;
|
|
5426
5426
|
readonly label: string;
|
|
5427
|
+
readonly optionKey: string;
|
|
5427
5428
|
readonly order: number;
|
|
5428
|
-
readonly statementKey: string;
|
|
5429
5429
|
}[];
|
|
5430
5430
|
} | {
|
|
5431
5431
|
readonly criteria: readonly {
|
|
@@ -5544,6 +5544,21 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5544
5544
|
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
5545
5545
|
};
|
|
5546
5546
|
readonly projection: {
|
|
5547
|
+
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
5548
|
+
readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
|
|
5549
|
+
readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
|
|
5550
|
+
readonly pageKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPageKey">;
|
|
5551
|
+
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
5552
|
+
readonly kind: "public-page";
|
|
5553
|
+
readonly metadata: {
|
|
5554
|
+
readonly dateModified?: string;
|
|
5555
|
+
readonly datePublished: string;
|
|
5556
|
+
readonly description: string;
|
|
5557
|
+
readonly title: string;
|
|
5558
|
+
};
|
|
5559
|
+
readonly sitemap: true;
|
|
5560
|
+
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
5561
|
+
} | {
|
|
5547
5562
|
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
5548
5563
|
readonly articleRouteSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleRouteSlug">;
|
|
5549
5564
|
readonly articleSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleSlug">;
|
|
@@ -5612,21 +5627,6 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5612
5627
|
readonly parentPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
5613
5628
|
readonly sitemap: true;
|
|
5614
5629
|
readonly topicTitle: string;
|
|
5615
|
-
} | {
|
|
5616
|
-
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
5617
|
-
readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
|
|
5618
|
-
readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
|
|
5619
|
-
readonly pageKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPageKey">;
|
|
5620
|
-
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
5621
|
-
readonly kind: "public-page";
|
|
5622
|
-
readonly metadata: {
|
|
5623
|
-
readonly dateModified?: string;
|
|
5624
|
-
readonly datePublished: string;
|
|
5625
|
-
readonly description: string;
|
|
5626
|
-
readonly title: string;
|
|
5627
|
-
};
|
|
5628
|
-
readonly sitemap: true;
|
|
5629
|
-
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
5630
5630
|
} | {
|
|
5631
5631
|
readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
|
|
5632
5632
|
readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
|
|
@@ -5651,12 +5651,17 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5651
5651
|
};
|
|
5652
5652
|
readonly stimulusKey?: string;
|
|
5653
5653
|
readonly response: {
|
|
5654
|
-
readonly
|
|
5655
|
-
|
|
5656
|
-
readonly
|
|
5654
|
+
readonly categories: readonly {
|
|
5655
|
+
readonly categoryKey: string;
|
|
5656
|
+
readonly label: string;
|
|
5657
|
+
readonly order: number;
|
|
5658
|
+
}[];
|
|
5659
|
+
readonly kind: "category";
|
|
5660
|
+
readonly statements: readonly {
|
|
5661
|
+
readonly correctCategoryKey: string;
|
|
5657
5662
|
readonly label: string;
|
|
5658
|
-
readonly optionKey: string;
|
|
5659
5663
|
readonly order: number;
|
|
5664
|
+
readonly statementKey: string;
|
|
5660
5665
|
}[];
|
|
5661
5666
|
} | {
|
|
5662
5667
|
readonly kind: "multiple-choice";
|
|
@@ -5667,17 +5672,12 @@ export declare const decodePublicationResponse: (input: unknown) => Effect.Effec
|
|
|
5667
5672
|
readonly order: number;
|
|
5668
5673
|
}[];
|
|
5669
5674
|
} | {
|
|
5670
|
-
readonly
|
|
5671
|
-
|
|
5672
|
-
readonly
|
|
5673
|
-
readonly order: number;
|
|
5674
|
-
}[];
|
|
5675
|
-
readonly kind: "category";
|
|
5676
|
-
readonly statements: readonly {
|
|
5677
|
-
readonly correctCategoryKey: string;
|
|
5675
|
+
readonly kind: "single-choice";
|
|
5676
|
+
readonly options: readonly {
|
|
5677
|
+
readonly isCorrect: boolean;
|
|
5678
5678
|
readonly label: string;
|
|
5679
|
+
readonly optionKey: string;
|
|
5679
5680
|
readonly order: number;
|
|
5680
|
-
readonly statementKey: string;
|
|
5681
5681
|
}[];
|
|
5682
5682
|
} | {
|
|
5683
5683
|
readonly criteria: readonly {
|
|
@@ -12,136 +12,53 @@ import { PublicationFailureSchema } from "#contracts/transport/failure";
|
|
|
12
12
|
import { StageGroupSuccessSchema } from "#contracts/transport/group";
|
|
13
13
|
import { StageTryoutRuntimeBundleReceiptSchema } from "#contracts/transport/runtime";
|
|
14
14
|
import { StageSnapshotBatchReceiptSchema, StageSnapshotReceiptSchema, } from "#contracts/transport/snapshot";
|
|
15
|
+
import { successSchema } from "#contracts/transport/success";
|
|
15
16
|
/** Returns authoritative active, candidate, and recovery identities. */
|
|
16
|
-
export const PublicationCurrentSuccessSchema =
|
|
17
|
-
ok: Schema.Literal(true),
|
|
18
|
-
operation: Schema.Literal("current"),
|
|
19
|
-
value: ContentReleaseCurrentSchema,
|
|
20
|
-
});
|
|
17
|
+
export const PublicationCurrentSuccessSchema = successSchema("current", ContentReleaseCurrentSchema);
|
|
21
18
|
/** Returns durable cumulative progress from one release abort page. */
|
|
22
|
-
export const PublicationAbortSuccessSchema =
|
|
23
|
-
ok: Schema.Literal(true),
|
|
24
|
-
operation: Schema.Literal("abort"),
|
|
25
|
-
value: ReleaseAbortReceiptSchema,
|
|
26
|
-
});
|
|
19
|
+
export const PublicationAbortSuccessSchema = successSchema("abort", ReleaseAbortReceiptSchema);
|
|
27
20
|
/** Returns terminal discard evidence for one exact retained inverse. */
|
|
28
|
-
export const PublicationAcceptSuccessSchema =
|
|
29
|
-
ok: Schema.Literal(true),
|
|
30
|
-
operation: Schema.Literal("accept"),
|
|
31
|
-
value: ReleaseAbortReceiptSchema,
|
|
32
|
-
});
|
|
21
|
+
export const PublicationAcceptSuccessSchema = successSchema("accept", ReleaseAbortReceiptSchema);
|
|
33
22
|
/** Returns one bounded authoritative material-head page. */
|
|
34
|
-
export const PublicationHeadPageSuccessSchema =
|
|
35
|
-
ok: Schema.Literal(true),
|
|
36
|
-
operation: Schema.Literal("headPage"),
|
|
37
|
-
value: HeadPageSchema,
|
|
38
|
-
});
|
|
23
|
+
export const PublicationHeadPageSuccessSchema = successSchema("headPage", HeadPageSchema);
|
|
39
24
|
/** Returns exact historical recovery completion or explicit absence. */
|
|
40
|
-
export const PublicationRecoverySuccessSchema =
|
|
41
|
-
ok: Schema.Literal(true),
|
|
42
|
-
operation: Schema.Literal("recovery"),
|
|
43
|
-
value: RecoveryLookupSchema,
|
|
44
|
-
});
|
|
25
|
+
export const PublicationRecoverySuccessSchema = successSchema("recovery", RecoveryLookupSchema);
|
|
45
26
|
/** Durable release status that proves stageRelease found or created a row. */
|
|
46
27
|
export const StagedReleaseStatusSchema = ContentReleaseStatusSchema.pipe(Schema.check(Schema.makeFilter((status) => status.phase !== "missing", {
|
|
47
28
|
message: "Expected stageRelease to return a stored release status.",
|
|
48
29
|
})));
|
|
49
30
|
/** Confirms the exact durable status created or resumed by staging. */
|
|
50
|
-
export const StageReleaseSuccessSchema =
|
|
51
|
-
ok: Schema.Literal(true),
|
|
52
|
-
operation: Schema.Literal("stageRelease"),
|
|
53
|
-
value: StagedReleaseStatusSchema,
|
|
54
|
-
});
|
|
31
|
+
export const StageReleaseSuccessSchema = successSchema("stageRelease", StagedReleaseStatusSchema);
|
|
55
32
|
/** Confirms the exact durable inverse status created or resumed by staging. */
|
|
56
|
-
export const StageRecoverySuccessSchema =
|
|
57
|
-
ok: Schema.Literal(true),
|
|
58
|
-
operation: Schema.Literal("stageRecovery"),
|
|
59
|
-
value: StagedReleaseStatusSchema,
|
|
60
|
-
});
|
|
33
|
+
export const StageRecoverySuccessSchema = successSchema("stageRecovery", StagedReleaseStatusSchema);
|
|
61
34
|
/** Confirms the idempotent outcome of one structured-family manifest. */
|
|
62
|
-
export const StageSnapshotSuccessSchema =
|
|
63
|
-
ok: Schema.Literal(true),
|
|
64
|
-
operation: Schema.Literal("stageSnapshot"),
|
|
65
|
-
value: StageSnapshotReceiptSchema,
|
|
66
|
-
});
|
|
35
|
+
export const StageSnapshotSuccessSchema = successSchema("stageSnapshot", StageSnapshotReceiptSchema);
|
|
67
36
|
/** Confirms the idempotent outcome of one structured-snapshot row batch. */
|
|
68
|
-
export const StageSnapshotBatchSuccessSchema =
|
|
69
|
-
ok: Schema.Literal(true),
|
|
70
|
-
operation: Schema.Literal("stageSnapshotBatch"),
|
|
71
|
-
value: StageSnapshotBatchReceiptSchema,
|
|
72
|
-
});
|
|
37
|
+
export const StageSnapshotBatchSuccessSchema = successSchema("stageSnapshotBatch", StageSnapshotBatchReceiptSchema);
|
|
73
38
|
/** Confirms the idempotent outcome of one permanent runtime bundle. */
|
|
74
|
-
export const StageTryoutRuntimeBundleSuccessSchema =
|
|
75
|
-
ok: Schema.Literal(true),
|
|
76
|
-
operation: Schema.Literal("stageTryoutRuntimeBundle"),
|
|
77
|
-
value: StageTryoutRuntimeBundleReceiptSchema,
|
|
78
|
-
});
|
|
39
|
+
export const StageTryoutRuntimeBundleSuccessSchema = successSchema("stageTryoutRuntimeBundle", StageTryoutRuntimeBundleReceiptSchema);
|
|
79
40
|
/** Confirms the idempotent outcome of one ordered item batch. */
|
|
80
|
-
export const StageItemBatchSuccessSchema =
|
|
81
|
-
ok: Schema.Literal(true),
|
|
82
|
-
operation: Schema.Literal("stageItemBatch"),
|
|
83
|
-
value: StageBatchReceiptSchema,
|
|
84
|
-
});
|
|
41
|
+
export const StageItemBatchSuccessSchema = successSchema("stageItemBatch", StageBatchReceiptSchema);
|
|
85
42
|
/** Confirms the idempotent outcome of one ordered route batch. */
|
|
86
|
-
export const StageRouteBatchSuccessSchema =
|
|
87
|
-
ok: Schema.Literal(true),
|
|
88
|
-
operation: Schema.Literal("stageRouteBatch"),
|
|
89
|
-
value: StageBatchReceiptSchema,
|
|
90
|
-
});
|
|
43
|
+
export const StageRouteBatchSuccessSchema = successSchema("stageRouteBatch", StageBatchReceiptSchema);
|
|
91
44
|
/** Confirms the idempotent outcome of one projection batch. */
|
|
92
|
-
export const StageProjectionBatchSuccessSchema =
|
|
93
|
-
ok: Schema.Literal(true),
|
|
94
|
-
operation: Schema.Literal("stageProjectionBatch"),
|
|
95
|
-
value: StageBatchReceiptSchema,
|
|
96
|
-
});
|
|
45
|
+
export const StageProjectionBatchSuccessSchema = successSchema("stageProjectionBatch", StageBatchReceiptSchema);
|
|
97
46
|
/** Confirms the idempotent outcome of one immutable artifact batch. */
|
|
98
|
-
export const StageArtifactBatchSuccessSchema =
|
|
99
|
-
ok: Schema.Literal(true),
|
|
100
|
-
operation: Schema.Literal("stageArtifactBatch"),
|
|
101
|
-
value: StageBatchReceiptSchema,
|
|
102
|
-
});
|
|
47
|
+
export const StageArtifactBatchSuccessSchema = successSchema("stageArtifactBatch", StageBatchReceiptSchema);
|
|
103
48
|
/** Returns the durable phase for the requested exact manifest identity. */
|
|
104
|
-
export const PublicationStatusSuccessSchema =
|
|
105
|
-
ok: Schema.Literal(true),
|
|
106
|
-
operation: Schema.Literal("status"),
|
|
107
|
-
value: ContentReleaseStatusSchema,
|
|
108
|
-
});
|
|
49
|
+
export const PublicationStatusSuccessSchema = successSchema("status", ContentReleaseStatusSchema);
|
|
109
50
|
/** Returns bounded progress or final evidence for durable verification. */
|
|
110
|
-
export const VerifyReleaseSuccessSchema =
|
|
111
|
-
ok: Schema.Literal(true),
|
|
112
|
-
operation: Schema.Literal("verify"),
|
|
113
|
-
value: ReleaseVerificationStatusSchema,
|
|
114
|
-
});
|
|
51
|
+
export const VerifyReleaseSuccessSchema = successSchema("verify", ReleaseVerificationStatusSchema);
|
|
115
52
|
/** Returns the atomic activation receipt for one verified release. */
|
|
116
|
-
export const ActivateReleaseSuccessSchema =
|
|
117
|
-
ok: Schema.Literal(true),
|
|
118
|
-
operation: Schema.Literal("activate"),
|
|
119
|
-
value: PublicationReceiptSchema,
|
|
120
|
-
});
|
|
53
|
+
export const ActivateReleaseSuccessSchema = successSchema("activate", PublicationReceiptSchema);
|
|
121
54
|
/** Returns the atomic activation receipt for one retained inverse release. */
|
|
122
|
-
export const ActivateRecoverySuccessSchema =
|
|
123
|
-
ok: Schema.Literal(true),
|
|
124
|
-
operation: Schema.Literal("activateRecovery"),
|
|
125
|
-
value: PublicationReceiptSchema,
|
|
126
|
-
});
|
|
55
|
+
export const ActivateRecoverySuccessSchema = successSchema("activateRecovery", PublicationReceiptSchema);
|
|
127
56
|
/** Returns one exact bounded page used to build a forward rollback. */
|
|
128
|
-
export const PublicationRollbackSuccessSchema =
|
|
129
|
-
ok: Schema.Literal(true),
|
|
130
|
-
operation: Schema.Literal("rollbackPage"),
|
|
131
|
-
value: RollbackPageSchema,
|
|
132
|
-
});
|
|
57
|
+
export const PublicationRollbackSuccessSchema = successSchema("rollbackPage", RollbackPageSchema);
|
|
133
58
|
/** Returns one bounded prior-owner page used to reverse signed routes. */
|
|
134
|
-
export const PublicationRoutePageSuccessSchema =
|
|
135
|
-
ok: Schema.Literal(true),
|
|
136
|
-
operation: Schema.Literal("routePage"),
|
|
137
|
-
value: RoutePageSchema,
|
|
138
|
-
});
|
|
59
|
+
export const PublicationRoutePageSuccessSchema = successSchema("routePage", RoutePageSchema);
|
|
139
60
|
/** Returns durable cumulative evidence from server-owned cleanup progress. */
|
|
140
|
-
export const PublicationCleanupSuccessSchema =
|
|
141
|
-
ok: Schema.Literal(true),
|
|
142
|
-
operation: Schema.Literal("cleanup"),
|
|
143
|
-
value: ReleaseCleanupReceiptSchema,
|
|
144
|
-
});
|
|
61
|
+
export const PublicationCleanupSuccessSchema = successSchema("cleanup", ReleaseCleanupReceiptSchema);
|
|
145
62
|
/** Complete success vocabulary returned by publication ingress. */
|
|
146
63
|
export const PublicationSuccessSchema = Schema.Union([
|
|
147
64
|
PublicationAcceptSuccessSchema,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { PublicationOperation } from "#contracts/transport/request";
|
|
3
|
+
/**
|
|
4
|
+
* Builds one successful publication envelope for one operation. The operation
|
|
5
|
+
* must be a member of PublicationOperationSchema, so a misspelled operation
|
|
6
|
+
* fails the typecheck instead of producing a response no client accepts.
|
|
7
|
+
*/
|
|
8
|
+
export declare function successSchema<Operation extends PublicationOperation, Value extends Schema.Top>(operation: Operation, value: Value): Schema.Struct<{
|
|
9
|
+
readonly ok: Schema.Literal<true>;
|
|
10
|
+
readonly operation: Schema.Literal<Operation>;
|
|
11
|
+
readonly value: Value;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/**
|
|
3
|
+
* Builds one successful publication envelope for one operation. The operation
|
|
4
|
+
* must be a member of PublicationOperationSchema, so a misspelled operation
|
|
5
|
+
* fails the typecheck instead of producing a response no client accepts.
|
|
6
|
+
*/
|
|
7
|
+
export function successSchema(operation, value) {
|
|
8
|
+
return Schema.Struct({
|
|
9
|
+
ok: Schema.Literal(true),
|
|
10
|
+
operation: Schema.Literal(operation),
|
|
11
|
+
value,
|
|
12
|
+
});
|
|
13
|
+
}
|
package/dist/tryout/catalog.d.ts
CHANGED
|
@@ -161,6 +161,8 @@ export declare const TryoutSectionSchema: Schema.Struct<{
|
|
|
161
161
|
readonly visibility: Schema.Literals<readonly ["internal-entry", "visible"]>;
|
|
162
162
|
}>;
|
|
163
163
|
export type TryoutSection = typeof TryoutSectionSchema.Type;
|
|
164
|
+
/** Counts every question owned by one ordered list of try-out sections. */
|
|
165
|
+
export declare function countSectionQuestions(sections: readonly Pick<TryoutSection, "questionCount">[]): number;
|
|
164
166
|
/** Complete hierarchy vocabulary for try-out publication. */
|
|
165
167
|
export declare const TryoutCatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
|
|
166
168
|
readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
|
package/dist/tryout/catalog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
1
|
+
import { Array as Arr, Schema } from "effect";
|
|
2
2
|
import { CountryCodeSchema } from "#contracts/country";
|
|
3
3
|
import { LearningGraphIdentitySchema } from "#contracts/graph/spec";
|
|
4
4
|
import { CorpusSourcePathSchema, PublicPathSchema, Sha256HashSchema, } from "#contracts/ids";
|
|
@@ -136,6 +136,10 @@ export const TryoutSectionSchema = Schema.Struct({
|
|
|
136
136
|
}).pipe(Schema.check(Schema.makeFilter(({ publicPath, visibility }) => visibility === "visible"
|
|
137
137
|
? publicPath !== undefined
|
|
138
138
|
: publicPath === undefined, { message: "Section visibility does not match its public path." })));
|
|
139
|
+
/** Counts every question owned by one ordered list of try-out sections. */
|
|
140
|
+
export function countSectionQuestions(sections) {
|
|
141
|
+
return Arr.reduce(sections, 0, (total, section) => total + section.questionCount);
|
|
142
|
+
}
|
|
139
143
|
/** Complete hierarchy vocabulary for try-out publication. */
|
|
140
144
|
export const TryoutCatalogRowSchema = Schema.Union([
|
|
141
145
|
TryoutCountrySchema,
|
|
@@ -34,15 +34,21 @@ export declare const digestTryoutCatalog: <E, R>(records: Stream.Stream<{
|
|
|
34
34
|
readonly title: string;
|
|
35
35
|
readonly countryKey: string;
|
|
36
36
|
readonly examKey: string;
|
|
37
|
-
readonly kind: "
|
|
37
|
+
readonly kind: "section";
|
|
38
|
+
readonly marks?: {
|
|
39
|
+
readonly blank: number;
|
|
40
|
+
readonly correct: number;
|
|
41
|
+
readonly wrong: number;
|
|
42
|
+
};
|
|
38
43
|
readonly order: number;
|
|
39
|
-
readonly publicPath
|
|
44
|
+
readonly publicPath?: (string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">) | undefined;
|
|
40
45
|
readonly questionCount: number;
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
46
|
+
readonly questionSourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
47
|
+
readonly sectionKey: string;
|
|
48
|
+
readonly setKey: string;
|
|
49
|
+
readonly timeLimitSeconds: number;
|
|
43
50
|
readonly trackKey: string;
|
|
44
|
-
readonly
|
|
45
|
-
readonly visibleSectionCount: number;
|
|
51
|
+
readonly visibility: "internal-entry" | "visible";
|
|
46
52
|
} | {
|
|
47
53
|
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
48
54
|
readonly description?: string | undefined;
|
|
@@ -81,21 +87,15 @@ export declare const digestTryoutCatalog: <E, R>(records: Stream.Stream<{
|
|
|
81
87
|
readonly title: string;
|
|
82
88
|
readonly countryKey: string;
|
|
83
89
|
readonly examKey: string;
|
|
84
|
-
readonly kind: "
|
|
85
|
-
readonly marks?: {
|
|
86
|
-
readonly blank: number;
|
|
87
|
-
readonly correct: number;
|
|
88
|
-
readonly wrong: number;
|
|
89
|
-
};
|
|
90
|
+
readonly kind: "track";
|
|
90
91
|
readonly order: number;
|
|
91
|
-
readonly publicPath
|
|
92
|
+
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
92
93
|
readonly questionCount: number;
|
|
93
|
-
readonly
|
|
94
|
-
readonly
|
|
95
|
-
readonly setKey: string;
|
|
96
|
-
readonly timeLimitSeconds: number;
|
|
94
|
+
readonly sectionCount: number;
|
|
95
|
+
readonly setCount: number;
|
|
97
96
|
readonly trackKey: string;
|
|
98
|
-
readonly
|
|
97
|
+
readonly trackKind: "institution" | "subject" | "year";
|
|
98
|
+
readonly visibleSectionCount: number;
|
|
99
99
|
} | {
|
|
100
100
|
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
101
101
|
readonly description?: string | undefined;
|
|
@@ -108,11 +108,12 @@ export declare const digestTryoutCatalog: <E, R>(records: Stream.Stream<{
|
|
|
108
108
|
};
|
|
109
109
|
readonly sourceRevision: string;
|
|
110
110
|
readonly title: string;
|
|
111
|
-
readonly countryCode: string;
|
|
112
111
|
readonly countryKey: string;
|
|
113
|
-
readonly
|
|
112
|
+
readonly examKey: string;
|
|
113
|
+
readonly kind: "exam";
|
|
114
114
|
readonly order: number;
|
|
115
115
|
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
116
|
+
readonly scoringStrategy: "irt" | "penalized" | "raw";
|
|
116
117
|
} | {
|
|
117
118
|
readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
|
|
118
119
|
readonly description?: string | undefined;
|
|
@@ -125,12 +126,11 @@ export declare const digestTryoutCatalog: <E, R>(records: Stream.Stream<{
|
|
|
125
126
|
};
|
|
126
127
|
readonly sourceRevision: string;
|
|
127
128
|
readonly title: string;
|
|
129
|
+
readonly countryCode: string;
|
|
128
130
|
readonly countryKey: string;
|
|
129
|
-
readonly
|
|
130
|
-
readonly kind: "exam";
|
|
131
|
+
readonly kind: "country";
|
|
131
132
|
readonly order: number;
|
|
132
133
|
readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
|
|
133
|
-
readonly scoringStrategy: "irt" | "penalized" | "raw";
|
|
134
134
|
};
|
|
135
135
|
readonly rowHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
136
136
|
}, E, R>) => Effect.Effect<{
|
package/package.json
CHANGED