Options
All
  • Public
  • Public/Protected
  • All
Menu

EVA SDK Redux

EVA SDK Redux

semantic-release Travis Dependencies

The EVA SDK provides access to the functionality exposed by the EVA API using developer focused methods and classes. This SDK is built specifically to provide a redux state store.

Pre 2.0 migration

Since SDK version 2.0 we have switched to a newer TypeScript interface generation method. The EVA backend supplies us with these typings and as time went on refactoring and reorganization was required that could no longer be done in a backwards compatible way. A number of old namespace have been removed and are now a part of EVA.Core. Effectively you will need to do some search and replace operations to use the same typings from their new namespace:

The most common changes are:

  • EVA.Core.Services -> Eva.Core
  • EVA.CRM -> EVA.Core
  • EVA.UserTasks -> EVA.Core
  • EVA.API.ResponseMessage -> EVA.Core.EmptyResponseMessage/EVA.CoreResourceResponseMessage
  • EVA.API.ServiceExceptionResult -> EVA.Core.ServiceError

The new typings also properly declare embedded types inside the parent type now. Previously these names would have been contracted into a single name. So for example GetProductAvailabilityAvailabilityOptions is now GetProductAvailability.AvailabilityOptions;

Documentation

You can find the documentation for the SDK right here on github pages: https://springtreesolutions.github.io/eva-sdk-redux/. All the documentation files are in the docs folder in Markdown format

Usage

npm install --save @springtree/eva-sdk-redux

Local development

You can use npm link to use a local version of the SDK. Run the following commands:

npm i
npm run build
npm link
npm prune --production

# cd to your application
npm link @springtree/eva-sdk-redux

If linking does not work due to peer dependency conflicts there is an alternative using npm pack. This will create a zip file which contains exactly what would be uploaded to npm.

npm i
npm run build
npm run pack

# cd to your application
npm i ../eva-sdk-redux/springtree-eva-sdk-redux-0.0.0.tgz

Remember to revert your package.json to the normal version instead of the now set file:... value when you are done with local development

Testing

There is large unit test suite you can (and should) run with npm run test.

You can run a single test with: npx jest test/your-test.test.ts.