New:Socket for Asana Is Now Available.Learn more
Get Started

@postio/api-types

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@postio/api-types

TypeScript types for the Postio API, generated from @postio/openapi.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

@postio/api-types

TypeScript types for Postio — the UK validation API for addresses, emails and phone numbers.

First time? Sign up free — first 100 lookups on us, no card needed.

Generated from @postio/openapi via openapi-typescript.

Install

npm install --save-dev @postio/api-types

Use

import type { paths, components, operations } from "@postio/api-types"

// The full request/response shape for an operation:
type SearchOp = operations["getV1AddressSearch"]
type SearchResponse = SearchOp["responses"]["200"]["content"]["application/json"]

// Or pull a schema directly:
type Address = components["schemas"]["Address"]
type ErrorEnvelope = components["schemas"]["ErrorEnvelope"]

// Path-level shapes (matches the OpenAPI document):
type AddressSearchPath = paths["/address/search"]

Versioning

Lockstep with @postio/openapi and the underlying API spec. Bumping the API spec version in postio-uk/postio-api cascades to a new release of both packages.

Build

pnpm install
pnpm build           # generates types from local @postio/openapi
pnpm build:fetch     # generates types from postio.co.uk/openapi.json

The generated src/index.ts and compiled dist/index.d.ts are both gitignored. CI rebuilds them on every release.

License

MIT.

Keywords

postio

FAQs

Package last updated on 12 Aug 2026

Related posts