@freedome/protocol 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ /** One validation error (`pointer` = JSON pointer into the instance). */
2
+ interface SchemaIssue {
3
+ /** JSON pointer (`/` for the root). */
4
+ pointer: string;
5
+ /** Raw Ajv instance path (empty string for the root). */
6
+ instancePath: string;
7
+ keyword: string;
8
+ message: string;
9
+ }
10
+ /** Contract schema ids (prefix). */
11
+ declare const SCHEMA_BASE = "https://freedome.nativemind.us/schemas/";
12
+ /** Validates [value] against the schema [id] (absolute `$id`, optionally `#/$defs/x`, or relative to SCHEMA_BASE). */
13
+ declare function validate(id: string, value: unknown): SchemaIssue[];
14
+ /** Validates a `.dome` manifest (`dome.json`) of format 1.1 (or 1.0 when `formatVersion` says so). */
15
+ declare function validateDome(manifest: unknown): SchemaIssue[];
16
+ /** `.dome` minors with a bundled schema (e.g. `['1.0', '1.1']`), oldest first. */
17
+ declare const domeMinors: readonly string[];
18
+ /** All bundled schema ids. */
19
+ declare const schemaIds: readonly string[];
20
+
21
+ export { SCHEMA_BASE, type SchemaIssue, domeMinors, schemaIds, validate, validateDome };
@@ -0,0 +1,21 @@
1
+ /** One validation error (`pointer` = JSON pointer into the instance). */
2
+ interface SchemaIssue {
3
+ /** JSON pointer (`/` for the root). */
4
+ pointer: string;
5
+ /** Raw Ajv instance path (empty string for the root). */
6
+ instancePath: string;
7
+ keyword: string;
8
+ message: string;
9
+ }
10
+ /** Contract schema ids (prefix). */
11
+ declare const SCHEMA_BASE = "https://freedome.nativemind.us/schemas/";
12
+ /** Validates [value] against the schema [id] (absolute `$id`, optionally `#/$defs/x`, or relative to SCHEMA_BASE). */
13
+ declare function validate(id: string, value: unknown): SchemaIssue[];
14
+ /** Validates a `.dome` manifest (`dome.json`) of format 1.1 (or 1.0 when `formatVersion` says so). */
15
+ declare function validateDome(manifest: unknown): SchemaIssue[];
16
+ /** `.dome` minors with a bundled schema (e.g. `['1.0', '1.1']`), oldest first. */
17
+ declare const domeMinors: readonly string[];
18
+ /** All bundled schema ids. */
19
+ declare const schemaIds: readonly string[];
20
+
21
+ export { SCHEMA_BASE, type SchemaIssue, domeMinors, schemaIds, validate, validateDome };