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

feat(#9065): add cht-datasource to support get person by uuid #9090

Merged
merged 45 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
de6b864
Move cht-script-api to cht-datasource
jkuester May 2, 2024
b429273
Clean up auth.js to fix Sonar
jkuester May 2, 2024
b63981e
Switch cht-datasource to be built with tsc
jkuester May 3, 2024
1701082
Use cht-datasource as TS lib in webapp
jkuester May 3, 2024
1f1961a
Fix up the -watch commands to listen for changes to cht-datasource
jkuester May 3, 2024
eb7e4b2
Clean up index code for cht-datasource
jkuester May 3, 2024
463f002
Tweak up tsconfig options. Generating source maps for debugging and e…
jkuester May 3, 2024
c2dc2df
Add cht-datasource support for getting a person
jkuester May 7, 2024
b00c298
Get ambient types working - tests broken
jkuester May 10, 2024
af16a8c
Make hard separation between local and remote
jkuester May 10, 2024
b508bc9
Take the parallel route where functions are available, but the base d…
jkuester May 13, 2024
c743fb2
Clean up cht-datasource based on Mokhtar's suggestions
jkuester May 13, 2024
149dcde
Clean up cht-datasource based on Mokhtar's suggestions
jkuester May 13, 2024
6b5e32c
Merge remote-tracking branch 'origin/9065_get_contact_by_id' into 906…
jkuester May 13, 2024
0a5e7f6
Refactor cht-datasource to support different access methodologies and…
jkuester May 14, 2024
f4cc564
Merge branch 'refs/heads/master' into 9065_get_contact_by_id
jkuester May 14, 2024
b2b3585
Fix linking issue with @medic/logger
jkuester May 14, 2024
ef8b511
Add cht-datasource unit tests
jkuester May 15, 2024
c87de8a
Fix webapp tests
jkuester May 15, 2024
5196de4
Clean everything up
jkuester May 15, 2024
640abab
Remove unnecessary eslint config
jkuester May 15, 2024
2a53e9d
Add eslint-plugin-jsdoc and require all exported entities have doc
jkuester May 17, 2024
fcd0c21
Update jsdocs to remove redundant documentation and expand other docs…
jkuester May 20, 2024
2039d74
Move Local Data Context code to be in `./local`
jkuester May 20, 2024
e5730b6
Move Remote Data Context code to be in `./remote`
jkuester May 20, 2024
6f8c428
Restructure data context code and add logging
jkuester May 22, 2024
266a9e8
Refactor V1 namespace to v1
jkuester May 22, 2024
6f7e3ff
Merge branch 'refs/heads/master' into 9065_get_contact_by_id
jkuester May 22, 2024
f4174ac
Remove request-promise-native from cht-datasouce since it broke webapp.
jkuester May 22, 2024
871c1ea
Update sentinel to use local data context
jkuester May 22, 2024
5c5469d
Update cht-datasource README to point to TSDoc
jkuester May 22, 2024
c454405
Add some development instructions to the cht-datasource README docs
jkuester May 22, 2024
1b81b78
Include doc on backwards compatibility of the API
jkuester May 22, 2024
d95beaa
Update cht-datasource DataContext to be able to run provided function…
jkuester May 24, 2024
738e4b4
Add support for /api/v1/person/:uuid endpoint
jkuester May 24, 2024
bbeece8
Add integration tests for /api/v1/person/:uuid api
jkuester May 24, 2024
9110233
Clean things up
jkuester May 24, 2024
815f920
Rename CHTScriptApiService to CHTDatasourceService
jkuester Jun 10, 2024
fa3e041
Rename getApi to just get
jkuester Jun 10, 2024
3128337
Rename cht-script-api.service file to be cht-datasource.service
jkuester Jun 10, 2024
d3b9532
Change DataContext.get to DataContext.bind
jkuester Jun 10, 2024
9ab853d
Merge branch 'refs/heads/master' into 9065_get_contact_by_id
jkuester Jun 10, 2024
45411d3
Watch cht-datasource when running dev-api
jkuester Jun 10, 2024
a22df65
Fix sonar issues
jkuester Jun 10, 2024
9dac6fe
Merge branch 'refs/heads/master' into 9065_get_contact_by_id
jkuester Jun 11, 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
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"api/src/public/login/lib-bowser.js",
"build/**",
"jsdocs/**",
"shared-libs/cht-datasource/dist/**",
"tests/scalability/report*/**",
"tests/scalability/jmeter/**",
"webapp/src/ts/providers/xpath-element-path.provider.ts"
Expand Down
4 changes: 2 additions & 2 deletions admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions admin/src/js/services/auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const chtScriptApi = require('@medic/cht-script-api');
const cht = require('@medic/cht-datasource');
const chtDatasource = cht.getDatasource(cht.getRemoteDataContext());

jkuester marked this conversation as resolved.
Show resolved Hide resolved
angular.module('inboxServices').factory('Auth',
function(
Expand Down Expand Up @@ -36,7 +37,7 @@ angular.module('inboxServices').factory('Auth',
return false;
}

return chtScriptApi.v1.hasAnyPermission(permissionsGroupList, userCtx.roles, settings.permissions);
return chtDatasource.v1.hasAnyPermission(permissionsGroupList, userCtx.roles, settings.permissions);
})
.catch(() => false);
};
Expand All @@ -62,7 +63,7 @@ angular.module('inboxServices').factory('Auth',
return false;
}

return chtScriptApi.v1.hasPermissions(permissions, userCtx.roles, settings.permissions);
return chtDatasource.v1.hasPermissions(permissions, userCtx.roles, settings.permissions);
})
.catch(() => false);
};
Expand Down
2 changes: 1 addition & 1 deletion api/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"allowModules": [
"@medic/bulk-docs-utils",
"@medic/cht-script-api",
"@medic/cht-datasource",
"@medic/contact-types-utils",
"@medic/contacts",
"@medic/couch-request",
Expand Down
Loading
Loading