@twin.org/document-management-models 0.0.3-next.10 → 0.0.3-next.12

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.
Files changed (27) hide show
  1. package/README.md +1 -1
  2. package/dist/es/models/IDocument.js.map +1 -1
  3. package/dist/es/models/IDocumentAttestation.js.map +1 -1
  4. package/dist/es/models/IDocumentList.js.map +1 -1
  5. package/dist/es/schemas/Document.json +21 -25
  6. package/dist/types/models/IDocument.d.ts +16 -16
  7. package/dist/types/models/IDocumentAttestation.d.ts +5 -5
  8. package/dist/types/models/IDocumentList.d.ts +2 -2
  9. package/docs/changelog.md +15 -1
  10. package/docs/examples.md +23 -1
  11. package/docs/reference/classes/DocumentManagementDataTypes.md +1 -1
  12. package/docs/reference/interfaces/IDocument.md +29 -45
  13. package/docs/reference/interfaces/IDocumentAttestation.md +7 -12
  14. package/docs/reference/interfaces/IDocumentList.md +5 -7
  15. package/docs/reference/interfaces/IDocumentManagementComponent.md +8 -8
  16. package/docs/reference/interfaces/IDocumentManagementCreateRequest.md +6 -6
  17. package/docs/reference/interfaces/IDocumentManagementGetRequest.md +13 -13
  18. package/docs/reference/interfaces/IDocumentManagementGetResponse.md +4 -4
  19. package/docs/reference/interfaces/IDocumentManagementGetRevisionRequest.md +10 -10
  20. package/docs/reference/interfaces/IDocumentManagementGetRevisionResponse.md +3 -3
  21. package/docs/reference/interfaces/IDocumentManagementQueryRequest.md +5 -5
  22. package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +4 -4
  23. package/docs/reference/interfaces/IDocumentManagementRemoveRequest.md +1 -1
  24. package/docs/reference/interfaces/IDocumentManagementUpdateRequest.md +5 -5
  25. package/docs/reference/variables/DocumentContexts.md +6 -6
  26. package/docs/reference/variables/DocumentTypes.md +2 -2
  27. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Document Management Models
2
2
 
3
- Models which define the structure of the document management contracts and connectors.
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":"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. json-ld type:schema:identifier"
37
+ "description": "The id of the document."
41
38
  },
42
39
  "documentIdFormat": {
43
40
  "type": "string",
44
- "description": "The format of the document id. json-ld type:schema:Text"
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. json-ld type:schema:identifier"
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. json-ld type:schema:Integer"
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. json-ld namespace:twin-common"
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. json-ld type:schema:identifier"
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. json-ld namespace:twin-common"
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. json-ld id"
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. json-ld type:json"
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. json-ld type:schema:identifier"
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. json-ld id"
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. json-ld namespace:schema"
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. json-ld namespace:schema"
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. json-ld namespace:schema"
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. json-ld namespace:twin-common"
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. json-ld namespace:twin-common"
96
+ "description": "The user who added the document to the graph."
100
97
  }
101
98
  },
102
99
  "required": [
@@ -109,6 +106,5 @@
109
106
  "blobStorageId",
110
107
  "integrity",
111
108
  "dateCreated"
112
- ],
113
- "additionalProperties": false
109
+ ]
114
110
  }
@@ -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
  }
