@twin.org/document-management-service 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 +303 -118
- package/dist/esm/index.mjs +304 -120
- package/dist/types/documentManagementRoutes.d.ts +10 -2
- package/dist/types/documentManagementService.d.ts +26 -5
- package/dist/types/models/IDocumentManagementStorageServiceConstructorOptions.d.ts +5 -0
- package/docs/changelog.md +211 -0
- package/docs/open-api/spec.json +521 -4591
- package/docs/reference/classes/DocumentManagementService.md +90 -8
- package/docs/reference/functions/documentManagementGetRevision.md +31 -0
- package/docs/reference/functions/documentManagementUpdate.md +1 -1
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IDocumentManagementServiceConstructorOptions.md +14 -0
- package/locales/en.json +2 -1
- package/package.json +3 -2
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { type IAuditableItemGraphVertexList } from "@twin.org/auditable-item-graph-models";
|
|
2
2
|
import { type IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
3
|
-
import { type IDocumentList, type IDocumentManagementComponent } from "@twin.org/document-management-models";
|
|
3
|
+
import { type IDocument, type IDocumentList, type IDocumentManagementComponent } from "@twin.org/document-management-models";
|
|
4
4
|
import { UneceDocumentCodes } from "@twin.org/standards-unece";
|
|
5
5
|
import type { IDocumentManagementServiceConstructorOptions } from "./models/IDocumentManagementStorageServiceConstructorOptions";
|
|
6
6
|
/**
|
|
7
7
|
* Service for performing document management operations.
|
|
8
8
|
*/
|
|
9
9
|
export declare class DocumentManagementService implements IDocumentManagementComponent {
|
|
10
|
-
/**
|
|
11
|
-
* The namespace supported by the document management service.
|
|
12
|
-
*/
|
|
13
|
-
static readonly NAMESPACE: string;
|
|
14
10
|
/**
|
|
15
11
|
* Runtime name for the class.
|
|
16
12
|
*/
|
|
@@ -72,6 +68,8 @@ export declare class DocumentManagementService implements IDocumentManagementCom
|
|
|
72
68
|
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
73
69
|
* @param options.includeAttestation Flag to include the attestation information for the document, defaults to false.
|
|
74
70
|
* @param options.includeRemoved Flag to include deleted documents, defaults to false.
|
|
71
|
+
* @param options.extractRuleGroupId If provided will extract data from the document using the specified rule group id.
|
|
72
|
+
* @param options.extractMimeType By default extraction will auto detect the mime type of the document, this can be used to override the detection.
|
|
75
73
|
* @param cursor The cursor to get the next chunk of revisions.
|
|
76
74
|
* @param pageSize Page size of items to return, defaults to 1 so only most recent is returned.
|
|
77
75
|
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
@@ -83,7 +81,30 @@ export declare class DocumentManagementService implements IDocumentManagementCom
|
|
|
83
81
|
includeBlobStorageData?: boolean;
|
|
84
82
|
includeAttestation?: boolean;
|
|
85
83
|
includeRemoved?: boolean;
|
|
84
|
+
extractRuleGroupId?: string;
|
|
85
|
+
extractMimeType?: string;
|
|
86
86
|
}, cursor?: string, pageSize?: number, userIdentity?: string, nodeIdentity?: string): Promise<IDocumentList>;
|
|
87
|
+
/**
|
|
88
|
+
* Get a document revision using it's auditable item graph vertex id.
|
|
89
|
+
* @param auditableItemGraphDocumentId The auditable item graph vertex id which contains the document.
|
|
90
|
+
* @param revision The revision id for the document.
|
|
91
|
+
* @param options Additional options for the get operation.
|
|
92
|
+
* @param options.includeBlobStorageMetadata Flag to include the blob storage metadata for the document, defaults to false.
|
|
93
|
+
* @param options.includeBlobStorageData Flag to include the blob storage data for the document, defaults to false.
|
|
94
|
+
* @param options.includeAttestation Flag to include the attestation information for the document, 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.
|
|
97
|
+
* @param userIdentity The identity to perform the auditable item graph operation with.
|
|
98
|
+
* @param nodeIdentity The node identity to use for vault operations.
|
|
99
|
+
* @returns The documents and revisions if requested, ordered by revision descending, cursor is set if there are more document revisions.
|
|
100
|
+
*/
|
|
101
|
+
getRevision(auditableItemGraphDocumentId: string, revision: number, options?: {
|
|
102
|
+
includeBlobStorageMetadata?: boolean;
|
|
103
|
+
includeBlobStorageData?: boolean;
|
|
104
|
+
includeAttestation?: boolean;
|
|
105
|
+
extractRuleGroupId?: string;
|
|
106
|
+
extractMimeType?: string;
|
|
107
|
+
}, userIdentity?: string, nodeIdentity?: string): Promise<IDocument>;
|
|
87
108
|
/**
|
|
88
109
|
* Remove an auditable item graph vertex using it's id.
|
|
89
110
|
* The document dateDeleted will be set, but can still be queried with the includeRemoved flag.
|
|
@@ -18,6 +18,11 @@ export interface IDocumentManagementServiceConstructorOptions {
|
|
|
18
18
|
* @default attestation
|
|
19
19
|
*/
|
|
20
20
|
attestationComponentType?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The type of the data processing component.
|
|
23
|
+
* @default data-processing
|
|
24
|
+
*/
|
|
25
|
+
dataProcessingComponentType?: string;
|
|
21
26
|
/**
|
|
22
27
|
* The configuration for the service.
|
|
23
28
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,216 @@
|
|
|
1
1
|
# @twin.org/document-management-service - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.2-next.0...document-management-service-v0.0.2-next.1) (2025-08-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add external unece type reference ([e8311ae](https://github.com/twinfoundation/document-management/commit/e8311ae35f36d83783ce24dfdd3f38142d7f4abf))
|
|
9
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
10
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
11
|
+
* populate dateDeleted from aig resource object ([ce91cf1](https://github.com/twinfoundation/document-management/commit/ce91cf1385c4370ec6924435349213abf776f3e5))
|
|
12
|
+
* remove unused namespace ([602259d](https://github.com/twinfoundation/document-management/commit/602259d6e9aeb8006dff45bebd94157e3f0a204b))
|
|
13
|
+
* store document as a vertex ([#2](https://github.com/twinfoundation/document-management/issues/2)) ([7febedc](https://github.com/twinfoundation/document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
14
|
+
* update blob storage component ([63fe802](https://github.com/twinfoundation/document-management/commit/63fe8023bdae76631e324e6fee753c7e9243acfe))
|
|
15
|
+
* update dependencies ([b051009](https://github.com/twinfoundation/document-management/commit/b051009ae27a44c38a73ebdb0f05ebea1c8dae0e))
|
|
16
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
17
|
+
* update framework core ([f991a59](https://github.com/twinfoundation/document-management/commit/f991a59d25ec228bcdd7a5b6bd55578985b55a84))
|
|
18
|
+
* use standard list json ld types ([20ea04b](https://github.com/twinfoundation/document-management/commit/20ea04b05fd4bc4fcedce8f66958942c3c2fa303))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* 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))
|
|
24
|
+
* query params force coercion ([d667d0f](https://github.com/twinfoundation/document-management/commit/d667d0f195accca2887a5ca732e9790063763996))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* The following workspace dependencies were updated
|
|
30
|
+
* dependencies
|
|
31
|
+
* @twin.org/document-management-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
32
|
+
|
|
33
|
+
## 0.0.1 (2025-07-09)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* release to production ([a009526](https://github.com/twinfoundation/document-management/commit/a009526032a0ee6e6b74f476a01fbe5f4c7fd4da))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Dependencies
|
|
42
|
+
|
|
43
|
+
* The following workspace dependencies were updated
|
|
44
|
+
* dependencies
|
|
45
|
+
* @twin.org/document-management-models bumped from ^0.0.0 to ^0.0.1
|
|
46
|
+
|
|
47
|
+
## [0.0.1-next.20](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.19...document-management-service-v0.0.1-next.20) (2025-06-20)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
53
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
54
|
+
* populate dateDeleted from aig resource object ([ce91cf1](https://github.com/twinfoundation/document-management/commit/ce91cf1385c4370ec6924435349213abf776f3e5))
|
|
55
|
+
* store document as a vertex ([#2](https://github.com/twinfoundation/document-management/issues/2)) ([7febedc](https://github.com/twinfoundation/document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
56
|
+
* update blob storage component ([63fe802](https://github.com/twinfoundation/document-management/commit/63fe8023bdae76631e324e6fee753c7e9243acfe))
|
|
57
|
+
* update dependencies ([b051009](https://github.com/twinfoundation/document-management/commit/b051009ae27a44c38a73ebdb0f05ebea1c8dae0e))
|
|
58
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
59
|
+
* use standard list json ld types ([20ea04b](https://github.com/twinfoundation/document-management/commit/20ea04b05fd4bc4fcedce8f66958942c3c2fa303))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Bug Fixes
|
|
63
|
+
|
|
64
|
+
* 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))
|
|
65
|
+
* query params force coercion ([d667d0f](https://github.com/twinfoundation/document-management/commit/d667d0f195accca2887a5ca732e9790063763996))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Dependencies
|
|
69
|
+
|
|
70
|
+
* The following workspace dependencies were updated
|
|
71
|
+
* dependencies
|
|
72
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.19 to 0.0.1-next.20
|
|
73
|
+
|
|
74
|
+
## [0.0.1-next.19](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.18...document-management-service-v0.0.1-next.19) (2025-06-20)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* query params force coercion ([d667d0f](https://github.com/twinfoundation/document-management/commit/d667d0f195accca2887a5ca732e9790063763996))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Dependencies
|
|
83
|
+
|
|
84
|
+
* The following workspace dependencies were updated
|
|
85
|
+
* dependencies
|
|
86
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.18 to 0.0.1-next.19
|
|
87
|
+
|
|
88
|
+
## [0.0.1-next.18](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.17...document-management-service-v0.0.1-next.18) (2025-06-18)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Features
|
|
92
|
+
|
|
93
|
+
* update blob storage component ([63fe802](https://github.com/twinfoundation/document-management/commit/63fe8023bdae76631e324e6fee753c7e9243acfe))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
### Dependencies
|
|
97
|
+
|
|
98
|
+
* The following workspace dependencies were updated
|
|
99
|
+
* dependencies
|
|
100
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.17 to 0.0.1-next.18
|
|
101
|
+
|
|
102
|
+
## [0.0.1-next.17](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.16...document-management-service-v0.0.1-next.17) (2025-06-12)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Features
|
|
106
|
+
|
|
107
|
+
* update dependencies ([f9d8641](https://github.com/twinfoundation/document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Dependencies
|
|
111
|
+
|
|
112
|
+
* The following workspace dependencies were updated
|
|
113
|
+
* dependencies
|
|
114
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.16 to 0.0.1-next.17
|
|
115
|
+
|
|
116
|
+
## [0.0.1-next.16](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.15...document-management-service-v0.0.1-next.16) (2025-06-03)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Miscellaneous Chores
|
|
120
|
+
|
|
121
|
+
* **document-management-service:** Synchronize repo versions
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Dependencies
|
|
125
|
+
|
|
126
|
+
* The following workspace dependencies were updated
|
|
127
|
+
* dependencies
|
|
128
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
129
|
+
|
|
130
|
+
## [0.0.1-next.15](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.14...document-management-service-v0.0.1-next.15) (2025-05-28)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Miscellaneous Chores
|
|
134
|
+
|
|
135
|
+
* **document-management-service:** Synchronize repo versions
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### Dependencies
|
|
139
|
+
|
|
140
|
+
* The following workspace dependencies were updated
|
|
141
|
+
* dependencies
|
|
142
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
143
|
+
|
|
144
|
+
## [0.0.1-next.14](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.13...document-management-service-v0.0.1-next.14) (2025-05-08)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
### Features
|
|
148
|
+
|
|
149
|
+
* use standard list json ld types ([20ea04b](https://github.com/twinfoundation/document-management/commit/20ea04b05fd4bc4fcedce8f66958942c3c2fa303))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Dependencies
|
|
153
|
+
|
|
154
|
+
* The following workspace dependencies were updated
|
|
155
|
+
* dependencies
|
|
156
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
157
|
+
|
|
158
|
+
## [0.0.1-next.13](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.12...document-management-service-v0.0.1-next.13) (2025-04-30)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### Features
|
|
162
|
+
|
|
163
|
+
* populate dateDeleted from aig resource object ([ce91cf1](https://github.com/twinfoundation/document-management/commit/ce91cf1385c4370ec6924435349213abf776f3e5))
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### Dependencies
|
|
167
|
+
|
|
168
|
+
* The following workspace dependencies were updated
|
|
169
|
+
* dependencies
|
|
170
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.12 to 0.0.1-next.13
|
|
171
|
+
|
|
172
|
+
## [0.0.1-next.12](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.11...document-management-service-v0.0.1-next.12) (2025-04-30)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Features
|
|
176
|
+
|
|
177
|
+
* get document revision ([080eddc](https://github.com/twinfoundation/document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Dependencies
|
|
181
|
+
|
|
182
|
+
* The following workspace dependencies were updated
|
|
183
|
+
* dependencies
|
|
184
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.11 to 0.0.1-next.12
|
|
185
|
+
|
|
186
|
+
## [0.0.1-next.11](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.10...document-management-service-v0.0.1-next.11) (2025-04-28)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Features
|
|
190
|
+
|
|
191
|
+
* document get can perform extraction ([#6](https://github.com/twinfoundation/document-management/issues/6)) ([5ce6d37](https://github.com/twinfoundation/document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### Dependencies
|
|
195
|
+
|
|
196
|
+
* The following workspace dependencies were updated
|
|
197
|
+
* dependencies
|
|
198
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.10 to 0.0.1-next.11
|
|
199
|
+
|
|
200
|
+
## [0.0.1-next.10](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.9...document-management-service-v0.0.1-next.10) (2025-04-25)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
### Bug Fixes
|
|
204
|
+
|
|
205
|
+
* 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))
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Dependencies
|
|
209
|
+
|
|
210
|
+
* The following workspace dependencies were updated
|
|
211
|
+
* dependencies
|
|
212
|
+
* @twin.org/document-management-models bumped from 0.0.1-next.9 to 0.0.1-next.10
|
|
213
|
+
|
|
3
214
|
## [0.0.1-next.9](https://github.com/twinfoundation/document-management/compare/document-management-service-v0.0.1-next.8...document-management-service-v0.0.1-next.9) (2025-04-17)
|
|
4
215
|
|
|
5
216
|
|