Foundations TS Defintions
TypeScript definition files for the Reapit Foundations API
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 API explorer.
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
For a version tied to your API version;
yarn add @reapit/[email protected]
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.
import { AppModel } from '@reapit/foundations-ts-definitions'
// Or
const { AppModel } = require('@reapit/foundations-ts-definitions')

Last modified 1yr ago
Copy link