Skip to content

tuneomusic/api-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tuneo API types

Official package for Tuneo API types. Always ahead.

bun add @tuneo/types
npm install @tuneo/types

Using Tuneo API 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.

Releases

No releases published

Packages

No packages published