package/docs/changelog.md CHANGED
@@ -1,4 +1,18 @@
1
- # @twin.org/document-management-models - Changelog
1
+ # Changelog
2
+
3
+ ## [0.0.3-next.12](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.11...document-management-models-v0.0.3-next.12) (2026-03-26)
4
+
5
+
6
+ ### Features
7
+
8
+ * update to latest aig method shapes ([497e895](https://github.com/twinfoundation/document-management/commit/497e8954f24774db628e057ebb9d158a1fd9d92a))
9
+
10
+ ## [0.0.3-next.11](https://github.com/twinfoundation/document-management/compare/document-management-models-v0.0.3-next.10...document-management-models-v0.0.3-next.11) (2026-02-25)
11
+
12
+
13
+ ### Features
14
+
15
+ * update schemas ([310261d](https://github.com/twinfoundation/document-management/commit/310261d620254d9c00dfa8fbb470948af9101778))
2
16
 
3
17
  ## [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
18
 
package/docs/examples.md CHANGED
@@ -1 +1,23 @@
1
- # @twin.org/document-management-models - Examples
1
+ # Document Management Models Examples
2
+
3
+ These snippets show typical setup steps for registering data types and creating document-shaped data that can be validated and exchanged consistently.
4
+
5
+ ## DocumentManagementDataTypes
6
+
7
+ ```typescript
8
+ import { DataTypeHandlerFactory } from '@twin.org/data-core';
9
+ import {
10
+ DocumentContexts,
11
+ DocumentManagementDataTypes,
12
+ DocumentTypes
13
+ } from '@twin.org/document-management-models';
14
+
15
+ DocumentManagementDataTypes.registerTypes();
16
+
17
+ const handler = DataTypeHandlerFactory.get(
18
+ `${DocumentContexts.Namespace}${DocumentTypes.Document}`
19
+ );
20
+
21
+ console.log(handler.namespace); // https://schema.twindev.org/document-management/
22
+ console.log(handler.type); // Document
23
+ ```
@@ -14,7 +14,7 @@ Handle all the data types for document management.
14
14
 
15
15
  ## Methods
16
16
 
17
- ### registerTypes()
17
+ ### registerTypes() {#registertypes}
18
18
 
19
19
  > `static` **registerTypes**(): `void`
20
20
 
@@ -4,7 +4,7 @@ Interface describing a document.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### @context
7
+ ### @context {#context}
8
8
 
9
9
  > **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/documents/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
@@ -12,7 +12,7 @@ JSON-LD Context.
12
12
 
13
13
  ***
14
14
 
15
- ### type
15
+ ### type {#type}
16
16
 
17
17
  > **type**: `"Document"`
18
18
 
@@ -20,7 +20,7 @@ JSON-LD Type.
20
20
 
21
21
  ***
22
22
 
23
- ### id
23
+ ### id {#id}
24
24
 
25
25
  > **id**: `string`
26
26
 
@@ -28,144 +28,128 @@ The full id of the document.
28
28
 
29
29
  ***
30
30
 
31
- ### documentId
31
+ ### documentId {#documentid}
32
32
 
33
33
  > **documentId**: `string`
34
34
 
35
35
  The id of the document.
36
- json-ld type:schema:identifier
37
36
 
38
37
  ***
39
38
 
40
- ### documentIdFormat?
39
+ ### documentIdFormat? {#documentidformat}
41
40
 
42
- > `optional` **documentIdFormat**: `string`
41
+ > `optional` **documentIdFormat?**: `string`
43
42
 
44
43
  The format of the document id.
45
- json-ld type:schema:Text
46
44
 
47
45
  ***
48
46
 
49
- ### documentCode
47
+ ### documentCode {#documentcode}
50
48
 
51
49
  > **documentCode**: `UneceDocumentCodeList`
52
50
 
53
51
  The code for the document type.
54
- json-ld type:schema:identifier
55
52
 
56
53
  ***
57
54
 
58
- ### documentRevision
55
+ ### documentRevision {#documentrevision}
59
56
 
60
57
  > **documentRevision**: `number`
61
58
 
62
59
  The revision of the document as a 0 based index.
63
- json-ld type:schema:Integer
64
60
 
65
61
  ***
66
62
 
67
- ### annotationObject?
63
+ ### annotationObject? {#annotationobject}
68
64
 
69
- > `optional` **annotationObject**: `IJsonLdNodeObject`
65
+ > `optional` **annotationObject?**: `IJsonLdNodeObject`
70
66
 
71
67
  Additional annotation information for the document.
72
- json-ld namespace:twin-common
73
68
 
74
69
  ***
75
70
 
76
- ### blobStorageId
71
+ ### blobStorageId {#blobstorageid}
77
72
 
78
73
  > **blobStorageId**: `string`
79
74
 
80
75
  The blob storage id for the document.
81
- json-ld type:schema:identifier
82
76
 
83
77
  ***
84
78
 
85
- ### integrity
79
+ ### integrity {#integrity}
86
80
 
87
81
  > **integrity**: `string`
88
82
 
89
83
  The integrity of the blob data.
90
- json-ld namespace:twin-common
91
84
 
92
85
  ***
93
86
 
94
- ### blobStorageEntry?
87
+ ### blobStorageEntry? {#blobstorageentry}
95
88
 
96
- > `optional` **blobStorageEntry**: `IBlobStorageEntry`
89
+ > `optional` **blobStorageEntry?**: `IBlobStorageEntry`
97
90
 
98
91
  The additional JSON-LD for blob storage if it was requested.
99
- json-ld id
100
92
 
101
93
  ***
102
94
 
103
- ### extractedData?
95
+ ### extractedData? {#extracteddata}
104
96
 
105
- > `optional` **extractedData**: `unknown`
97
+ > `optional` **extractedData?**: `unknown`
106
98
 
107
99
  The data extracted from the document using data extraction services.
108
- json-ld type:json
109
100
 
110
101
  ***
111
102
 
112
- ### attestationId?
103
+ ### attestationId? {#attestationid}
113
104
 
114
- > `optional` **attestationId**: `string`
105
+ > `optional` **attestationId?**: `string`
115
106
 
116
107
  The attestation for the document if one was created.
117
- json-ld type:schema:identifier
118
108
 
119
109
  ***
120
110
 
121
- ### attestationInformation?
111
+ ### attestationInformation? {#attestationinformation}
122
112
 
123
- > `optional` **attestationInformation**: `IAttestationInformation`
113
+ > `optional` **attestationInformation?**: `IAttestationInformation`
124
114
 
125
115
  The additional JSON-LD for attestation storage if it was requested.
126
- json-ld id
127
116
 
128
117
  ***
129
118
 
130
- ### dateCreated
119
+ ### dateCreated {#datecreated}
131
120
 
132
121
  > **dateCreated**: `string`
133
122
 
134
123
  The date/time of when the document was created.
135
- json-ld namespace:schema
136
124
 
137
125
  ***
138
126
 
139
- ### dateModified?
127
+ ### dateModified? {#datemodified}
140
128
 
141
- > `optional` **dateModified**: `string`
129
+ > `optional` **dateModified?**: `string`
142
130
 
143
131
  The date/time of when the document was modified.
144
- json-ld namespace:schema
145
132
 
146
133
  ***
147
134
 
148
- ### dateDeleted?
135
+ ### dateDeleted? {#datedeleted}
149
136
 
150
- > `optional` **dateDeleted**: `string`
137
+ > `optional` **dateDeleted?**: `string`
151
138
 
152
139
  The date/time of when the document was deleted, as we never actually remove items.
153
- json-ld namespace:schema
154
140
 
155
141
  ***
156
142
 
157
- ### organizationIdentity?
143
+ ### organizationIdentity? {#organizationidentity}
158
144
 
159
- > `optional` **organizationIdentity**: `string`
145
+ > `optional` **organizationIdentity?**: `string`
160
146
 
161
147
  The organization which added the document to the graph.
162
- json-ld namespace:twin-common
163
148
 
164
149
  ***
165
150
 
166
- ### userIdentity?
151
+ ### userIdentity? {#useridentity}
167
152
 
168
- > `optional` **userIdentity**: `string`
153
+ > `optional` **userIdentity?**: `string`
169
154
 
170
155
  The user who added the document to the graph.
171
- json-ld namespace:twin-common
@@ -4,7 +4,7 @@ Interface describing a document attestation.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### @context
7
+ ### @context {#context}
8
8
 
9
9
  > **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/documents/"`, `"https://schema.twindev.org/common/"`\]
10
10
 
@@ -12,7 +12,7 @@ JSON-LD Context.
12
12
 
13
13
  ***
14
14
 
15
- ### type
15
+ ### type {#type}
16
16
 
17
17
  > **type**: `"DocumentAttestation"`
18
18
 
@@ -20,45 +20,40 @@ JSON-LD Type.
20
20
 
21
21
  ***
22
22
 
23
- ### documentId
23
+ ### documentId {#documentid}
24
24
 
25
25
  > **documentId**: `string`
26
26
 
27
27
  The id of the document.
28
- json-ld type:schema:identifier
29
28
 
30
29
  ***
31
30
 
32
- ### documentCode
31
+ ### documentCode {#documentcode}
33
32
 
34
33
  > **documentCode**: `UneceDocumentCodeList`
35
34
 
36
35
  The code for the document type.
37
- json-ld type:schema:identifier
38
36
 
39
37
  ***
40
38
 
41
- ### documentRevision
39
+ ### documentRevision {#documentrevision}
42
40
 
43
41
  > **documentRevision**: `number`
44
42
 
45
43
  The revision of the document as a 0 based index.
46
- json-ld type:schema:Integer
47
44
 
48
45
  ***
49
46
 
50
- ### dateCreated
47
+ ### dateCreated {#datecreated}
51
48
 
52
49
  > **dateCreated**: `string`
53
50
 
54
51
  The date/time of when the document was created.
55
- json-ld namespace:schema
56
52
 
57
53
  ***
58
54
 
59
- ### integrity
55
+ ### integrity {#integrity}
60
56
 
61
57
  > **integrity**: `string`
62
58
 
63
59
  The integrity of the document being attested.
64
- json-ld namespace:twin-common
@@ -4,7 +4,7 @@ Interface describing a list of document entries.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### @context
7
+ ### @context {#context}
8
8
 
9
9
  > **@context**: \[`"https://schema.org"`, `"https://schema.twindev.org/documents/"`, `"https://schema.twindev.org/common/"`, `...IJsonLdContextDefinitionElement[]`\]
10
10
 
@@ -12,7 +12,7 @@ JSON-LD Context.
12
12
 
13
13
  ***
14
14
 
15
- ### type
15
+ ### type {#type}
16
16
 
17
17
  > **type**: `"ItemList"`
18
18
 
@@ -20,18 +20,16 @@ JSON-LD Type.
20
20
 
21
21
  ***
22
22
 
23
- ### itemListElement
23
+ ### itemListElement {#itemlistelement}
24
24
 
25
25
  > **itemListElement**: [`IDocument`](IDocument.md)[]
26
26
 
27
27
  The list of documents.
28
- json-ld namespace:schema
29
28
 
30
29
  ***
31
30
 
32
- ### edges?
31
+ ### edges? {#edges}
33
32
 
34
- > `optional` **edges**: `string`[]
33
+ > `optional` **edges?**: `string`[]
35
34
 
36
35
  The ids of the other vertices which are connected to the document.
37
- json-ld container:set
@@ -8,7 +8,7 @@ Interface describing an document management contract.
8
8
 
9
9
  ## Methods
10
10
 
11
- ### create()
11
+ ### create() {#create}
12
12
 
13
13
  > **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`string`\>
14
14
 
@@ -26,9 +26,9 @@ The document id to create.
26
26
 
27
27
  ##### documentIdFormat
28
28
 
29
- The format of the document identifier.
29
+ `string` \| `undefined`
30
30
 
31
- `string` | `undefined`
31
+ The format of the document identifier.
32
32
 
33
33
  ##### documentCode
34
34
 
@@ -84,7 +84,7 @@ The auditable item graph vertex created for the document including its revision.
84
84
 
85
85
  ***
86
86
 
87
- ### update()
87
+ ### update() {#update}
88
88
 
89
89
  > **update**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges?`): `Promise`\<`void`\>
90
90
 
@@ -126,7 +126,7 @@ Nothing.
126
126
 
127
127
  ***
128
128
 
129
- ### get()
129
+ ### get() {#get}
130
130
 
131
131
  > **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: [`IDocumentList`](IDocumentList.md); `cursor?`: `string`; \}\>
132
132
 
@@ -200,7 +200,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
200
200
 
201
201
  ***
202
202
 
203
- ### getRevision()
203
+ ### getRevision() {#getrevision}
204
204
 
205
205
  > **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`): `Promise`\<[`IDocument`](IDocument.md)\>
206
206
 
@@ -262,7 +262,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
262
262
 
263
263
  ***
264
264
 
265
- ### removeRevision()
265
+ ### removeRevision() {#removerevision}
266
266
 
267
267
  > **removeRevision**(`auditableItemGraphDocumentId`, `revision`): `Promise`\<`void`\>
268
268
 
@@ -291,7 +291,7 @@ Nothing.
291
291
 
292
292
  ***
293
293
 
294
- ### query()
294
+ ### query() {#query}
295
295
 
296
296
  > **query**(`documentId`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: `IAuditableItemGraphVertexList`; `cursor?`: `string`; \}\>
297
297
 
@@ -4,7 +4,7 @@ Request to create a document as an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### body
7
+ ### body {#body}
8
8
 
9
9
  > **body**: `object`
10
10
 
@@ -36,30 +36,30 @@ The data to create the document with, in base64.
36
36
 
37
37
  #### annotationObject?
38
38
 
39
- > `optional` **annotationObject**: `IJsonLdNodeObject`
39
+ > `optional` **annotationObject?**: `IJsonLdNodeObject`
40
40
 
41
41
  Additional information to associate with the document.
42
42
 
43
43
  #### auditableItemGraphEdges?
44
44
 
45
- > `optional` **auditableItemGraphEdges**: `object`[]
45
+ > `optional` **auditableItemGraphEdges?**: `object`[]
46
46
 
47
47
  The auditable item graph vertices to connect the document to.
48
48
 
49
49
  #### createAttestation?
50
50
 
51
- > `optional` **createAttestation**: `boolean`
51
+ > `optional` **createAttestation?**: `boolean`
52
52
 
53
53
  Flag to create an attestation for the document, defaults to false.
54
54
 
55
55
  #### addAlias?
56
56
 
57
- > `optional` **addAlias**: `boolean`
57
+ > `optional` **addAlias?**: `boolean`
58
58
 
59
59
  Flag to add the document id as an alias to the aig vertex, defaults to true.
60
60
 
61
61
  #### aliasAnnotationObject?
62
62
 
63
- > `optional` **aliasAnnotationObject**: `IJsonLdNodeObject`
63
+ > `optional` **aliasAnnotationObject?**: `IJsonLdNodeObject`
64
64
 
65
65
  Annotation object for the alias.
@@ -4,9 +4,9 @@ Request to get a document from an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers?
7
+ ### headers? {#headers}
8
8
 
9
- > `optional` **headers**: `object`
9
+ > `optional` **headers?**: `object`
10
10
 
11
11
  The headers which can be used to determine the response data type.
12
12
 
@@ -16,7 +16,7 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  ***
18
18
 
19
- ### pathParams
19
+ ### pathParams {#pathparams}
20
20
 
21
21
  > **pathParams**: `object`
22
22
 
@@ -30,15 +30,15 @@ The full id of the document to get.
30
30
 
31
31
  ***
32
32
 
33
- ### query?
33
+ ### query? {#query}
34
34
 
35
- > `optional` **query**: `object`
35
+ > `optional` **query?**: `object`
36
36
 
37
37
  The query parameters.
38
38
 
39
39
  #### includeBlobStorageMetadata?
40
40
 
41
- > `optional` **includeBlobStorageMetadata**: `string`
41
+ > `optional` **includeBlobStorageMetadata?**: `string`
42
42
 
43
43
  Include the blob storage metadata in the response.
44
44
 
@@ -50,7 +50,7 @@ false
50
50
 
51
51
  #### includeBlobStorageData?
52
52
 
53
- > `optional` **includeBlobStorageData**: `string`
53
+ > `optional` **includeBlobStorageData?**: `string`
54
54
 
55
55
  Include the blob storage data in the response.
56
56
 
@@ -62,7 +62,7 @@ false
62
62
 
63
63
  #### includeAttestation?
64
64
 
65
- > `optional` **includeAttestation**: `string`
65
+ > `optional` **includeAttestation?**: `string`
66
66
 
67
67
  Include the attestation information in the response.
68
68
 
@@ -74,7 +74,7 @@ false
74
74
 
75
75
  #### includeRemoved?
76
76
 
77
- > `optional` **includeRemoved**: `string`
77
+ > `optional` **includeRemoved?**: `string`
78
78
 
79
79
  Include deleted documents in the response.
80
80
 
@@ -86,19 +86,19 @@ false
86
86
 
87
87
  #### extractRuleGroupId?
88
88
 
89
- > `optional` **extractRuleGroupId**: `string`
89
+ > `optional` **extractRuleGroupId?**: `string`
90
90
 
91
91
  If provided will extract data from the document using the specified rule group id.
92
92
 
93
93
  #### extractMimeType?
94
94
 
95
- > `optional` **extractMimeType**: `string`
95
+ > `optional` **extractMimeType?**: `string`
96
96
 
97
97
  By default extraction will auto detect the mime type of the document, this can be used to override the detection.
98
98
 
99
99
  #### limit?
100
100
 
101
- > `optional` **limit**: `string`
101
+ > `optional` **limit?**: `string`
102
102
 
103
103
  PLimit the number of items to return, defaults to 1 so only most recent is returned.
104
104
 
@@ -110,6 +110,6 @@ PLimit the number of items to return, defaults to 1 so only most recent is retur
110
110
 
111
111
  #### cursor?
112
112
 
113
- > `optional` **cursor**: `string`
113
+ > `optional` **cursor?**: `string`
114
114
 
115
115
  The cursor to get the next chunk of revisions.
@@ -4,9 +4,9 @@ Response to get a document and optionally revisions from an auditable item graph
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers?
7
+ ### headers? {#headers}
8
8
 
9
- > `optional` **headers**: `object`
9
+ > `optional` **headers?**: `object`
10
10
 
11
11
  The headers which can be used to determine the response data type.
12
12
 
@@ -16,11 +16,11 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  #### link?
18
18
 
19
- > `optional` **link**: `string` \| `string`[]
19
+ > `optional` **link?**: `string` \| `string`[]
20
20
 
21
21
  ***
22
22
 
23
- ### body
23
+ ### body {#body}
24
24
 
25
25
  > **body**: [`IDocumentList`](IDocumentList.md)
26
26
 
@@ -4,9 +4,9 @@ Request to get a document revision from an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers?
7
+ ### headers? {#headers}
8
8
 
9
- > `optional` **headers**: `object`
9
+ > `optional` **headers?**: `object`
10
10
 
11
11
  The headers which can be used to determine the response data type.
12
12
 
@@ -16,7 +16,7 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  ***
18
18
 
19
- ### pathParams
19
+ ### pathParams {#pathparams}
20
20
 
21
21
  > **pathParams**: `object`
22
22
 
@@ -36,15 +36,15 @@ The revision of the document to get.
36
36
 
37
37
  ***
38
38
 
39
- ### query?
39
+ ### query? {#query}
40
40
 
41
- > `optional` **query**: `object`
41
+ > `optional` **query?**: `object`
42
42
 
43
43
  The query parameters.
44
44
 
45
45
  #### includeBlobStorageMetadata?
46
46
 
47
- > `optional` **includeBlobStorageMetadata**: `string`
47
+ > `optional` **includeBlobStorageMetadata?**: `string`
48
48
 
49
49
  Include the blob storage metadata in the response.
50
50
 
@@ -56,7 +56,7 @@ false
56
56
 
57
57
  #### includeBlobStorageData?
58
58
 
59
- > `optional` **includeBlobStorageData**: `string`
59
+ > `optional` **includeBlobStorageData?**: `string`
60
60
 
61
61
  Include the blob storage data in the response.
62
62
 
@@ -68,7 +68,7 @@ false
68
68
 
69
69
  #### includeAttestation?
70
70
 
71
- > `optional` **includeAttestation**: `string`
71
+ > `optional` **includeAttestation?**: `string`
72
72
 
73
73
  Include the attestation information in the response.
74
74
 
@@ -80,12 +80,12 @@ false
80
80
 
81
81
  #### extractRuleGroupId?
82
82
 
83
- > `optional` **extractRuleGroupId**: `string`
83
+ > `optional` **extractRuleGroupId?**: `string`
84
84
 
85
85
  If provided will extract data from the document using the specified rule group id.
86
86
 
87
87
  #### extractMimeType?
88
88
 
89
- > `optional` **extractMimeType**: `string`
89
+ > `optional` **extractMimeType?**: `string`
90
90
 
91
91
  By default extraction will auto detect the mime type of the document, this can be used to override the detection.
@@ -4,9 +4,9 @@ Response to get a document revision from an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers?
7
+ ### headers? {#headers}
8
8
 
9
- > `optional` **headers**: `object`
9
+ > `optional` **headers?**: `object`
10
10
 
11
11
  The headers which can be used to determine the response data type.
12
12
 
@@ -16,7 +16,7 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  ***
18
18
 
19
- ### body
19
+ ### body {#body}
20
20
 
21
21
  > **body**: [`IDocument`](IDocument.md)
22
22
 
@@ -4,9 +4,9 @@ Request to get a list of document from an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers?
7
+ ### headers? {#headers}
8
8
 
9
- > `optional` **headers**: `object`
9
+ > `optional` **headers?**: `object`
10
10
 
11
11
  The headers which can be used to determine the response data type.
12
12
 
@@ -16,7 +16,7 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  ***
18
18
 
19
- ### query
19
+ ### query {#query}
20
20
 
21
21
  > **query**: `object`
22
22
 
@@ -30,12 +30,12 @@ The id of the document id we are trying to find.
30
30
 
31
31
  #### cursor?
32
32
 
33
- > `optional` **cursor**: `string`
33
+ > `optional` **cursor?**: `string`
34
34
 
35
35
  The cursor to get the next chunk of documents.
36
36
 
37
37
  #### limit?
38
38
 
39
- > `optional` **limit**: `string`
39
+ > `optional` **limit?**: `string`
40
40
 
41
41
  The number of documents to return.
@@ -4,9 +4,9 @@ Response to query the documents from an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers?
7
+ ### headers? {#headers}
8
8
 
9
- > `optional` **headers**: `object`
9
+ > `optional` **headers?**: `object`
10
10
 
11
11
  The headers which can be used to determine the response data type.
12
12
 
@@ -16,11 +16,11 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  #### link?
18
18
 
19
- > `optional` **link**: `string` \| `string`[]
19
+ > `optional` **link?**: `string` \| `string`[]
20
20
 
21
21
  ***
22
22
 
23
- ### body
23
+ ### body {#body}
24
24
 
25
25
  > **body**: `IAuditableItemGraphVertexList`
26
26
 
@@ -4,7 +4,7 @@ Request to remove a document revision from an auditable item graph.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### pathParams
7
+ ### pathParams {#pathparams}
8
8
 
9
9
  > **pathParams**: `object`
10
10
 
@@ -4,7 +4,7 @@ Request to update a document as an auditable item graph vertex.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### pathParams
7
+ ### pathParams {#pathparams}
8
8
 
9
9
  > **pathParams**: `object`
10
10
 
@@ -18,7 +18,7 @@ The full id of the document to get.
18
18
 
19
19
  ***
20
20
 
21
- ### body
21
+ ### body {#body}
22
22
 
23
23
  > **body**: `object`
24
24
 
@@ -26,18 +26,18 @@ The body parameters.
26
26
 
27
27
  #### blob?
28
28
 
29
- > `optional` **blob**: `string`
29
+ > `optional` **blob?**: `string`
30
30
 
31
31
  The data to create the document with, in base64.
32
32
 
33
33
  #### annotationObject?
34
34
 
35
- > `optional` **annotationObject**: `IJsonLdNodeObject`
35
+ > `optional` **annotationObject?**: `IJsonLdNodeObject`
36
36
 
37
37
  Additional information to associate with the document.
38
38
 
39
39
  #### auditableItemGraphEdges?
40
40
 
41
- > `optional` **auditableItemGraphEdges**: `object`[]
41
+ > `optional` **auditableItemGraphEdges?**: `object`[]
42
42
 
43
43
  The auditable item graph vertices to connect the document to.
@@ -6,37 +6,37 @@ The contexts of document management objects.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### Namespace
9
+ ### Namespace {#namespace}
10
10
 
11
11
  > `readonly` **Namespace**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
12
12
 
13
13
  The canonical RDF namespace URI for Document Management.
14
14
 
15
- ### Context
15
+ ### Context {#context}
16
16
 
17
17
  > `readonly` **Context**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
18
18
 
19
19
  The value to use in context for Document Management.
20
20
 
21
- ### JsonLdContext
21
+ ### JsonLdContext {#jsonldcontext}
22
22
 
23
23
  > `readonly` **JsonLdContext**: `"https://schema.twindev.org/documents/types.jsonld"` = `"https://schema.twindev.org/documents/types.jsonld"`
24
24
 
25
25
  The JSON-LD Context URL for Document Management.
26
26
 
27
- ### NamespaceCommon
27
+ ### NamespaceCommon {#namespacecommon}
28
28
 
29
29
  > `readonly` **NamespaceCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
30
30
 
31
31
  The canonical RDF namespace URI for TWIN Common.
32
32
 
33
- ### ContextCommon
33
+ ### ContextCommon {#contextcommon}
34
34
 
35
35
  > `readonly` **ContextCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
36
36
 
37
37
  The value to use in JSON-LD context for TWIN Common.
38
38
 
39
- ### JsonLdContextCommon
39
+ ### JsonLdContextCommon {#jsonldcontextcommon}
40
40
 
41
41
  > `readonly` **JsonLdContextCommon**: `"https://schema.twindev.org/common/types.jsonld"` = `"https://schema.twindev.org/common/types.jsonld"`
42
42
 
@@ -6,13 +6,13 @@ The types of document management objects.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### Document
9
+ ### Document {#document}
10
10
 
11
11
  > `readonly` **Document**: `"Document"` = `"Document"`
12
12
 
13
13
  Represents a document.
14
14
 
15
- ### DocumentAttestation
15
+ ### DocumentAttestation {#documentattestation}
16
16
 
17
17
  > `readonly` **DocumentAttestation**: `"DocumentAttestation"` = `"DocumentAttestation"`
18
18
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@twin.org/document-management-models",
3
- "version": "0.0.3-next.10",
4
- "description": "Models which define the structure of the document management connectors and services",
3
+ "version": "0.0.3-next.12",
4
+ "description": "Shared data models, schemas, and context definitions for document lifecycle records.",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/document-management.git",