@twin.org/document-management-models 0.0.3-next.11 → 0.0.3-next.13
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 +1 -1
- package/dist/es/dataTypes/documentManagementDataTypes.js.map +1 -1
- package/dist/es/models/IDocument.js.map +1 -1
- package/dist/es/models/IDocumentAttestation.js.map +1 -1
- package/dist/es/models/IDocumentList.js.map +1 -1
- package/dist/es/schemas/Document.json +20 -23
- package/dist/types/models/IDocument.d.ts +16 -16
- package/dist/types/models/IDocumentAttestation.d.ts +5 -5
- package/dist/types/models/IDocumentList.d.ts +2 -2
- package/docs/changelog.md +98 -84
- package/docs/examples.md +23 -1
- package/docs/reference/classes/DocumentManagementDataTypes.md +1 -1
- package/docs/reference/interfaces/IDocument.md +29 -45
- package/docs/reference/interfaces/IDocumentAttestation.md +7 -12
- package/docs/reference/interfaces/IDocumentList.md +5 -7
- package/docs/reference/interfaces/IDocumentManagementComponent.md +8 -8
- package/docs/reference/interfaces/IDocumentManagementCreateRequest.md +6 -6
- package/docs/reference/interfaces/IDocumentManagementGetRequest.md +13 -13
- package/docs/reference/interfaces/IDocumentManagementGetResponse.md +4 -4
- package/docs/reference/interfaces/IDocumentManagementGetRevisionRequest.md +10 -10
- package/docs/reference/interfaces/IDocumentManagementGetRevisionResponse.md +3 -3
- package/docs/reference/interfaces/IDocumentManagementQueryRequest.md +5 -5
- package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +4 -4
- package/docs/reference/interfaces/IDocumentManagementRemoveRequest.md +1 -1
- package/docs/reference/interfaces/IDocumentManagementUpdateRequest.md +5 -5
- package/docs/reference/variables/DocumentContexts.md +6 -6
- package/docs/reference/variables/DocumentTypes.md +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN Document Management Models
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package defines the core document data structures, JSON-LD contexts, and schema-aligned model contracts used across the repository. It provides a single source of truth for payload shape and semantic consistency between services and client integrations.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentManagementDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/documentManagementDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"documentManagementDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/documentManagementDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,cAAc,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE5E;;GAEG;AACH,MAAM,OAAO,2BAA2B;IACvC;;OAEG;IACI,MAAM,CAAC,aAAa;QAC1B,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,gBAAgB,CAAC,SAAS,GAAG,aAAa,CAAC,QAAQ,EAAE,EACxD,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,gBAAgB,CAAC,SAAS;YACrC,IAAI,EAAE,aAAa,CAAC,QAAQ;YAC5B,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,cAAc;SACtC,CAAC,CACF,CAAC;QAEF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,gBAAgB,CAAC,SAAS,GAAG,aAAa,CAAC,mBAAmB,EAAE,EACnE,GAAG,EAAE,CAAC,CAAC;YACN,SAAS,EAAE,gBAAgB,CAAC,SAAS;YACrC,IAAI,EAAE,aAAa,CAAC,mBAAmB;YACvC,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,cAAc;SACtC,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory } from \"@twin.org/data-core\";\nimport { DocumentContexts } from \"../models/documentContexts.js\";\nimport { DocumentTypes } from \"../models/documentTypes.js\";\nimport DocumentSchema from \"../schemas/Document.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for document management.\n */\nexport class DocumentManagementDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DocumentContexts.Namespace}${DocumentTypes.Document}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: DocumentContexts.Namespace,\n\t\t\t\ttype: DocumentTypes.Document,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => DocumentSchema\n\t\t\t})\n\t\t);\n\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${DocumentContexts.Namespace}${DocumentTypes.DocumentAttestation}`,\n\t\t\t() => ({\n\t\t\t\tnamespace: DocumentContexts.Namespace,\n\t\t\t\ttype: DocumentTypes.DocumentAttestation,\n\t\t\t\tdefaultValue: {},\n\t\t\t\tjsonSchema: async () => DocumentSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDocument.js","sourceRoot":"","sources":["../../../src/models/IDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAttestationInformation } from \"@twin.org/attestation-models\";\nimport type { IBlobStorageEntry } from \"@twin.org/blob-storage-models\";\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document.\n */\nexport interface IDocument {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.Document;\n\n\t/**\n\t * The full id of the document.\n\t */\n\tid: string;\n\n\t/**\n\t * The id of the document.\n\t * json-ld type:schema:identifier\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The format of the document id.\n\t * json-ld type:schema:Text\n\t */\n\tdocumentIdFormat?: string;\n\n\t/**\n\t * The code for the document type.\n\t * json-ld type:schema:identifier\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t * json-ld type:schema:Integer\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * Additional annotation information for the document.\n\t * json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob storage id for the document.\n\t * json-ld type:schema:identifier\n\t */\n\tblobStorageId: string;\n\n\t/**\n\t * The integrity of the blob data.\n\t * json-ld namespace:twin-common\n\t */\n\tintegrity: string;\n\n\t/**\n\t * The additional JSON-LD for blob storage if it was requested.\n\t * json-ld id\n\t */\n\tblobStorageEntry?: IBlobStorageEntry;\n\n\t/**\n\t * The data extracted from the document using data extraction services.\n\t * json-ld type:json\n\t */\n\textractedData?: unknown;\n\n\t/**\n\t * The attestation for the document if one was created.\n\t * json-ld type:schema:identifier\n\t */\n\tattestationId?: string;\n\n\t/**\n\t * The additional JSON-LD for attestation storage if it was requested.\n\t * json-ld id\n\t */\n\tattestationInformation?: IAttestationInformation;\n\n\t/**\n\t * The date/time of when the document was created.\n\t * json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time of when the document was modified.\n\t * json-ld namespace:schema\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The date/time of when the document was deleted, as we never actually remove items.\n\t * json-ld namespace:schema\n\t */\n\tdateDeleted?: string;\n\n\t/**\n\t * The organization which added the document to the graph.\n\t * json-ld namespace:twin-common\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The user who added the document to the graph.\n\t * json-ld namespace:twin-common\n\t */\n\tuserIdentity?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IDocument.js","sourceRoot":"","sources":["../../../src/models/IDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IAttestationInformation } from \"@twin.org/attestation-models\";\nimport type { IBlobStorageEntry } from \"@twin.org/blob-storage-models\";\nimport type { IJsonLdContextDefinitionElement, IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document.\n */\nexport interface IDocument {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.Document;\n\n\t/**\n\t * The full id of the document.\n\t */\n\tid: string;\n\n\t/**\n\t * The id of the document.\n\t * @json-ld type:schema:identifier\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The format of the document id.\n\t * @json-ld type:schema:Text\n\t */\n\tdocumentIdFormat?: string;\n\n\t/**\n\t * The code for the document type.\n\t * @json-ld type:schema:identifier\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t * @json-ld type:schema:Integer\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * Additional annotation information for the document.\n\t * @json-ld namespace:twin-common\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob storage id for the document.\n\t * @json-ld type:schema:identifier\n\t */\n\tblobStorageId: string;\n\n\t/**\n\t * The integrity of the blob data.\n\t * @json-ld namespace:twin-common\n\t */\n\tintegrity: string;\n\n\t/**\n\t * The additional JSON-LD for blob storage if it was requested.\n\t * @json-ld id\n\t */\n\tblobStorageEntry?: IBlobStorageEntry;\n\n\t/**\n\t * The data extracted from the document using data extraction services.\n\t * @json-ld type:json\n\t */\n\textractedData?: unknown;\n\n\t/**\n\t * The attestation for the document if one was created.\n\t * @json-ld type:schema:identifier\n\t */\n\tattestationId?: string;\n\n\t/**\n\t * The additional JSON-LD for attestation storage if it was requested.\n\t * @json-ld id\n\t */\n\tattestationInformation?: IAttestationInformation;\n\n\t/**\n\t * The date/time of when the document was created.\n\t * @json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time of when the document was modified.\n\t * @json-ld namespace:schema\n\t */\n\tdateModified?: string;\n\n\t/**\n\t * The date/time of when the document was deleted, as we never actually remove items.\n\t * @json-ld namespace:schema\n\t */\n\tdateDeleted?: string;\n\n\t/**\n\t * The organization which added the document to the graph.\n\t * @json-ld namespace:twin-common\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The user who added the document to the graph.\n\t * @json-ld namespace:twin-common\n\t */\n\tuserIdentity?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDocumentAttestation.js","sourceRoot":"","sources":["../../../src/models/IDocumentAttestation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document attestation.\n */\nexport interface IDocumentAttestation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.DocumentAttestation;\n\n\t/**\n\t * The id of the document.\n\t * json-ld type:schema:identifier\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The code for the document type.\n\t * json-ld type:schema:identifier\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t * json-ld type:schema:Integer\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * The date/time of when the document was created.\n\t * json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The integrity of the document being attested.\n\t * json-ld namespace:twin-common\n\t */\n\tintegrity: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IDocumentAttestation.js","sourceRoot":"","sources":["../../../src/models/IDocumentAttestation.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { SchemaOrgContexts } from \"@twin.org/standards-schema-org\";\nimport type { UneceDocumentCodeList } from \"@twin.org/standards-unece\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { DocumentTypes } from \"./documentTypes.js\";\n\n/**\n * Interface describing a document attestation.\n */\nexport interface IDocumentAttestation {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof DocumentTypes.DocumentAttestation;\n\n\t/**\n\t * The id of the document.\n\t * @json-ld type:schema:identifier\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * The code for the document type.\n\t * @json-ld type:schema:identifier\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t * @json-ld type:schema:Integer\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * The date/time of when the document was created.\n\t * @json-ld namespace:schema\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The integrity of the document being attested.\n\t * @json-ld namespace:twin-common\n\t */\n\tintegrity: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDocumentList.js","sourceRoot":"","sources":["../../../src/models/IDocumentList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { IDocument } from \"./IDocument.js\";\n\n/**\n * Interface describing a list of document entries.\n */\nexport interface IDocumentList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof SchemaOrgTypes.ItemList;\n\n\t/**\n\t * The list of documents.\n\t * json-ld namespace:schema\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IDocument[];\n\n\t/**\n\t * The ids of the other vertices which are connected to the document.\n\t * json-ld container:set\n\t */\n\tedges?: string[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IDocumentList.js","sourceRoot":"","sources":["../../../src/models/IDocumentList.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"@twin.org/data-json-ld\";\nimport type { SchemaOrgContexts, SchemaOrgTypes } from \"@twin.org/standards-schema-org\";\nimport type { DocumentContexts } from \"./documentContexts.js\";\nimport type { IDocument } from \"./IDocument.js\";\n\n/**\n * Interface describing a list of document entries.\n */\nexport interface IDocumentList {\n\t/**\n\t * JSON-LD Context.\n\t */\n\t\"@context\": [\n\t\ttypeof SchemaOrgContexts.Context,\n\t\ttypeof DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon,\n\t\t...IJsonLdContextDefinitionElement[]\n\t];\n\n\t/**\n\t * JSON-LD Type.\n\t */\n\ttype: typeof SchemaOrgTypes.ItemList;\n\n\t/**\n\t * The list of documents.\n\t * @json-ld namespace:schema\n\t */\n\t[SchemaOrgTypes.ItemListElement]: IDocument[];\n\n\t/**\n\t * The ids of the other vertices which are connected to the document.\n\t * @json-ld container:set\n\t */\n\tedges?: string[];\n}\n"]}
|
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schema.twindev.org/documents/Document",
|
|
4
|
+
"title": "Document",
|
|
4
5
|
"description": "Interface describing a document.",
|
|
5
6
|
"type": "object",
|
|
6
7
|
"properties": {
|
|
7
8
|
"@context": {
|
|
8
9
|
"type": "array",
|
|
9
|
-
"minItems": 3,
|
|
10
|
-
"description": "JSON-LD Context.",
|
|
11
10
|
"prefixItems": [
|
|
12
11
|
{
|
|
13
|
-
"type": "string",
|
|
14
12
|
"const": "https://schema.org"
|
|
15
13
|
},
|
|
16
14
|
{
|
|
17
|
-
"type": "string",
|
|
18
15
|
"const": "https://schema.twindev.org/documents/"
|
|
19
16
|
},
|
|
20
17
|
{
|
|
21
|
-
"type": "string",
|
|
22
18
|
"const": "https://schema.twindev.org/common/"
|
|
23
19
|
}
|
|
24
20
|
],
|
|
25
21
|
"items": {
|
|
26
22
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
|
|
27
|
-
}
|
|
23
|
+
},
|
|
24
|
+
"minItems": 3,
|
|
25
|
+
"description": "JSON-LD Context."
|
|
28
26
|
},
|
|
29
27
|
"type": {
|
|
30
|
-
"type": "string",
|
|
31
28
|
"const": "Document",
|
|
32
29
|
"description": "JSON-LD Type."
|
|
33
30
|
},
|
|
@@ -37,66 +34,66 @@
|
|
|
37
34
|
},
|
|
38
35
|
"documentId": {
|
|
39
36
|
"type": "string",
|
|
40
|
-
"description": "The id of the document.
|
|
37
|
+
"description": "The id of the document."
|
|
41
38
|
},
|
|
42
39
|
"documentIdFormat": {
|
|
43
40
|
"type": "string",
|
|
44
|
-
"description": "The format of the document id.
|
|
41
|
+
"description": "The format of the document id."
|
|
45
42
|
},
|
|
46
43
|
"documentCode": {
|
|
47
44
|
"$ref": "https://schema.twindev.org/unece/UneceDocumentCodeList",
|
|
48
|
-
"description": "The code for the document type.
|
|
45
|
+
"description": "The code for the document type."
|
|
49
46
|
},
|
|
50
47
|
"documentRevision": {
|
|
51
48
|
"type": "number",
|
|
52
|
-
"description": "The revision of the document as a 0 based index.
|
|
49
|
+
"description": "The revision of the document as a 0 based index."
|
|
53
50
|
},
|
|
54
51
|
"annotationObject": {
|
|
55
52
|
"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
|
|
56
|
-
"description": "Additional annotation information for the document.
|
|
53
|
+
"description": "Additional annotation information for the document."
|
|
57
54
|
},
|
|
58
55
|
"blobStorageId": {
|
|
59
56
|
"type": "string",
|
|
60
|
-
"description": "The blob storage id for the document.
|
|
57
|
+
"description": "The blob storage id for the document."
|
|
61
58
|
},
|
|
62
59
|
"integrity": {
|
|
63
60
|
"type": "string",
|
|
64
|
-
"description": "The integrity of the blob data.
|
|
61
|
+
"description": "The integrity of the blob data."
|
|
65
62
|
},
|
|
66
63
|
"blobStorageEntry": {
|
|
67
64
|
"$ref": "https://schema.twindev.org/blob-storage/BlobStorageEntry",
|
|
68
|
-
"description": "The additional JSON-LD for blob storage if it was requested.
|
|
65
|
+
"description": "The additional JSON-LD for blob storage if it was requested."
|
|
69
66
|
},
|
|
70
67
|
"extractedData": {
|
|
71
|
-
"description": "The data extracted from the document using data extraction services.
|
|
68
|
+
"description": "The data extracted from the document using data extraction services."
|
|
72
69
|
},
|
|
73
70
|
"attestationId": {
|
|
74
71
|
"type": "string",
|
|
75
|
-
"description": "The attestation for the document if one was created.
|
|
72
|
+
"description": "The attestation for the document if one was created."
|
|
76
73
|
},
|
|
77
74
|
"attestationInformation": {
|
|
78
75
|
"$ref": "https://schema.twindev.org/attestation/AttestationInformation",
|
|
79
|
-
"description": "The additional JSON-LD for attestation storage if it was requested.
|
|
76
|
+
"description": "The additional JSON-LD for attestation storage if it was requested."
|
|
80
77
|
},
|
|
81
78
|
"dateCreated": {
|
|
82
79
|
"type": "string",
|
|
83
|
-
"description": "The date/time of when the document was created.
|
|
80
|
+
"description": "The date/time of when the document was created."
|
|
84
81
|
},
|
|
85
82
|
"dateModified": {
|
|
86
83
|
"type": "string",
|
|
87
|
-
"description": "The date/time of when the document was modified.
|
|
84
|
+
"description": "The date/time of when the document was modified."
|
|
88
85
|
},
|
|
89
86
|
"dateDeleted": {
|
|
90
87
|
"type": "string",
|
|
91
|
-
"description": "The date/time of when the document was deleted, as we never actually remove items.
|
|
88
|
+
"description": "The date/time of when the document was deleted, as we never actually remove items."
|
|
92
89
|
},
|
|
93
90
|
"organizationIdentity": {
|
|
94
91
|
"type": "string",
|
|
95
|
-
"description": "The organization which added the document to the graph.
|
|
92
|
+
"description": "The organization which added the document to the graph."
|
|
96
93
|
},
|
|
97
94
|
"userIdentity": {
|
|
98
95
|
"type": "string",
|
|
99
|
-
"description": "The user who added the document to the graph.
|
|
96
|
+
"description": "The user who added the document to the graph."
|
|
100
97
|
}
|
|
101
98
|
},
|
|
102
99
|
"required": [
|
|
@@ -28,82 +28,82 @@ export interface IDocument {
|
|
|
28
28
|
id: string;
|
|
29
29
|
/**
|
|
30
30
|
* The id of the document.
|
|
31
|
-
* json-ld type:schema:identifier
|
|
31
|
+
* @json-ld type:schema:identifier
|
|
32
32
|
*/
|
|
33
33
|
documentId: string;
|
|
34
34
|
/**
|
|
35
35
|
* The format of the document id.
|
|
36
|
-
* json-ld type:schema:Text
|
|
36
|
+
* @json-ld type:schema:Text
|
|
37
37
|
*/
|
|
38
38
|
documentIdFormat?: string;
|
|
39
39
|
/**
|
|
40
40
|
* The code for the document type.
|
|
41
|
-
* json-ld type:schema:identifier
|
|
41
|
+
* @json-ld type:schema:identifier
|
|
42
42
|
*/
|
|
43
43
|
documentCode: UneceDocumentCodeList;
|
|
44
44
|
/**
|
|
45
45
|
* The revision of the document as a 0 based index.
|
|
46
|
-
* json-ld type:schema:Integer
|
|
46
|
+
* @json-ld type:schema:Integer
|
|
47
47
|
*/
|
|
48
48
|
documentRevision: number;
|
|
49
49
|
/**
|
|
50
50
|
* Additional annotation information for the document.
|
|
51
|
-
* json-ld namespace:twin-common
|
|
51
|
+
* @json-ld namespace:twin-common
|
|
52
52
|
*/
|
|
53
53
|
annotationObject?: IJsonLdNodeObject;
|
|
54
54
|
/**
|
|
55
55
|
* The blob storage id for the document.
|
|
56
|
-
* json-ld type:schema:identifier
|
|
56
|
+
* @json-ld type:schema:identifier
|
|
57
57
|
*/
|
|
58
58
|
blobStorageId: string;
|
|
59
59
|
/**
|
|
60
60
|
* The integrity of the blob data.
|
|
61
|
-
* json-ld namespace:twin-common
|
|
61
|
+
* @json-ld namespace:twin-common
|
|
62
62
|
*/
|
|
63
63
|
integrity: string;
|
|
64
64
|
/**
|
|
65
65
|
* The additional JSON-LD for blob storage if it was requested.
|
|
66
|
-
* json-ld id
|
|
66
|
+
* @json-ld id
|
|
67
67
|
*/
|
|
68
68
|
blobStorageEntry?: IBlobStorageEntry;
|
|
69
69
|
/**
|
|
70
70
|
* The data extracted from the document using data extraction services.
|
|
71
|
-
* json-ld type:json
|
|
71
|
+
* @json-ld type:json
|
|
72
72
|
*/
|
|
73
73
|
extractedData?: unknown;
|
|
74
74
|
/**
|
|
75
75
|
* The attestation for the document if one was created.
|
|
76
|
-
* json-ld type:schema:identifier
|
|
76
|
+
* @json-ld type:schema:identifier
|
|
77
77
|
*/
|
|
78
78
|
attestationId?: string;
|
|
79
79
|
/**
|
|
80
80
|
* The additional JSON-LD for attestation storage if it was requested.
|
|
81
|
-
* json-ld id
|
|
81
|
+
* @json-ld id
|
|
82
82
|
*/
|
|
83
83
|
attestationInformation?: IAttestationInformation;
|
|
84
84
|
/**
|
|
85
85
|
* The date/time of when the document was created.
|
|
86
|
-
* json-ld namespace:schema
|
|
86
|
+
* @json-ld namespace:schema
|
|
87
87
|
*/
|
|
88
88
|
dateCreated: string;
|
|
89
89
|
/**
|
|
90
90
|
* The date/time of when the document was modified.
|
|
91
|
-
* json-ld namespace:schema
|
|
91
|
+
* @json-ld namespace:schema
|
|
92
92
|
*/
|
|
93
93
|
dateModified?: string;
|
|
94
94
|
/**
|
|
95
95
|
* The date/time of when the document was deleted, as we never actually remove items.
|
|
96
|
-
* json-ld namespace:schema
|
|
96
|
+
* @json-ld namespace:schema
|
|
97
97
|
*/
|
|
98
98
|
dateDeleted?: string;
|
|
99
99
|
/**
|
|
100
100
|
* The organization which added the document to the graph.
|
|
101
|
-
* json-ld namespace:twin-common
|
|
101
|
+
* @json-ld namespace:twin-common
|
|
102
102
|
*/
|
|
103
103
|
organizationIdentity?: string;
|
|
104
104
|
/**
|
|
105
105
|
* The user who added the document to the graph.
|
|
106
|
-
* json-ld namespace:twin-common
|
|
106
|
+
* @json-ld namespace:twin-common
|
|
107
107
|
*/
|
|
108
108
|
userIdentity?: string;
|
|
109
109
|
}
|
|
@@ -20,27 +20,27 @@ export interface IDocumentAttestation {
|
|
|
20
20
|
type: typeof DocumentTypes.DocumentAttestation;
|
|
21
21
|
/**
|
|
22
22
|
* The id of the document.
|
|
23
|
-
* json-ld type:schema:identifier
|
|
23
|
+
* @json-ld type:schema:identifier
|
|
24
24
|
*/
|
|
25
25
|
documentId: string;
|
|
26
26
|
/**
|
|
27
27
|
* The code for the document type.
|
|
28
|
-
* json-ld type:schema:identifier
|
|
28
|
+
* @json-ld type:schema:identifier
|
|
29
29
|
*/
|
|
30
30
|
documentCode: UneceDocumentCodeList;
|
|
31
31
|
/**
|
|
32
32
|
* The revision of the document as a 0 based index.
|
|
33
|
-
* json-ld type:schema:Integer
|
|
33
|
+
* @json-ld type:schema:Integer
|
|
34
34
|
*/
|
|
35
35
|
documentRevision: number;
|
|
36
36
|
/**
|
|
37
37
|
* The date/time of when the document was created.
|
|
38
|
-
* json-ld namespace:schema
|
|
38
|
+
* @json-ld namespace:schema
|
|
39
39
|
*/
|
|
40
40
|
dateCreated: string;
|
|
41
41
|
/**
|
|
42
42
|
* The integrity of the document being attested.
|
|
43
|
-
* json-ld namespace:twin-common
|
|
43
|
+
* @json-ld namespace:twin-common
|
|
44
44
|
*/
|
|
45
45
|
integrity: string;
|
|
46
46
|
}
|
|
@@ -21,12 +21,12 @@ export interface IDocumentList {
|
|
|
21
21
|
type: typeof SchemaOrgTypes.ItemList;
|
|
22
22
|
/**
|
|
23
23
|
* The list of documents.
|
|
24
|
-
* json-ld namespace:schema
|
|
24
|
+
* @json-ld namespace:schema
|
|
25
25
|
*/
|
|
26
26
|
[SchemaOrgTypes.ItemListElement]: IDocument[];
|
|
27
27
|
/**
|
|
28
28
|
* The ids of the other vertices which are connected to the document.
|
|
29
|
-
* json-ld container:set
|
|
29
|
+
* @json-ld container:set
|
|
30
30
|
*/
|
|
31
31
|
edges?: string[];
|
|
32
32
|
}
|