Skip to content

TRUEPIC/vision-api-types

Repository files navigation

Truepic Vision API Types

TypeScript type declarations for Truepic Vision API v3.

npm

Installation

npm install @truepic/vision-api-types

Usage

import 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.

Development

Prerequisites

The only prerequisite is a compatible version of Node.js (see engines.node in package.json).

Dependencies

Install dependencies with npm:

npm install

Generate

To generate the TypeScript types from the OpenAPI specification to index.d.ts:

npm run generate

Validate

To validate the generated TypeScript types in index.d.ts:

npm run validate

Releasing

The 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 release

The release version should match the Vision API version.

About

TypeScript type declarations for Truepic Vision API v3

Resources

License

Stars

Watchers

Forks

Contributors