Skip to content

Releases: UN-OCHA/hpc-api-core

Add more options to some utility methods

07 Dec 18:13
7f609ca
Compare
Choose a tag to compare
  • Add allowMissingPlanEntities option to getAndValidateAllPlanEntities utility method (#71)
  • Add ignoreInconsistentBudgets option to getProjectBudgetsByOrgAndCluster utility method (#71)

Add sourceProjectId column to track the source of a cloned project

07 Dec 16:04
@s0 s0
Compare
Choose a tag to compare

New column sourceProjectId got added to project model (#72)

Don't include deleted data by default

06 Dec 13:40
f979cec
Compare
Choose a tag to compare

When using find and findOne on models defined with sequelize, rows which have deletedAt field different from null are now excluded by default. New option includeDeleted should be used to include virtually deleted rows (#70)

Accept empty array parameter in createMany

06 Dec 09:43
5b27e21
Compare
Choose a tag to compare

[BUG FIX]
When passing empty array to createMany, error is no longer thrown, but empty array returned instead (#69)

Fix type of category.group field in model definitions

03 Dec 11:50
a5c4936
Compare
Choose a tag to compare

Field catagory.group is now correctly defined as a string, fixing bug where it was defined as branded integer (#68)

Add new data fetching utility methods

02 Dec 20:13
ae1e1c0
Compare
Choose a tag to compare
  • Introduce getConditionFieldsForProjects utility method (#57)
  • Allow for more flexible use of project lib module, where lib clients don't need to supply too much unnecessary data in params (#57)
  • Introduce getProjectBudgetsByOrgAndCluster utility method (#67)

Introduce new custom where condition construction

02 Dec 19:00
88b7be9
Compare
Choose a tag to compare

[BREAKING CHANGE]
New custom where construction is allowing for specifying conditions like ... IS NOT NULL, WHERE [NOT] IN ..., LIKE ..., WHERE BETWEEN..., <, > comparison operators and more, in type-safe manner (#66)

Allow limit, offset and orderBy inside queries

02 Dec 17:00
@s0 s0
Compare
Choose a tag to compare
  • Enable model library clients to supply limit, offset and orderBy in their queries (#63)
  • Fix createMany when used with sequelize-defined models (#65)

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.