@twin.org/document-management-rest-client 0.0.1-next.9 → 0.0.2-next.1
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/cjs/index.cjs
CHANGED
|
@@ -24,7 +24,7 @@ class DocumentManagementClient extends apiCore.BaseRestClient {
|
|
|
24
24
|
* @param config The configuration for the client.
|
|
25
25
|
*/
|
|
26
26
|
constructor(config) {
|
|
27
|
-
super(DocumentManagementClient._CLASS_NAME, config, "
|
|
27
|
+
super(DocumentManagementClient._CLASS_NAME, config, "document-management");
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Store a document as an auditable item graph vertex and add its content to blob storage.
|
|
@@ -92,6 +92,8 @@ class DocumentManagementClient extends apiCore.BaseRestClient {
|
|
|
92
92
|
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
93
93
|
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
94
94
|
* @param options.includeRemoved Flag to include deleted documents, defaults to false.
|
|
95
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
96
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
95
97
|
* @param cursor The cursor to get the next chunk of revisions.
|
|
96
98
|
* @param pageSize Page size of items to return, defaults to 1 so only most recent is returned.
|
|
97
99
|
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
@@ -107,12 +109,44 @@ class DocumentManagementClient extends apiCore.BaseRestClient {
|
|
|
107
109
|
includeBlobStorageData: options?.includeBlobStorageData,
|
|
108
110
|
includeAttestation: options?.includeAttestation,
|
|
109
111
|
includeRemoved: options?.includeRemoved,
|
|
112
|
+
extractRuleGroupId: options?.extractRuleGroupId,
|
|
113
|
+
extractMimeType: options?.extractMimeType,
|
|
110
114
|
cursor,
|
|
111
115
|
pageSize: core.Coerce.string(pageSize)
|
|
112
116
|
}
|
|
113
117
|
});
|
|
114
118
|
return response.body;
|
|
115
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Get a document revision using it's auditable item graph vertex id.
|
|
122
|
+
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
123
|
+
* @param revision The revision id for the document.
|
|
124
|
+
* @param options Additional options for the get operation.
|
|
125
|
+
* @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.
|
|
126
|
+
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
127
|
+
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
128
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
129
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
130
|
+
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
131
|
+
*/
|
|
132
|
+
async getRevision(auditableItemGraphDocumentId, revision, options) {
|
|
133
|
+
core.Urn.guard(this.CLASS_NAME, "auditableItemGraphDocumentId", auditableItemGraphDocumentId);
|
|
134
|
+
core.Guards.integer(this.CLASS_NAME, "revision", revision);
|
|
135
|
+
const response = await this.fetch("/:auditableItemGraphDocumentId/:revision", "GET", {
|
|
136
|
+
pathParams: {
|
|
137
|
+
auditableItemGraphDocumentId,
|
|
138
|
+
revision: revision.toString()
|
|
139
|
+
},
|
|
140
|
+
query: {
|
|
141
|
+
includeBlobStorageMetadata: options?.includeBlobStorageMetadata,
|
|
142
|
+
includeBlobStorageData: options?.includeBlobStorageData,
|
|
143
|
+
includeAttestation: options?.includeAttestation,
|
|
144
|
+
extractRuleGroupId: options?.extractRuleGroupId,
|
|
145
|
+
extractMimeType: options?.extractMimeType
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
return response.body;
|
|
149
|
+
}
|
|
116
150
|
/**
|
|
117
151
|
* Remove an auditable item graph vertex using it's id.
|
|
118
152
|
* The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ class DocumentManagementClient extends BaseRestClient {
|
|
|
22
22
|
* @param config The configuration for the client.
|
|
23
23
|
*/
|
|
24
24
|
constructor(config) {
|
|
25
|
-
super(DocumentManagementClient._CLASS_NAME, config, "
|
|
25
|
+
super(DocumentManagementClient._CLASS_NAME, config, "document-management");
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Store a document as an auditable item graph vertex and add its content to blob storage.
|
|
@@ -90,6 +90,8 @@ class DocumentManagementClient extends BaseRestClient {
|
|
|
90
90
|
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
91
91
|
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
92
92
|
* @param options.includeRemoved Flag to include deleted documents, defaults to false.
|
|
93
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
94
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
93
95
|
* @param cursor The cursor to get the next chunk of revisions.
|
|
94
96
|
* @param pageSize Page size of items to return, defaults to 1 so only most recent is returned.
|
|
95
97
|
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
@@ -105,12 +107,44 @@ class DocumentManagementClient extends BaseRestClient {
|
|
|
105
107
|
includeBlobStorageData: options?.includeBlobStorageData,
|
|
106
108
|
includeAttestation: options?.includeAttestation,
|
|
107
109
|
includeRemoved: options?.includeRemoved,
|
|
110
|
+
extractRuleGroupId: options?.extractRuleGroupId,
|
|
111
|
+
extractMimeType: options?.extractMimeType,
|
|
108
112
|
cursor,
|
|
109
113
|
pageSize: Coerce.string(pageSize)
|
|
110
114
|
}
|
|
111
115
|
});
|
|
112
116
|
return response.body;
|
|
113
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Get a document revision using it's auditable item graph vertex id.
|
|
120
|
+
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
121
|
+
* @param revision The revision id for the document.
|
|
122
|
+
* @param options Additional options for the get operation.
|
|
123
|
+
* @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.
|
|
124
|
+
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
125
|
+
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
126
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
127
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
128
|
+
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
129
|
+
*/
|
|
130
|
+
async getRevision(auditableItemGraphDocumentId, revision, options) {
|
|
131
|
+
Urn.guard(this.CLASS_NAME, "auditableItemGraphDocumentId", auditableItemGraphDocumentId);
|
|
132
|
+
Guards.integer(this.CLASS_NAME, "revision", revision);
|
|
133
|
+
const response = await this.fetch("/:auditableItemGraphDocumentId/:revision", "GET", {
|
|
134
|
+
pathParams: {
|
|
135
|
+
auditableItemGraphDocumentId,
|
|
136
|
+
revision: revision.toString()
|
|
137
|
+
},
|
|
138
|
+
query: {
|
|
139
|
+
includeBlobStorageMetadata: options?.includeBlobStorageMetadata,
|
|
140
|
+
includeBlobStorageData: options?.includeBlobStorageData,
|
|
141
|
+
includeAttestation: options?.includeAttestation,
|
|
142
|
+
extractRuleGroupId: options?.extractRuleGroupId,
|
|
143
|
+
extractMimeType: options?.extractMimeType
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
return response.body;
|
|
147
|
+
}
|
|
114
148
|
/**
|
|
115
149
|
* Remove an auditable item graph vertex using it's id.
|
|
116
150
|
* The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
|
@@ -2,7 +2,7 @@ import { BaseRestClient } from "@twin.org/api-core";
|
|
|
2
2
|
import type { IBaseRestClientConfig } from "@twin.org/api-models";
|
|
3
3
|
import type { IAuditableItemGraphVertexList } from "@twin.org/auditable-item-graph-models";
|
|
4
4
|
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
5
|
-
import type { IDocumentList, IDocumentManagementComponent } from "@twin.org/document-management-models";
|
|
5
|
+
import type { IDocument, IDocumentList, IDocumentManagementComponent } from "@twin.org/document-management-models";
|
|
6
6
|
import { UneceDocumentCodes } from "@twin.org/standards-unece";
|
|
7
7
|
/**
|
|
8
8
|
* Client for performing document management through to REST endpoints.
|
|
@@ -65,6 +65,8 @@ export declare class DocumentManagementClient extends BaseRestClient implements
|
|
|
65
65
|
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
66
66
|
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
67
67
|
* @param options.includeRemoved Flag to include deleted documents, defaults to false.
|
|
68
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
69
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
68
70
|
* @param cursor The cursor to get the next chunk of revisions.
|
|
69
71
|
* @param pageSize Page size of items to return, defaults to 1 so only most recent is returned.
|
|
70
72
|
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
@@ -74,7 +76,28 @@ export declare class DocumentManagementClient extends BaseRestClient implements
|
|
|
74
76
|
includeBlobStorageData?: boolean;
|
|
75
77
|
includeAttestation?: boolean;
|
|
76
78
|
includeRemoved?: boolean;
|
|
79
|
+
extractRuleGroupId?: string;
|
|
80
|
+
extractMimeType?: string;
|
|
77
81
|
}, cursor?: string, pageSize?: number): Promise<IDocumentList>;
|
|
82
|
+
/**
|
|
83
|
+
* Get a document revision using it's auditable item graph vertex id.
|
|
84
|
+
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
85
|
+
* @param revision The revision id for the document.
|
|
86
|
+
* @param options Additional options for the get operation.
|
|
87
|
+
* @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.
|
|
88
|
+
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
89
|
+
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
90
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
91
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
92
|
+
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
93
|
+
*/
|
|
94
|
+
getRevision(auditableItemGraphDocumentId: string, revision: number, options?: {
|
|
95
|
+
includeBlobStorageMetadata?: boolean;
|
|
96
|
+
includeBlobStorageData?: boolean;
|
|
97
|
+
includeAttestation?: boolean;
|
|
98
|
+
extractRuleGroupId?: string;
|
|
99
|
+
extractMimeType?: string;
|
|
100
|
+
}): Promise<IDocument>;
|
|
78
101
|
/**
|
|
79
102
|
* Remove an auditable item graph vertex using it's id.
|
|
80
103
|
* The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,204 @@
|
|
|
1
1
|
# @twin.org/document-management-rest-client - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.2-next.0...document-management-rest-client-v0.0.2-next.1) (2025-08-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
9
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
10
|
+
* store document as a vertex ([#2](https://github.com/twinfoundation/document-management/issues/2)) ([7febedc](https://github.com/twinfoundation/document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
11
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
12
|
+
* update framework core ([f991a59](https://github.com/twinfoundation/document-management/commit/f991a59d25ec228bcdd7a5b6bd55578985b55a84))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* adding missing route for the document management ([#4](https://github.com/twinfoundation/document-management/issues/4)) ([fd3292e](https://github.com/twinfoundation/document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Dependencies
|
|
21
|
+
|
|
22
|
+
* The following workspace dependencies were updated
|
|
23
|
+
* dependencies
|
|
24
|
+
* @twin.org/document-management-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
25
|
+
|
|
26
|
+
## 0.0.1 (2025-07-09)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* release to production ([a009526](https://github.com/twinfoundation/document-management/commit/a009526032a0ee6e6b74f476a01fbe5f4c7fd4da))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
|
|
36
|
+
* The following workspace dependencies were updated
|
|
37
|
+
* dependencies
|
|
38
|
+
* @twin.org/document-management-models bumped from ^0.0.0 to ^0.0.1
|
|
39
|
+
|
|
40
|
+
## [0.0.1-next.20](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.19...document-management-rest-client-v0.0.1-next.20) (2025-06-20)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
46
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
47
|
+
* store document as a vertex ([#2](https://github.com/twinfoundation/document-management/issues/2)) ([7febedc](https://github.com/twinfoundation/document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
48
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* adding missing route for the document management ([#4](https://github.com/twinfoundation/document-management/issues/4)) ([fd3292e](https://github.com/twinfoundation/document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Dependencies
|
|
57
|
+
|
|
58
|
+
* The following workspace dependencies were updated
|
|
59
|
+
* dependencies
|
|
60
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.19 to 0.0.1-next.20
|
|
61
|
+
|
|
62
|
+
## [0.0.1-next.19](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.18...document-management-rest-client-v0.0.1-next.19) (2025-06-20)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Miscellaneous Chores
|
|
66
|
+
|
|
67
|
+
* **document-management-rest-client:** Synchronize repo versions
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Dependencies
|
|
71
|
+
|
|
72
|
+
* The following workspace dependencies were updated
|
|
73
|
+
* dependencies
|
|
74
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.18 to 0.0.1-next.19
|
|
75
|
+
|
|
76
|
+
## [0.0.1-next.18](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.17...document-management-rest-client-v0.0.1-next.18) (2025-06-18)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Miscellaneous Chores
|
|
80
|
+
|
|
81
|
+
* **document-management-rest-client:** Synchronize repo versions
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Dependencies
|
|
85
|
+
|
|
86
|
+
* The following workspace dependencies were updated
|
|
87
|
+
* dependencies
|
|
88
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.17 to 0.0.1-next.18
|
|
89
|
+
|
|
90
|
+
## [0.0.1-next.17](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.16...document-management-rest-client-v0.0.1-next.17) (2025-06-12)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Features
|
|
94
|
+
|
|
95
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Dependencies
|
|
99
|
+
|
|
100
|
+
* The following workspace dependencies were updated
|
|
101
|
+
* dependencies
|
|
102
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.16 to 0.0.1-next.17
|
|
103
|
+
|
|
104
|
+
## [0.0.1-next.16](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.15...document-management-rest-client-v0.0.1-next.16) (2025-06-03)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Miscellaneous Chores
|
|
108
|
+
|
|
109
|
+
* **document-management-rest-client:** Synchronize repo versions
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Dependencies
|
|
113
|
+
|
|
114
|
+
* The following workspace dependencies were updated
|
|
115
|
+
* dependencies
|
|
116
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
117
|
+
|
|
118
|
+
## [0.0.1-next.15](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.14...document-management-rest-client-v0.0.1-next.15) (2025-05-28)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Miscellaneous Chores
|
|
122
|
+
|
|
123
|
+
* **document-management-rest-client:** Synchronize repo versions
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Dependencies
|
|
127
|
+
|
|
128
|
+
* The following workspace dependencies were updated
|
|
129
|
+
* dependencies
|
|
130
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
131
|
+
|
|
132
|
+
## [0.0.1-next.14](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.13...document-management-rest-client-v0.0.1-next.14) (2025-05-08)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### Miscellaneous Chores
|
|
136
|
+
|
|
137
|
+
* **document-management-rest-client:** Synchronize repo versions
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Dependencies
|
|
141
|
+
|
|
142
|
+
* The following workspace dependencies were updated
|
|
143
|
+
* dependencies
|
|
144
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
145
|
+
|
|
146
|
+
## [0.0.1-next.13](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.12...document-management-rest-client-v0.0.1-next.13) (2025-04-30)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Miscellaneous Chores
|
|
150
|
+
|
|
151
|
+
* **document-management-rest-client:** Synchronize repo versions
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
### Dependencies
|
|
155
|
+
|
|
156
|
+
* The following workspace dependencies were updated
|
|
157
|
+
* dependencies
|
|
158
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.12 to 0.0.1-next.13
|
|
159
|
+
|
|
160
|
+
## [0.0.1-next.12](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.11...document-management-rest-client-v0.0.1-next.12) (2025-04-30)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Dependencies
|
|
169
|
+
|
|
170
|
+
* The following workspace dependencies were updated
|
|
171
|
+
* dependencies
|
|
172
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.11 to 0.0.1-next.12
|
|
173
|
+
|
|
174
|
+
## [0.0.1-next.11](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.10...document-management-rest-client-v0.0.1-next.11) (2025-04-28)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Features
|
|
178
|
+
|
|
179
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Dependencies
|
|
183
|
+
|
|
184
|
+
* The following workspace dependencies were updated
|
|
185
|
+
* dependencies
|
|
186
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.10 to 0.0.1-next.11
|
|
187
|
+
|
|
188
|
+
## [0.0.1-next.10](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.9...document-management-rest-client-v0.0.1-next.10) (2025-04-25)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Bug Fixes
|
|
192
|
+
|
|
193
|
+
* adding missing route for the document management ([#4](https://github.com/twinfoundation/document-management/issues/4)) ([fd3292e](https://github.com/twinfoundation/document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
### Dependencies
|
|
197
|
+
|
|
198
|
+
* The following workspace dependencies were updated
|
|
199
|
+
* dependencies
|
|
200
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.9 to 0.0.1-next.10
|
|
201
|
+
|
|
3
202
|
## [0.0.1-next.9](https://github.com/twinfoundation/document-management/compare/document-management-rest-client-v0.0.1-next.8...document-management-rest-client-v0.0.1-next.9) (2025-04-17)
|
|
4
203
|
|
|
5
204
|
|
|
@@ -216,6 +216,18 @@ Flag to include the attestation information for the document, defaults to false.
|
|
|
216
216
|
|
|
217
217
|
Flag to include deleted documents, defaults to false.
|
|
218
218
|
|
|
219
|
+
###### extractRuleGroupId?
|
|
220
|
+
|
|
221
|
+
`string`
|
|
222
|
+
|
|
223
|
+
If provided will extract data from the document using the specified rule group id.
|
|
224
|
+
|
|
225
|
+
###### extractMimeType?
|
|
226
|
+
|
|
227
|
+
`string`
|
|
228
|
+
|
|
229
|
+
By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
230
|
+
|
|
219
231
|
##### cursor?
|
|
220
232
|
|
|
221
233
|
`string`
|
|
@@ -240,6 +252,72 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
240
252
|
|
|
241
253
|
***
|
|
242
254
|
|
|
255
|
+
### getRevision()
|
|
256
|
+
|
|
257
|
+
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`): `Promise`\<`IDocument`\>
|
|
258
|
+
|
|
259
|
+
Get a document revision using it's auditable item graph vertex id.
|
|
260
|
+
|
|
261
|
+
#### Parameters
|
|
262
|
+
|
|
263
|
+
##### auditableItemGraphDocumentId
|
|
264
|
+
|
|
265
|
+
`string`
|
|
266
|
+
|
|
267
|
+
The auditable item graph vertex id which contains the document.
|
|
268
|
+
|
|
269
|
+
##### revision
|
|
270
|
+
|
|
271
|
+
`number`
|
|
272
|
+
|
|
273
|
+
The revision id for the document.
|
|
274
|
+
|
|
275
|
+
##### options?
|
|
276
|
+
|
|
277
|
+
Additional options for the get operation.
|
|
278
|
+
|
|
279
|
+
###### includeBlobStorageMetadata?
|
|
280
|
+
|
|
281
|
+
`boolean`
|
|
282
|
+
|
|
283
|
+
Flag to include the blob storage metadata for the document, defaults to false.
|
|
284
|
+
|
|
285
|
+
###### includeBlobStorageData?
|
|
286
|
+
|
|
287
|
+
`boolean`
|
|
288
|
+
|
|
289
|
+
Flag to include the blob storage data for the document, defaults to false.
|
|
290
|
+
|
|
291
|
+
###### includeAttestation?
|
|
292
|
+
|
|
293
|
+
`boolean`
|
|
294
|
+
|
|
295
|
+
Flag to include the attestation information for the document, defaults to false.
|
|
296
|
+
|
|
297
|
+
###### extractRuleGroupId?
|
|
298
|
+
|
|
299
|
+
`string`
|
|
300
|
+
|
|
301
|
+
If provided will extract data from the document using the specified rule group id.
|
|
302
|
+
|
|
303
|
+
###### extractMimeType?
|
|
304
|
+
|
|
305
|
+
`string`
|
|
306
|
+
|
|
307
|
+
By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
308
|
+
|
|
309
|
+
#### Returns
|
|
310
|
+
|
|
311
|
+
`Promise`\<`IDocument`\>
|
|
312
|
+
|
|
313
|
+
The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
314
|
+
|
|
315
|
+
#### Implementation of
|
|
316
|
+
|
|
317
|
+
`IDocumentManagementComponent.getRevision`
|
|
318
|
+
|
|
319
|
+
***
|
|
320
|
+
|
|
243
321
|
### removeRevision()
|
|
244
322
|
|
|
245
323
|
> **removeRevision**(`auditableItemGraphDocumentId`, `revision`): `Promise`\<`void`\>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/document-management-rest-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-next.1",
|
|
4
4
|
"description": "Document management contract implementation which can connect to REST endpoints",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@twin.org/auditable-item-graph-models": "next",
|
|
20
20
|
"@twin.org/core": "next",
|
|
21
21
|
"@twin.org/data-json-ld": "next",
|
|
22
|
-
"@twin.org/document-management-models": "0.0.
|
|
22
|
+
"@twin.org/document-management-models": "0.0.2-next.1",
|
|
23
23
|
"@twin.org/entity": "next",
|
|
24
24
|
"@twin.org/nameof": "next",
|
|
25
25
|
"@twin.org/standards-unece": "next",
|