@nakafa/aksara-contracts 0.27.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.
- package/LICENSE +185 -0
- package/README.md +73 -0
- package/dist/artifact/integrity.d.ts +29 -0
- package/dist/artifact/integrity.js +54 -0
- package/dist/artifact/limits.d.ts +26 -0
- package/dist/artifact/limits.js +46 -0
- package/dist/artifact/source.d.ts +21 -0
- package/dist/artifact/source.js +24 -0
- package/dist/artifact/spec.d.ts +148 -0
- package/dist/artifact/spec.js +92 -0
- package/dist/artifact/verify.d.ts +26 -0
- package/dist/artifact/verify.js +18 -0
- package/dist/cache/content.d.ts +52 -0
- package/dist/cache/content.js +80 -0
- package/dist/content.d.ts +168 -0
- package/dist/content.js +107 -0
- package/dist/country.d.ts +4 -0
- package/dist/country.js +8 -0
- package/dist/date.d.ts +24 -0
- package/dist/date.js +44 -0
- package/dist/decode.d.ts +4 -0
- package/dist/decode.js +8 -0
- package/dist/delivery.d.ts +4 -0
- package/dist/delivery.js +7 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.js +8 -0
- package/dist/graph/family.d.ts +45 -0
- package/dist/graph/family.js +85 -0
- package/dist/graph/identity.d.ts +19 -0
- package/dist/graph/identity.js +39 -0
- package/dist/graph/spec.d.ts +20 -0
- package/dist/graph/spec.js +26 -0
- package/dist/hash/text.d.ts +10 -0
- package/dist/hash/text.js +20 -0
- package/dist/ids.d.ts +27 -0
- package/dist/ids.js +63 -0
- package/dist/limits.d.ts +10 -0
- package/dist/limits.js +10 -0
- package/dist/locale.d.ts +37 -0
- package/dist/locale.js +53 -0
- package/dist/material/domain.d.ts +4 -0
- package/dist/material/domain.js +8 -0
- package/dist/preview/artifact.d.ts +198 -0
- package/dist/preview/artifact.js +20 -0
- package/dist/preview/auth.d.ts +71 -0
- package/dist/preview/auth.js +49 -0
- package/dist/preview/document.d.ts +692 -0
- package/dist/preview/document.js +90 -0
- package/dist/preview/spec.d.ts +2517 -0
- package/dist/preview/spec.js +142 -0
- package/dist/preview/target.d.ts +172 -0
- package/dist/preview/target.js +70 -0
- package/dist/program/curriculum.d.ts +69 -0
- package/dist/program/curriculum.js +181 -0
- package/dist/program/snapshot/digest.d.ts +26 -0
- package/dist/program/snapshot/digest.js +220 -0
- package/dist/program/snapshot/hash.d.ts +31 -0
- package/dist/program/snapshot/hash.js +40 -0
- package/dist/program/snapshot/row-hash.d.ts +155 -0
- package/dist/program/snapshot/row-hash.js +34 -0
- package/dist/program/snapshot/row.d.ts +139 -0
- package/dist/program/snapshot/row.js +28 -0
- package/dist/program/snapshot/spec.d.ts +36 -0
- package/dist/program/snapshot/spec.js +39 -0
- package/dist/program/spec.d.ts +85 -0
- package/dist/program/spec.js +197 -0
- package/dist/projection/article.d.ts +145 -0
- package/dist/projection/article.js +150 -0
- package/dist/projection/digest.d.ts +261 -0
- package/dist/projection/digest.js +59 -0
- package/dist/projection/hash.d.ts +3 -0
- package/dist/projection/hash.js +10 -0
- package/dist/projection/material.d.ts +109 -0
- package/dist/projection/material.js +160 -0
- package/dist/projection/page.d.ts +112 -0
- package/dist/projection/page.js +106 -0
- package/dist/projection/question.d.ts +520 -0
- package/dist/projection/question.js +109 -0
- package/dist/projection/spec.d.ts +503 -0
- package/dist/projection/spec.js +56 -0
- package/dist/projection/verify.d.ts +281 -0
- package/dist/projection/verify.js +86 -0
- package/dist/question/identity.d.ts +175 -0
- package/dist/question/identity.js +205 -0
- package/dist/question/item.d.ts +453 -0
- package/dist/question/item.js +146 -0
- package/dist/question/response.d.ts +175 -0
- package/dist/question/response.js +150 -0
- package/dist/quran/attribution.d.ts +48 -0
- package/dist/quran/attribution.js +44 -0
- package/dist/quran/identity.d.ts +105 -0
- package/dist/quran/identity.js +100 -0
- package/dist/quran/notes.d.ts +56 -0
- package/dist/quran/notes.js +142 -0
- package/dist/quran/provenance.d.ts +257 -0
- package/dist/quran/provenance.js +144 -0
- package/dist/quran/snapshot/digest.d.ts +33 -0
- package/dist/quran/snapshot/digest.js +232 -0
- package/dist/quran/snapshot/hash.d.ts +51 -0
- package/dist/quran/snapshot/hash.js +50 -0
- package/dist/quran/snapshot/row/hash.d.ts +748 -0
- package/dist/quran/snapshot/row/hash.js +115 -0
- package/dist/quran/snapshot/row.d.ts +354 -0
- package/dist/quran/snapshot/row.js +91 -0
- package/dist/quran/snapshot/spec.d.ts +50 -0
- package/dist/quran/snapshot/spec.js +66 -0
- package/dist/quran/source.d.ts +206 -0
- package/dist/quran/source.js +153 -0
- package/dist/quran/spec.d.ts +47 -0
- package/dist/quran/spec.js +41 -0
- package/dist/quran/text.d.ts +7 -0
- package/dist/quran/text.js +11 -0
- package/dist/release/canonical.d.ts +23 -0
- package/dist/release/canonical.js +29 -0
- package/dist/release/current/evidence.d.ts +424 -0
- package/dist/release/current/evidence.js +41 -0
- package/dist/release/current/runtime.d.ts +4 -0
- package/dist/release/current/runtime.js +15 -0
- package/dist/release/current/state.d.ts +567 -0
- package/dist/release/current/state.js +91 -0
- package/dist/release/digest.d.ts +54 -0
- package/dist/release/digest.js +71 -0
- package/dist/release/hash.d.ts +72 -0
- package/dist/release/hash.js +14 -0
- package/dist/release/head.d.ts +206 -0
- package/dist/release/head.js +131 -0
- package/dist/release/items.d.ts +98 -0
- package/dist/release/items.js +114 -0
- package/dist/release/lifecycle.d.ts +297 -0
- package/dist/release/lifecycle.js +97 -0
- package/dist/release/origin.d.ts +30 -0
- package/dist/release/origin.js +24 -0
- package/dist/release/policy.d.ts +45 -0
- package/dist/release/policy.js +124 -0
- package/dist/release/result/digest.d.ts +127 -0
- package/dist/release/result/digest.js +140 -0
- package/dist/release/result/spec.d.ts +4 -0
- package/dist/release/result/spec.js +5 -0
- package/dist/release/rollback/digest.d.ts +126 -0
- package/dist/release/rollback/digest.js +92 -0
- package/dist/release/rollback/spec.d.ts +1729 -0
- package/dist/release/rollback/spec.js +156 -0
- package/dist/release/route/digest.d.ts +45 -0
- package/dist/release/route/digest.js +59 -0
- package/dist/release/route/page.d.ts +56 -0
- package/dist/release/route/page.js +46 -0
- package/dist/release/route/spec.d.ts +49 -0
- package/dist/release/route/spec.js +40 -0
- package/dist/release/route/verify.d.ts +66 -0
- package/dist/release/route/verify.js +67 -0
- package/dist/release/signing.d.ts +6 -0
- package/dist/release/signing.js +38 -0
- package/dist/release/snapshot/data.d.ts +475 -0
- package/dist/release/snapshot/data.js +74 -0
- package/dist/release/snapshot/evidence-requirement.d.ts +22 -0
- package/dist/release/snapshot/evidence-requirement.js +21 -0
- package/dist/release/snapshot/evidence.d.ts +58 -0
- package/dist/release/snapshot/evidence.js +14 -0
- package/dist/release/snapshot/program-evidence.d.ts +17 -0
- package/dist/release/snapshot/program-evidence.js +39 -0
- package/dist/release/snapshot/quran-evidence.d.ts +27 -0
- package/dist/release/snapshot/quran-evidence.js +43 -0
- package/dist/release/snapshot/scope.d.ts +60 -0
- package/dist/release/snapshot/scope.js +102 -0
- package/dist/release/snapshot/spec.d.ts +193 -0
- package/dist/release/snapshot/spec.js +139 -0
- package/dist/release/snapshot/tryout-evidence.d.ts +22 -0
- package/dist/release/snapshot/tryout-evidence.js +86 -0
- package/dist/release/snapshot/verify.d.ts +710 -0
- package/dist/release/snapshot/verify.js +147 -0
- package/dist/release/spec.d.ts +491 -0
- package/dist/release/spec.js +200 -0
- package/dist/release/verify.d.ts +98 -0
- package/dist/release/verify.js +70 -0
- package/dist/renderer/compatibility.d.ts +35 -0
- package/dist/renderer/compatibility.js +48 -0
- package/dist/renderer/component.d.ts +99 -0
- package/dist/renderer/component.js +102 -0
- package/dist/renderer/contract.d.ts +144 -0
- package/dist/renderer/contract.js +122 -0
- package/dist/renderer/domain.d.ts +6 -0
- package/dist/renderer/domain.js +18 -0
- package/dist/renderer/manifest.d.ts +86 -0
- package/dist/renderer/manifest.js +49 -0
- package/dist/renderer/selection.d.ts +39 -0
- package/dist/renderer/selection.js +87 -0
- package/dist/runtime/error.d.ts +8 -0
- package/dist/runtime/error.js +20 -0
- package/dist/runtime/protected/limits.d.ts +10 -0
- package/dist/runtime/protected/limits.js +15 -0
- package/dist/runtime/protected/spec.d.ts +328 -0
- package/dist/runtime/protected/spec.js +79 -0
- package/dist/runtime/protected/verify.d.ts +97 -0
- package/dist/runtime/protected/verify.js +72 -0
- package/dist/runtime/result.d.ts +12 -0
- package/dist/runtime/result.js +17 -0
- package/dist/runtime/spec.d.ts +705 -0
- package/dist/runtime/spec.js +61 -0
- package/dist/runtime/verify.d.ts +479 -0
- package/dist/runtime/verify.js +123 -0
- package/dist/signature/spec.d.ts +53 -0
- package/dist/signature/spec.js +29 -0
- package/dist/signature/trusted.d.ts +19 -0
- package/dist/signature/trusted.js +32 -0
- package/dist/signature/verify.d.ts +10 -0
- package/dist/signature/verify.js +82 -0
- package/dist/text/order.d.ts +2 -0
- package/dist/text/order.js +10 -0
- package/dist/text/syntax.d.ts +6 -0
- package/dist/text/syntax.js +15 -0
- package/dist/transport/batch.d.ts +971 -0
- package/dist/transport/batch.js +101 -0
- package/dist/transport/failure.d.ts +168 -0
- package/dist/transport/failure.js +194 -0
- package/dist/transport/group.d.ts +2946 -0
- package/dist/transport/group.js +47 -0
- package/dist/transport/limits.d.ts +30 -0
- package/dist/transport/limits.js +30 -0
- package/dist/transport/request.d.ts +9333 -0
- package/dist/transport/request.js +121 -0
- package/dist/transport/response.d.ts +6247 -0
- package/dist/transport/response.js +181 -0
- package/dist/transport/runtime.d.ts +77 -0
- package/dist/transport/runtime.js +33 -0
- package/dist/transport/snapshot.d.ts +978 -0
- package/dist/transport/snapshot.js +70 -0
- package/dist/tryout/canonical.d.ts +2 -0
- package/dist/tryout/canonical.js +11 -0
- package/dist/tryout/catalog-hash.d.ts +134 -0
- package/dist/tryout/catalog-hash.js +203 -0
- package/dist/tryout/catalog.d.ts +376 -0
- package/dist/tryout/catalog.js +147 -0
- package/dist/tryout/content-hash.d.ts +89 -0
- package/dist/tryout/content-hash.js +72 -0
- package/dist/tryout/identity.d.ts +12 -0
- package/dist/tryout/identity.js +46 -0
- package/dist/tryout/key.d.ts +4 -0
- package/dist/tryout/key.js +8 -0
- package/dist/tryout/language.d.ts +24 -0
- package/dist/tryout/language.js +32 -0
- package/dist/tryout/locale-closure.d.ts +20 -0
- package/dist/tryout/locale-closure.js +164 -0
- package/dist/tryout/placement-closure.d.ts +5 -0
- package/dist/tryout/placement-closure.js +30 -0
- package/dist/tryout/placement-hash.d.ts +11 -0
- package/dist/tryout/placement-hash.js +55 -0
- package/dist/tryout/placement.d.ts +280 -0
- package/dist/tryout/placement.js +82 -0
- package/dist/tryout/row-hash.d.ts +28 -0
- package/dist/tryout/row-hash.js +50 -0
- package/dist/tryout/runtime/canonical.d.ts +8 -0
- package/dist/tryout/runtime/canonical.js +33 -0
- package/dist/tryout/runtime/hash.d.ts +32 -0
- package/dist/tryout/runtime/hash.js +11 -0
- package/dist/tryout/runtime/source.d.ts +42 -0
- package/dist/tryout/runtime/source.js +47 -0
- package/dist/tryout/runtime/spec.d.ts +58 -0
- package/dist/tryout/runtime/spec.js +21 -0
- package/dist/tryout/runtime/verify.d.ts +61 -0
- package/dist/tryout/runtime/verify.js +69 -0
- package/dist/tryout/snapshot/canonical.d.ts +7 -0
- package/dist/tryout/snapshot/canonical.js +17 -0
- package/dist/tryout/snapshot/hash.d.ts +8 -0
- package/dist/tryout/snapshot/hash.js +19 -0
- package/dist/tryout/snapshot/spec.d.ts +46 -0
- package/dist/tryout/snapshot/spec.js +30 -0
- package/dist/tryout/spec.d.ts +13 -0
- package/dist/tryout/spec.js +15 -0
- package/package.json +506 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { decodeContract } from "#contracts/decode";
|
|
3
|
+
import { HeadPageRequestSchema } from "#contracts/release/head";
|
|
4
|
+
import { ContentReleaseBundleSchema, ContentReleaseStatusRequestSchema, ReleaseAbortRequestSchema, ReleaseAcceptRequestSchema, ReleaseCleanupRequestSchema, } from "#contracts/release/lifecycle";
|
|
5
|
+
import { RollbackPageRequestSchema } from "#contracts/release/rollback/spec";
|
|
6
|
+
import { RoutePageRequestSchema } from "#contracts/release/route/page";
|
|
7
|
+
import { RollbackSignedContentReleaseSchema, SignedContentReleaseSchema, } from "#contracts/release/spec";
|
|
8
|
+
import { StageArtifactBatchRequestSchema, StageItemBatchRequestSchema, StageProjectionBatchRequestSchema, StageRouteBatchRequestSchema, } from "#contracts/transport/batch";
|
|
9
|
+
import { StageGroupRequestSchema } from "#contracts/transport/group";
|
|
10
|
+
import { StageTryoutRuntimeBundleRequestSchema } from "#contracts/transport/runtime";
|
|
11
|
+
import { StageSnapshotBatchRequestSchema, StageSnapshotRequestSchema, } from "#contracts/transport/snapshot";
|
|
12
|
+
/** Complete stable operation vocabulary shared by requests and diagnostics. */
|
|
13
|
+
export const PublicationOperationSchema = Schema.Literals([
|
|
14
|
+
"abort",
|
|
15
|
+
"accept",
|
|
16
|
+
"activate",
|
|
17
|
+
"activateRecovery",
|
|
18
|
+
"cleanup",
|
|
19
|
+
"current",
|
|
20
|
+
"headPage",
|
|
21
|
+
"recovery",
|
|
22
|
+
"rollbackPage",
|
|
23
|
+
"routePage",
|
|
24
|
+
"stageArtifactBatch",
|
|
25
|
+
"stageGroup",
|
|
26
|
+
"stageItemBatch",
|
|
27
|
+
"stageProjectionBatch",
|
|
28
|
+
"stageRecovery",
|
|
29
|
+
"stageRelease",
|
|
30
|
+
"stageRouteBatch",
|
|
31
|
+
"stageSnapshot",
|
|
32
|
+
"stageSnapshotBatch",
|
|
33
|
+
"stageTryoutRuntimeBundle",
|
|
34
|
+
"status",
|
|
35
|
+
"verify",
|
|
36
|
+
]);
|
|
37
|
+
/** Reads the authoritative active, candidate, and recovery identities. */
|
|
38
|
+
export const PublicationCurrentRequestSchema = Schema.Struct({
|
|
39
|
+
operation: Schema.Literal("current"),
|
|
40
|
+
});
|
|
41
|
+
/** Abandons one invisible staged release through server-owned progress. */
|
|
42
|
+
export const PublicationAbortRequestSchema = Schema.Struct({
|
|
43
|
+
...ReleaseAbortRequestSchema.fields,
|
|
44
|
+
operation: Schema.Literal("abort"),
|
|
45
|
+
});
|
|
46
|
+
/** Accepts one healthy release and discards its exact retained inverse. */
|
|
47
|
+
export const PublicationAcceptRequestSchema = ReleaseAcceptRequestSchema.mapFields((fields) => ({ ...fields, operation: Schema.Literal("accept") }), { unsafePreserveChecks: true });
|
|
48
|
+
/** Reads one bounded authoritative material-head page for an active release. */
|
|
49
|
+
export const PublicationHeadPageRequestSchema = Schema.Struct({
|
|
50
|
+
...HeadPageRequestSchema.fields,
|
|
51
|
+
operation: Schema.Literal("headPage"),
|
|
52
|
+
});
|
|
53
|
+
/** Looks up exact historical completion evidence for one signed recovery. */
|
|
54
|
+
export const PublicationRecoveryLookupRequestSchema = ReleaseAcceptRequestSchema.mapFields((fields) => ({ ...fields, operation: Schema.Literal("recovery") }), { unsafePreserveChecks: true });
|
|
55
|
+
/** Starts or idempotently resumes one exact signed release. */
|
|
56
|
+
export const StageReleaseRequestSchema = ContentReleaseBundleSchema.mapFields((fields) => ({ ...fields, operation: Schema.Literal("stageRelease") }), { unsafePreserveChecks: true });
|
|
57
|
+
/** Starts or idempotently resumes one exact pre-staged inverse release. */
|
|
58
|
+
const StageRecoveryRequestBaseSchema = ContentReleaseBundleSchema.mapFields((fields) => ({ ...fields, operation: Schema.Literal("stageRecovery") }), { unsafePreserveChecks: true });
|
|
59
|
+
export const StageRecoveryRequestSchema = StageRecoveryRequestBaseSchema.pipe(Schema.refine((request) => request.release.manifest.origin.kind === "rollback", { message: "Expected a rollback release for recovery staging." }));
|
|
60
|
+
/** Reads the durable phase for one exact manifest identity. */
|
|
61
|
+
export const PublicationStatusRequestSchema = Schema.Struct({
|
|
62
|
+
...ContentReleaseStatusRequestSchema.fields,
|
|
63
|
+
operation: Schema.Literal("status"),
|
|
64
|
+
});
|
|
65
|
+
/** Recomputes all staged evidence for one signed release. */
|
|
66
|
+
export const VerifyReleaseRequestSchema = Schema.Struct({
|
|
67
|
+
operation: Schema.Literal("verify"),
|
|
68
|
+
release: SignedContentReleaseSchema,
|
|
69
|
+
});
|
|
70
|
+
/** Atomically activates one fully verified signed release. */
|
|
71
|
+
export const ActivateReleaseRequestSchema = Schema.Struct({
|
|
72
|
+
operation: Schema.Literal("activate"),
|
|
73
|
+
release: SignedContentReleaseSchema,
|
|
74
|
+
});
|
|
75
|
+
/** Atomically activates the retained inverse for the exact active release. */
|
|
76
|
+
export const ActivateRecoveryRequestSchema = Schema.Struct({
|
|
77
|
+
operation: Schema.Literal("activateRecovery"),
|
|
78
|
+
release: RollbackSignedContentReleaseSchema,
|
|
79
|
+
});
|
|
80
|
+
/** Reads one bounded prior-state page for a forward rollback release. */
|
|
81
|
+
export const PublicationRollbackRequestSchema = Schema.Struct({
|
|
82
|
+
...RollbackPageRequestSchema.fields,
|
|
83
|
+
operation: Schema.Literal("rollbackPage"),
|
|
84
|
+
});
|
|
85
|
+
/** Reads one bounded prior-owner page for a forward route rollback. */
|
|
86
|
+
export const PublicationRoutePageRequestSchema = Schema.Struct({
|
|
87
|
+
...RoutePageRequestSchema.fields,
|
|
88
|
+
operation: Schema.Literal("routePage"),
|
|
89
|
+
});
|
|
90
|
+
/** Deletes one bounded page of unreachable release-owned rows. */
|
|
91
|
+
export const PublicationCleanupRequestSchema = Schema.Struct({
|
|
92
|
+
...ReleaseCleanupRequestSchema.fields,
|
|
93
|
+
operation: Schema.Literal("cleanup"),
|
|
94
|
+
});
|
|
95
|
+
/** Complete request vocabulary accepted by publication ingress. */
|
|
96
|
+
export const PublicationRequestSchema = Schema.Union([
|
|
97
|
+
PublicationAcceptRequestSchema,
|
|
98
|
+
PublicationAbortRequestSchema,
|
|
99
|
+
PublicationCurrentRequestSchema,
|
|
100
|
+
PublicationHeadPageRequestSchema,
|
|
101
|
+
PublicationRecoveryLookupRequestSchema,
|
|
102
|
+
StageReleaseRequestSchema,
|
|
103
|
+
StageRecoveryRequestSchema,
|
|
104
|
+
StageSnapshotRequestSchema,
|
|
105
|
+
StageSnapshotBatchRequestSchema,
|
|
106
|
+
StageTryoutRuntimeBundleRequestSchema,
|
|
107
|
+
StageGroupRequestSchema,
|
|
108
|
+
StageItemBatchRequestSchema,
|
|
109
|
+
StageRouteBatchRequestSchema,
|
|
110
|
+
StageProjectionBatchRequestSchema,
|
|
111
|
+
StageArtifactBatchRequestSchema,
|
|
112
|
+
PublicationStatusRequestSchema,
|
|
113
|
+
VerifyReleaseRequestSchema,
|
|
114
|
+
ActivateReleaseRequestSchema,
|
|
115
|
+
ActivateRecoveryRequestSchema,
|
|
116
|
+
PublicationRollbackRequestSchema,
|
|
117
|
+
PublicationRoutePageRequestSchema,
|
|
118
|
+
PublicationCleanupRequestSchema,
|
|
119
|
+
]);
|
|
120
|
+
/** Strictly decodes one unknown publication request without throwing. */
|
|
121
|
+
export const decodePublicationRequest = Effect.fn("AksaraContracts.decodePublicationRequest")((input) => decodeContract(PublicationRequestSchema, "PublicationRequest", input));
|