Skip to content

Releases: UN-OCHA/hpc-api-core

Define bigint and numeric columns as a union of string and number

01 Dec 17:55
10fb9af
Compare
Choose a tag to compare

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

30 Nov 17:16
fa37611
Compare
Choose a tag to compare

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

26 Nov 16:16
1277452
Compare
Choose a tag to compare
  • Introduce getGoverningEntityIDsForProjects utility method (#50)
  • Define budget segment models (#58)
    • budgetSegment
    • budgetSegmentBreakdown
    • budgetSegmentBreakdownEntity
  • Fix the method to get current and latest project versions in getAllProjectsForPlan (#60)

Expose `DISAGGREGATED_LOCATIONS` codec

25 Nov 09:59
b32dc35
Compare
Choose a tag to compare

Extract DISAGGREGATED_LOCATIONS codec out from DISAGGREGATED_DATA and expose it (#55)

Add ability to get current and latest versions of project plans

24 Nov 17:46
4a97801
Compare
Choose a tag to compare

Extend getAllProjectsForPlan utility method to support both 'current' and 'latest' versions (#54)

Define permissions for deleting projects

23 Nov 21:43
7e144a8
Compare
Choose a tag to compare
  • Define permissions for deleting projects (#53)
    • DELETE_ANY_PROJECT (global scope)
    • DELETE (project scope)

Reduce timestamp precision of `createdAt` and `updatedAt`

23 Nov 16:26
4c7650e
Compare
Choose a tag to compare

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

17 Nov 13:19
12c54af
Compare
Choose a tag to compare
  • Improve error messages related to model data access to make debugging easier (#36)
  • Introduce findAndOrganizeObjectsByUniqueProperty fetching function that combines a database fetch with an organizeObjectsByUniqueValue call to produce a map that is annotated with the table name of the objects contained within. Utility method getRequiredData 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

11 Nov 16:48
ed23632
Compare
Choose a tag to compare

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

11 Nov 12:03
@s0 s0
Compare
Choose a tag to compare
  • Introduce permissions to allow for plan visibility changes in PM: (#40)
    • CHANGE_ANY_PLAN_VISIBILITY_IN_PROJECTS
    • MAKE_VISIBLE_IN_PROJECTS
  • Introduce EmptyTuple type and EMPTY_TUPLE codec (#39)
  • Define type for projectVersionAttachment.value (#39)
  • Handle planEntityVersions with null planEntityIds (#39)
  • Allow for partially-defined indicator units (#39)