@openfn/language-dhis2 7.1.1 → 7.1.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/dist/index.cjs CHANGED
@@ -191,7 +191,7 @@ async function request(configuration, requestData) {
191
191
 
192
192
  // src/meta/helper.js
193
193
  var createHelper = (configuration = {}) => {
194
- const { username, password } = configuration;
194
+ const { username, password, hostUrl } = configuration;
195
195
  const get3 = (url) => (0, import_axios.default)({
196
196
  url,
197
197
  headers: { "Content-Type": "application/json" },
@@ -218,14 +218,14 @@ var createHelper = (configuration = {}) => {
218
218
  };
219
219
  const getOrgUnits = async () => {
220
220
  const url = prefixVersionToPath(configuration, {}, "organisationUnits");
221
- const response = await get3(url);
221
+ const response = await get3(`${hostUrl}${url}`);
222
222
  return response.data;
223
223
  };
224
224
  const getPrograms = () => {
225
225
  };
226
226
  const getTrackedEntityTypes = async () => {
227
227
  const url = prefixVersionToPath(configuration, {}, "trackedEntityTypes");
228
- const response = await get3(url);
228
+ const response = await get3(`${hostUrl}${url}`);
229
229
  return response.data;
230
230
  };
231
231
  const getAttributes = async () => {
@@ -234,7 +234,7 @@ var createHelper = (configuration = {}) => {
234
234
  {},
235
235
  "trackedEntityAttributes"
236
236
  );
237
- const response = await get3(url);
237
+ const response = await get3(`${hostUrl}${url}`);
238
238
  return response.data;
239
239
  };
240
240
  return {
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ async function request(configuration, requestData) {
144
144
 
145
145
  // src/meta/helper.js
146
146
  var createHelper = (configuration = {}) => {
147
- const { username, password } = configuration;
147
+ const { username, password, hostUrl } = configuration;
148
148
  const get3 = (url) => axios({
149
149
  url,
150
150
  headers: { "Content-Type": "application/json" },
@@ -171,14 +171,14 @@ var createHelper = (configuration = {}) => {
171
171
  };
172
172
  const getOrgUnits = async () => {
173
173
  const url = prefixVersionToPath(configuration, {}, "organisationUnits");
174
- const response = await get3(url);
174
+ const response = await get3(`${hostUrl}${url}`);
175
175
  return response.data;
176
176
  };
177
177
  const getPrograms = () => {
178
178
  };
179
179
  const getTrackedEntityTypes = async () => {
180
180
  const url = prefixVersionToPath(configuration, {}, "trackedEntityTypes");
181
- const response = await get3(url);
181
+ const response = await get3(`${hostUrl}${url}`);
182
182
  return response.data;
183
183
  };
184
184
  const getAttributes = async () => {
@@ -187,7 +187,7 @@ var createHelper = (configuration = {}) => {
187
187
  {},
188
188
  "trackedEntityAttributes"
189
189
  );
190
- const response = await get3(url);
190
+ const response = await get3(`${hostUrl}${url}`);
191
191
  return response.data;
192
192
  };
193
193
  return {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@openfn/language-dhis2",
3
3
  "label": "DHIS2",
4
- "version": "7.1.1",
5
- "description": "DHIS2 Language Pack for OpenFn",
4
+ "version": "7.1.3",
5
+ "description": "OpenFn adaptor for DHIS2",
6
6
  "homepage": "https://docs.openfn.org",
7
7
  "repository": {
8
8
  "type": "git",
@@ -29,7 +29,7 @@
29
29
  "axios": "^1.8.2",
30
30
  "lodash": "^4.17.21",
31
31
  "qs": "^6.11.0",
32
- "@openfn/language-common": "3.0.1"
32
+ "@openfn/language-common": "3.0.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "assertion-error": "2.0.0",