@openfn/language-dhis2 4.0.3 → 4.0.5
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/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -146,7 +146,7 @@ var createHelper = (configuration = {}) => {
|
|
|
146
146
|
return response.data;
|
|
147
147
|
};
|
|
148
148
|
const getAttributes = async () => {
|
|
149
|
-
const url = generateUrl(configuration, {}, "
|
|
149
|
+
const url = generateUrl(configuration, {}, "trackedEntityAttributes");
|
|
150
150
|
const response = await get2(url);
|
|
151
151
|
return response.data;
|
|
152
152
|
};
|
|
@@ -182,7 +182,7 @@ var metadata = async (configuration = {}, helper) => {
|
|
|
182
182
|
})
|
|
183
183
|
)) ?? [];
|
|
184
184
|
const attributes = await helper.getAttributes() ?? [];
|
|
185
|
-
children.attributes = ((_b = attributes.
|
|
185
|
+
children.attributes = ((_b = attributes.trackedEntityAttributes) == null ? void 0 : _b.map(
|
|
186
186
|
(attr2) => (0, import_metadata.createEntity)(attr2.id, "attribute", {
|
|
187
187
|
datatype: "string",
|
|
188
188
|
label: attr2.displayName
|
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ var createHelper = (configuration = {}) => {
|
|
|
97
97
|
return response.data;
|
|
98
98
|
};
|
|
99
99
|
const getAttributes = async () => {
|
|
100
|
-
const url = generateUrl(configuration, {}, "
|
|
100
|
+
const url = generateUrl(configuration, {}, "trackedEntityAttributes");
|
|
101
101
|
const response = await get2(url);
|
|
102
102
|
return response.data;
|
|
103
103
|
};
|
|
@@ -133,7 +133,7 @@ var metadata = async (configuration = {}, helper) => {
|
|
|
133
133
|
})
|
|
134
134
|
)) ?? [];
|
|
135
135
|
const attributes = await helper.getAttributes() ?? [];
|
|
136
|
-
children.attributes = ((_b = attributes.
|
|
136
|
+
children.attributes = ((_b = attributes.trackedEntityAttributes) == null ? void 0 : _b.map(
|
|
137
137
|
(attr2) => createEntity(attr2.id, "attribute", {
|
|
138
138
|
datatype: "string",
|
|
139
139
|
label: attr2.displayName
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-dhis2",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "DHIS2 Language Pack for OpenFn",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"configuration-schema.json"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@openfn/language-common": "^1.
|
|
27
|
+
"@openfn/language-common": "^1.13.2",
|
|
28
28
|
"axios": "^0.24.0",
|
|
29
|
-
"lodash": "^4.17.
|
|
29
|
+
"lodash": "^4.17.21",
|
|
30
30
|
"qs": "^6.11.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|