Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhis2: Update tracked entities endpoints to V42 #819

Merged
merged 41 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6cb5377
add warning for breaking versions
hunterachieng Nov 7, 2024
a2451d9
update readme
hunterachieng Nov 7, 2024
46243c7
fix: add link in readMe
hunterachieng Nov 7, 2024
d2b77ed
update docs
hunterachieng Nov 7, 2024
d793d75
update readme docs
hunterachieng Nov 7, 2024
dc052e5
fix console warning and changeset
hunterachieng Nov 7, 2024
0d086c1
fix: remove brackets and add version in readMe
hunterachieng Nov 8, 2024
f00ffd6
feat: update get for new v42
hunterachieng Nov 11, 2024
31839d1
Merge branch 'main' of github.com:OpenFn/adaptors into feat/754-dhis2…
hunterachieng Nov 11, 2024
6e064cd
fix: update delete, update, and create for tracker
hunterachieng Nov 11, 2024
43aebf2
upate import strategy
hunterachieng Nov 12, 2024
6f1e497
implement upsert and fix resolvedPath
hunterachieng Nov 12, 2024
b44a3b1
fix examples and use tracker regex
hunterachieng Nov 13, 2024
8a464cb
fix resolvedOptions
hunterachieng Nov 13, 2024
dab76c4
implement generic post
hunterachieng Nov 13, 2024
deadfe0
fix: add tests
hunterachieng Nov 13, 2024
177a64a
fix add more tests and fix use new tracker
hunterachieng Nov 14, 2024
66a3bcd
update regex
hunterachieng Nov 15, 2024
25ed340
fix reduce version
hunterachieng Nov 16, 2024
d30f39f
dhis2: update changelog
josephjclark Nov 20, 2024
5fdba74
dhis2: tweak warnings
josephjclark Nov 20, 2024
cbc787c
dhis2: ast
josephjclark Nov 20, 2024
94be282
dhis2: fix integration tests
josephjclark Nov 20, 2024
2ed5ea8
Merge branch 'dhis2-integration-tests' into feat/754-dhis2-update
hunterachieng Nov 21, 2024
246d0d9
fix integration tests
hunterachieng Nov 21, 2024
eca2798
fix: aupdated get tests
hunterachieng Nov 21, 2024
929206b
fix remove unused path
hunterachieng Nov 22, 2024
32c3191
improve docs and default async to false
mtuchi Nov 22, 2024
4467255
update tracker functions
mtuchi Nov 26, 2024
3239022
add tracker example
mtuchi Nov 26, 2024
7aabaa9
Merge branch 'main' into feat/754-dhis2-update
mtuchi Nov 26, 2024
eae4dbc
fix test
mtuchi Nov 26, 2024
120f659
update changeset
mtuchi Nov 27, 2024
8a0a070
update examples
mtuchi Nov 27, 2024
8531e46
use Array.isArray
mtuchi Nov 27, 2024
3c79681
update example
mtuchi Nov 27, 2024
f67008b
remove unused code
mtuchi Nov 27, 2024
4f7f83c
dhis2: tweak notes and warnings
josephjclark Nov 28, 2024
82b1756
dhis2: typo
josephjclark Nov 28, 2024
33438e4
dhis2: update migration guide
josephjclark Nov 28, 2024
47ba230
dhis2: 6.0.0
josephjclark Nov 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions packages/dhis2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,70 @@
# @openfn/language-dhis2

## 6.0.0

### Major Changes

- b44a3b1: Migrates the adaptor to the new Tracker API (v36+) for
`trackedEntities`, `enrollments`, `events` and `relationships`. Note that
`trackedEntities` is no longer used.

This release is designed for compatibility with DHIS2 v42, which drops support
for a number of endpoints.

The `create`, `update`, `upsert` and `destroy` functions will automatically
map affected resources to the new tracker API endpoint.

If you have an existing workflow which uses these functions with
`trackedEntities`, `enrollments`, `events` or `relationships`, the data and
options you pass may be incompatible with the new tracker API. You should
review your code carefully against the
[DHIS2 Tracker Migration Guide](https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-241/tracker-deprecated.html#webapi_tracker_migration)
to see what's changed.

For example, if you used to do:

```js
create('trackedEntityInstances', {
/*...*/
});
```

You should now do:

```js
create('trackedEntities', {
/*...*/
});
```

The payloads have also changed shape, so for example if you used to:

```js
create('events', {
trackedEntityInstance: 'eBAyeGv0exc',
eventDate: '2024-01-01',
/* ... */
});
```

You should now do:

```js
create('events', {
trackedEntity: 'eBAyeGv0exc',
occurredAt: '2024-01-01',
/* ... */
});
```

The HTTP APIs `get()`, `patch()`, and `post()` do not automatically map to the
new tracker: they continue to call the URL you provide with the data you send.
You can use this to continue to call the old tracker API directly.

### Minor Changes

- d30f39f: Added new post() operation

## 5.0.8

### Patch Changes
Expand Down
277 changes: 234 additions & 43 deletions packages/dhis2/ast.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/dhis2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfn/language-dhis2",
"version": "5.0.8",
"version": "6.0.0",
"description": "DHIS2 Language Pack for OpenFn",
"homepage": "https://docs.openfn.org",
"repository": {
Expand Down
Loading