@twin.org/document-management-models 0.0.1-next.2 → 0.0.1-next.20

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 (41) hide show
  1. package/dist/cjs/index.cjs +167 -5
  2. package/dist/esm/index.mjs +166 -6
  3. package/dist/types/dataTypes/documentManagementDataTypes.d.ts +9 -0
  4. package/dist/types/index.d.ts +8 -2
  5. package/dist/types/models/IDocument.d.ts +14 -9
  6. package/dist/types/models/IDocumentAttestation.d.ts +41 -0
  7. package/dist/types/models/IDocumentList.d.ts +13 -7
  8. package/dist/types/models/IDocumentManagementComponent.d.ts +75 -33
  9. package/dist/types/models/api/{IDocumentManagementSetRequest.d.ts → IDocumentManagementCreateRequest.d.ts} +19 -12
  10. package/dist/types/models/api/IDocumentManagementGetRequest.d.ts +17 -13
  11. package/dist/types/models/api/IDocumentManagementGetResponse.d.ts +2 -2
  12. package/dist/types/models/api/IDocumentManagementGetRevisionRequest.d.ts +53 -0
  13. package/dist/types/models/api/IDocumentManagementGetRevisionResponse.d.ts +17 -0
  14. package/dist/types/models/api/IDocumentManagementQueryRequest.d.ts +7 -22
  15. package/dist/types/models/api/IDocumentManagementQueryResponse.d.ts +2 -2
  16. package/dist/types/models/api/IDocumentManagementRemoveRequest.d.ts +5 -15
  17. package/dist/types/models/api/IDocumentManagementUpdateRequest.d.ts +36 -0
  18. package/dist/types/models/documentContexts.d.ts +17 -0
  19. package/dist/types/models/documentTypes.d.ts +17 -0
  20. package/docs/changelog.md +104 -1
  21. package/docs/reference/classes/DocumentManagementDataTypes.md +25 -0
  22. package/docs/reference/index.md +11 -1
  23. package/docs/reference/interfaces/IDocument.md +14 -6
  24. package/docs/reference/interfaces/IDocumentAttestation.md +59 -0
  25. package/docs/reference/interfaces/IDocumentList.md +15 -7
  26. package/docs/reference/interfaces/IDocumentManagementComponent.md +179 -55
  27. package/docs/reference/interfaces/{IDocumentManagementSetRequest.md → IDocumentManagementCreateRequest.md} +21 -17
  28. package/docs/reference/interfaces/IDocumentManagementGetRequest.md +24 -18
  29. package/docs/reference/interfaces/IDocumentManagementGetResponse.md +1 -1
  30. package/docs/reference/interfaces/IDocumentManagementGetRevisionRequest.md +91 -0
  31. package/docs/reference/interfaces/IDocumentManagementGetRevisionResponse.md +23 -0
  32. package/docs/reference/interfaces/IDocumentManagementQueryRequest.md +11 -43
  33. package/docs/reference/interfaces/IDocumentManagementQueryResponse.md +1 -1
  34. package/docs/reference/interfaces/IDocumentManagementRemoveRequest.md +7 -27
  35. package/docs/reference/interfaces/IDocumentManagementUpdateRequest.md +43 -0
  36. package/docs/reference/type-aliases/DocumentContexts.md +5 -0
  37. package/docs/reference/type-aliases/DocumentTypes.md +1 -1
  38. package/docs/reference/variables/DocumentContexts.md +19 -0
  39. package/docs/reference/variables/DocumentTypes.md +3 -15
  40. package/package.json +3 -1
  41. package/dist/types/models/documentDataTypes.d.ts +0 -25
@@ -18,6 +18,6 @@ The headers which can be used to determine the response data type.
18
18
 
19
19
  ### body
20
20
 
21
- > **body**: [`IDocument`](IDocument.md)
21
+ > **body**: [`IDocumentList`](IDocumentList.md)
22
22
 
