@twin.org/data-framework 0.0.3-next.16 → 0.0.3-next.17

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Framework Data
2
2
 
3
- Models which define the structure of framework types.
3
+ This package provides framework data models that define common structures consumed by other packages in the repository. It centralises shared domain shapes so integrations can rely on clearer contracts and maintain semantic consistency as the ecosystem evolves.
4
4
 
5
5
  ## Installation
6
6
 
package/docs/changelog.md CHANGED
@@ -1,4 +1,19 @@
1
- # @twin.org/data-framework - Changelog
1
+ # Changelog
2
+
3
+ ## [0.0.3-next.17](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.16...data-framework-v0.0.3-next.17) (2026-03-12)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **data-framework:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/data-core bumped from 0.0.3-next.16 to 0.0.3-next.17
16
+ * @twin.org/data-json-ld bumped from 0.0.3-next.16 to 0.0.3-next.17
2
17
 
3
18
  ## [0.0.3-next.16](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.15...data-framework-v0.0.3-next.16) (2026-03-06)
4
19
 
package/docs/examples.md CHANGED
@@ -1 +1,30 @@
1
- # @twin.org/data-framework - Examples
1
+ # Data Framework Examples
2
+
3
+ These examples show how to register framework data types and validate values against the registered handlers.
4
+
5
+ ## FrameworkDataTypes
6
+
7
+ ```typescript
8
+ import { type IValidationFailure } from '@twin.org/core';
9
+ import { DataTypeHelper, ValidationMode } from '@twin.org/data-core';
10
+ import { FrameworkContexts, FrameworkDataTypes, FrameworkTypes } from '@twin.org/data-framework';
11
+
12
+ FrameworkDataTypes.registerTypes();
13
+
14
+ const failures: IValidationFailure[] = [];
15
+ const urnType = `${FrameworkContexts.Namespace}${FrameworkTypes.Urn}`;
16
+
17
+ const isValidUrn = await DataTypeHelper.validate(
18
+ 'resourceId',
19
+ urnType,
20
+ 'urn:example:12345',
21
+ failures,
22
+ {
23
+ validationMode: ValidationMode.Both,
24
+ failOnMissingType: true
25
+ }
26
+ );
27
+
28
+ console.log('URN validation result:', isValidUrn);
29
+ console.log('Failure count:', failures.length);
30
+ ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@twin.org/data-framework",
3
- "version": "0.0.3-next.16",
4
- "description": "Models which define the structure of framework types",
3
+ "version": "0.0.3-next.17",
4
+ "description": "Framework data models that define common structures used by other packages.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/data.git",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/core": "next",
18
- "@twin.org/data-core": "0.0.3-next.16",
19
- "@twin.org/data-json-ld": "0.0.3-next.16",
18
+ "@twin.org/data-core": "0.0.3-next.17",
19
+ "@twin.org/data-json-ld": "0.0.3-next.17",
20
20
  "@twin.org/entity": "next",
21
21
  "@twin.org/nameof": "next"
22
22
  },