@twin.org/blob-storage-models 0.0.1-next.31 → 0.0.1-next.32

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.
@@ -3,6 +3,23 @@
3
3
  var dataCore = require('@twin.org/data-core');
4
4
  var core = require('@twin.org/core');
5
5
 
6
+ // Copyright 2024 IOTA Stiftung.
7
+ // SPDX-License-Identifier: Apache-2.0.
8
+ /**
9
+ * The contexts of blob storage data.
10
+ */
11
+ // eslint-disable-next-line @typescript-eslint/naming-convention
12
+ const BlobStorageContexts = {
13
+ /**
14
+ * The context root for the blob storage types.
15
+ */
16
+ ContextRoot: "https://schema.twindev.org/blob-storage/",
17
+ /**
18
+ * The context root for the common types.
19
+ */
20
+ ContextRootCommon: "https://schema.twindev.org/common/"
21
+ };
22
+
6
23
  // Copyright 2024 IOTA Stiftung.
7
24
  // SPDX-License-Identifier: Apache-2.0.
8
25
  /**
@@ -106,7 +123,8 @@ class BlobStorageDataTypes {
106
123
  * Register all the data types.
107
124
  */
108
125
  static registerTypes() {
109
- dataCore.DataTypeHandlerFactory.register(BlobStorageTypes.Entry, () => ({
126
+ dataCore.DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.Entry}`, () => ({
127
+ context: BlobStorageContexts.ContextRoot,
110
128
  type: BlobStorageTypes.Entry,
111
129
  defaultValue: {},
112
130
  jsonSchema: async () => BlobStorageEntrySchema
@@ -122,23 +140,6 @@ class BlobStorageDataTypes {
122
140
  // eslint-disable-next-line @typescript-eslint/naming-convention
123
141
  const BlobStorageConnectorFactory = core.Factory.createFactory("blob-storage");
124
142
 
125
- // Copyright 2024 IOTA Stiftung.
126
- // SPDX-License-Identifier: Apache-2.0.
127
- /**
128
- * The contexts of blob storage data.
129
- */
130
- // eslint-disable-next-line @typescript-eslint/naming-convention
131
- const BlobStorageContexts = {
132
- /**
133
- * The context root for the blob storage types.
134
- */
135
- ContextRoot: "https://schema.twindev.org/blob-storage/",
136
- /**
137
- * The context root for the common types.
138
- */
139
- ContextRootCommon: "https://schema.twindev.org/common/"
140
- };
141
-
142
143
  exports.BlobStorageConnectorFactory = BlobStorageConnectorFactory;
143
144
  exports.BlobStorageContexts = BlobStorageContexts;
144
145
  exports.BlobStorageDataTypes = BlobStorageDataTypes;
@@ -1,6 +1,23 @@
1
1
  import { DataTypeHandlerFactory } from '@twin.org/data-core';
2
2
  import { Factory } from '@twin.org/core';
3
3
 
4
+ // Copyright 2024 IOTA Stiftung.
5
+ // SPDX-License-Identifier: Apache-2.0.
6
+ /**
7
+ * The contexts of blob storage data.
8
+ */
9
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
+ const BlobStorageContexts = {
11
+ /**
12
+ * The context root for the blob storage types.
13
+ */
14
+ ContextRoot: "https://schema.twindev.org/blob-storage/",
15
+ /**
16
+ * The context root for the common types.
17
+ */
18
+ ContextRootCommon: "https://schema.twindev.org/common/"
19
+ };
20
+
4
21
  // Copyright 2024 IOTA Stiftung.
5
22
  // SPDX-License-Identifier: Apache-2.0.
6
23
  /**
@@ -104,7 +121,8 @@ class BlobStorageDataTypes {
104
121
  * Register all the data types.
105
122
  */
106
123
  static registerTypes() {
107
- DataTypeHandlerFactory.register(BlobStorageTypes.Entry, () => ({
124
+ DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.Entry}`, () => ({
125
+ context: BlobStorageContexts.ContextRoot,
108
126
  type: BlobStorageTypes.Entry,
109
127
  defaultValue: {},
110
128
  jsonSchema: async () => BlobStorageEntrySchema
@@ -120,21 +138,4 @@ class BlobStorageDataTypes {
120
138
  // eslint-disable-next-line @typescript-eslint/naming-convention
121
139
  const BlobStorageConnectorFactory = Factory.createFactory("blob-storage");
122
140
 
123
- // Copyright 2024 IOTA Stiftung.
124
- // SPDX-License-Identifier: Apache-2.0.
125
- /**
126
- * The contexts of blob storage data.
127
- */
128
- // eslint-disable-next-line @typescript-eslint/naming-convention
129
- const BlobStorageContexts = {
130
- /**
131
- * The context root for the blob storage types.
132
- */
133
- ContextRoot: "https://schema.twindev.org/blob-storage/",
134
- /**
135
- * The context root for the common types.
136
- */
137
- ContextRootCommon: "https://schema.twindev.org/common/"
138
- };
139
-
140
141
  export { BlobStorageConnectorFactory, BlobStorageContexts, BlobStorageDataTypes, BlobStorageTypes };
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @twin.org/blob-storage-models - Changelog
2
2
 
3
+ ## [0.0.1-next.32](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.1-next.31...blob-storage-models-v0.0.1-next.32) (2025-05-28)
4
+
5
+
6
+ ### Features
7
+
8
+ * update to support fully qualified data type names ([3297d69](https://github.com/twinfoundation/blob-storage/commit/3297d69d332058b0f0141002087f56ba230620e1))
9
+
3
10
  ## [0.0.1-next.31](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.1-next.30...blob-storage-models-v0.0.1-next.31) (2025-05-08)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-models",
3
- "version": "0.0.1-next.31",
3
+ "version": "0.0.1-next.32",
4
4
  "description": "Models which define the structure of the blob storage contracts and connectors",
5
5
  "repository": {
6
6
  "type": "git",