Releases: UN-OCHA/hpc-api-core
Releases · UN-OCHA/hpc-api-core
Define budget segment models
Expose `DISAGGREGATED_LOCATIONS` codec
Extract DISAGGREGATED_LOCATIONS
codec out from DISAGGREGATED_DATA
and expose it (#55)
Add ability to get current and latest versions of project plans
Extend getAllProjectsForPlan
utility method to support both 'current'
and 'latest'
versions (#54)
Define permissions for deleting projects
- Define permissions for deleting projects (#53)
DELETE_ANY_PROJECT
(global
scope)DELETE
(project
scope)
Reduce timestamp precision of `createdAt` and `updatedAt`
To allow for cooperation between other (legacy) models and models defined in this library, cut the precision of updatedAt
and createdAt
to 3, for seqeulize defined models (#51)
Define error classes and condition field related models
- Improve error messages related to model data access to make debugging easier (#36)
- Introduce
findAndOrganizeObjectsByUniqueProperty
fetching function that combines a database fetch with anorganizeObjectsByUniqueValue
call to produce a map that is annotated with the table name of the objects contained within. Utility methodgetRequiredData
should be use to interact with this annotated map (#36): - Expose
createMany
interface for creating multiple rows inside a table at once (#47) - Define condition field related models (#48)
conditionField
conditionFieldType
conditionFieldReliesOn
- Define more error classes (#49)
BadRequestError
NotFoundError
PreconditionFailedError
Accept `null` for optional user data
When providing data to model's create
method, null
is now accepted for columns marked as optional
(#43)
Define utility types and relax json types
- Introduce permissions to allow for plan visibility changes in PM: (#40)
CHANGE_ANY_PLAN_VISIBILITY_IN_PROJECTS
MAKE_VISIBLE_IN_PROJECTS
- Introduce
EmptyTuple
type andEMPTY_TUPLE
codec (#39) - Define type for
projectVersionAttachment.value
(#39) - Handle
planEntityVersions
with nullplanEntityIds
(#39) - Allow for partially-defined indicator units (#39)
Define more models
Make the package standalone, improve errors and define lots of utility and data fetching methods
- Specify
@types/lodash
and@types/node-fetch
as regular dependencies to make this library usable by just installing in other repos (#34) - Introduce
groupObjectsByValue
andorganizeObjectsByUniqueValue
utility functions (#32) - Improve the errors produced when validating data by including identifiable information in the error messages, and giving more human-readable error messages to the user, which should improve debugging going forward. (#32)
- Expand/correct type definitions for columns of
attachmentPrototype
andattachmentVersion
(#32) - Migrate
indexedObjectType
fromhpc_service
to this repo (#32) - Migrate JSON definitions for caseloads and attachments (#32)
- Introduce following data fetching methods that allow to get all (#33):
- Governing entities for a plan -
getAllGoverningEntitiesForPlan
- Plan entities of a plan (which are also validated) -
getAndValidateAllPlanEntities
- Projects for a given plan -
getAllProjectsForPlan
- Attachments of a plan (with a given type) -
getAllAttachments
- Governing entities for a plan -
- Define
projectVersionField
model (#35)