@twin.org/blob-storage-models 0.0.1-next.30 → 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.
- package/dist/cjs/index.cjs +20 -23
- package/dist/esm/index.mjs +20 -23
- package/dist/types/models/IBlobStorageEntryList.d.ts +5 -4
- package/dist/types/models/blobStorageTypes.d.ts +0 -4
- package/docs/changelog.md +14 -0
- package/docs/reference/interfaces/IBlobStorageEntryList.md +6 -6
- package/docs/reference/variables/BlobStorageTypes.md +0 -6
- package/package.json +2 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
|
/**
|
|
@@ -13,11 +30,7 @@ const BlobStorageTypes = {
|
|
|
13
30
|
/**
|
|
14
31
|
* Represents blob storage entry.
|
|
15
32
|
*/
|
|
16
|
-
Entry: "BlobStorageEntry"
|
|
17
|
-
/**
|
|
18
|
-
* Represents blob storage entry list.
|
|
19
|
-
*/
|
|
20
|
-
EntryList: "BlobStorageEntryList"
|
|
33
|
+
Entry: "BlobStorageEntry"
|
|
21
34
|
};
|
|
22
35
|
|
|
23
36
|
var type = "object";
|
|
@@ -110,7 +123,8 @@ class BlobStorageDataTypes {
|
|
|
110
123
|
* Register all the data types.
|
|
111
124
|
*/
|
|
112
125
|
static registerTypes() {
|
|
113
|
-
dataCore.DataTypeHandlerFactory.register(BlobStorageTypes.Entry
|
|
126
|
+
dataCore.DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.Entry}`, () => ({
|
|
127
|
+
context: BlobStorageContexts.ContextRoot,
|
|
114
128
|
type: BlobStorageTypes.Entry,
|
|
115
129
|
defaultValue: {},
|
|
116
130
|
jsonSchema: async () => BlobStorageEntrySchema
|
|
@@ -126,23 +140,6 @@ class BlobStorageDataTypes {
|
|
|
126
140
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
127
141
|
const BlobStorageConnectorFactory = core.Factory.createFactory("blob-storage");
|
|
128
142
|
|
|
129
|
-
// Copyright 2024 IOTA Stiftung.
|
|
130
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
131
|
-
/**
|
|
132
|
-
* The contexts of blob storage data.
|
|
133
|
-
*/
|
|
134
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
135
|
-
const BlobStorageContexts = {
|
|
136
|
-
/**
|
|
137
|
-
* The context root for the blob storage types.
|
|
138
|
-
*/
|
|
139
|
-
ContextRoot: "https://schema.twindev.org/blob-storage/",
|
|
140
|
-
/**
|
|
141
|
-
* The context root for the common types.
|
|
142
|
-
*/
|
|
143
|
-
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
144
|
-
};
|
|
145
|
-
|
|
146
143
|
exports.BlobStorageConnectorFactory = BlobStorageConnectorFactory;
|
|
147
144
|
exports.BlobStorageContexts = BlobStorageContexts;
|
|
148
145
|
exports.BlobStorageDataTypes = BlobStorageDataTypes;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -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
|
/**
|
|
@@ -11,11 +28,7 @@ const BlobStorageTypes = {
|
|
|
11
28
|
/**
|
|
12
29
|
* Represents blob storage entry.
|
|
13
30
|
*/
|
|
14
|
-
Entry: "BlobStorageEntry"
|
|
15
|
-
/**
|
|
16
|
-
* Represents blob storage entry list.
|
|
17
|
-
*/
|
|
18
|
-
EntryList: "BlobStorageEntryList"
|
|
31
|
+
Entry: "BlobStorageEntry"
|
|
19
32
|
};
|
|
20
33
|
|
|
21
34
|
var type = "object";
|
|
@@ -108,7 +121,8 @@ class BlobStorageDataTypes {
|
|
|
108
121
|
* Register all the data types.
|
|
109
122
|
*/
|
|
110
123
|
static registerTypes() {
|
|
111
|
-
DataTypeHandlerFactory.register(BlobStorageTypes.Entry
|
|
124
|
+
DataTypeHandlerFactory.register(`${BlobStorageContexts.ContextRoot}${BlobStorageTypes.Entry}`, () => ({
|
|
125
|
+
context: BlobStorageContexts.ContextRoot,
|
|
112
126
|
type: BlobStorageTypes.Entry,
|
|
113
127
|
defaultValue: {},
|
|
114
128
|
jsonSchema: async () => BlobStorageEntrySchema
|
|
@@ -124,21 +138,4 @@ class BlobStorageDataTypes {
|
|
|
124
138
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
125
139
|
const BlobStorageConnectorFactory = Factory.createFactory("blob-storage");
|
|
126
140
|
|
|
127
|
-
// Copyright 2024 IOTA Stiftung.
|
|
128
|
-
// SPDX-License-Identifier: Apache-2.0.
|
|
129
|
-
/**
|
|
130
|
-
* The contexts of blob storage data.
|
|
131
|
-
*/
|
|
132
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
133
|
-
const BlobStorageContexts = {
|
|
134
|
-
/**
|
|
135
|
-
* The context root for the blob storage types.
|
|
136
|
-
*/
|
|
137
|
-
ContextRoot: "https://schema.twindev.org/blob-storage/",
|
|
138
|
-
/**
|
|
139
|
-
* The context root for the common types.
|
|
140
|
-
*/
|
|
141
|
-
ContextRootCommon: "https://schema.twindev.org/common/"
|
|
142
|
-
};
|
|
143
|
-
|
|
144
141
|
export { BlobStorageConnectorFactory, BlobStorageContexts, BlobStorageDataTypes, BlobStorageTypes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { SchemaOrgContexts, SchemaOrgTypes } from "@twin.org/standards-schema-org";
|
|
2
3
|
import type { BlobStorageContexts } from "./blobStorageContexts";
|
|
3
|
-
import type { BlobStorageTypes } from "./blobStorageTypes";
|
|
4
4
|
import type { IBlobStorageEntry } from "./IBlobStorageEntry";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing an blob storage entry list.
|
|
@@ -10,6 +10,7 @@ export interface IBlobStorageEntryList {
|
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
12
|
"@context": [
|
|
13
|
+
typeof SchemaOrgContexts.ContextRoot,
|
|
13
14
|
typeof BlobStorageContexts.ContextRoot,
|
|
14
15
|
typeof BlobStorageContexts.ContextRootCommon,
|
|
15
16
|
...IJsonLdContextDefinitionElement[]
|
|
@@ -17,13 +18,13 @@ export interface IBlobStorageEntryList {
|
|
|
17
18
|
/**
|
|
18
19
|
* JSON-LD Type.
|
|
19
20
|
*/
|
|
20
|
-
type: typeof
|
|
21
|
+
type: typeof SchemaOrgTypes.ItemList;
|
|
21
22
|
/**
|
|
22
23
|
* The list of entries.
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
[SchemaOrgTypes.ItemListElement]: IBlobStorageEntry[];
|
|
25
26
|
/**
|
|
26
27
|
* The cursor to get the next chunk of entries.
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
+
[SchemaOrgTypes.NextItem]?: string;
|
|
29
30
|
}
|
|
@@ -6,10 +6,6 @@ export declare const BlobStorageTypes: {
|
|
|
6
6
|
* Represents blob storage entry.
|
|
7
7
|
*/
|
|
8
8
|
readonly Entry: "BlobStorageEntry";
|
|
9
|
-
/**
|
|
10
|
-
* Represents blob storage entry list.
|
|
11
|
-
*/
|
|
12
|
-
readonly EntryList: "BlobStorageEntryList";
|
|
13
9
|
};
|
|
14
10
|
/**
|
|
15
11
|
* The types of blob storage data.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
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
|
+
|
|
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)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* use standard list json ld types ([d6bdfd6](https://github.com/twinfoundation/blob-storage/commit/d6bdfd68af47f70f3cc53658b4a12543497e1f48))
|
|
16
|
+
|
|
3
17
|
## [0.0.1-next.30](https://github.com/twinfoundation/blob-storage/compare/blob-storage-models-v0.0.1-next.29...blob-storage-models-v0.0.1-next.30) (2025-04-17)
|
|
4
18
|
|
|
5
19
|
|
|
@@ -6,7 +6,7 @@ Interface describing an blob storage entry list.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: \[`"https://schema.twindev.org/blob-storage/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
9
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/blob-storage/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
@@ -14,22 +14,22 @@ JSON-LD Context.
|
|
|
14
14
|
|
|
15
15
|
### type
|
|
16
16
|
|
|
17
|
-
> **type**: `"
|
|
17
|
+
> **type**: `"ItemList"`
|
|
18
18
|
|
|
19
19
|
JSON-LD Type.
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### itemListElement
|
|
24
24
|
|
|
25
|
-
> **
|
|
25
|
+
> **itemListElement**: [`IBlobStorageEntry`](IBlobStorageEntry.md)[]
|
|
26
26
|
|
|
27
27
|
The list of entries.
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### nextItem?
|
|
32
32
|
|
|
33
|
-
> `optional` **
|
|
33
|
+
> `optional` **nextItem**: `string`
|
|
34
34
|
|
|
35
35
|
The cursor to get the next chunk of entries.
|
|
@@ -11,9 +11,3 @@ The types of blob storage data.
|
|
|
11
11
|
> `readonly` **Entry**: `"BlobStorageEntry"` = `"BlobStorageEntry"`
|
|
12
12
|
|
|
13
13
|
Represents blob storage entry.
|
|
14
|
-
|
|
15
|
-
### EntryList
|
|
16
|
-
|
|
17
|
-
> `readonly` **EntryList**: `"BlobStorageEntryList"` = `"BlobStorageEntryList"`
|
|
18
|
-
|
|
19
|
-
Represents blob storage entry list.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/blob-storage-models",
|
|
3
|
-
"version": "0.0.1-next.
|
|
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",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@twin.org/data-json-ld": "next",
|
|
20
20
|
"@twin.org/entity": "next",
|
|
21
21
|
"@twin.org/nameof": "next",
|
|
22
|
+
"@twin.org/standards-schema-org": "next",
|
|
22
23
|
"@twin.org/web": "next"
|
|
23
24
|
},
|
|
24
25
|
"main": "./dist/cjs/index.cjs",
|