Foundations TS Defintions
TypeScript definition files for the Reapit Foundations API
Last updated
TypeScript definition files for the Reapit Foundations API
Last updated
Develop in TypeScript against the Reapit Foundations Platform with confidence
If you are using TypeScript (and we recommend you do!), for your front end or NodeJS project, we provide full type definitions for the API documented in the .
We generate these types from the Swagger contracts direct with a daily CRON job, so you can be sure that when the API changes, your types will be updated too. This allows for a much closer alignment between front and back end development, with compile time feedback on definition changes. Ultimately this should lead to more robust applications.
The definitions are updated automatically when the API changes. As such, it is recommended strongly that you match by date stamp the correct version of the definitions to the API version you are using in your headers.
For the latest version;
yarn add @reapit/foundations-ts-definitions
Then import the required type into your code with ES6 Modules or CommonJS. The naming maps directly to the model names in the API Explorer in the developer portal.
Webhook event payloads are generic, however the types can be infered by the topicId. Here are some examples of how to use the webhook types