Skip to content

Releases: UN-OCHA/hpc-api-core

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)

Define more models

10 Nov 18:06
1c1c8fd
Compare
Choose a tag to compare
  • Define following models:
    • organization (#41)
    • projectContact (#42)
    • projectVersionGoverningEntity (#38)
    • projectVersionHistory (#38)
    • projectVersionOrganization (#42)
  • Define getOrganizationIDsForProjects utility method (#41)

Make the package standalone, improve errors and define lots of utility and data fetching methods

08 Nov 13:54
5c1e5bb
Compare
Choose a tag to compare
  • Specify @types/lodash and @types/node-fetch as regular dependencies to make this library usable by just installing in other repos (#34)
  • Introduce groupObjectsByValue and organizeObjectsByUniqueValue 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 and attachmentVersion (#32)
  • Migrate indexedObjectType from hpc_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
  • Define projectVersionField model (#35)