Official package for Tuneo API types. Always ahead.
bun add @tuneo/types
npm install @tuneo/types
Our types are always prefixed with REST
or API
. REST
for any type that comes directly from a request and always have the method after the REST
prefix, and API
for any type from the API.
import type { RESTPatchUpdateCurrentUser, RESTPatchUpdateCurrentUserJSONBody } from '@tuneo/types'
function updateUser(data: RESTPatchUpdateCurrentUserJSONBody): RESTPatchUpdateCurrentUser {
// ...
}
Import types with the suffix JSONBody
when you need to type a route the needs a body in the request.
Types exported as never
are when the API response is NO CONTENT.