23
23
  The body parameters.
@@ -0,0 +1,91 @@
1
+ # Interface: IDocumentManagementGetRevisionRequest
2
+
3
+ Request to get a document revision from an auditable item graph vertex.
4
+
5
+ ## Properties
6
+
7
+ ### headers?
8
+
9
+ > `optional` **headers**: `object`
10
+
11
+ The headers which can be used to determine the response data type.
12
+
13
+ #### accept
14
+
15
+ > **accept**: `"application/json"` \| `"application/ld+json"`
16
+
17
+ ***
18
+
19
+ ### pathParams
20
+
21
+ > **pathParams**: `object`
22
+
23
+ The path parameters.
24
+
25
+ #### auditableItemGraphDocumentId
26
+
27
+ > **auditableItemGraphDocumentId**: `string`
28
+
29
+ The full id of the document to get.
30
+
31
+ #### revision
32
+
33
+ > **revision**: `string`
34
+
35
+ The revision of the document to get.
36
+
37
+ ***
38
+
39
+ ### query?
40
+
41
+ > `optional` **query**: `object`
42
+
43
+ The query parameters.
44
+
45
+ #### includeBlobStorageMetadata?
46
+
47
+ > `optional` **includeBlobStorageMetadata**: `string` \| `boolean`
48
+
49
+ Include the blob storage metadata in the response.
50
+
51
+ ##### Default
52
+
53
+ ```ts
54
+ false
55
+ ```
56
+
57
+ #### includeBlobStorageData?
58
+
59
+ > `optional` **includeBlobStorageData**: `string` \| `boolean`
60
+
61
+ Include the blob storage data in the response.
62
+
63
+ ##### Default
64
+
65
+ ```ts
66
+ false
67
+ ```
68
+
69
+ #### includeAttestation?
70
+
71
+ > `optional` **includeAttestation**: `string` \| `boolean`
72
+
73
+ Include the attestation information in the response.
74
+
75
+ ##### Default
76
+
77
+ ```ts
78
+ false
79
+ ```
80
+
81
+ #### extractRuleGroupId?
82
+
83
+ > `optional` **extractRuleGroupId**: `string`
84
+
85
+ If provided will extract data from the document using the specified rule group id.
86
+
87
+ #### extractMimeType?
88
+
89
+ > `optional` **extractMimeType**: `string`
90
+
91
+ By default extraction will auto detect the mime type of the document, this can be used to override the detection.
@@ -0,0 +1,23 @@
1
+ # Interface: IDocumentManagementGetRevisionResponse
2
+
3
+ Response to get a document revision from an auditable item graph vertex.
4
+
5
+ ## Properties
6
+
7
+ ### headers?
8
+
9
+ > `optional` **headers**: `object`
10
+
11
+ The headers which can be used to determine the response data type.
12
+
13
+ #### content-type
14
+
15
+ > **content-type**: `"application/json"` \| `"application/ld+json"`
16
+
17
+ ***
18
+
19
+ ### body
20
+
21
+ > **body**: [`IDocument`](IDocument.md)
22
+
23
+ The body parameters.
@@ -16,58 +16,26 @@ The headers which can be used to determine the response data type.
16
16
 
17
17
  ***
18
18
 
19
- ### pathParams
19
+ ### query
20
20
 
21
- > **pathParams**: `object`
22
-
23
- The path parameters.
24
-
25
- #### auditableItemGraphId
26
-
27
- > **auditableItemGraphId**: `string`
28
-
29
- The id of the auditable item graph vertex which contains the documents.
30
-
31
- ***
32
-
33
- ### query?
34
-
35
- > `optional` **query**: `object`
21
+ > **query**: `object`
36
22
 
37
23
  The query parameters.
38
24
 
39
- #### documentCodes?
40
-
41
- > `optional` **documentCodes**: `string`
42
-
43
- List of comma separated document codes to filter the query.
44
-
45
- #### includeRemoved?
25
+ #### documentId
46
26
 
