Skip to content

Releases: UN-OCHA/hpc-api-core

Improvements for deletion

21 Nov 11:18
33756b1
Compare
Choose a tag to compare

⚠️ BREAKING CHANGES ⚠️

  • Method createToken() has renamed its models parameter to database, in order to standardize with other similar usages

This release is focused on improving deletion of plans and entities in auth tables.

  • Add new permission DELETE_ANY_PLAN, which is granted to HPC and RPM admins
  • Allow to provide a transaction to authGrant.create and authGrant.update. This method is heavily-reliant on changes happening in transaction that we now enable specifying external transaction object
  • Introduce auth target deletion util method deleteAuthTarget() and deprecate direct usage of authTarget.destroy()

Upgrade to Node.js v20

02 Nov 13:45
9aeb13a
Compare
Choose a tag to compare

⚠️ BREAKING CHANGES ⚠️

  • Minimal supported Node.js 18 version is raised to >=18.18.2 (#131)

Other changes

  • Minimal supported Node.js 20 version is >=20.9.0 (#131)
  • Minimal supported NPM 10 version is >=10.2.2 (#131)
  • Package pg got updated to v8.11.3 (#131)

Add lots of utility methods

03 Oct 14:15
b62c0a4
Compare
Choose a tag to compare
  • Introduced utility methods (#128) to get:
    • Years of a plan
    • Basic organization info plus their type, subtype and level
    • Attachment and measurement disaggregation data
    • All country locations
  • Some non-fetching utility methods were added (#128) to:
    • Convert string to camel case
    • Clean numeric values
  • Introduce new permissions for update measurements (#129)
    • global.EDIT_ANY_MEASUREMENT
    • plan.EDIT_MEASUREMENTS
    • governingEntity.EDIT_MEASUREMENTS

Allow generatedCompositeKey everywhere generated is needed

22 Sep 11:19
79d1fd4
Compare
Choose a tag to compare

Allow generatedCompositeKey everywhere generated is needed (#127)

Allow to specify flow ID when inserting new rows

22 Sep 08:26
843cef5
Compare
Choose a tag to compare
  • Allow to specify flow ID when inserting new rows (#125)

    DB table flow is the only table we have where its id column is part of a composite key, alongside versionID column. Since we weren't allowing for specifying IDs during new row insertion, it wasn't possible to create a new version of already-existing flow with the database models library

Other changes:

  • Allow cluster lead to grant ownership of project (#124)
  • Deduplicate plan revision state codecs (#126)

Require Node.js v18 and NPM v9

04 Jul 13:52
9df1cdc
Compare
Choose a tag to compare

⚠️ BREAKING CHANGES ⚠️

  • Require Node.js version >=18.16.1 (#123)
  • Typescript compilation target changed from ES2021 to ES2022 (#123)

Other changes

  • Add support for TRUNCATE SQL command (#106)
  • Fix linting errors violating quote rule (#122)
  • Update dev dependencies (#123)
  • Update semver sub-dependency to resolve security vulnerability (#121)

Expand attachment and measurement codecs

06 Jun 13:20
e54ffbf
Compare
Choose a tag to compare
  • Add measureFields optional field to indicator and caseload value column
  • Add attachmentType field to measurement value. It equals 'indicator' for indicator attachments and 'caseLoad' for caseload attachments
  • Add name optional field to attachment value
  • Allow metric total to be typed as string. ⚠️ This could break your typing checks as previously only empty string was allowed
  • Add calculationMethod field to attachment prototype and indicator value

Introduce new project editing permissions

16 May 10:01
edda8f0
Compare
Choose a tag to compare

New permissions to control who can edit project have been introduced:

  • project.EDIT: Users with this permission can edit the project with that ID
  • plan.EDIT_PROJECTS: Users with this permission can edit projects under the plan with that ID
  • governingEntity.EDIT_PROJECTS: Users with this permission can edit the projects associated with governing entity with that ID
  • global.EDIT_ANY_PROJECT: Users with this permission can edit any project

Define highWater model

15 May 13:07
ed3abb8
Compare
Choose a tag to compare

Define highWater model (#116)

Upgrade to Typescript 5

28 Apr 13:21
41a2c33
Compare
Choose a tag to compare
  • ⚠️ BREAKING CHANGE ⚠️ Upgrade to Typescript 5 (#114)
  • Update all dependencies to latest versions (#114)