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.
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:
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
;
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
npm install --save @springtree/eva-sdk-redux
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
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
.