47
- > `optional` **includeRemoved**: `boolean`
27
+ > **documentId**: `string`
48
28
 
49
- Include deleted documents in the response.
50
-
51
- ##### Default
52
-
53
- ```ts
54
- false
55
- ```
56
-
57
- #### includeMostRecentRevisions?
58
-
59
- > `optional` **includeMostRecentRevisions**: `boolean`
60
-
61
- Include the most recent 5 revisions, use the individual get to retrieve more.
62
-
63
- ##### Default
64
-
65
- ```ts
66
- false
67
- ```
29
+ The id of the document id we are trying to find.
68
30
 
69
31
  #### cursor?
70
32
 
71
33
  > `optional` **cursor**: `string`
72
34
 
73
35
  The cursor to get the next chunk of documents.
36
+
37
+ #### pageSize?
38
+
39
+ > `optional` **pageSize**: `string` \| `number`
40
+
41
+ The number of documents to return.
@@ -18,6 +18,6 @@ The headers which can be used to determine the response data type.
18
18
 
19
19
  ### body
20
20
 
21
- > **body**: [`IDocumentList`](IDocumentList.md)
21
+ > **body**: `IAuditableItemGraphVertexList`
22
22
 
23
23
  The body parameters.
@@ -1,6 +1,6 @@
1
1
  # Interface: IDocumentManagementRemoveRequest
2
2
 
3
- Request to remove a document from an auditable item graph.
3
+ Request to remove a document revision from an auditable item graph.
4
4
 
5
5
  ## Properties
6
6
 
@@ -10,34 +10,14 @@ Request to remove a document from an auditable item graph.
10
10
 
11
11
  The path parameters.
12
12
 
13
- #### auditableItemGraphId
13
+ #### auditableItemGraphDocumentId
14
14
 
15
- > **auditableItemGraphId**: `string`
15
+ > **auditableItemGraphDocumentId**: `string`
16
16
 
17
- The id of the auditable item graph vertex to remove the document from.
17
+ The id of the auditable item graph vertex to remove the revision from.
18
18
 
19
- #### documentId
19
+ #### revision
20
20
 
21
- > **documentId**: `string`
21
+ > **revision**: `string`
22
22
 
23
- The full id of the document to remove.
24
-
25
- ***
26
-
27
- ### query?
28
-
29
- > `optional` **query**: `object`
30
-
31
- The query parameters.
32
-
33
- #### removeAllRevisions?
34
-
35
- > `optional` **removeAllRevisions**: `boolean`
36
-
37
- Flag to remove all revisions of the document.
38
-
39
- ##### Default
40
-
41
- ```ts
42
- false
43
- ```
23
+ The revision of the document to remove.
@@ -0,0 +1,43 @@
1
+ # Interface: IDocumentManagementUpdateRequest
2
+
3
+ Request to update a document as an auditable item graph vertex.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### auditableItemGraphDocumentId
14
+
15
+ > **auditableItemGraphDocumentId**: `string`
16
+
17
+ The full id of the document to get.
18
+
19
+ ***
20
+
21
+ ### body
22
+
23
+ > **body**: `object`
24
+
25
+ The body parameters.
26
+
27
+ #### blob?
28
+
29
+ > `optional` **blob**: `string`
30
+
31
+ The data to create the document with, in base64.
32
+
33
+ #### annotationObject?
34
+
35
+ > `optional` **annotationObject**: `IJsonLdNodeObject`
36
+
37
+ Additional information to associate with the document.
38
+
39
+ #### auditableItemGraphEdges?
40
+
41
+ > `optional` **auditableItemGraphEdges**: `object`[]
42
+
43
+ The auditable item graph vertices to connect the document to.
@@ -0,0 +1,5 @@
1
+ # Type Alias: DocumentContexts
2
+
3
+ > **DocumentContexts** = *typeof* [`DocumentContexts`](../variables/DocumentContexts.md)\[keyof *typeof* [`DocumentContexts`](../variables/DocumentContexts.md)\]
4
+
5
+ The contexts of document management objects.
@@ -1,5 +1,5 @@
1
1
  # Type Alias: DocumentTypes
