@twin.org/data-processing-rest-client 0.0.3-next.1 → 0.0.3-next.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Data Processing REST Client
2
2
 
3
- Data processing contract implementation which can connect to REST endpoints.
3
+ REST client for calling data processing service endpoints from applications.
4
4
 
5
5
  ## Installation
6
6
 
package/docs/changelog.md CHANGED
@@ -1,24 +1,52 @@
1
- # @twin.org/data-processing-rest-client - Changelog
1
+ # Changelog
2
2
 
3
- ## [0.0.3-next.1](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.3-next.0...data-processing-rest-client-v0.0.3-next.1) (2025-11-11)
3
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.3-next.2...data-processing-rest-client-v0.0.3-next.3) (2026-05-20)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * add context id features ([#25](https://github.com/twinfoundation/data-processing/issues/25)) ([2a2a955](https://github.com/twinfoundation/data-processing/commit/2a2a9559d54e8c703e97e2c05996e678416ef560))
9
- * Add rule group query functionality ([#2](https://github.com/twinfoundation/data-processing/issues/2)) ([0fbbfb0](https://github.com/twinfoundation/data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
10
- * add validate-locales ([9af0874](https://github.com/twinfoundation/data-processing/commit/9af0874cd3f44a4cfca514dde8380f002e62337e))
11
- * eslint migration to flat config ([a8138b0](https://github.com/twinfoundation/data-processing/commit/a8138b020ed58baeff162a822d4df207a6aeadc4))
12
- * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/twinfoundation/data-processing/issues/9)) ([a2b36de](https://github.com/twinfoundation/data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
13
- * update dependencies ([21b8e80](https://github.com/twinfoundation/data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
14
- * update framework core ([96f6e80](https://github.com/twinfoundation/data-processing/commit/96f6e8016a4ef0fb873f6775e750b4ab42e9f491))
15
- * use shared store mechanism ([#6](https://github.com/twinfoundation/data-processing/issues/6)) ([6009228](https://github.com/twinfoundation/data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
8
+ * update dependencies ([0b2e77d](https://github.com/iotaledger/twin-data-processing/commit/0b2e77d673ede6e92847ff0b50fdfcf4e9c08b3b))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/data-processing-models bumped from 0.0.3-next.2 to 0.0.3-next.3
16
+
17
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.3-next.1...data-processing-rest-client-v0.0.3-next.2) (2026-05-11)
18
+
19
+
20
+ ### Features
21
+
22
+ * typescript 6 update ([b67debb](https://github.com/iotaledger/twin-data-processing/commit/b67debb8aff83c0f3b179c6db038ed733f7308b1))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/data-processing-models bumped from 0.0.3-next.1 to 0.0.3-next.2
30
+
31
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.3-next.0...data-processing-rest-client-v0.0.3-next.1) (2025-11-11)
32
+
33
+
34
+ ### Features
35
+
36
+ * add context id features ([#25](https://github.com/iotaledger/twin-data-processing/issues/25)) ([2a2a955](https://github.com/iotaledger/twin-data-processing/commit/2a2a9559d54e8c703e97e2c05996e678416ef560))
37
+ * Add rule group query functionality ([#2](https://github.com/iotaledger/twin-data-processing/issues/2)) ([0fbbfb0](https://github.com/iotaledger/twin-data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
38
+ * add validate-locales ([9af0874](https://github.com/iotaledger/twin-data-processing/commit/9af0874cd3f44a4cfca514dde8380f002e62337e))
39
+ * eslint migration to flat config ([a8138b0](https://github.com/iotaledger/twin-data-processing/commit/a8138b020ed58baeff162a822d4df207a6aeadc4))
40
+ * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/iotaledger/twin-data-processing/issues/9)) ([a2b36de](https://github.com/iotaledger/twin-data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
41
+ * update dependencies ([21b8e80](https://github.com/iotaledger/twin-data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
42
+ * update framework core ([96f6e80](https://github.com/iotaledger/twin-data-processing/commit/96f6e8016a4ef0fb873f6775e750b4ab42e9f491))
43
+ * use shared store mechanism ([#6](https://github.com/iotaledger/twin-data-processing/issues/6)) ([6009228](https://github.com/iotaledger/twin-data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
16
44
 
17
45
 
18
46
  ### Bug Fixes
19
47
 
20
- * supporting array usage ([#20](https://github.com/twinfoundation/data-processing/issues/20)) ([d2c68cd](https://github.com/twinfoundation/data-processing/commit/d2c68cd3983622586cc073377545d6416b87a827))
21
- * Update endpoint for fetching rule group list ([#3](https://github.com/twinfoundation/data-processing/issues/3)) ([919c1b4](https://github.com/twinfoundation/data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
48
+ * supporting array usage ([#20](https://github.com/iotaledger/twin-data-processing/issues/20)) ([d2c68cd](https://github.com/iotaledger/twin-data-processing/commit/d2c68cd3983622586cc073377545d6416b87a827))
49
+ * Update endpoint for fetching rule group list ([#3](https://github.com/iotaledger/twin-data-processing/issues/3)) ([919c1b4](https://github.com/iotaledger/twin-data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
22
50
 
23
51
 
24
52
  ### Dependencies
@@ -27,12 +55,12 @@
27
55
  * dependencies
28
56
  * @twin.org/data-processing-models bumped from 0.0.3-next.0 to 0.0.3-next.1
29
57
 
30
- ## [0.0.2-next.4](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.2-next.3...data-processing-rest-client-v0.0.2-next.4) (2025-10-22)
58
+ ## [0.0.2-next.4](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.2-next.3...data-processing-rest-client-v0.0.2-next.4) (2025-10-22)
31
59
 
32
60
 
33
61
  ### Bug Fixes
34
62
 
35
- * supporting array usage ([#20](https://github.com/twinfoundation/data-processing/issues/20)) ([d2c68cd](https://github.com/twinfoundation/data-processing/commit/d2c68cd3983622586cc073377545d6416b87a827))
63
+ * supporting array usage ([#20](https://github.com/iotaledger/twin-data-processing/issues/20)) ([d2c68cd](https://github.com/iotaledger/twin-data-processing/commit/d2c68cd3983622586cc073377545d6416b87a827))
36
64
 
37
65
 
38
66
  ### Dependencies
@@ -41,12 +69,12 @@
41
69
  * dependencies
42
70
  * @twin.org/data-processing-models bumped from 0.0.2-next.3 to 0.0.2-next.4
43
71
 
44
- ## [0.0.2-next.3](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.2-next.2...data-processing-rest-client-v0.0.2-next.3) (2025-10-09)
72
+ ## [0.0.2-next.3](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.2-next.2...data-processing-rest-client-v0.0.2-next.3) (2025-10-09)
45
73
 
46
74
 
47
75
  ### Features
48
76
 
49
- * add validate-locales ([9af0874](https://github.com/twinfoundation/data-processing/commit/9af0874cd3f44a4cfca514dde8380f002e62337e))
77
+ * add validate-locales ([9af0874](https://github.com/iotaledger/twin-data-processing/commit/9af0874cd3f44a4cfca514dde8380f002e62337e))
50
78
 
51
79
 
52
80
  ### Dependencies
@@ -55,12 +83,12 @@
55
83
  * dependencies
56
84
  * @twin.org/data-processing-models bumped from 0.0.2-next.2 to 0.0.2-next.3
57
85
 
58
- ## [0.0.2-next.2](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.2-next.1...data-processing-rest-client-v0.0.2-next.2) (2025-08-29)
86
+ ## [0.0.2-next.2](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.2-next.1...data-processing-rest-client-v0.0.2-next.2) (2025-08-29)
59
87
 
60
88
 
61
89
  ### Features
62
90
 
63
- * eslint migration to flat config ([a8138b0](https://github.com/twinfoundation/data-processing/commit/a8138b020ed58baeff162a822d4df207a6aeadc4))
91
+ * eslint migration to flat config ([a8138b0](https://github.com/iotaledger/twin-data-processing/commit/a8138b020ed58baeff162a822d4df207a6aeadc4))
64
92
 
65
93
 
66
94
  ### Dependencies
@@ -69,21 +97,21 @@
69
97
  * dependencies
70
98
  * @twin.org/data-processing-models bumped from 0.0.2-next.1 to 0.0.2-next.2
71
99
 
72
- ## [0.0.2-next.1](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.2-next.0...data-processing-rest-client-v0.0.2-next.1) (2025-08-20)
100
+ ## [0.0.2-next.1](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.2-next.0...data-processing-rest-client-v0.0.2-next.1) (2025-08-20)
73
101
 
74
102
 
75
103
  ### Features
76
104
 
77
- * Add rule group query functionality ([#2](https://github.com/twinfoundation/data-processing/issues/2)) ([0fbbfb0](https://github.com/twinfoundation/data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
78
- * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/twinfoundation/data-processing/issues/9)) ([a2b36de](https://github.com/twinfoundation/data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
79
- * update dependencies ([21b8e80](https://github.com/twinfoundation/data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
80
- * update framework core ([96f6e80](https://github.com/twinfoundation/data-processing/commit/96f6e8016a4ef0fb873f6775e750b4ab42e9f491))
81
- * use shared store mechanism ([#6](https://github.com/twinfoundation/data-processing/issues/6)) ([6009228](https://github.com/twinfoundation/data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
105
+ * Add rule group query functionality ([#2](https://github.com/iotaledger/twin-data-processing/issues/2)) ([0fbbfb0](https://github.com/iotaledger/twin-data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
106
+ * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/iotaledger/twin-data-processing/issues/9)) ([a2b36de](https://github.com/iotaledger/twin-data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
107
+ * update dependencies ([21b8e80](https://github.com/iotaledger/twin-data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
108
+ * update framework core ([96f6e80](https://github.com/iotaledger/twin-data-processing/commit/96f6e8016a4ef0fb873f6775e750b4ab42e9f491))
109
+ * use shared store mechanism ([#6](https://github.com/iotaledger/twin-data-processing/issues/6)) ([6009228](https://github.com/iotaledger/twin-data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
82
110
 
83
111
 
84
112
  ### Bug Fixes
85
113
 
86
- * Update endpoint for fetching rule group list ([#3](https://github.com/twinfoundation/data-processing/issues/3)) ([919c1b4](https://github.com/twinfoundation/data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
114
+ * Update endpoint for fetching rule group list ([#3](https://github.com/iotaledger/twin-data-processing/issues/3)) ([919c1b4](https://github.com/iotaledger/twin-data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
87
115
 
88
116
 
89
117
  ### Dependencies
@@ -97,16 +125,16 @@
97
125
 
98
126
  ### Features
99
127
 
100
- * Add rule group query functionality ([#2](https://github.com/twinfoundation/data-processing/issues/2)) ([0fbbfb0](https://github.com/twinfoundation/data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
101
- * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/twinfoundation/data-processing/issues/9)) ([a2b36de](https://github.com/twinfoundation/data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
102
- * release to production ([531ba89](https://github.com/twinfoundation/data-processing/commit/531ba89dea2deb2810870b72851dca3081f9d2ce))
103
- * update dependencies ([21b8e80](https://github.com/twinfoundation/data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
104
- * use shared store mechanism ([#6](https://github.com/twinfoundation/data-processing/issues/6)) ([6009228](https://github.com/twinfoundation/data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
128
+ * Add rule group query functionality ([#2](https://github.com/iotaledger/twin-data-processing/issues/2)) ([0fbbfb0](https://github.com/iotaledger/twin-data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
129
+ * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/iotaledger/twin-data-processing/issues/9)) ([a2b36de](https://github.com/iotaledger/twin-data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
130
+ * release to production ([531ba89](https://github.com/iotaledger/twin-data-processing/commit/531ba89dea2deb2810870b72851dca3081f9d2ce))
131
+ * update dependencies ([21b8e80](https://github.com/iotaledger/twin-data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
132
+ * use shared store mechanism ([#6](https://github.com/iotaledger/twin-data-processing/issues/6)) ([6009228](https://github.com/iotaledger/twin-data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
105
133
 
106
134
 
107
135
  ### Bug Fixes
108
136
 
109
- * Update endpoint for fetching rule group list ([#3](https://github.com/twinfoundation/data-processing/issues/3)) ([919c1b4](https://github.com/twinfoundation/data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
137
+ * Update endpoint for fetching rule group list ([#3](https://github.com/iotaledger/twin-data-processing/issues/3)) ([919c1b4](https://github.com/iotaledger/twin-data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
110
138
 
111
139
 
112
140
  ### Dependencies
@@ -115,7 +143,7 @@
115
143
  * dependencies
116
144
  * @twin.org/data-processing-models bumped from ^0.0.0 to ^0.0.1
117
145
 
118
- ## [0.0.1-next.16](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.1-next.15...data-processing-rest-client-v0.0.1-next.16) (2025-06-20)
146
+ ## [0.0.1-next.16](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.1-next.15...data-processing-rest-client-v0.0.1-next.16) (2025-06-20)
119
147
 
120
148
 
121
149
  ### Miscellaneous Chores
@@ -129,12 +157,12 @@
129
157
  * dependencies
130
158
  * @twin.org/data-processing-models bumped from 0.0.1-next.15 to 0.0.1-next.16
131
159
 
132
- ## [0.0.1-next.15](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.1-next.14...data-processing-rest-client-v0.0.1-next.15) (2025-06-12)
160
+ ## [0.0.1-next.15](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.1-next.14...data-processing-rest-client-v0.0.1-next.15) (2025-06-12)
133
161
 
134
162
 
135
163
  ### Features
136
164
 
137
- * update dependencies ([21b8e80](https://github.com/twinfoundation/data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
165
+ * update dependencies ([21b8e80](https://github.com/iotaledger/twin-data-processing/commit/21b8e8007c87136a09f0a8e35ffde13a07ff4711))
138
166
 
139
167
 
140
168
  ### Dependencies
@@ -143,12 +171,12 @@
143
171
  * dependencies
144
172
  * @twin.org/data-processing-models bumped from 0.0.1-next.14 to 0.0.1-next.15
145
173
 
146
- ## [0.0.1-next.14](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.1-next.13...data-processing-rest-client-v0.0.1-next.14) (2025-04-28)
174
+ ## [0.0.1-next.14](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.1-next.13...data-processing-rest-client-v0.0.1-next.14) (2025-04-28)
147
175
 
148
176
 
149
177
  ### Features
150
178
 
151
- * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/twinfoundation/data-processing/issues/9)) ([a2b36de](https://github.com/twinfoundation/data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
179
+ * pass the mimeTypeOverride through the component extract method ([#9](https://github.com/iotaledger/twin-data-processing/issues/9)) ([a2b36de](https://github.com/iotaledger/twin-data-processing/commit/a2b36de5c19c56e4172d3f22b176aa83e1df84c8))
152
180
 
153
181
 
154
182
  ### Dependencies
@@ -157,7 +185,7 @@
157
185
  * dependencies
158
186
  * @twin.org/data-processing-models bumped from 0.0.1-next.13 to 0.0.1-next.14
159
187
 
160
- ## [0.0.1-next.13](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.1-next.12...data-processing-rest-client-v0.0.1-next.13) (2025-04-24)
188
+ ## [0.0.1-next.13](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.1-next.12...data-processing-rest-client-v0.0.1-next.13) (2025-04-24)
161
189
 
162
190
 
163
191
  ### Miscellaneous Chores
@@ -171,12 +199,12 @@
171
199
  * dependencies
172
200
  * @twin.org/data-processing-models bumped from 0.0.1-next.12 to 0.0.1-next.13
173
201
 
174
- ## [0.0.1-next.12](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.1-next.11...data-processing-rest-client-v0.0.1-next.12) (2025-04-17)
202
+ ## [0.0.1-next.12](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.1-next.11...data-processing-rest-client-v0.0.1-next.12) (2025-04-17)
175
203
 
176
204
 
177
205
  ### Features
178
206
 
179
- * use shared store mechanism ([#6](https://github.com/twinfoundation/data-processing/issues/6)) ([6009228](https://github.com/twinfoundation/data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
207
+ * use shared store mechanism ([#6](https://github.com/iotaledger/twin-data-processing/issues/6)) ([6009228](https://github.com/iotaledger/twin-data-processing/commit/600922880acef07cc2f818dee7645c342929108b))
180
208
 
181
209
 
182
210
  ### Dependencies
@@ -185,17 +213,17 @@
185
213
  * dependencies
186
214
  * @twin.org/data-processing-models bumped from 0.0.1-next.11 to 0.0.1-next.12
187
215
 
188
- ## [0.0.1-next.11](https://github.com/twinfoundation/data-processing/compare/data-processing-rest-client-v0.0.1-next.10...data-processing-rest-client-v0.0.1-next.11) (2025-03-28)
216
+ ## [0.0.1-next.11](https://github.com/iotaledger/twin-data-processing/compare/data-processing-rest-client-v0.0.1-next.10...data-processing-rest-client-v0.0.1-next.11) (2025-03-28)
189
217
 
190
218
 
191
219
  ### Features
192
220
 
193
- * Add rule group query functionality ([#2](https://github.com/twinfoundation/data-processing/issues/2)) ([0fbbfb0](https://github.com/twinfoundation/data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
221
+ * Add rule group query functionality ([#2](https://github.com/iotaledger/twin-data-processing/issues/2)) ([0fbbfb0](https://github.com/iotaledger/twin-data-processing/commit/0fbbfb065b6ecc293920b25f97ba011743105486))
194
222
 
195
223
 
196
224
  ### Bug Fixes
197
225
 
198
- * Update endpoint for fetching rule group list ([#3](https://github.com/twinfoundation/data-processing/issues/3)) ([919c1b4](https://github.com/twinfoundation/data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
226
+ * Update endpoint for fetching rule group list ([#3](https://github.com/iotaledger/twin-data-processing/issues/3)) ([919c1b4](https://github.com/iotaledger/twin-data-processing/commit/919c1b435e760251ca57f96ed9f701b08542f318))
199
227
 
200
228
 
201
229
  ### Dependencies
package/docs/examples.md CHANGED
@@ -1 +1,61 @@
1
- # @twin.org/data-processing-rest-client - Examples
1
+ # Data Processing REST Client Examples
2
+
3
+ These snippets show how to connect to a running service, maintain rule groups, and call extraction and conversion endpoints.
4
+
5
+ ## DataProcessingRestClient
6
+
7
+ ```typescript
8
+ import { ObjectHelper } from '@twin.org/core';
9
+ import type { IRuleGroup } from '@twin.org/data-processing-models';
10
+ import { DataProcessingRestClient } from '@twin.org/data-processing-rest-client';
11
+
12
+ const client = new DataProcessingRestClient({ endpoint: 'http://localhost:8080' });
13
+
14
+ console.log(client.className()); // dataProcessingRestClient
15
+
16
+ const ruleGroup: IRuleGroup = {
17
+ id: 'orders-summary',
18
+ label: 'Orders Summary',
19
+ rules: [
20
+ { source: '$.orders[*].id', target: 'orderIds' },
21
+ { source: '$.orders[*].total', target: 'totals' }
22
+ ]
23
+ };
24
+
25
+ await client.ruleGroupSet(ruleGroup);
26
+
27
+ const saved = await client.ruleGroupGet('orders-summary');
28
+ console.log(saved); // { id: 'orders-summary', label: 'Orders Summary', rules: [ { source: '$.orders[*].id', target: 'orderIds' }, { source: '$.orders[*].total', target: 'totals' } ] }
29
+ ```
30
+
31
+ ```typescript
32
+ import { ObjectHelper } from '@twin.org/core';
33
+ import { DataProcessingRestClient } from '@twin.org/data-processing-rest-client';
34
+
35
+ const client = new DataProcessingRestClient({ endpoint: 'http://localhost:8080' });
36
+
37
+ const payload = ObjectHelper.toBytes({
38
+ orders: [
39
+ { id: 'A-100', total: 19.99 },
40
+ { id: 'A-101', total: 24.5 }
41
+ ]
42
+ });
43
+
44
+ const extracted = await client.extract('orders-summary', payload);
45
+ console.log(extracted); // { orderIds: ['A-100', 'A-101'], totals: [19.99, 24.5] }
46
+
47
+ const converted = await client.convert(payload, 'application/json');
48
+ console.log(converted); // { orders: [ { id: 'A-100', total: 19.99 }, { id: 'A-101', total: 24.5 } ] }
49
+ ```
50
+
51
+ ```typescript
52
+ import { DataProcessingRestClient } from '@twin.org/data-processing-rest-client';
53
+
54
+ const client = new DataProcessingRestClient({ endpoint: 'http://localhost:8080' });
55
+
56
+ const listed = await client.query(undefined, 10);
57
+ console.log(listed.entities.length); // 1
58
+ console.log(listed.cursor); // undefined
59
+
60
+ await client.ruleGroupRemove('orders-summary');
61
+ ```
@@ -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
- ### ruleGroupSet()
65
+ ### ruleGroupSet() {#rulegroupset}
66
66
 
67
67
  > **ruleGroupSet**(`ruleGroup`): `Promise`\<`void`\>
68
68
 
@@ -88,7 +88,7 @@ Nothing.
88
88
 
89
89
  ***
90
90
 
91
- ### ruleGroupGet()
91
+ ### ruleGroupGet() {#rulegroupget}
92
92
 
93
93
  > **ruleGroupGet**(`ruleGroupId`): `Promise`\<`IRuleGroup`\>
94
94
 
@@ -114,7 +114,7 @@ The rule group.
114
114
 
115
115
  ***
116
116
 
117
- ### ruleGroupRemove()
117
+ ### ruleGroupRemove() {#rulegroupremove}
118
118
 
119
119
  > **ruleGroupRemove**(`ruleGroupId`): `Promise`\<`void`\>
120
120
 
@@ -140,7 +140,7 @@ Nothing.
140
140
 
141
141
  ***
142
142
 
143
- ### extract()
143
+ ### extract() {#extract}
144
144
 
145
145
  > **extract**(`ruleGroupId`, `data`, `overrideExtractorType?`, `overrideMimeType?`): `Promise`\<`unknown`\>
146
146
 
@@ -184,7 +184,7 @@ The extracted data.
184
184
 
185
185
  ***
186
186
 
187
- ### convert()
187
+ ### convert() {#convert}
188
188
 
189
189
  > **convert**(`data`, `overrideMimeType?`): `Promise`\<`unknown`\>
190
190
 
@@ -216,7 +216,7 @@ The converted data.
216
216
 
217
217
  ***
218
218
 
219
- ### query()
219
+ ### query() {#query}
220
220
 
221
221
  > **query**(`cursor?`, `limit?`): `Promise`\<\{ `entities`: `IRuleGroup`[]; `cursor?`: `string`; \}\>
222
222
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/data-processing-rest-client",
3
- "version": "0.0.3-next.1",
4
- "description": "Data processing contract implementation which can connect to REST endpoints",
3
+ "version": "0.0.3-next.3",
4
+ "description": "REST client for calling data processing service endpoints from applications",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/data-processing.git",
7
+ "url": "git+https://github.com/iotaledger/data-processing.git",
8
8
  "directory": "packages/data-processing-rest-client"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -17,7 +17,7 @@
17
17
  "@twin.org/api-core": "next",
18
18
  "@twin.org/api-models": "next",
19
19
  "@twin.org/core": "next",
20
- "@twin.org/data-processing-models": "0.0.3-next.1",
20
+ "@twin.org/data-processing-models": "0.0.3-next.3",
21
21
  "@twin.org/entity": "next",
22
22
  "@twin.org/nameof": "next",
23
23
  "@twin.org/web": "next"
@@ -51,7 +51,7 @@
51
51
  "conversion"
52
52
  ],
53
53
  "bugs": {
54
- "url": "git+https://github.com/twinfoundation/data-processing/issues"
54
+ "url": "git+https://github.com/iotaledger/data-processing/issues"
55
55
  },
56
56
  "homepage": "https://twindev.org"
57
57
  }