The application is aimed at retrieving outages and site-info from a KrakenFlex API endpoint, and post the filtered and enhanced outages to the API.
More specifically:
retrieveOutages
retrieves all outages from theGET /outages
endpointretrieveSiteInfoById
retrieves information from theGET /site-info/{siteId}
endpoint for the site with the IDnorwich-pear-tree
filterOutages
filters out any outages that began before2022-01-01T00:00:00.000Z
or don't have an ID that is in the list of devices in the site information. For the remaining outages, it attaches the display name of the device in the site information to each appropriate outagepostOutages
sends this list of outages toPOST /site-outages/{siteId}
for the site with the IDnorwich-pear-tree
The application is unit tested using Jest and mocking all API calls and responses.
See Instructions.md for additional context and background
npm install
in root folder
npm run test
npm run start
Node version in use: v14.18.3