2
2
 
3
- > **DocumentTypes**: *typeof* [`DocumentTypes`](../variables/DocumentTypes.md)\[keyof *typeof* [`DocumentTypes`](../variables/DocumentTypes.md)\]
3
+ > **DocumentTypes** = *typeof* [`DocumentTypes`](../variables/DocumentTypes.md)\[keyof *typeof* [`DocumentTypes`](../variables/DocumentTypes.md)\]
4
4
 
5
5
  The types of document management objects.
@@ -0,0 +1,19 @@
1
+ # Variable: DocumentContexts
2
+
3
+ > `const` **DocumentContexts**: `object`
4
+
5
+ The contexts of document management objects.
6
+
7
+ ## Type declaration
8
+
9
+ ### ContextRoot
10
+
11
+ > `readonly` **ContextRoot**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
12
+
13
+ The context root for the document types.
14
+
15
+ ### ContextRootCommon
16
+
17
+ > `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
18
+
19
+ The context root for the common types.
@@ -6,26 +6,14 @@ The types of document management objects.
6
6
 
7
7
  ## Type declaration
8
8
 
9
- ### ContextRoot
10
-
11
- > `readonly` **ContextRoot**: `"https://schema.twindev.org/documents/"` = `"https://schema.twindev.org/documents/"`
12
-
13
- The context root for the document types.
14
-
15
- ### ContextRootCommon
16
-
17
- > `readonly` **ContextRootCommon**: `"https://schema.twindev.org/common/"` = `"https://schema.twindev.org/common/"`
18
-
19
- The context root for the common types.
20
-
21
9
  ### Document
22
10
 
23
11
  > `readonly` **Document**: `"Document"` = `"Document"`
24
12
 
25
13
  Represents a document.
26
14
 
27
- ### DocumentList
15
+ ### DocumentAttestation
28
16
 
29
- > `readonly` **DocumentList**: `"DocumentList"` = `"DocumentList"`
17
+ > `readonly` **DocumentAttestation**: `"DocumentAttestation"` = `"DocumentAttestation"`
30
18
 
31
- Represents a document list.
19
+ Represents a document attestation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/document-management-models",
3
- "version": "0.0.1-next.2",
3
+ "version": "0.0.1-next.20",
4
4
  "description": "Models which define the structure of the document management connectors and services",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,8 +15,10 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/attestation-models": "next",
18
+ "@twin.org/auditable-item-graph-models": "next",
18
19
  "@twin.org/blob-storage-models": "next",
19
20
  "@twin.org/core": "next",
21
+ "@twin.org/data-core": "next",
20
22
  "@twin.org/data-json-ld": "next",
21
23
  "@twin.org/nameof": "next",
22
24
  "@twin.org/standards-schema-org": "next",
@@ -1,25 +0,0 @@
1
- /**
2
- * The types of document management objects.
3
- */
4
- export declare const DocumentTypes: {
5
- /**
6
- * The context root for the document types.
7
- */
8
- readonly ContextRoot: "https://schema.twindev.org/documents/";
9
- /**
10
- * The context root for the common types.
11
- */
12
- readonly ContextRootCommon: "https://schema.twindev.org/common/";
13
- /**
14
- * Represents a document.
15
- */
16
- readonly Document: "Document";
17
- /**
18
- * Represents a document list.
19
- */
20
- readonly DocumentList: "DocumentList";
21
- };
22
- /**
23
- * The types of document management objects.
24
- */
25
- export type DocumentTypes = (typeof DocumentTypes)[keyof typeof DocumentTypes];