Releases: UN-OCHA/hpc-api-core
Define bigint and numeric columns as a union of string and number
Columns with type int8
/bigint
and numeric
in PostgreSQL, which were previously defined with t.bigint
and t.number
codecs respectively, are defined as a union of t.string
and t.number
now (#62)
Define most of the remaining models
Following models have been defined (#46): blueprint
, cache
, category
, categoryGroup
, categoryRef
, client
, currency
, disaggregationCategory
, disaggregationCategoryGroup
, disaggregationModel
, emergency
, emergencyLocation
, endpointLog
, endpointUsage
, externalData
, externalReference
, fileAssetEntity
, fileRecord
, flow
, flowLink
, flowObject
, flowObjectType
, globalCluster
, globalClusterAssociation
, globalIndicator
, iatiActivity
, iatiPublisher
, iatiRecipientCountry
, iatiTransaction
, job
, jobAssociation
, measurement
, measurementVersion
, organizationLocation
, participantCountry
, participantOrganization
, planEmergency
, planLocation
, planReportingPeriod
, planTag
, procedureEntityPrototype
, procedureSection
, procedureSectionField
, projectGlobalClusters
, projectLocations
, projectVersionComment
, projectVersionPlanEntity
, tag
, task
, unit
, unitType
and workflowStatusOptionStep
.
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)