@twin.org/document-management-models 0.0.2-next.4 → 0.0.3-next.10
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/dataTypes/documentManagementDataTypes.js +29 -0
- package/dist/es/dataTypes/documentManagementDataTypes.js.map +1 -0
- package/dist/es/index.js +19 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IDocument.js +2 -0
- package/dist/es/models/IDocument.js.map +1 -0
- package/dist/es/models/IDocumentAttestation.js +2 -0
- package/dist/es/models/IDocumentAttestation.js.map +1 -0
- package/dist/es/models/IDocumentList.js +2 -0
- package/dist/es/models/IDocumentList.js.map +1 -0
- package/dist/es/models/IDocumentManagementComponent.js +2 -0
- package/dist/es/models/IDocumentManagementComponent.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementCreateRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementCreateRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementGetRevisionResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementQueryRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementQueryRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementQueryResponse.js +2 -0
- package/dist/es/models/api/IDocumentManagementQueryResponse.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementRemoveRequest.js +4 -0
- package/dist/es/models/api/IDocumentManagementRemoveRequest.js.map +1 -0
- package/dist/es/models/api/IDocumentManagementUpdateRequest.js +2 -0
- package/dist/es/models/api/IDocumentManagementUpdateRequest.js.map +1 -0
- package/dist/es/models/documentContexts.js +33 -0
- package/dist/es/models/documentContexts.js.map +1 -0
- package/dist/es/models/documentTypes.js +17 -0
- package/dist/es/models/documentTypes.js.map +1 -0
- package/dist/es/schemas/Document.json +114 -0
- package/dist/types/index.d.ts +16 -16
- package/dist/types/models/IDocument.d.ts +28 -12
- package/dist/types/models/IDocumentAttestation.d.ts +14 -9
- package/dist/types/models/IDocumentList.d.ts +7 -9
- package/dist/types/models/IDocumentManagementComponent.d.ts +16 -22
- package/dist/types/models/api/IDocumentManagementCreateRequest.d.ts +2 -2
- package/dist/types/models/api/IDocumentManagementGetRequest.d.ts +4 -4
- package/dist/types/models/api/IDocumentManagementGetResponse.d.ts +2 -1
- package/dist/types/models/api/IDocumentManagementGetRevisionRequest.d.ts +3 -3
- package/dist/types/models/api/IDocumentManagementGetRevisionResponse.d.ts +1 -1
- package/dist/types/models/api/IDocumentManagementQueryResponse.d.ts +1 -0
- package/dist/types/models/documentContexts.d.ts +20 -4
- package/docs/changelog.md +88 -0
- package/docs/reference/interfaces/IDocument.md +26 -10
- package/docs/reference/interfaces/IDocumentAttestation.md +10 -5
- package/docs/reference/interfaces/IDocumentList.md +2 -8
- package/docs/reference/interfaces/IDocumentManagementComponent.md +10 -90
- package/docs/reference/interfaces/IDocumentManagementCreateRequest.md +2 -2
- package/docs/reference/interfaces/IDocumentManagementGetRequest.md +4 -4
- package/docs/reference/interfaces/IDocumentManagementGetResponse.md +4 -0
- package/docs/reference/interfaces/IDocumentManagementGetRevisionRequest.md +3 -3
- package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +4 -0
- package/docs/reference/variables/DocumentContexts.md +30 -6
- package/package.json +5 -7
- package/dist/cjs/index.cjs +0 -190
- package/dist/esm/index.mjs +0 -186
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { SchemaOrgContexts, SchemaOrgTypes } from "@twin.org/standards-schema-org";
|
|
3
|
-
import type { DocumentContexts } from "./documentContexts";
|
|
4
|
-
import type { IDocument } from "./IDocument";
|
|
3
|
+
import type { DocumentContexts } from "./documentContexts.js";
|
|
4
|
+
import type { IDocument } from "./IDocument.js";
|
|
5
5
|
/**
|
|
6
6
|
* Interface describing a list of document entries.
|
|
7
7
|
*/
|
|
@@ -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
|
/**
|
|
@@ -21,14 +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
25
|
*/
|
|
25
26
|
[SchemaOrgTypes.ItemListElement]: IDocument[];
|
|
26
27
|
/**
|
|
27
28
|
* The ids of the other vertices which are connected to the document.
|
|
29
|
+
* json-ld container:set
|
|
28
30
|
*/
|
|
29
31
|
edges?: string[];
|
|
30
|
-
/**
|
|
31
|
-
* The cursor to get the next chunk of documents.
|
|
32
|
-
*/
|
|
33
|
-
[SchemaOrgTypes.NextItem]?: string;
|
|
34
32
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { IAuditableItemGraphVertexList } from "@twin.org/auditable-item-graph-models";
|
|
2
2
|
import type { IComponent } from "@twin.org/core";
|
|
3
3
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
4
|
-
import type {
|
|
5
|
-
import type { IDocument } from "./IDocument";
|
|
6
|
-
import type { IDocumentList } from "./IDocumentList";
|
|
4
|
+
import type { UneceDocumentCodeList } from "@twin.org/standards-unece";
|
|
5
|
+
import type { IDocument } from "./IDocument.js";
|
|
6
|
+
import type { IDocumentList } from "./IDocumentList.js";
|
|
7
7
|
/**
|
|
8
8
|
* Interface describing an document management contract.
|
|
9
9
|
*/
|
|
@@ -22,11 +22,9 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
22
22
|
* @param options.createAttestation Flag to create an attestation for the document, defaults to false.
|
|
23
23
|
* @param options.addAlias Flag to add the document id as an alias to the aig vertex, defaults to true.
|
|
24
24
|
* @param options.aliasAnnotationObject Annotation object for the alias.
|
|
25
|
-
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
26
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
27
25
|
* @returns The auditable item graph vertex created for the document including its revision.
|
|
28
26
|
*/
|
|
29
|
-
create(documentId: string, documentIdFormat: string | undefined, documentCode:
|
|
27
|
+
create(documentId: string, documentIdFormat: string | undefined, documentCode: UneceDocumentCodeList, blob: Uint8Array, annotationObject?: IJsonLdNodeObject, auditableItemGraphEdges?: {
|
|
30
28
|
targetId: string;
|
|
31
29
|
addAlias?: boolean;
|
|
32
30
|
aliasAnnotationObject?: IJsonLdNodeObject;
|
|
@@ -34,7 +32,7 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
34
32
|
createAttestation?: boolean;
|
|
35
33
|
addAlias?: boolean;
|
|
36
34
|
aliasAnnotationObject?: IJsonLdNodeObject;
|
|
37
|
-
}
|
|
35
|
+
}): Promise<string>;
|
|
38
36
|
/**
|
|
39
37
|
* Update a document as an auditable item graph vertex and add its content to blob storage.
|
|
40
38
|
* If the blob data is different a new revision will be created.
|
|
@@ -43,15 +41,13 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
43
41
|
* @param blob The data to update the document with.
|
|
44
42
|
* @param annotationObject Additional information to associate with the document.
|
|
45
43
|
* @param auditableItemGraphEdges The auditable item graph vertices to connect the document to, if undefined retains current connections.
|
|
46
|
-
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
47
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
48
44
|
* @returns Nothing.
|
|
49
45
|
*/
|
|
50
46
|
update(auditableItemGraphDocumentId: string, blob?: Uint8Array, annotationObject?: IJsonLdNodeObject, auditableItemGraphEdges?: {
|
|
51
47
|
targetId: string;
|
|
52
48
|
addAlias?: boolean;
|
|
53
49
|
aliasAnnotationObject?: IJsonLdNodeObject;
|
|
54
|
-
}[]
|
|
50
|
+
}[]): Promise<void>;
|
|
55
51
|
/**
|
|
56
52
|
* Get a document using it's auditable item graph vertex id and optional revision.
|
|
57
53
|
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
@@ -64,8 +60,6 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
64
60
|
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
65
61
|
* @param cursor The cursor to get the next chunk of revisions.
|
|
66
62
|
* @param limit Limit the number of items to return, defaults to 1 so only most recent is returned.
|
|
67
|
-
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
68
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
69
63
|
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
70
64
|
*/
|
|
71
65
|
get(auditableItemGraphDocumentId: string, options?: {
|
|
@@ -75,7 +69,10 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
75
69
|
includeRemoved?: boolean;
|
|
76
70
|
extractRuleGroupId?: string;
|
|
77
71
|
extractMimeType?: string;
|
|
78
|
-
}, cursor?: string, limit?: number
|
|
72
|
+
}, cursor?: string, limit?: number): Promise<{
|
|
73
|
+
entries: IDocumentList;
|
|
74
|
+
cursor?: string;
|
|
75
|
+
}>;
|
|
79
76
|
/**
|
|
80
77
|
* Get a document revision using it's auditable item graph vertex id.
|
|
81
78
|
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
@@ -86,8 +83,6 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
86
83
|
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
87
84
|
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
88
85
|
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
89
|
-
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
90
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
91
86
|
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
92
87
|
*/
|
|
93
88
|
getRevision(auditableItemGraphDocumentId: string, revision: number, options?: {
|
|
@@ -96,25 +91,24 @@ export interface IDocumentManagementComponent extends IComponent {
|
|
|
96
91
|
includeAttestation?: boolean;
|
|
97
92
|
extractRuleGroupId?: string;
|
|
98
93
|
extractMimeType?: string;
|
|
99
|
-
}
|
|
94
|
+
}): Promise<IDocument>;
|
|
100
95
|
/**
|
|
101
96
|
* Remove an auditable item graph vertex using it's id.
|
|
102
97
|
* The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
|
103
98
|
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
104
99
|
* @param revision The revision of the document to remove.
|
|
105
|
-
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
106
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
107
100
|
* @returns Nothing.
|
|
108
101
|
*/
|
|
109
|
-
removeRevision(auditableItemGraphDocumentId: string, revision: number
|
|
102
|
+
removeRevision(auditableItemGraphDocumentId: string, revision: number): Promise<void>;
|
|
110
103
|
/**
|
|
111
104
|
* Find all the document with a specific id.
|
|
112
105
|
* @param documentId The document id to find in the graph.
|
|
113
106
|
* @param cursor The cursor to get the next chunk of documents.
|
|
114
107
|
* @param limit The limit to get the next chunk of documents.
|
|
115
|
-
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
116
|
-
* @param nodeIdentity The node identity to use for vault operations.
|
|
117
108
|
* @returns The graph vertices that contain documents referencing the specified document id.
|
|
118
109
|
*/
|
|
119
|
-
query(documentId: string, cursor?: string, limit?: number
|
|
110
|
+
query(documentId: string, cursor?: string, limit?: number): Promise<{
|
|
111
|
+
entries: IAuditableItemGraphVertexList;
|
|
112
|
+
cursor?: string;
|
|
113
|
+
}>;
|
|
120
114
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
-
import type {
|
|
2
|
+
import type { UneceDocumentCodeList } from "@twin.org/standards-unece";
|
|
3
3
|
/**
|
|
4
4
|
* Request to create a document as an auditable item graph vertex.
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ export interface IDocumentManagementCreateRequest {
|
|
|
19
19
|
/**
|
|
20
20
|
* The code for the document type.
|
|
21
21
|
*/
|
|
22
|
-
documentCode:
|
|
22
|
+
documentCode: UneceDocumentCodeList;
|
|
23
23
|
/**
|
|
24
24
|
* The data to create the document with, in base64.
|
|
25
25
|
*/
|
|
@@ -26,22 +26,22 @@ export interface IDocumentManagementGetRequest {
|
|
|
26
26
|
* Include the blob storage metadata in the response.
|
|
27
27
|
* @default false
|
|
28
28
|
*/
|
|
29
|
-
includeBlobStorageMetadata?:
|
|
29
|
+
includeBlobStorageMetadata?: string;
|
|
30
30
|
/**
|
|
31
31
|
* Include the blob storage data in the response.
|
|
32
32
|
* @default false
|
|
33
33
|
*/
|
|
34
|
-
includeBlobStorageData?:
|
|
34
|
+
includeBlobStorageData?: string;
|
|
35
35
|
/**
|
|
36
36
|
* Include the attestation information in the response.
|
|
37
37
|
* @default false
|
|
38
38
|
*/
|
|
39
|
-
includeAttestation?:
|
|
39
|
+
includeAttestation?: string;
|
|
40
40
|
/**
|
|
41
41
|
* Include deleted documents in the response.
|
|
42
42
|
* @default false
|
|
43
43
|
*/
|
|
44
|
-
includeRemoved?:
|
|
44
|
+
includeRemoved?: string;
|
|
45
45
|
/**
|
|
46
46
|
* If provided will extract data from the document using the specified rule group id.
|
|
47
47
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeaderTypes, MimeTypes } from "@twin.org/web";
|
|
2
|
-
import type { IDocumentList } from "../IDocumentList";
|
|
2
|
+
import type { IDocumentList } from "../IDocumentList.js";
|
|
3
3
|
/**
|
|
4
4
|
* Response to get a document and optionally revisions from an auditable item graph vertex.
|
|
5
5
|
*/
|
|
@@ -9,6 +9,7 @@ export interface IDocumentManagementGetResponse {
|
|
|
9
9
|
*/
|
|
10
10
|
headers?: {
|
|
11
11
|
[HeaderTypes.ContentType]: typeof MimeTypes.Json | typeof MimeTypes.JsonLd;
|
|
12
|
+
[HeaderTypes.Link]?: string | string[];
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* The body parameters.
|
|
@@ -30,17 +30,17 @@ export interface IDocumentManagementGetRevisionRequest {
|
|
|
30
30
|
* Include the blob storage metadata in the response.
|
|
31
31
|
* @default false
|
|
32
32
|
*/
|
|
33
|
-
includeBlobStorageMetadata?:
|
|
33
|
+
includeBlobStorageMetadata?: string;
|
|
34
34
|
/**
|
|
35
35
|
* Include the blob storage data in the response.
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
|
-
includeBlobStorageData?:
|
|
38
|
+
includeBlobStorageData?: string;
|
|
39
39
|
/**
|
|
40
40
|
* Include the attestation information in the response.
|
|
41
41
|
* @default false
|
|
42
42
|
*/
|
|
43
|
-
includeAttestation?:
|
|
43
|
+
includeAttestation?: string;
|
|
44
44
|
/**
|
|
45
45
|
* If provided will extract data from the document using the specified rule group id.
|
|
46
46
|
*/
|
|
@@ -3,13 +3,29 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const DocumentContexts: {
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
6
|
+
* The canonical RDF namespace URI for Document Management.
|
|
7
7
|
*/
|
|
8
|
-
readonly
|
|
8
|
+
readonly Namespace: "https://schema.twindev.org/documents/";
|
|
9
9
|
/**
|
|
10
|
-
* The context
|
|
10
|
+
* The value to use in context for Document Management.
|
|
11
11
|
*/
|
|
12
|
-
readonly
|
|
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.
|
|
19
|
+
*/
|
|
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,93 @@
|
|
|
1
1
|
# @twin.org/document-management-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.10](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.9...document-management-models-v0.0.3-next.10) (2026-02-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add ts-to-jsonld-context tool ([da11115](https://github.com/twinfoundation/document-management/commit/da111155614dc7f7789480c8b0d2f03c66a16ae4))
|
|
9
|
+
* blobHash to integrity ([#38](https://github.com/twinfoundation/document-management/issues/38)) ([2d45756](https://github.com/twinfoundation/document-management/commit/2d457565ba61d260ace12a762e592b6b1a65788d))
|
|
10
|
+
|
|
11
|
+
## [0.0.3-next.9](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.8...document-management-models-v0.0.3-next.9) (2026-01-26)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Miscellaneous Chores
|
|
15
|
+
|
|
16
|
+
* **document-management-models:** Synchronize repo versions
|
|
17
|
+
|
|
18
|
+
## [0.0.3-next.8](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.7...document-management-models-v0.0.3-next.8) (2026-01-26)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Miscellaneous Chores
|
|
22
|
+
|
|
23
|
+
* **document-management-models:** Synchronize repo versions
|
|
24
|
+
|
|
25
|
+
## [0.0.3-next.7](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.6...document-management-models-v0.0.3-next.7) (2026-01-23)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* replace nextItem property with Link header ([#34](https://github.com/twinfoundation/document-management/issues/34)) ([3f04c3f](https://github.com/twinfoundation/document-management/commit/3f04c3fb5c9ec0c56f213089a15cc247fbfbd59c))
|
|
31
|
+
|
|
32
|
+
## [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)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
* update contexts ([#32](https://github.com/twinfoundation/document-management/issues/32)) ([2fc1d92](https://github.com/twinfoundation/document-management/commit/2fc1d9200ecd8b755efb552c5f84f996cb61e64a))
|
|
38
|
+
|
|
39
|
+
## [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)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* update contexts and namespaces ([#29](https://github.com/twinfoundation/document-management/issues/29)) ([ef7abc0](https://github.com/twinfoundation/document-management/commit/ef7abc01d10b3f9528be8afaa21dbd00181939ae))
|
|
45
|
+
|
|
46
|
+
## [0.0.3-next.4](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.3...document-management-models-v0.0.3-next.4) (2026-01-06)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Features
|
|
50
|
+
|
|
51
|
+
* update unece dependencies ([a27548c](https://github.com/twinfoundation/document-management/commit/a27548cdebbe1d9577fc8341166538c2f07348a3))
|
|
52
|
+
|
|
53
|
+
## [0.0.3-next.3](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.2...document-management-models-v0.0.3-next.3) (2025-12-03)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* use updated unece types ([c141a89](https://github.com/twinfoundation/document-management/commit/c141a895138cb45fa0b1e95c42f56e31708c846c))
|
|
59
|
+
|
|
60
|
+
## [0.0.3-next.2](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.1...document-management-models-v0.0.3-next.2) (2025-11-28)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
### Features
|
|
64
|
+
|
|
65
|
+
* update background task service ([5c380dc](https://github.com/twinfoundation/document-management/commit/5c380dca3114254201768f184f9486828501ff66))
|
|
66
|
+
|
|
67
|
+
## [0.0.3-next.1](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.0...document-management-models-v0.0.3-next.1) (2025-11-12)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Features
|
|
71
|
+
|
|
72
|
+
* add context id features ([#24](https://github.com/twinfoundation/document-management/issues/24)) ([83f65f1](https://github.com/twinfoundation/document-management/commit/83f65f15e55f2293f5ca0d9d1e4679ba67c4ec8d))
|
|
73
|
+
* add validate-locales ([b6b6f9e](https://github.com/twinfoundation/document-management/commit/b6b6f9e9d66c17af3d030247ca168ac0b5844bdc))
|
|
74
|
+
* data type registration use fully qualified names ([18d27d0](https://github.com/twinfoundation/document-management/commit/18d27d0c21d0f652b7df4b409bb2d3c66cf22f84))
|
|
75
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
76
|
+
* eslint migration to flat config ([98635aa](https://github.com/twinfoundation/document-management/commit/98635aa24ebafba265e989e461fe98104f683191))
|
|
77
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
78
|
+
* improve comments ([4d2f094](https://github.com/twinfoundation/document-management/commit/4d2f094b23e3320cb739917246c1ee5f6ad41c11))
|
|
79
|
+
* store document as a vertex ([#2](https://github.com/twinfoundation/document-management/issues/2)) ([7febedc](https://github.com/twinfoundation/document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
80
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
81
|
+
* update framework core ([f991a59](https://github.com/twinfoundation/document-management/commit/f991a59d25ec228bcdd7a5b6bd55578985b55a84))
|
|
82
|
+
* update ts-to-schema generation ([01a5335](https://github.com/twinfoundation/document-management/commit/01a5335372f6a4764a74d56c446d669724a308aa))
|
|
83
|
+
* use standard list json ld types ([20ea04b](https://github.com/twinfoundation/document-management/commit/20ea04b05fd4bc4fcedce8f66958942c3c2fa303))
|
|
84
|
+
* use targetId in AIG for edges ([82dec81](https://github.com/twinfoundation/document-management/commit/82dec8190d8b523b350ef133bdcf648cab1023b0))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Bug Fixes
|
|
88
|
+
|
|
89
|
+
* query params force coercion ([d667d0f](https://github.com/twinfoundation/document-management/commit/d667d0f195accca2887a5ca732e9790063763996))
|
|
90
|
+
|
|
3
91
|
## [0.0.2-next.4](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.2-next.3...document-management-models-v0.0.2-next.4) (2025-10-09)
|
|
4
92
|
|
|
5
93
|
|
|
@@ -6,7 +6,7 @@ Interface describing a document.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: \[`"https://schema.
|
|
9
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/documents/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
@@ -33,6 +33,7 @@ The full id of the document.
|
|
|
33
33
|
> **documentId**: `string`
|
|
34
34
|
|
|
35
35
|
The id of the document.
|
|
36
|
+
json-ld type:schema:identifier
|
|
36
37
|
|
|
37
38
|
***
|
|
38
39
|
|
|
@@ -41,14 +42,16 @@ The id of the document.
|
|
|
41
42
|
> `optional` **documentIdFormat**: `string`
|
|
42
43
|
|
|
43
44
|
The format of the document id.
|
|
45
|
+
json-ld type:schema:Text
|
|
44
46
|
|
|
45
47
|
***
|
|
46
48
|
|
|
47
49
|
### documentCode
|
|
48
50
|
|
|
49
|
-
> **documentCode**: `
|
|
51
|
+
> **documentCode**: `UneceDocumentCodeList`
|
|
50
52
|
|
|
51
53
|
The code for the document type.
|
|
54
|
+
json-ld type:schema:identifier
|
|
52
55
|
|
|
53
56
|
***
|
|
54
57
|
|
|
@@ -57,6 +60,7 @@ The code for the document type.
|
|
|
57
60
|
> **documentRevision**: `number`
|
|
58
61
|
|
|
59
62
|
The revision of the document as a 0 based index.
|
|
63
|
+
json-ld type:schema:Integer
|
|
60
64
|
|
|
61
65
|
***
|
|
62
66
|
|
|
@@ -65,6 +69,7 @@ The revision of the document as a 0 based index.
|
|
|
65
69
|
> `optional` **annotationObject**: `IJsonLdNodeObject`
|
|
66
70
|
|
|
67
71
|
Additional annotation information for the document.
|
|
72
|
+
json-ld namespace:twin-common
|
|
68
73
|
|
|
69
74
|
***
|
|
70
75
|
|
|
@@ -73,14 +78,16 @@ Additional annotation information for the document.
|
|
|
73
78
|
> **blobStorageId**: `string`
|
|
74
79
|
|
|
75
80
|
The blob storage id for the document.
|
|
81
|
+
json-ld type:schema:identifier
|
|
76
82
|
|
|
77
83
|
***
|
|
78
84
|
|
|
79
|
-
###
|
|
85
|
+
### integrity
|
|
80
86
|
|
|
81
|
-
> **
|
|
87
|
+
> **integrity**: `string`
|
|
82
88
|
|
|
83
|
-
The
|
|
89
|
+
The integrity of the blob data.
|
|
90
|
+
json-ld namespace:twin-common
|
|
84
91
|
|
|
85
92
|
***
|
|
86
93
|
|
|
@@ -89,6 +96,7 @@ The hash of the blob data.
|
|
|
89
96
|
> `optional` **blobStorageEntry**: `IBlobStorageEntry`
|
|
90
97
|
|
|
91
98
|
The additional JSON-LD for blob storage if it was requested.
|
|
99
|
+
json-ld id
|
|
92
100
|
|
|
93
101
|
***
|
|
94
102
|
|
|
@@ -97,6 +105,7 @@ The additional JSON-LD for blob storage if it was requested.
|
|
|
97
105
|
> `optional` **extractedData**: `unknown`
|
|
98
106
|
|
|
99
107
|
The data extracted from the document using data extraction services.
|
|
108
|
+
json-ld type:json
|
|
100
109
|
|
|
101
110
|
***
|
|
102
111
|
|
|
@@ -105,6 +114,7 @@ The data extracted from the document using data extraction services.
|
|
|
105
114
|
> `optional` **attestationId**: `string`
|
|
106
115
|
|
|
107
116
|
The attestation for the document if one was created.
|
|
117
|
+
json-ld type:schema:identifier
|
|
108
118
|
|
|
109
119
|
***
|
|
110
120
|
|
|
@@ -113,6 +123,7 @@ The attestation for the document if one was created.
|
|
|
113
123
|
> `optional` **attestationInformation**: `IAttestationInformation`
|
|
114
124
|
|
|
115
125
|
The additional JSON-LD for attestation storage if it was requested.
|
|
126
|
+
json-ld id
|
|
116
127
|
|
|
117
128
|
***
|
|
118
129
|
|
|
@@ -121,6 +132,7 @@ The additional JSON-LD for attestation storage if it was requested.
|
|
|
121
132
|
> **dateCreated**: `string`
|
|
122
133
|
|
|
123
134
|
The date/time of when the document was created.
|
|
135
|
+
json-ld namespace:schema
|
|
124
136
|
|
|
125
137
|
***
|
|
126
138
|
|
|
@@ -129,6 +141,7 @@ The date/time of when the document was created.
|
|
|
129
141
|
> `optional` **dateModified**: `string`
|
|
130
142
|
|
|
131
143
|
The date/time of when the document was modified.
|
|
144
|
+
json-ld namespace:schema
|
|
132
145
|
|
|
133
146
|
***
|
|
134
147
|
|
|
@@ -137,19 +150,22 @@ The date/time of when the document was modified.
|
|
|
137
150
|
> `optional` **dateDeleted**: `string`
|
|
138
151
|
|
|
139
152
|
The date/time of when the document was deleted, as we never actually remove items.
|
|
153
|
+
json-ld namespace:schema
|
|
140
154
|
|
|
141
155
|
***
|
|
142
156
|
|
|
143
|
-
###
|
|
157
|
+
### organizationIdentity?
|
|
144
158
|
|
|
145
|
-
> **
|
|
159
|
+
> `optional` **organizationIdentity**: `string`
|
|
146
160
|
|
|
147
|
-
The
|
|
161
|
+
The organization which added the document to the graph.
|
|
162
|
+
json-ld namespace:twin-common
|
|
148
163
|
|
|
149
164
|
***
|
|
150
165
|
|
|
151
|
-
### userIdentity
|
|
166
|
+
### userIdentity?
|
|
152
167
|
|
|
153
|
-
> **userIdentity**: `string`
|
|
168
|
+
> `optional` **userIdentity**: `string`
|
|
154
169
|
|
|
155
170
|
The user who added the document to the graph.
|
|
171
|
+
json-ld namespace:twin-common
|
|
@@ -6,7 +6,7 @@ Interface describing a document attestation.
|
|
|
6
6
|
|
|
7
7
|
### @context
|
|
8
8
|
|
|
9
|
-
> **@context**: \[`"https://schema.
|
|
9
|
+
> **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/documents/"`, `"https://schema.twindev.org/common/"`\]
|
|
10
10
|
|
|
11
11
|
JSON-LD Context.
|
|
12
12
|
|
|
@@ -25,14 +25,16 @@ JSON-LD Type.
|
|
|
25
25
|
> **documentId**: `string`
|
|
26
26
|
|
|
27
27
|
The id of the document.
|
|
28
|
+
json-ld type:schema:identifier
|
|
28
29
|
|
|
29
30
|
***
|
|
30
31
|
|
|
31
32
|
### documentCode
|
|
32
33
|
|
|
33
|
-
> **documentCode**: `
|
|
34
|
+
> **documentCode**: `UneceDocumentCodeList`
|
|
34
35
|
|
|
35
36
|
The code for the document type.
|
|
37
|
+
json-ld type:schema:identifier
|
|
36
38
|
|
|
37
39
|
***
|
|
38
40
|
|
|
@@ -41,6 +43,7 @@ The code for the document type.
|
|
|
41
43
|
> **documentRevision**: `number`
|
|
42
44
|
|
|
43
45
|
The revision of the document as a 0 based index.
|
|
46
|
+
json-ld type:schema:Integer
|
|
44
47
|
|
|
45
48
|
***
|
|
46
49
|
|
|
@@ -49,11 +52,13 @@ The revision of the document as a 0 based index.
|
|
|
49
52
|
> **dateCreated**: `string`
|
|
50
53
|
|
|
51
54
|
The date/time of when the document was created.
|
|
55
|
+
json-ld namespace:schema
|
|
52
56
|
|
|
53
57
|
***
|
|
54
58
|
|
|
55
|
-
###
|
|
59
|
+
### integrity
|
|
56
60
|
|
|
57
|
-
> **
|
|
61
|
+
> **integrity**: `string`
|
|
58
62
|
|
|
59
|
-
The
|
|
63
|
+
The integrity of the document being attested.
|
|
64
|
+
json-ld namespace:twin-common
|
|
@@ -25,6 +25,7 @@ JSON-LD Type.
|
|
|
25
25
|
> **itemListElement**: [`IDocument`](IDocument.md)[]
|
|
26
26
|
|
|
27
27
|
The list of documents.
|
|
28
|
+
json-ld namespace:schema
|
|
28
29
|
|
|
29
30
|
***
|
|
30
31
|
|
|
@@ -33,11 +34,4 @@ The list of documents.
|
|
|
33
34
|
> `optional` **edges**: `string`[]
|
|
34
35
|
|
|
35
36
|
The ids of the other vertices which are connected to the document.
|
|
36
|
-
|
|
37
|
-
***
|
|
38
|
-
|
|
39
|
-
### nextItem?
|
|
40
|
-
|
|
41
|
-
> `optional` **nextItem**: `string`
|
|
42
|
-
|
|
43
|
-
The cursor to get the next chunk of documents.
|
|
37
|
+
json-ld container:set
|