the current data context
the CHT datasource API
Verify if the user's role has all the permissions of any of the provided groups.
{string[][]} Array of groups of permissions due to the complexity of permission grouping
{string[]} Array of user roles.
{object} Object of configured permissions in CHT-Core's settings.
Verify if the user's role has the permission(s).
{string | string[]} Permission(s) to verify
{string[]} Array of user roles.
{object} Object of configured permissions in CHT-Core's settings.
Returns a generator for fetching all people with the given type.
Returns a person by their UUID.
Returns a person by their UUID along with the person's parent lineage.
the UUID of the person to retrieve
the person or null
if no person is found for the UUID
Returns an array of people for the provided page specifications.
getByType which provides the same data, but without having to manually account for paging
the type of people to return
the token identifying which page to retrieve. A null
value indicates the first page should be
returned. Subsequent pages can be retrieved by providing the cursor returned with the previous page.
the maximum number of people to return. Default is 100.
a page of people for the provided specifications
Returns a generator for fetching all places with the given type.
Returns a place by its UUID.
Returns a place by its UUID along with the place's parent lineage.
the UUID of the place to retrieve
the place or null
if no place is found for the UUID
Returns an array of places for the provided page specifications.
getByType which provides the same data, but without having to manually account for paging
the type of place to return
the token identifying which page to retrieve. A null
value indicates the first page should be
returned. Subsequent pages can be retrieved by providing the cursor returned with the previous page.
the maximum number of place to return. Default is 100.
a page of places for the provided specifications
Returns the source for CHT data.
Throws
Error if the provided context is invalid