Type System
The SDK exports a fully typed API surface from src/index.ts, including:
- manager request/response contracts
- client runtime event and request types
- OAuth request/token types
- normalized and raw user models
Public Type Export Surface
API contracts
ts
export type * from "./types/api";This includes all exports from:
src/types/api/common.tssrc/types/api/enums.tssrc/types/api/shared.tssrc/types/api/user.tssrc/types/api/releases.tssrc/types/api/tracks.tssrc/types/api/preferences.tssrc/types/api/lookup.tssrc/types/api/deprecated.ts
Client types
From src/types/client.ts:
TooLostClientOptionsRequestEventResponseEventErrorEventTokenRefreshEventHTTPMethodQueryPrimitiveQueryValueRequestOptions
OAuth types
From src/types/oauth.ts:
ScopeAuthorizationURLOptionsExchangeCodeOptionsPKCEPairTokenResponseTokenRequestOptions
Normalized user model
ts
export type { User } from "./structures/User";User is the camelCase projection of UserResource.
API Types by Module
common.ts
Core envelope and primitive utility types:
APIResponse<T>MessageResponseMessageDataResponse<T>UnauthenticatedResponseValidationErrorResponseValidationResultDataEntityIdJSONValue,JSONObject,JSONArrayPaginationOptions
enums.ts
Domain unions:
ReleaseStatusReleaseTypeTrackFileKindArtistPlatformArtistViaUrlPlatformUserType
shared.ts
Reusable nested structures used by release and preference payloads:
- contributors and collaborator inputs
- file references and review assets
- track lyrics
- social/platform links
- artist delivery config
- preference metadata
- territory/collaborator inputs
Representative exports:
ContributorInput,ContributorResourceFileReference,ReleaseReviewAttachmentTrackLyricsSocialLinks,PlatformLinks,AdditionalLinksAudiomackConfig,ArtistPreferenceDeliveryPreferenceMetadataTerritoryInput,CollaboratorInput
user.ts
UserResource(raw API shape)
releases.ts
Release and release-track-related contracts:
ReleaseResourceTrackResourceListReleasesQuery,ListReleasesResponseCreateReleaseRequestUpdateReleaseMetadataRequestUpdateReleaseDeliveryRequestUpdateReleaseVideoRequestSubmitReleaseRequest,SubmitReleaseResponseValidateUpcRequest
tracks.ts
Track-focused write and validation contracts:
ValidateIsrcRequestCreateTrackUploadUrlRequestTrackUploadUrlDataReplaceSingleTrackFileRequestReplaceReleaseTracksTrackInputReplaceReleaseTracksRequest
preferences.ts
Preference and platform-discovery contracts:
ArtistPreferenceResource,ArtistPreferencesDataPreferenceArtistItemLabelPreferenceResource,LabelArtistResourceLabelPreferencesQuery,LabelPreferencesDataArtistPlatformResultSearchArtistPlatformRequest,SearchArtistPlatformResponseDataGetArtistViaUrlRequestSubmitArtistPreferenceRequestSubmitLabelPreferenceRequestRemoveLabelArtistRequest
lookup.ts
Lookup result models:
CountryResourceLanguageResourceLookupPlatformsData
Deprecated Aliases
For compatibility, legacy aliases are exported from deprecated.ts:
ReleasePayload->ReleaseResourceTrackPayload->TrackResourcePreferencePayload->ArtistPreferenceResource | LabelPreferenceResourcePlatformSearchResult->ArtistPlatformResult
Type Design Notes
- Request methods are strongly typed per manager operation.
- Envelope unwrapping (
requestData) means many manager methods return concrete payload types instead ofAPIResponse<T>. - Query options accept primitive, array, null, and undefined values via
QueryValue. - API payloads remain close to server shape while normalized structures are offered where it improves DX (
User).