@twin.org/document-management-rest-client 0.0.3-next.11 → 0.0.3-next.13
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/README.md +1 -1
- package/docs/changelog.md +91 -63
- package/docs/examples.md +118 -1
- package/docs/reference/classes/DocumentManagementRestClient.md +10 -10
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN Document Management REST Client
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This package provides a client for invoking document lifecycle endpoints over HTTP with a stable, contract-led API. It is intended for consumers that need to create, update, fetch revisions, remove revisions, and query document records from remote services.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/docs/changelog.md
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.3-next.
|
|
3
|
+
## [0.0.3-next.13](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.12...document-management-rest-client-v0.0.3-next.13) (2026-05-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* typescript 6 update ([35631d8](https://github.com/iotaledger/twin-document-management/commit/35631d88551380933009443d77b1a844b631a98e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/document-management-models bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
16
|
+
|
|
17
|
+
## [0.0.3-next.12](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.11...document-management-rest-client-v0.0.3-next.12) (2026-03-26)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* update to latest aig method shapes ([497e895](https://github.com/iotaledger/twin-document-management/commit/497e8954f24774db628e057ebb9d158a1fd9d92a))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/document-management-models bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
30
|
+
|
|
31
|
+
## [0.0.3-next.11](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.10...document-management-rest-client-v0.0.3-next.11) (2026-02-25)
|
|
4
32
|
|
|
5
33
|
|
|
6
34
|
### Miscellaneous Chores
|
|
@@ -14,7 +42,7 @@
|
|
|
14
42
|
* dependencies
|
|
15
43
|
* @twin.org/document-management-models bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
16
44
|
|
|
17
|
-
## [0.0.3-next.10](https://github.com/
|
|
45
|
+
## [0.0.3-next.10](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.9...document-management-rest-client-v0.0.3-next.10) (2026-02-11)
|
|
18
46
|
|
|
19
47
|
|
|
20
48
|
### Miscellaneous Chores
|
|
@@ -28,7 +56,7 @@
|
|
|
28
56
|
* dependencies
|
|
29
57
|
* @twin.org/document-management-models bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
30
58
|
|
|
31
|
-
## [0.0.3-next.9](https://github.com/
|
|
59
|
+
## [0.0.3-next.9](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.8...document-management-rest-client-v0.0.3-next.9) (2026-01-26)
|
|
32
60
|
|
|
33
61
|
|
|
34
62
|
### Miscellaneous Chores
|
|
@@ -42,7 +70,7 @@
|
|
|
42
70
|
* dependencies
|
|
43
71
|
* @twin.org/document-management-models bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
44
72
|
|
|
45
|
-
## [0.0.3-next.8](https://github.com/
|
|
73
|
+
## [0.0.3-next.8](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.7...document-management-rest-client-v0.0.3-next.8) (2026-01-26)
|
|
46
74
|
|
|
47
75
|
|
|
48
76
|
### Miscellaneous Chores
|
|
@@ -56,12 +84,12 @@
|
|
|
56
84
|
* dependencies
|
|
57
85
|
* @twin.org/document-management-models bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
58
86
|
|
|
59
|
-
## [0.0.3-next.7](https://github.com/
|
|
87
|
+
## [0.0.3-next.7](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.6...document-management-rest-client-v0.0.3-next.7) (2026-01-23)
|
|
60
88
|
|
|
61
89
|
|
|
62
90
|
### Features
|
|
63
91
|
|
|
64
|
-
* replace nextItem property with Link header ([#34](https://github.com/
|
|
92
|
+
* replace nextItem property with Link header ([#34](https://github.com/iotaledger/twin-document-management/issues/34)) ([3f04c3f](https://github.com/iotaledger/twin-document-management/commit/3f04c3fb5c9ec0c56f213089a15cc247fbfbd59c))
|
|
65
93
|
|
|
66
94
|
|
|
67
95
|
### Dependencies
|
|
@@ -70,7 +98,7 @@
|
|
|
70
98
|
* dependencies
|
|
71
99
|
* @twin.org/document-management-models bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
72
100
|
|
|
73
|
-
## [0.0.3-next.6](https://github.com/
|
|
101
|
+
## [0.0.3-next.6](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.5...document-management-rest-client-v0.0.3-next.6) (2026-01-22)
|
|
74
102
|
|
|
75
103
|
|
|
76
104
|
### Miscellaneous Chores
|
|
@@ -84,7 +112,7 @@
|
|
|
84
112
|
* dependencies
|
|
85
113
|
* @twin.org/document-management-models bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
86
114
|
|
|
87
|
-
## [0.0.3-next.5](https://github.com/
|
|
115
|
+
## [0.0.3-next.5](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.4...document-management-rest-client-v0.0.3-next.5) (2026-01-14)
|
|
88
116
|
|
|
89
117
|
|
|
90
118
|
### Miscellaneous Chores
|
|
@@ -98,12 +126,12 @@
|
|
|
98
126
|
* dependencies
|
|
99
127
|
* @twin.org/document-management-models bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
100
128
|
|
|
101
|
-
## [0.0.3-next.4](https://github.com/
|
|
129
|
+
## [0.0.3-next.4](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.3...document-management-rest-client-v0.0.3-next.4) (2026-01-06)
|
|
102
130
|
|
|
103
131
|
|
|
104
132
|
### Features
|
|
105
133
|
|
|
106
|
-
* update unece dependencies ([a27548c](https://github.com/
|
|
134
|
+
* update unece dependencies ([a27548c](https://github.com/iotaledger/twin-document-management/commit/a27548cdebbe1d9577fc8341166538c2f07348a3))
|
|
107
135
|
|
|
108
136
|
|
|
109
137
|
### Dependencies
|
|
@@ -112,12 +140,12 @@
|
|
|
112
140
|
* dependencies
|
|
113
141
|
* @twin.org/document-management-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
114
142
|
|
|
115
|
-
## [0.0.3-next.3](https://github.com/
|
|
143
|
+
## [0.0.3-next.3](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.2...document-management-rest-client-v0.0.3-next.3) (2025-12-03)
|
|
116
144
|
|
|
117
145
|
|
|
118
146
|
### Features
|
|
119
147
|
|
|
120
|
-
* use updated unece types ([c141a89](https://github.com/
|
|
148
|
+
* use updated unece types ([c141a89](https://github.com/iotaledger/twin-document-management/commit/c141a895138cb45fa0b1e95c42f56e31708c846c))
|
|
121
149
|
|
|
122
150
|
|
|
123
151
|
### Dependencies
|
|
@@ -126,12 +154,12 @@
|
|
|
126
154
|
* dependencies
|
|
127
155
|
* @twin.org/document-management-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
128
156
|
|
|
129
|
-
## [0.0.3-next.2](https://github.com/
|
|
157
|
+
## [0.0.3-next.2](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.1...document-management-rest-client-v0.0.3-next.2) (2025-11-28)
|
|
130
158
|
|
|
131
159
|
|
|
132
160
|
### Features
|
|
133
161
|
|
|
134
|
-
* update background task service ([5c380dc](https://github.com/
|
|
162
|
+
* update background task service ([5c380dc](https://github.com/iotaledger/twin-document-management/commit/5c380dca3114254201768f184f9486828501ff66))
|
|
135
163
|
|
|
136
164
|
|
|
137
165
|
### Dependencies
|
|
@@ -140,25 +168,25 @@
|
|
|
140
168
|
* dependencies
|
|
141
169
|
* @twin.org/document-management-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
142
170
|
|
|
143
|
-
## [0.0.3-next.1](https://github.com/
|
|
171
|
+
## [0.0.3-next.1](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.3-next.0...document-management-rest-client-v0.0.3-next.1) (2025-11-12)
|
|
144
172
|
|
|
145
173
|
|
|
146
174
|
### Features
|
|
147
175
|
|
|
148
|
-
* add context id features ([#24](https://github.com/
|
|
149
|
-
* add validate-locales ([b6b6f9e](https://github.com/
|
|
150
|
-
* document get can perform extraction ([#6](https://github.com/
|
|
151
|
-
* eslint migration to flat config ([98635aa](https://github.com/
|
|
152
|
-
* get document revision ([080eddc](https://github.com/
|
|
153
|
-
* store document as a vertex ([#2](https://github.com/
|
|
154
|
-
* update dependencies ([f9d8641](https://github.com/
|
|
155
|
-
* update framework core ([f991a59](https://github.com/
|
|
156
|
-
* use targetId in AIG for edges ([82dec81](https://github.com/
|
|
176
|
+
* add context id features ([#24](https://github.com/iotaledger/twin-document-management/issues/24)) ([83f65f1](https://github.com/iotaledger/twin-document-management/commit/83f65f15e55f2293f5ca0d9d1e4679ba67c4ec8d))
|
|
177
|
+
* add validate-locales ([b6b6f9e](https://github.com/iotaledger/twin-document-management/commit/b6b6f9e9d66c17af3d030247ca168ac0b5844bdc))
|
|
178
|
+
* document get can perform extraction ([#6](https://github.com/iotaledger/twin-document-management/issues/6)) ([5ce6d37](https://github.com/iotaledger/twin-document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
179
|
+
* eslint migration to flat config ([98635aa](https://github.com/iotaledger/twin-document-management/commit/98635aa24ebafba265e989e461fe98104f683191))
|
|
180
|
+
* get document revision ([080eddc](https://github.com/iotaledger/twin-document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
181
|
+
* store document as a vertex ([#2](https://github.com/iotaledger/twin-document-management/issues/2)) ([7febedc](https://github.com/iotaledger/twin-document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
182
|
+
* update dependencies ([f9d8641](https://github.com/iotaledger/twin-document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
183
|
+
* update framework core ([f991a59](https://github.com/iotaledger/twin-document-management/commit/f991a59d25ec228bcdd7a5b6bd55578985b55a84))
|
|
184
|
+
* use targetId in AIG for edges ([82dec81](https://github.com/iotaledger/twin-document-management/commit/82dec8190d8b523b350ef133bdcf648cab1023b0))
|
|
157
185
|
|
|
158
186
|
|
|
159
187
|
### Bug Fixes
|
|
160
188
|
|
|
161
|
-
* adding missing route for the document management ([#4](https://github.com/
|
|
189
|
+
* adding missing route for the document management ([#4](https://github.com/iotaledger/twin-document-management/issues/4)) ([fd3292e](https://github.com/iotaledger/twin-document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
162
190
|
|
|
163
191
|
|
|
164
192
|
### Dependencies
|
|
@@ -167,12 +195,12 @@
|
|
|
167
195
|
* dependencies
|
|
168
196
|
* @twin.org/document-management-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
169
197
|
|
|
170
|
-
## [0.0.2-next.4](https://github.com/
|
|
198
|
+
## [0.0.2-next.4](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.2-next.3...document-management-rest-client-v0.0.2-next.4) (2025-10-09)
|
|
171
199
|
|
|
172
200
|
|
|
173
201
|
### Features
|
|
174
202
|
|
|
175
|
-
* add validate-locales ([b6b6f9e](https://github.com/
|
|
203
|
+
* add validate-locales ([b6b6f9e](https://github.com/iotaledger/twin-document-management/commit/b6b6f9e9d66c17af3d030247ca168ac0b5844bdc))
|
|
176
204
|
|
|
177
205
|
|
|
178
206
|
### Dependencies
|
|
@@ -181,12 +209,12 @@
|
|
|
181
209
|
* dependencies
|
|
182
210
|
* @twin.org/document-management-models bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
183
211
|
|
|
184
|
-
## [0.0.2-next.3](https://github.com/
|
|
212
|
+
## [0.0.2-next.3](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.2-next.2...document-management-rest-client-v0.0.2-next.3) (2025-09-29)
|
|
185
213
|
|
|
186
214
|
|
|
187
215
|
### Features
|
|
188
216
|
|
|
189
|
-
* use targetId in AIG for edges ([82dec81](https://github.com/
|
|
217
|
+
* use targetId in AIG for edges ([82dec81](https://github.com/iotaledger/twin-document-management/commit/82dec8190d8b523b350ef133bdcf648cab1023b0))
|
|
190
218
|
|
|
191
219
|
|
|
192
220
|
### Dependencies
|
|
@@ -195,12 +223,12 @@
|
|
|
195
223
|
* dependencies
|
|
196
224
|
* @twin.org/document-management-models bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
197
225
|
|
|
198
|
-
## [0.0.2-next.2](https://github.com/
|
|
226
|
+
## [0.0.2-next.2](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.2-next.1...document-management-rest-client-v0.0.2-next.2) (2025-08-29)
|
|
199
227
|
|
|
200
228
|
|
|
201
229
|
### Features
|
|
202
230
|
|
|
203
|
-
* eslint migration to flat config ([98635aa](https://github.com/
|
|
231
|
+
* eslint migration to flat config ([98635aa](https://github.com/iotaledger/twin-document-management/commit/98635aa24ebafba265e989e461fe98104f683191))
|
|
204
232
|
|
|
205
233
|
|
|
206
234
|
### Dependencies
|
|
@@ -209,21 +237,21 @@
|
|
|
209
237
|
* dependencies
|
|
210
238
|
* @twin.org/document-management-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
211
239
|
|
|
212
|
-
## [0.0.2-next.1](https://github.com/
|
|
240
|
+
## [0.0.2-next.1](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.2-next.0...document-management-rest-client-v0.0.2-next.1) (2025-08-21)
|
|
213
241
|
|
|
214
242
|
|
|
215
243
|
### Features
|
|
216
244
|
|
|
217
|
-
* document get can perform extraction ([#6](https://github.com/
|
|
218
|
-
* get document revision ([080eddc](https://github.com/
|
|
219
|
-
* store document as a vertex ([#2](https://github.com/
|
|
220
|
-
* update dependencies ([f9d8641](https://github.com/
|
|
221
|
-
* update framework core ([f991a59](https://github.com/
|
|
245
|
+
* document get can perform extraction ([#6](https://github.com/iotaledger/twin-document-management/issues/6)) ([5ce6d37](https://github.com/iotaledger/twin-document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
246
|
+
* get document revision ([080eddc](https://github.com/iotaledger/twin-document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
247
|
+
* store document as a vertex ([#2](https://github.com/iotaledger/twin-document-management/issues/2)) ([7febedc](https://github.com/iotaledger/twin-document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
248
|
+
* update dependencies ([f9d8641](https://github.com/iotaledger/twin-document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
249
|
+
* update framework core ([f991a59](https://github.com/iotaledger/twin-document-management/commit/f991a59d25ec228bcdd7a5b6bd55578985b55a84))
|
|
222
250
|
|
|
223
251
|
|
|
224
252
|
### Bug Fixes
|
|
225
253
|
|
|
226
|
-
* adding missing route for the document management ([#4](https://github.com/
|
|
254
|
+
* adding missing route for the document management ([#4](https://github.com/iotaledger/twin-document-management/issues/4)) ([fd3292e](https://github.com/iotaledger/twin-document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
227
255
|
|
|
228
256
|
|
|
229
257
|
### Dependencies
|
|
@@ -237,7 +265,7 @@
|
|
|
237
265
|
|
|
238
266
|
### Features
|
|
239
267
|
|
|
240
|
-
* release to production ([a009526](https://github.com/
|
|
268
|
+
* release to production ([a009526](https://github.com/iotaledger/twin-document-management/commit/a009526032a0ee6e6b74f476a01fbe5f4c7fd4da))
|
|
241
269
|
|
|
242
270
|
|
|
243
271
|
### Dependencies
|
|
@@ -246,20 +274,20 @@
|
|
|
246
274
|
* dependencies
|
|
247
275
|
* @twin.org/document-management-models bumped from ^0.0.0 to ^0.0.1
|
|
248
276
|
|
|
249
|
-
## [0.0.1-next.20](https://github.com/
|
|
277
|
+
## [0.0.1-next.20](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.19...document-management-rest-client-v0.0.1-next.20) (2025-06-20)
|
|
250
278
|
|
|
251
279
|
|
|
252
280
|
### Features
|
|
253
281
|
|
|
254
|
-
* document get can perform extraction ([#6](https://github.com/
|
|
255
|
-
* get document revision ([080eddc](https://github.com/
|
|
256
|
-
* store document as a vertex ([#2](https://github.com/
|
|
257
|
-
* update dependencies ([f9d8641](https://github.com/
|
|
282
|
+
* document get can perform extraction ([#6](https://github.com/iotaledger/twin-document-management/issues/6)) ([5ce6d37](https://github.com/iotaledger/twin-document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
283
|
+
* get document revision ([080eddc](https://github.com/iotaledger/twin-document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
284
|
+
* store document as a vertex ([#2](https://github.com/iotaledger/twin-document-management/issues/2)) ([7febedc](https://github.com/iotaledger/twin-document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
285
|
+
* update dependencies ([f9d8641](https://github.com/iotaledger/twin-document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
258
286
|
|
|
259
287
|
|
|
260
288
|
### Bug Fixes
|
|
261
289
|
|
|
262
|
-
* adding missing route for the document management ([#4](https://github.com/
|
|
290
|
+
* adding missing route for the document management ([#4](https://github.com/iotaledger/twin-document-management/issues/4)) ([fd3292e](https://github.com/iotaledger/twin-document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
263
291
|
|
|
264
292
|
|
|
265
293
|
### Dependencies
|
|
@@ -268,7 +296,7 @@
|
|
|
268
296
|
* dependencies
|
|
269
297
|
* @twin.org/document-management-models bumped from 0.0.1-next.19 to 0.0.1-next.20
|
|
270
298
|
|
|
271
|
-
## [0.0.1-next.19](https://github.com/
|
|
299
|
+
## [0.0.1-next.19](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.18...document-management-rest-client-v0.0.1-next.19) (2025-06-20)
|
|
272
300
|
|
|
273
301
|
|
|
274
302
|
### Miscellaneous Chores
|
|
@@ -282,7 +310,7 @@
|
|
|
282
310
|
* dependencies
|
|
283
311
|
* @twin.org/document-management-models bumped from 0.0.1-next.18 to 0.0.1-next.19
|
|
284
312
|
|
|
285
|
-
## [0.0.1-next.18](https://github.com/
|
|
313
|
+
## [0.0.1-next.18](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.17...document-management-rest-client-v0.0.1-next.18) (2025-06-18)
|
|
286
314
|
|
|
287
315
|
|
|
288
316
|
### Miscellaneous Chores
|
|
@@ -296,12 +324,12 @@
|
|
|
296
324
|
* dependencies
|
|
297
325
|
* @twin.org/document-management-models bumped from 0.0.1-next.17 to 0.0.1-next.18
|
|
298
326
|
|
|
299
|
-
## [0.0.1-next.17](https://github.com/
|
|
327
|
+
## [0.0.1-next.17](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.16...document-management-rest-client-v0.0.1-next.17) (2025-06-12)
|
|
300
328
|
|
|
301
329
|
|
|
302
330
|
### Features
|
|
303
331
|
|
|
304
|
-
* update dependencies ([f9d8641](https://github.com/
|
|
332
|
+
* update dependencies ([f9d8641](https://github.com/iotaledger/twin-document-management/commit/f9d86417dba24027699225ec7473296e361dcb00))
|
|
305
333
|
|
|
306
334
|
|
|
307
335
|
### Dependencies
|
|
@@ -310,7 +338,7 @@
|
|
|
310
338
|
* dependencies
|
|
311
339
|
* @twin.org/document-management-models bumped from 0.0.1-next.16 to 0.0.1-next.17
|
|
312
340
|
|
|
313
|
-
## [0.0.1-next.16](https://github.com/
|
|
341
|
+
## [0.0.1-next.16](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.15...document-management-rest-client-v0.0.1-next.16) (2025-06-03)
|
|
314
342
|
|
|
315
343
|
|
|
316
344
|
### Miscellaneous Chores
|
|
@@ -324,7 +352,7 @@
|
|
|
324
352
|
* dependencies
|
|
325
353
|
* @twin.org/document-management-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
326
354
|
|
|
327
|
-
## [0.0.1-next.15](https://github.com/
|
|
355
|
+
## [0.0.1-next.15](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.14...document-management-rest-client-v0.0.1-next.15) (2025-05-28)
|
|
328
356
|
|
|
329
357
|
|
|
330
358
|
### Miscellaneous Chores
|
|
@@ -338,7 +366,7 @@
|
|
|
338
366
|
* dependencies
|
|
339
367
|
* @twin.org/document-management-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
340
368
|
|
|
341
|
-
## [0.0.1-next.14](https://github.com/
|
|
369
|
+
## [0.0.1-next.14](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.13...document-management-rest-client-v0.0.1-next.14) (2025-05-08)
|
|
342
370
|
|
|
343
371
|
|
|
344
372
|
### Miscellaneous Chores
|
|
@@ -352,7 +380,7 @@
|
|
|
352
380
|
* dependencies
|
|
353
381
|
* @twin.org/document-management-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
354
382
|
|
|
355
|
-
## [0.0.1-next.13](https://github.com/
|
|
383
|
+
## [0.0.1-next.13](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.12...document-management-rest-client-v0.0.1-next.13) (2025-04-30)
|
|
356
384
|
|
|
357
385
|
|
|
358
386
|
### Miscellaneous Chores
|
|
@@ -366,12 +394,12 @@
|
|
|
366
394
|
* dependencies
|
|
367
395
|
* @twin.org/document-management-models bumped from 0.0.1-next.12 to 0.0.1-next.13
|
|
368
396
|
|
|
369
|
-
## [0.0.1-next.12](https://github.com/
|
|
397
|
+
## [0.0.1-next.12](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.11...document-management-rest-client-v0.0.1-next.12) (2025-04-30)
|
|
370
398
|
|
|
371
399
|
|
|
372
400
|
### Features
|
|
373
401
|
|
|
374
|
-
* get document revision ([080eddc](https://github.com/
|
|
402
|
+
* get document revision ([080eddc](https://github.com/iotaledger/twin-document-management/commit/080eddcc024c622dda6bb36f60f5fa80a86cf5bb))
|
|
375
403
|
|
|
376
404
|
|
|
377
405
|
### Dependencies
|
|
@@ -380,12 +408,12 @@
|
|
|
380
408
|
* dependencies
|
|
381
409
|
* @twin.org/document-management-models bumped from 0.0.1-next.11 to 0.0.1-next.12
|
|
382
410
|
|
|
383
|
-
## [0.0.1-next.11](https://github.com/
|
|
411
|
+
## [0.0.1-next.11](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.10...document-management-rest-client-v0.0.1-next.11) (2025-04-28)
|
|
384
412
|
|
|
385
413
|
|
|
386
414
|
### Features
|
|
387
415
|
|
|
388
|
-
* document get can perform extraction ([#6](https://github.com/
|
|
416
|
+
* document get can perform extraction ([#6](https://github.com/iotaledger/twin-document-management/issues/6)) ([5ce6d37](https://github.com/iotaledger/twin-document-management/commit/5ce6d37432ad271ca5783f422846f4be98ec2215))
|
|
389
417
|
|
|
390
418
|
|
|
391
419
|
### Dependencies
|
|
@@ -394,12 +422,12 @@
|
|
|
394
422
|
* dependencies
|
|
395
423
|
* @twin.org/document-management-models bumped from 0.0.1-next.10 to 0.0.1-next.11
|
|
396
424
|
|
|
397
|
-
## [0.0.1-next.10](https://github.com/
|
|
425
|
+
## [0.0.1-next.10](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.9...document-management-rest-client-v0.0.1-next.10) (2025-04-25)
|
|
398
426
|
|
|
399
427
|
|
|
400
428
|
### Bug Fixes
|
|
401
429
|
|
|
402
|
-
* adding missing route for the document management ([#4](https://github.com/
|
|
430
|
+
* adding missing route for the document management ([#4](https://github.com/iotaledger/twin-document-management/issues/4)) ([fd3292e](https://github.com/iotaledger/twin-document-management/commit/fd3292ede5014847ae2f2bcadb174b6552486154))
|
|
403
431
|
|
|
404
432
|
|
|
405
433
|
### Dependencies
|
|
@@ -408,12 +436,12 @@
|
|
|
408
436
|
* dependencies
|
|
409
437
|
* @twin.org/document-management-models bumped from 0.0.1-next.9 to 0.0.1-next.10
|
|
410
438
|
|
|
411
|
-
## [0.0.1-next.9](https://github.com/
|
|
439
|
+
## [0.0.1-next.9](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.8...document-management-rest-client-v0.0.1-next.9) (2025-04-17)
|
|
412
440
|
|
|
413
441
|
|
|
414
442
|
### Features
|
|
415
443
|
|
|
416
|
-
* store document as a vertex ([#2](https://github.com/
|
|
444
|
+
* store document as a vertex ([#2](https://github.com/iotaledger/twin-document-management/issues/2)) ([7febedc](https://github.com/iotaledger/twin-document-management/commit/7febedc3fb31de9c19565d6326341046834f2c74))
|
|
417
445
|
|
|
418
446
|
|
|
419
447
|
### Dependencies
|
|
@@ -422,7 +450,7 @@
|
|
|
422
450
|
* dependencies
|
|
423
451
|
* @twin.org/document-management-models bumped from 0.0.1-next.8 to 0.0.1-next.9
|
|
424
452
|
|
|
425
|
-
## [0.0.1-next.8](https://github.com/
|
|
453
|
+
## [0.0.1-next.8](https://github.com/iotaledger/twin-document-management/compare/document-management-rest-client-v0.0.1-next.7...document-management-rest-client-v0.0.1-next.8) (2025-03-28)
|
|
426
454
|
|
|
427
455
|
|
|
428
456
|
### Miscellaneous Chores
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,118 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Document Management REST Client Examples
|
|
2
|
+
|
|
3
|
+
These examples walk through common client calls for creating, updating, reading, and finding documents from a remote service.
|
|
4
|
+
|
|
5
|
+
## DocumentManagementRestClient
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { DocumentManagementRestClient } from '@twin.org/document-management-rest-client';
|
|
9
|
+
import { Converter } from '@twin.org/core';
|
|
10
|
+
import { UneceDocumentCodeList } from '@twin.org/standards-unece';
|
|
11
|
+
|
|
12
|
+
const client = new DocumentManagementRestClient({
|
|
13
|
+
endpoint: 'http://localhost:3000'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const blobBytes = Converter.utf8ToBytes('Updated bill of lading payload');
|
|
17
|
+
const edgeTargetId = 'aig:shipment-vertex';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
const componentName = client.className();
|
|
22
|
+
console.log(componentName); // DocumentManagementRestClient
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
const createdVertexId = await client.create(
|
|
27
|
+
'BOL-2026-0001',
|
|
28
|
+
'bol',
|
|
29
|
+
UneceDocumentCodeList.BillOfLading,
|
|
30
|
+
blobBytes,
|
|
31
|
+
{
|
|
32
|
+
'@context': 'https://schema.org',
|
|
33
|
+
'@type': 'DigitalDocument',
|
|
34
|
+
name: 'bol-2026-0001.pdf'
|
|
35
|
+
},
|
|
36
|
+
[
|
|
37
|
+
{
|
|
38
|
+
targetId: edgeTargetId,
|
|
39
|
+
addAlias: true,
|
|
40
|
+
aliasAnnotationObject: {
|
|
41
|
+
'@context': 'https://schema.org',
|
|
42
|
+
'@type': 'Thing',
|
|
43
|
+
name: 'Shipment link'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
{
|
|
48
|
+
createAttestation: true,
|
|
49
|
+
addAlias: true,
|
|
50
|
+
aliasAnnotationObject: {
|
|
51
|
+
'@context': 'https://schema.org',
|
|
52
|
+
'@type': 'Thing',
|
|
53
|
+
name: 'Primary alias'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
console.log(createdVertexId); // aig:document-vertex-1
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
await client.update(
|
|
63
|
+
'aig:document-vertex-1',
|
|
64
|
+
Converter.utf8ToBytes('Second revision payload'),
|
|
65
|
+
{
|
|
66
|
+
'@context': 'https://schema.org',
|
|
67
|
+
'@type': 'CreativeWork',
|
|
68
|
+
name: 'bol-2026-0001-rev1.pdf'
|
|
69
|
+
},
|
|
70
|
+
[
|
|
71
|
+
{
|
|
72
|
+
targetId: edgeTargetId,
|
|
73
|
+
addAlias: true,
|
|
74
|
+
aliasAnnotationObject: {
|
|
75
|
+
'@context': 'https://schema.org',
|
|
76
|
+
'@type': 'Thing',
|
|
77
|
+
name: 'Shipment alias'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
const latest = await client.get(
|
|
86
|
+
'aig:document-vertex-1',
|
|
87
|
+
{
|
|
88
|
+
includeBlobStorageMetadata: true,
|
|
89
|
+
includeAttestation: true
|
|
90
|
+
},
|
|
91
|
+
'0',
|
|
92
|
+
2
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
console.log(latest.entries.itemListElement.length); // 2
|
|
96
|
+
console.log(latest.cursor); // 2
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
const revisionOne = await client.getRevision('aig:document-vertex-1', 1, {
|
|
101
|
+
includeBlobStorageData: true,
|
|
102
|
+
includeAttestation: true
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
console.log(revisionOne.documentRevision); // 1
|
|
106
|
+
console.log(revisionOne.documentId); // BOL-2026-0001
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
await client.removeRevision('aig:document-vertex-1', 1);
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
const matches = await client.query('BOL-2026-0001', '0', 10);
|
|
115
|
+
|
|
116
|
+
console.log(matches.entries.vertices.length); // 1
|
|
117
|
+
console.log(matches.cursor); // undefined
|
|
118
|
+
```
|
|
@@ -36,7 +36,7 @@ The configuration for the client.
|
|
|
36
36
|
|
|
37
37
|
## Properties
|
|
38
38
|
|
|
39
|
-
### CLASS\_NAME
|
|
39
|
+
### CLASS\_NAME {#class_name}
|
|
40
40
|
|
|
41
41
|
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ Runtime name for the class.
|
|
|
44
44
|
|
|
45
45
|
## Methods
|
|
46
46
|
|
|
47
|
-
### className()
|
|
47
|
+
### className() {#classname}
|
|
48
48
|
|
|
49
49
|
> **className**(): `string`
|
|
50
50
|
|
|
@@ -62,7 +62,7 @@ The class name of the component.
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
-
### create()
|
|
65
|
+
### create() {#create}
|
|
66
66
|
|
|
67
67
|
> **create**(`documentId`, `documentIdFormat`, `documentCode`, `blob`, `annotationObject?`, `auditableItemGraphEdges?`, `options?`): `Promise`\<`string`\>
|
|
68
68
|
|
|
@@ -80,9 +80,9 @@ The document id to create.
|
|
|
80
80
|
|
|
81
81
|
##### documentIdFormat
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
`string` \| `undefined`
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
The format of the document identifier.
|
|
86
86
|
|
|
87
87
|
##### documentCode
|
|
88
88
|
|
|
@@ -142,7 +142,7 @@ The auditable item graph vertex created for the document including its revision.
|
|
|
142
142
|
|
|
143
143
|
***
|
|
144
144
|
|
|
145
|
-
### update()
|
|
145
|
+
### update() {#update}
|
|
146
146
|
|
|
147
147
|
> **update**(`auditableItemGraphDocumentId`, `blob?`, `annotationObject?`, `auditableItemGraphEdges?`): `Promise`\<`void`\>
|
|
148
148
|
|
|
@@ -188,7 +188,7 @@ Nothing.
|
|
|
188
188
|
|
|
189
189
|
***
|
|
190
190
|
|
|
191
|
-
### get()
|
|
191
|
+
### get() {#get}
|
|
192
192
|
|
|
193
193
|
> **get**(`auditableItemGraphDocumentId`, `options?`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: `IDocumentList`; `cursor?`: `string`; \}\>
|
|
194
194
|
|
|
@@ -266,7 +266,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
266
266
|
|
|
267
267
|
***
|
|
268
268
|
|
|
269
|
-
### getRevision()
|
|
269
|
+
### getRevision() {#getrevision}
|
|
270
270
|
|
|
271
271
|
> **getRevision**(`auditableItemGraphDocumentId`, `revision`, `options?`): `Promise`\<`IDocument`\>
|
|
272
272
|
|
|
@@ -332,7 +332,7 @@ The documents and revisions if requested, ordered by revision descending, cursor
|
|
|
332
332
|
|
|
333
333
|
***
|
|
334
334
|
|
|
335
|
-
### removeRevision()
|
|
335
|
+
### removeRevision() {#removerevision}
|
|
336
336
|
|
|
337
337
|
> **removeRevision**(`auditableItemGraphDocumentId`, `revision`): `Promise`\<`void`\>
|
|
338
338
|
|
|
@@ -365,7 +365,7 @@ Nothing.
|
|
|
365
365
|
|
|
366
366
|
***
|
|
367
367
|
|
|
368
|
-
### query()
|
|
368
|
+
### query() {#query}
|
|
369
369
|
|
|
370
370
|
> **query**(`documentId`, `cursor?`, `limit?`): `Promise`\<\{ `entries`: `IAuditableItemGraphVertexList`; `cursor?`: `string`; \}\>
|
|
371
371
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/document-management-rest-client",
|
|
3
|
-
"version": "0.0.3-next.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-next.13",
|
|
4
|
+
"description": "REST client operations for creating, updating, retrieving, and querying managed documents.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/document-management.git",
|
|
8
8
|
"directory": "packages/document-management-rest-client"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -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.3-next.
|
|
22
|
+
"@twin.org/document-management-models": "0.0.3-next.13",
|
|
23
23
|
"@twin.org/entity": "next",
|
|
24
24
|
"@twin.org/nameof": "next",
|
|
25
25
|
"@twin.org/standards-unece": "next",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"rest-api"
|
|
55
55
|
],
|
|
56
56
|
"bugs": {
|
|
57
|
-
"url": "git+https://github.com/
|
|
57
|
+
"url": "git+https://github.com/iotaledger/document-management/issues"
|
|
58
58
|
},
|
|
59
59
|
"homepage": "https://twindev.org"
|
|
60
60
|
}
|