@twin.org/data-framework 0.0.3-next.2 → 0.0.3-next.20

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
 
@@ -15,22 +15,25 @@ export class FrameworkDataTypes {
15
15
  * Register all the data types.
16
16
  */
17
17
  static registerTypes() {
18
- DataTypeHandlerFactory.register(`${FrameworkContexts.ContextRoot}${FrameworkTypes.Urn}`, () => ({
19
- context: FrameworkContexts.ContextRoot,
18
+ DataTypeHandlerFactory.register(`${FrameworkContexts.Namespace}${FrameworkTypes.Urn}`, () => ({
19
+ namespace: FrameworkContexts.Namespace,
20
+ jsonLdContext: FrameworkContexts.JsonLdContext,
20
21
  type: FrameworkTypes.Urn,
21
22
  defaultValue: "",
22
23
  jsonSchema: async () => URNSchema,
23
24
  validate: async (propertyName, value, failures, container) => Urn.validate(propertyName, value, failures)
24
25
  }));
25
- DataTypeHandlerFactory.register(`${FrameworkContexts.ContextRoot}${FrameworkTypes.TimestampMilliseconds}`, () => ({
26
- context: FrameworkContexts.ContextRoot,
26
+ DataTypeHandlerFactory.register(`${FrameworkContexts.Namespace}${FrameworkTypes.TimestampMilliseconds}`, () => ({
27
+ namespace: FrameworkContexts.Namespace,
28
+ jsonLdContext: FrameworkContexts.JsonLdContext,
27
29
  type: FrameworkTypes.TimestampMilliseconds,
28
30
  defaultValue: Date.now(),
29
31
  jsonSchema: async () => TimestampMillisecondsSchema,
30
32
  validate: async (propertyName, value, failures, container) => Validation.timestampMilliseconds(propertyName, value, failures)
31
33
  }));
32
- DataTypeHandlerFactory.register(`${FrameworkContexts.ContextRoot}${FrameworkTypes.TimestampSeconds}`, () => ({
33
- context: FrameworkContexts.ContextRoot,
34
+ DataTypeHandlerFactory.register(`${FrameworkContexts.Namespace}${FrameworkTypes.TimestampSeconds}`, () => ({
35
+ namespace: FrameworkContexts.Namespace,
36
+ jsonLdContext: FrameworkContexts.JsonLdContext,
34
37
  type: FrameworkTypes.TimestampSeconds,
35
38
  defaultValue: Math.floor(Date.now() / 1000),
36
39
  jsonSchema: async () => TimestampSecondsSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"frameworkDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/frameworkDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,sBAAsB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5F,OAAO,SAAS,MAAM,qBAAqB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAC9B;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,iBAAiB,CAAC,WAAW,GAAG,cAAc,CAAC,GAAG,EAAE,EACvD,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,iBAAiB,CAAC,WAAW;YACtC,IAAI,EAAE,cAAc,CAAC,GAAG;YACxB,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,SAAwB;YAChD,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,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core\";\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { FrameworkContexts } from \"../models/frameworkContexts.js\";\nimport { FrameworkTypes } from \"../models/frameworkTypes.js\";\nimport TimestampMillisecondsSchema from \"../schemas/TimestampMilliseconds.json\" with { type: \"json\" };\nimport TimestampSecondsSchema from \"../schemas/TimestampSeconds.json\" with { type: \"json\" };\nimport URNSchema from \"../schemas/URN.json\" with { type: \"json\" };\n\n/**\n * Handle all the framework data types.\n */\nexport class FrameworkDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${FrameworkContexts.ContextRoot}${FrameworkTypes.Urn}`,\n\t\t\t() => ({\n\t\t\t\tcontext: FrameworkContexts.ContextRoot,\n\t\t\t\ttype: FrameworkTypes.Urn,\n\t\t\t\tdefaultValue: \"\",\n\t\t\t\tjsonSchema: async () => URNSchema as IJsonSchema,\n\t\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\t\tUrn.validate(propertyName, value, failures)\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${FrameworkContexts.ContextRoot}${FrameworkTypes.TimestampMilliseconds}`,\n\t\t\t() => ({\n\t\t\t\tcontext: FrameworkContexts.ContextRoot,\n\t\t\t\ttype: FrameworkTypes.TimestampMilliseconds,\n\t\t\t\tdefaultValue: Date.now(),\n\t\t\t\tjsonSchema: async () => TimestampMillisecondsSchema as IJsonSchema,\n\t\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\t\tValidation.timestampMilliseconds(propertyName, value, failures)\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${FrameworkContexts.ContextRoot}${FrameworkTypes.TimestampSeconds}`,\n\t\t\t() => ({\n\t\t\t\tcontext: FrameworkContexts.ContextRoot,\n\t\t\t\ttype: FrameworkTypes.TimestampSeconds,\n\t\t\t\tdefaultValue: Math.floor(Date.now() / 1000),\n\t\t\t\tjsonSchema: async () => TimestampSecondsSchema as IJsonSchema,\n\t\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\t\tValidation.timestampSeconds(propertyName, value, failures)\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"frameworkDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/frameworkDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,2BAA2B,MAAM,uCAAuC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACtG,OAAO,sBAAsB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5F,OAAO,SAAS,MAAM,qBAAqB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElE;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAC9B;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAAC,GAAG,iBAAiB,CAAC,SAAS,GAAG,cAAc,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YAC7F,SAAS,EAAE,iBAAiB,CAAC,SAAS;YACtC,aAAa,EAAE,iBAAiB,CAAC,aAAa;YAC9C,IAAI,EAAE,cAAc,CAAC,GAAG;YACxB,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,SAAwB;YAChD,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,C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: Apache-2.0.\nimport { Urn, Validation } from \"@twin.org/core\";\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { FrameworkContexts } from \"../models/frameworkContexts.js\";\nimport { FrameworkTypes } from \"../models/frameworkTypes.js\";\nimport TimestampMillisecondsSchema from \"../schemas/TimestampMilliseconds.json\" with { type: \"json\" };\nimport TimestampSecondsSchema from \"../schemas/TimestampSeconds.json\" with { type: \"json\" };\nimport URNSchema from \"../schemas/URN.json\" with { type: \"json\" };\n\n/**\n * Handle all the framework data types.\n */\nexport class FrameworkDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(`${FrameworkContexts.Namespace}${FrameworkTypes.Urn}`, () => ({\n\t\t\tnamespace: FrameworkContexts.Namespace,\n\t\t\tjsonLdContext: FrameworkContexts.JsonLdContext,\n\t\t\ttype: FrameworkTypes.Urn,\n\t\t\tdefaultValue: \"\",\n\t\t\tjsonSchema: async () => URNSchema as IJsonSchema,\n\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\tUrn.validate(propertyName, value, failures)\n\t\t}));\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${FrameworkContexts.Namespace}${FrameworkTypes.TimestampMilliseconds}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: FrameworkContexts.Namespace,\n\t\t\t\tjsonLdContext: FrameworkContexts.JsonLdContext,\n\t\t\t\ttype: FrameworkTypes.TimestampMilliseconds,\n\t\t\t\tdefaultValue: Date.now(),\n\t\t\t\tjsonSchema: async () => TimestampMillisecondsSchema as IJsonSchema,\n\t\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\t\tValidation.timestampMilliseconds(propertyName, value, failures)\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${FrameworkContexts.Namespace}${FrameworkTypes.TimestampSeconds}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: FrameworkContexts.Namespace,\n\t\t\t\tjsonLdContext: FrameworkContexts.JsonLdContext,\n\t\t\t\ttype: FrameworkTypes.TimestampSeconds,\n\t\t\t\tdefaultValue: Math.floor(Date.now() / 1000),\n\t\t\t\tjsonSchema: async () => TimestampSecondsSchema as IJsonSchema,\n\t\t\t\tvalidate: async (propertyName, value, failures, container) =>\n\t\t\t\t\tValidation.timestampSeconds(propertyName, value, failures)\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
@@ -6,8 +6,16 @@
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
7
7
  export const FrameworkContexts = {
8
8
  /**
9
- * Context Root.
9
+ * The canonical RDF namespace URI for Framework.
10
10
  */
11
- ContextRoot: "https://schema.twindev.org/framework/"
11
+ Namespace: "https://schema.twindev.org/framework/",
12
+ /**
13
+ * The value to use in JSON-LD context for Framework.
14
+ */
15
+ Context: "https://schema.twindev.org/framework/",
16
+ /**
17
+ * The JSON-LD Context URL for Framework.
18
+ */
19
+ JsonLdContext: "https://schema.twindev.org/framework/types.jsonld"
12
20
  };
13
21
  //# sourceMappingURL=frameworkContexts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frameworkContexts.js","sourceRoot":"","sources":["../../../src/models/frameworkContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC;;OAEG;IACH,WAAW,EAAE,uCAAuC;CAC3C,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of framework data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const FrameworkContexts = {\n\t/**\n\t * Context Root.\n\t */\n\tContextRoot: \"https://schema.twindev.org/framework/\"\n} as const;\n\n/**\n * The contexts of framework data.\n */\nexport type FrameworkContexts = (typeof FrameworkContexts)[keyof typeof FrameworkContexts];\n"]}
1
+ {"version":3,"file":"frameworkContexts.js","sourceRoot":"","sources":["../../../src/models/frameworkContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC;;OAEG;IACH,SAAS,EAAE,uCAAuC;IAElD;;OAEG;IACH,OAAO,EAAE,uCAAuC;IAEhD;;OAEG;IACH,aAAa,EAAE,mDAAmD;CACzD,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of framework data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const FrameworkContexts = {\n\t/**\n\t * The canonical RDF namespace URI for Framework.\n\t */\n\tNamespace: \"https://schema.twindev.org/framework/\",\n\n\t/**\n\t * The value to use in JSON-LD context for Framework.\n\t */\n\tContext: \"https://schema.twindev.org/framework/\",\n\n\t/**\n\t * The JSON-LD Context URL for Framework.\n\t */\n\tJsonLdContext: \"https://schema.twindev.org/framework/types.jsonld\"\n} as const;\n\n/**\n * The contexts of framework data.\n */\nexport type FrameworkContexts = (typeof FrameworkContexts)[keyof typeof FrameworkContexts];\n"]}
@@ -3,9 +3,17 @@
3
3
  */
4
4
  export declare const FrameworkContexts: {
5
5
  /**
6
- * Context Root.
6
+ * The canonical RDF namespace URI for Framework.
7
7
  */
8
- readonly ContextRoot: "https://schema.twindev.org/framework/";
8
+ readonly Namespace: "https://schema.twindev.org/framework/";
9
+ /**
10
+ * The value to use in JSON-LD context for Framework.
11
+ */
12
+ readonly Context: "https://schema.twindev.org/framework/";
13
+ /**
14
+ * The JSON-LD Context URL for Framework.
15
+ */
16
+ readonly JsonLdContext: "https://schema.twindev.org/framework/types.jsonld";
9
17
  };
10
18
  /**
11
19
  * The contexts of framework data.
package/docs/changelog.md CHANGED
@@ -1,4 +1,274 @@
1
- # @twin.org/data-framework - Changelog
1
+ # Changelog
2
+
3
+ ## [0.0.3-next.20](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.19...data-framework-v0.0.3-next.20) (2026-03-24)
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.19 to 0.0.3-next.20
16
+ * @twin.org/data-json-ld bumped from 0.0.3-next.19 to 0.0.3-next.20
17
+
18
+ ## [0.0.3-next.19](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.18...data-framework-v0.0.3-next.19) (2026-03-20)
19
+
20
+
21
+ ### Miscellaneous Chores
22
+
23
+ * **data-framework:** Synchronize repo versions
24
+
25
+
26
+ ### Dependencies
27
+
28
+ * The following workspace dependencies were updated
29
+ * dependencies
30
+ * @twin.org/data-core bumped from 0.0.3-next.18 to 0.0.3-next.19
31
+ * @twin.org/data-json-ld bumped from 0.0.3-next.18 to 0.0.3-next.19
32
+
33
+ ## [0.0.3-next.18](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.17...data-framework-v0.0.3-next.18) (2026-03-16)
34
+
35
+
36
+ ### Miscellaneous Chores
37
+
38
+ * **data-framework:** Synchronize repo versions
39
+
40
+
41
+ ### Dependencies
42
+
43
+ * The following workspace dependencies were updated
44
+ * dependencies
45
+ * @twin.org/data-core bumped from 0.0.3-next.17 to 0.0.3-next.18
46
+ * @twin.org/data-json-ld bumped from 0.0.3-next.17 to 0.0.3-next.18
47
+
48
+ ## [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)
49
+
50
+
51
+ ### Miscellaneous Chores
52
+
53
+ * **data-framework:** Synchronize repo versions
54
+
55
+
56
+ ### Dependencies
57
+
58
+ * The following workspace dependencies were updated
59
+ * dependencies
60
+ * @twin.org/data-core bumped from 0.0.3-next.16 to 0.0.3-next.17
61
+ * @twin.org/data-json-ld bumped from 0.0.3-next.16 to 0.0.3-next.17
62
+
63
+ ## [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)
64
+
65
+
66
+ ### Miscellaneous Chores
67
+
68
+ * **data-framework:** Synchronize repo versions
69
+
70
+
71
+ ### Dependencies
72
+
73
+ * The following workspace dependencies were updated
74
+ * dependencies
75
+ * @twin.org/data-core bumped from 0.0.3-next.15 to 0.0.3-next.16
76
+ * @twin.org/data-json-ld bumped from 0.0.3-next.15 to 0.0.3-next.16
77
+
78
+ ## [0.0.3-next.15](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.14...data-framework-v0.0.3-next.15) (2026-02-27)
79
+
80
+
81
+ ### Miscellaneous Chores
82
+
83
+ * **data-framework:** Synchronize repo versions
84
+
85
+
86
+ ### Dependencies
87
+
88
+ * The following workspace dependencies were updated
89
+ * dependencies
90
+ * @twin.org/data-core bumped from 0.0.3-next.14 to 0.0.3-next.15
91
+ * @twin.org/data-json-ld bumped from 0.0.3-next.14 to 0.0.3-next.15
92
+
93
+ ## [0.0.3-next.14](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.13...data-framework-v0.0.3-next.14) (2026-02-25)
94
+
95
+
96
+ ### Miscellaneous Chores
97
+
98
+ * **data-framework:** Synchronize repo versions
99
+
100
+
101
+ ### Dependencies
102
+
103
+ * The following workspace dependencies were updated
104
+ * dependencies
105
+ * @twin.org/data-core bumped from 0.0.3-next.13 to 0.0.3-next.14
106
+ * @twin.org/data-json-ld bumped from 0.0.3-next.13 to 0.0.3-next.14
107
+
108
+ ## [0.0.3-next.13](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.12...data-framework-v0.0.3-next.13) (2026-02-25)
109
+
110
+
111
+ ### Miscellaneous Chores
112
+
113
+ * **data-framework:** Synchronize repo versions
114
+
115
+
116
+ ### Dependencies
117
+
118
+ * The following workspace dependencies were updated
119
+ * dependencies
120
+ * @twin.org/data-core bumped from 0.0.3-next.12 to 0.0.3-next.13
121
+ * @twin.org/data-json-ld bumped from 0.0.3-next.12 to 0.0.3-next.13
122
+
123
+ ## [0.0.3-next.12](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.11...data-framework-v0.0.3-next.12) (2026-02-25)
124
+
125
+
126
+ ### Miscellaneous Chores
127
+
128
+ * **data-framework:** Synchronize repo versions
129
+
130
+
131
+ ### Dependencies
132
+
133
+ * The following workspace dependencies were updated
134
+ * dependencies
135
+ * @twin.org/data-core bumped from 0.0.3-next.11 to 0.0.3-next.12
136
+ * @twin.org/data-json-ld bumped from 0.0.3-next.11 to 0.0.3-next.12
137
+
138
+ ## [0.0.3-next.11](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.10...data-framework-v0.0.3-next.11) (2026-02-25)
139
+
140
+
141
+ ### Miscellaneous Chores
142
+
143
+ * **data-framework:** Synchronize repo versions
144
+
145
+
146
+ ### Dependencies
147
+
148
+ * The following workspace dependencies were updated
149
+ * dependencies
150
+ * @twin.org/data-core bumped from 0.0.3-next.10 to 0.0.3-next.11
151
+ * @twin.org/data-json-ld bumped from 0.0.3-next.10 to 0.0.3-next.11
152
+
153
+ ## [0.0.3-next.10](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.9...data-framework-v0.0.3-next.10) (2026-02-24)
154
+
155
+
156
+ ### Miscellaneous Chores
157
+
158
+ * **data-framework:** Synchronize repo versions
159
+
160
+
161
+ ### Dependencies
162
+
163
+ * The following workspace dependencies were updated
164
+ * dependencies
165
+ * @twin.org/data-core bumped from 0.0.3-next.9 to 0.0.3-next.10
166
+ * @twin.org/data-json-ld bumped from 0.0.3-next.9 to 0.0.3-next.10
167
+
168
+ ## [0.0.3-next.9](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.8...data-framework-v0.0.3-next.9) (2026-02-23)
169
+
170
+
171
+ ### Miscellaneous Chores
172
+
173
+ * **data-framework:** Synchronize repo versions
174
+
175
+
176
+ ### Dependencies
177
+
178
+ * The following workspace dependencies were updated
179
+ * dependencies
180
+ * @twin.org/data-core bumped from 0.0.3-next.8 to 0.0.3-next.9
181
+ * @twin.org/data-json-ld bumped from 0.0.3-next.8 to 0.0.3-next.9
182
+
183
+ ## [0.0.3-next.8](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.7...data-framework-v0.0.3-next.8) (2026-02-02)
184
+
185
+
186
+ ### Miscellaneous Chores
187
+
188
+ * **data-framework:** Synchronize repo versions
189
+
190
+
191
+ ### Dependencies
192
+
193
+ * The following workspace dependencies were updated
194
+ * dependencies
195
+ * @twin.org/data-core bumped from 0.0.3-next.7 to 0.0.3-next.8
196
+ * @twin.org/data-json-ld bumped from 0.0.3-next.7 to 0.0.3-next.8
197
+
198
+ ## [0.0.3-next.7](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.6...data-framework-v0.0.3-next.7) (2026-01-21)
199
+
200
+
201
+ ### Features
202
+
203
+ * update context naming ([#37](https://github.com/twinfoundation/data/issues/37)) ([9d99360](https://github.com/twinfoundation/data/commit/9d993605aa51f27a09722729057c6ee921617c2d))
204
+
205
+
206
+ ### Dependencies
207
+
208
+ * The following workspace dependencies were updated
209
+ * dependencies
210
+ * @twin.org/data-core bumped from 0.0.3-next.6 to 0.0.3-next.7
211
+ * @twin.org/data-json-ld bumped from 0.0.3-next.6 to 0.0.3-next.7
212
+
213
+ ## [0.0.3-next.6](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.5...data-framework-v0.0.3-next.6) (2026-01-14)
214
+
215
+
216
+ ### Miscellaneous Chores
217
+
218
+ * **data-framework:** Synchronize repo versions
219
+
220
+
221
+ ### Dependencies
222
+
223
+ * The following workspace dependencies were updated
224
+ * dependencies
225
+ * @twin.org/data-core bumped from 0.0.3-next.5 to 0.0.3-next.6
226
+ * @twin.org/data-json-ld bumped from 0.0.3-next.5 to 0.0.3-next.6
227
+
228
+ ## [0.0.3-next.5](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.4...data-framework-v0.0.3-next.5) (2026-01-14)
229
+
230
+
231
+ ### Features
232
+
233
+ * improve data type registration ([#34](https://github.com/twinfoundation/data/issues/34)) ([855d110](https://github.com/twinfoundation/data/commit/855d11046a4d85317b77a5c4e0f4a7b1b6d1a767))
234
+
235
+
236
+ ### Dependencies
237
+
238
+ * The following workspace dependencies were updated
239
+ * dependencies
240
+ * @twin.org/data-core bumped from 0.0.3-next.4 to 0.0.3-next.5
241
+ * @twin.org/data-json-ld bumped from 0.0.3-next.4 to 0.0.3-next.5
242
+
243
+ ## [0.0.3-next.4](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.3...data-framework-v0.0.3-next.4) (2026-01-06)
244
+
245
+
246
+ ### Miscellaneous Chores
247
+
248
+ * **data-framework:** Synchronize repo versions
249
+
250
+
251
+ ### Dependencies
252
+
253
+ * The following workspace dependencies were updated
254
+ * dependencies
255
+ * @twin.org/data-core bumped from 0.0.3-next.3 to 0.0.3-next.4
256
+ * @twin.org/data-json-ld bumped from 0.0.3-next.3 to 0.0.3-next.4
257
+
258
+ ## [0.0.3-next.3](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.2...data-framework-v0.0.3-next.3) (2026-01-05)
259
+
260
+
261
+ ### Miscellaneous Chores
262
+
263
+ * **data-framework:** Synchronize repo versions
264
+
265
+
266
+ ### Dependencies
267
+
268
+ * The following workspace dependencies were updated
269
+ * dependencies
270
+ * @twin.org/data-core bumped from 0.0.3-next.2 to 0.0.3-next.3
271
+ * @twin.org/data-json-ld bumped from 0.0.3-next.2 to 0.0.3-next.3
2
272
 
3
273
  ## [0.0.3-next.2](https://github.com/twinfoundation/data/compare/data-framework-v0.0.3-next.1...data-framework-v0.0.3-next.2) (2025-11-24)
4
274
 
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
+ ```
@@ -14,7 +14,7 @@ Handle all the framework data types.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### registerTypes()
17
+ ### registerTypes() {#registertypes}
18
18
 
19
19
  > `static` **registerTypes**(): `void`
20
20
 
@@ -6,8 +6,20 @@ The contexts of framework data.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### ContextRoot
9
+ ### Namespace {#namespace}
10
10
 
11
- > `readonly` **ContextRoot**: `"https://schema.twindev.org/framework/"` = `"https://schema.twindev.org/framework/"`
11
+ > `readonly` **Namespace**: `"https://schema.twindev.org/framework/"` = `"https://schema.twindev.org/framework/"`
12
12
 
13
- Context Root.
13
+ The canonical RDF namespace URI for Framework.
14
+
15
+ ### Context {#context}
16
+
17
+ > `readonly` **Context**: `"https://schema.twindev.org/framework/"` = `"https://schema.twindev.org/framework/"`
18
+
19
+ The value to use in JSON-LD context for Framework.
20
+
21
+ ### JsonLdContext {#jsonldcontext}
22
+
23
+ > `readonly` **JsonLdContext**: `"https://schema.twindev.org/framework/types.jsonld"` = `"https://schema.twindev.org/framework/types.jsonld"`
24
+
25
+ The JSON-LD Context URL for Framework.
@@ -6,19 +6,19 @@ The types of framework data.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### Urn
9
+ ### Urn {#urn}
10
10
 
11
11
  > `readonly` **Urn**: `"URN"` = `"URN"`
12
12
 
13
13
  Represents a urn.
14
14
 
15
- ### TimestampMilliseconds
15
+ ### TimestampMilliseconds {#timestampmilliseconds}
16
16
 
17
17
  > `readonly` **TimestampMilliseconds**: `"TimestampMilliseconds"` = `"TimestampMilliseconds"`
18
18
 
19
19
  Represents a timestamp as an integer, milliseconds since 1 Jan 1970.
20
20
 
21
- ### TimestampSeconds
21
+ ### TimestampSeconds {#timestampseconds}
22
22
 
23
23
  > `readonly` **TimestampSeconds**: `"TimestampSeconds"` = `"TimestampSeconds"`
24
24
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@twin.org/data-framework",
3
- "version": "0.0.3-next.2",
4
- "description": "Models which define the structure of framework types",
3
+ "version": "0.0.3-next.20",
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.2",
19
- "@twin.org/data-json-ld": "0.0.3-next.2",
18
+ "@twin.org/data-core": "0.0.3-next.20",
19
+ "@twin.org/data-json-ld": "0.0.3-next.20",
20
20
  "@twin.org/entity": "next",
21
21
  "@twin.org/nameof": "next"
22
22
  },