TypeScript type declarations for Truepic Vision API v3.
npm install @truepic/vision-api-typesimport type { components, paths } from '@truepic/vision-api-types'
type VisionInspectionSchema = components['schemas']['Inspection']
type VisionGetInspectionsPath = paths['/inspections']['get']OpenAPI TypeScript is used to generate the TypeScript types from the Vision API OpenAPI specification. See their docs for further details.
The only prerequisite is a compatible version of Node.js (see engines.node in
package.json).
Install dependencies with npm:
npm installTo generate the TypeScript types from the OpenAPI specification to index.d.ts:
npm run generateTo validate the generated TypeScript types in index.d.ts:
npm run validateThe TypeScript types must be manually generated, validated, and released after a Vision API release. That process does not happen automatically at this time.
Release It! is used to orchestrate the release process:
npm run releaseThe release version should match the Vision API version.