@openfn/language-dhis2 5.0.5 → 5.0.6
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/ast.json +13 -2
- package/package.json +2 -2
package/ast.json
CHANGED
|
@@ -1186,7 +1186,7 @@
|
|
|
1186
1186
|
"operation"
|
|
1187
1187
|
],
|
|
1188
1188
|
"docs": {
|
|
1189
|
-
"description": "
|
|
1189
|
+
"description": "Iterates over an array of items and invokes an operation upon each one, where the state\nobject is _scoped_ so that state.data is the item under iteration.\nThe rest of the state object is untouched and can be referenced as usual.\nYou can pass an array directly, or use lazy state or a JSONPath string to\nreference a slice of state.",
|
|
1190
1190
|
"tags": [
|
|
1191
1191
|
{
|
|
1192
1192
|
"title": "public",
|
|
@@ -1200,7 +1200,18 @@
|
|
|
1200
1200
|
},
|
|
1201
1201
|
{
|
|
1202
1202
|
"title": "example",
|
|
1203
|
-
"description": "each(\
|
|
1203
|
+
"description": "each(\n $.data,\n // Inside the callback operation, `$.data` is scoped to the item under iteration\n insert(\"patient\", {\n patient_name: $.data.properties.case_name,\n patient_id: $.data.case_id,\n })\n);",
|
|
1204
|
+
"caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"title": "example",
|
|
1208
|
+
"description": "each(\n $.data,\n insert(\"patient\", (state) => ({\n patient_id: state.data.case_id,\n ...state.data\n }))\n);",
|
|
1209
|
+
"caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"title": "example",
|
|
1213
|
+
"description": "each(\n \"$.data[*]\",\n insert(\"patient\", (state) => ({\n patient_name: state.data.properties.case_name,\n patient_id: state.data.case_id,\n }))\n);",
|
|
1214
|
+
"caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
|
|
1204
1215
|
},
|
|
1205
1216
|
{
|
|
1206
1217
|
"title": "param",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-dhis2",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"description": "DHIS2 Language Pack for OpenFn",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"axios": "^1.7.7",
|
|
29
29
|
"lodash": "^4.17.21",
|
|
30
30
|
"qs": "^6.11.0",
|
|
31
|
-
"@openfn/language-common": "2.1.
|
|
31
|
+
"@openfn/language-common": "2.1.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"assertion-error": "2.0.0",
|