@twin.org/document-management-models 0.0.3-next.5 → 0.0.3-next.6
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/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/models/documentContexts.js +19 -3
- package/dist/es/models/documentContexts.js.map +1 -1
- package/dist/types/models/IDocument.d.ts +3 -3
- package/dist/types/models/IDocumentAttestation.d.ts +3 -3
- package/dist/types/models/IDocumentList.d.ts +3 -3
- package/dist/types/models/documentContexts.d.ts +18 -2
- package/docs/changelog.md +7 -0
- package/docs/reference/variables/DocumentContexts.md +26 -2
- package/package.json +1 -1
|
@@ -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 DocumentContexts.
|
|
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 DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon,\n\t\ttypeof SchemaOrgContexts.Context,\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 */\n\tdocumentId: string;\n\n\t/**\n\t * The format of the document id.\n\t */\n\tdocumentIdFormat?: string;\n\n\t/**\n\t * The code for the document type.\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * Additional annotation information for the document.\n\t */\n\tannotationObject?: IJsonLdNodeObject;\n\n\t/**\n\t * The blob storage id for the document.\n\t */\n\tblobStorageId: string;\n\n\t/**\n\t * The hash of the blob data.\n\t */\n\tblobHash: string;\n\n\t/**\n\t * The additional JSON-LD for blob storage if it was requested.\n\t */\n\tblobStorageEntry?: IBlobStorageEntry;\n\n\t/**\n\t * The data extracted from the document using data extraction services.\n\t */\n\textractedData?: unknown;\n\n\t/**\n\t * The attestation for the document if one was created.\n\t */\n\tattestationId?: string;\n\n\t/**\n\t * The additional JSON-LD for attestation storage if it was requested.\n\t */\n\tattestationInformation?: IAttestationInformation;\n\n\t/**\n\t * The date/time of when the document was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The date/time of when the document was modified.\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 */\n\tdateDeleted?: string;\n\n\t/**\n\t * The organization which added the document to the graph.\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The user who added the document to the graph.\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 DocumentContexts.
|
|
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 DocumentContexts.Context,\n\t\ttypeof DocumentContexts.ContextCommon,\n\t\ttypeof SchemaOrgContexts.Context\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 */\n\tdocumentId: string;\n\n\t/**\n\t * The code for the document type.\n\t */\n\tdocumentCode: UneceDocumentCodeList;\n\n\t/**\n\t * The revision of the document as a 0 based index.\n\t */\n\tdocumentRevision: number;\n\n\t/**\n\t * The date/time of when the document was created.\n\t */\n\tdateCreated: string;\n\n\t/**\n\t * The hash of the document being attested.\n\t */\n\tblobHash: 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.
|
|
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 */\n\t[SchemaOrgTypes.ItemListElement]: IDocument[];\n\n\t/**\n\t * The ids of the other vertices which are connected to the document.\n\t */\n\tedges?: string[];\n\n\t/**\n\t * The cursor to get the next chunk of documents.\n\t */\n\t[SchemaOrgTypes.NextItem]?: string;\n}\n"]}
|
|
@@ -6,12 +6,28 @@
|
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
7
|
export const DocumentContexts = {
|
|
8
8
|
/**
|
|
9
|
-
* The namespace for
|
|
9
|
+
* The canonical RDF namespace URI for Document Management.
|
|
10
10
|
*/
|
|
11
11
|
Namespace: "https://schema.twindev.org/documents/",
|
|
12
12
|
/**
|
|
13
|
-
* The
|
|
13
|
+
* The value to use in context for Document Management.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
Context: "https://schema.twindev.org/documents/",
|
|
16
|
+
/**
|
|
17
|
+
* The JSON-LD Context URL for Document Management.
|
|
18
|
+
*/
|
|
19
|
+
JsonLdContext: "https://schema.twindev.org/documents/types.jsonld",
|
|
20
|
+
/**
|
|
21
|
+
* The canonical RDF namespace URI for TWIN Common.
|
|
22
|
+
*/
|
|
23
|
+
NamespaceCommon: "https://schema.twindev.org/common/",
|
|
24
|
+
/**
|
|
25
|
+
* The value to use in JSON-LD context for TWIN Common.
|
|
26
|
+
*/
|
|
27
|
+
ContextCommon: "https://schema.twindev.org/common/",
|
|
28
|
+
/**
|
|
29
|
+
* The JSON-LD Context URL for TWIN Common.
|
|
30
|
+
*/
|
|
31
|
+
JsonLdContextCommon: "https://schema.twindev.org/common/types.jsonld"
|
|
16
32
|
};
|
|
17
33
|
//# sourceMappingURL=documentContexts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentContexts.js","sourceRoot":"","sources":["../../../src/models/documentContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,uCAAuC;IAElD;;OAEG;IACH,eAAe,EAAE,oCAAoC;
|
|
1
|
+
{"version":3,"file":"documentContexts.js","sourceRoot":"","sources":["../../../src/models/documentContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,SAAS,EAAE,uCAAuC;IAElD;;OAEG;IACH,OAAO,EAAE,uCAAuC;IAEhD;;OAEG;IACH,aAAa,EAAE,mDAAmD;IAElE;;OAEG;IACH,eAAe,EAAE,oCAAoC;IAErD;;OAEG;IACH,aAAa,EAAE,oCAAoC;IAEnD;;OAEG;IACH,mBAAmB,EAAE,gDAAgD;CAC5D,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of document management objects.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const DocumentContexts = {\n\t/**\n\t * The canonical RDF namespace URI for Document Management.\n\t */\n\tNamespace: \"https://schema.twindev.org/documents/\",\n\n\t/**\n\t * The value to use in context for Document Management.\n\t */\n\tContext: \"https://schema.twindev.org/documents/\",\n\n\t/**\n\t * The JSON-LD Context URL for Document Management.\n\t */\n\tJsonLdContext: \"https://schema.twindev.org/documents/types.jsonld\",\n\n\t/**\n\t * The canonical RDF namespace URI for TWIN Common.\n\t */\n\tNamespaceCommon: \"https://schema.twindev.org/common/\",\n\n\t/**\n\t * The value to use in JSON-LD context for TWIN Common.\n\t */\n\tContextCommon: \"https://schema.twindev.org/common/\",\n\n\t/**\n\t * The JSON-LD Context URL for TWIN Common.\n\t */\n\tJsonLdContextCommon: \"https://schema.twindev.org/common/types.jsonld\"\n} as const;\n\n/**\n * The contexts of document management objects.\n */\nexport type DocumentContexts = (typeof DocumentContexts)[keyof typeof DocumentContexts];\n"]}
|
|
@@ -13,9 +13,9 @@ export interface IDocument {
|
|
|
13
13
|
* JSON-LD Context.
|
|
14
14
|
*/
|
|
15
15
|
"@context": [
|
|
16
|
-
typeof DocumentContexts.
|
|
17
|
-
typeof DocumentContexts.
|
|
18
|
-
typeof SchemaOrgContexts.
|
|
16
|
+
typeof DocumentContexts.Context,
|
|
17
|
+
typeof DocumentContexts.ContextCommon,
|
|
18
|
+
typeof SchemaOrgContexts.Context,
|
|
19
19
|
...IJsonLdContextDefinitionElement[]
|
|
20
20
|
];
|
|
21
21
|
/**
|
|
@@ -10,9 +10,9 @@ export interface IDocumentAttestation {
|
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
12
|
"@context": [
|
|
13
|
-
typeof DocumentContexts.
|
|
14
|
-
typeof DocumentContexts.
|
|
15
|
-
typeof SchemaOrgContexts.
|
|
13
|
+
typeof DocumentContexts.Context,
|
|
14
|
+
typeof DocumentContexts.ContextCommon,
|
|
15
|
+
typeof SchemaOrgContexts.Context
|
|
16
16
|
];
|
|
17
17
|
/**
|
|
18
18
|
* JSON-LD Type.
|
|
@@ -10,9 +10,9 @@ export interface IDocumentList {
|
|
|
10
10
|
* JSON-LD Context.
|
|
11
11
|
*/
|
|
12
12
|
"@context": [
|
|
13
|
-
typeof SchemaOrgContexts.
|
|
14
|
-
typeof DocumentContexts.
|
|
15
|
-
typeof DocumentContexts.
|
|
13
|
+
typeof SchemaOrgContexts.Context,
|
|
14
|
+
typeof DocumentContexts.Context,
|
|
15
|
+
typeof DocumentContexts.ContextCommon,
|
|
16
16
|
...IJsonLdContextDefinitionElement[]
|
|
17
17
|
];
|
|
18
18
|
/**
|
|
@@ -3,13 +3,29 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const DocumentContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The namespace for
|
|
6
|
+
* The canonical RDF namespace URI for Document Management.
|
|
7
7
|
*/
|
|
8
8
|
readonly Namespace: "https://schema.twindev.org/documents/";
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
10
|
+
* The value to use in context for Document Management.
|
|
11
|
+
*/
|
|
12
|
+
readonly Context: "https://schema.twindev.org/documents/";
|
|
13
|
+
/**
|
|
14
|
+
* The JSON-LD Context URL for Document Management.
|
|
15
|
+
*/
|
|
16
|
+
readonly JsonLdContext: "https://schema.twindev.org/documents/types.jsonld";
|
|
17
|
+
/**
|
|
18
|
+
* The canonical RDF namespace URI for TWIN Common.
|
|
11
19
|
*/
|
|
12
20
|
readonly NamespaceCommon: "https://schema.twindev.org/common/";
|
|
21
|
+
/**
|
|
22
|
+
* The value to use in JSON-LD context for TWIN Common.
|
|
23
|
+
*/
|
|
24
|
+
readonly ContextCommon: "https://schema.twindev.org/common/";
|
|
25
|
+
/**
|
|
26
|
+
* The JSON-LD Context URL for TWIN Common.
|
|
27
|
+
*/
|
|
28
|
+
readonly JsonLdContextCommon: "https://schema.twindev.org/common/types.jsonld";
|
|
13
29
|
};
|
|
14
30
|
/**
|
|
15
31
|
* The contexts of document management objects.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/document-management-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.6](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.5...document-management-models-v0.0.3-next.6) (2026-01-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update contexts ([#32](https://github.com/twinfoundation/document-management/issues/32)) ([2fc1d92](https://github.com/twinfoundation/document-management/commit/2fc1d9200ecd8b755efb552c5f84f996cb61e64a))
|
|
9
|
+
|
|
3
10
|
## [0.0.3-next.5](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.4...document-management-models-v0.0.3-next.5) (2026-01-14)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -10,10 +10,34 @@ The contexts of document management objects.
|
|
|
10
10
|
|
|
11
11
|
> `readonly` **Namespace**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
|
|
12
12
|
|
|
13
|
-
The namespace for
|
|
13
|
+
The canonical RDF namespace URI for Document Management.
|
|
14
|
+
|
|
15
|
+
### Context
|
|
16
|
+
|
|
17
|
+
> `readonly` **Context**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
|
|
18
|
+
|
|
19
|
+
The value to use in context for Document Management.
|
|
20
|
+
|
|
21
|
+
### JsonLdContext
|
|
22
|
+
|
|
23
|
+
> `readonly` **JsonLdContext**: `"https://schema.twindev.org/documents/types.jsonld"` = `"https://schema.twindev.org/documents/types.jsonld"`
|
|
24
|
+
|
|
25
|
+
The JSON-LD Context URL for Document Management.
|
|
14
26
|
|
|
15
27
|
### NamespaceCommon
|
|
16
28
|
|
|
17
29
|
> `readonly` **NamespaceCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
18
30
|
|
|
19
|
-
The namespace for
|
|
31
|
+
The canonical RDF namespace URI for TWIN Common.
|
|
32
|
+
|
|
33
|
+
### ContextCommon
|
|
34
|
+
|
|
35
|
+
> `readonly` **ContextCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
|
|
36
|
+
|
|
37
|
+
The value to use in JSON-LD context for TWIN Common.
|
|
38
|
+
|
|
39
|
+
### JsonLdContextCommon
|
|
40
|
+
|
|
41
|
+
> `readonly` **JsonLdContextCommon**: `"https://schema.twindev.org/common/types.jsonld"` = `"https://schema.twindev.org/common/types.jsonld"`
|
|
42
|
+
|
|
43
|
+
The JSON-LD Context URL for TWIN Common.
|
package/package.json
CHANGED