Skip to content

Releases: hyperbudget/hyperbudget-core

v10.0.0

07 Mar 17:35
Compare
Choose a tag to compare

REVERT v9.0.0

This release REVERTS release v9.0.0., which is now deprecated. Don't use that release.

[REVERTED] Categories: now with better categorising

07 Mar 16:36
Compare
Choose a tag to compare

THIS RELEASE HAS BEEN REVERTED due to not really working properly.
The below information is kept for historical reasons. Please do not use this release


You can finally have multiple category_rules for categories, using the familiar FLEX/STRICT modes.

strict (the default) requires all the below to be true:

{
  "category_rules": {
    "type": {"rules":[["=","DD"]]}, 
    "creditAmount": { "rules": [[">",500]]}
   }
}

FLEX will be type='DD' OR 'creditAmount' > 500

{
  "category_rules": {
    "type": {"rules":[["=","DD"]]}, 
    "creditAmount": { "rules": [[">",500]]},
    "mode": "FLEX"
   }
}

8.0.1

05 Jun 11:03
67a83f9
Compare
Choose a tag to compare

Fix security issues with dependencies

v8.0.0

05 May 00:49
Compare
Choose a tag to compare
  • Add filterType in report, allowing to filter transactions by type.
  • Minor refactoring.

v7.2.0

07 Oct 20:56
Compare
Choose a tag to compare

Add ReportFactory.removeRecords for removing transactions from a report

v7.1.0

10 Sep 23:17
Compare
Choose a tag to compare

groupByType functionality for transactions

Creates a hash of { 'transaction_type' : transactions: [{ description: 'blah' , creditAmount: 100, ... }] }. They are unique by description.

    const transactions: Transaction[] = [
      {
        description: 'Virgin Media',
        debitAmount: 40,
        type: 'DD',
        date: '2018-01-01T00:00:00Z',
      },
      {
        description: 'Virgin Media',
        debitAmount: 77,
        type: 'DD',
        date: '2018-02-01T00:00:00Z',
      },
      {
        description: 'Virgin Media',
        debitAmount: 77,
        type: 'DD',
        date: '2018-02-02T00:00:00Z',
      },
      {
        description: 'TFL',
        debitAmount: 130,
        type: 'DD',
        date: '2018-03-01T00:00:00Z',
      },
      {
        description: 'Rent',
        debitAmount: 1000,
        type: 'SO',
        date: '2018-03-07T00:00:00Z',
      },
      {
        description: 'Salary',
        creditAmount: 2000,
        type: 'FPI',
        date: '2018-03-30T00:00:00Z',
      },
      {
        description: 'Some random spends',
        debitAmount: 12,
        type: 'DEB',
        date: '2018-04-01T00:00:00Z'
      },
    ].map(t => new Transaction(t));
    
    let groups = reportManager.groupByType(transactions, ['DD',  'SO']);

    expect(Object.keys(groups)).to.deep.equal(['DD', 'SO']);
    expect(groups['DD']).to.have.property('transactions').with.lengthOf(2);
    expect(groups['DD'].transactions[0].description).to.equal('Virgin Media');
    expect(groups['DD'].transactions[0].debitAmount).to.equal(77);
    expect(groups['DD'].transactions[1].description).to.equal('TFL');
    expect(groups['DD'].transactions[1].debitAmount).to.equal(130);
    expect(groups['SO']).to.have.property('transactions').with.lengthOf(1);
    expect(groups['SO'].transactions[0].description).to.equal('Rent');
    expect(groups['SO'].transactions[0].debitAmount).to.equal(1000);

v5.0.1

18 Aug 17:28
Compare
Choose a tag to compare

Various bug fixes around the fact that timezones unfortunately still exist

v5.0.0

05 Aug 15:15
Compare
Choose a tag to compare

Revert validation to native JS code

Reverts validating transactions & categories to native JS code instead of jsonschema. Clients can still use JSONschema for their own validation if they wish, but the core code will now use custom JS code. The reason for this is that it appears validating big amounts of data with jsonschema was extremely slow in the backend

v4.0.0

05 Aug 12:42
Compare
Choose a tag to compare

Update to typescript 3. No breaking changes expected.

Version 3.0.0

23 Jul 20:49
Compare
Choose a tag to compare

Breaking changes: (I can haz doing semver correctly)

  • JSON Schemas available for Category and Transaction objects.
    • These are available in the exported JSONSchema object.
  • Validation now uses these JSON Schemas.
  • Category mode enums are now changed to strings "STRICT" and "FLEX" instead of numbers.