/** Supported Audible marketplace locales */ export type AudibleLocale = 'fr' | 'com' | 'co.uk' | 'de' | 'it' | 'es' | 'ca' | 'com.au' | 'in' | 'co.jp'; /** Marketplace configuration for a given locale */ export type LocaleConfig = { domain: string; marketplaceId: string; countryCode: string; }; /** Credentials obtained after device registration */ export type AudibleCredentials = { accessToken: string; refreshToken: string; adpToken: string; devicePrivateKey: string; serial: string; locale: AudibleLocale; expiresAt: Date; }; /** Rating distribution for a single dimension (overall, performance, or story) */ export type RatingDistribution = { averageRating: number; displayAverageRating: string; displayStars: number; numRatings: number; numFiveStarRatings: number; numFourStarRatings: number; numThreeStarRatings: number; numTwoStarRatings: number; numOneStarRatings: number; }; /** Full rating data for an audiobook */ export type AudibleRating = { numReviews: number; overallDistribution?: RatingDistribution; performanceDistribution?: RatingDistribution; storyDistribution?: RatingDistribution; }; /** A category in the Audible taxonomy */ export type AudibleCategory = { id: string; name: string; }; /** A category path from root to leaf */ export type CategoryLadder = { root: string; categories: AudibleCategory[]; }; /** A relationship to another Audible product */ export type AudibleRelationship = { asin: string; relationshipToProduct: string; relationshipType: string; title?: string; sort?: string; url?: string; }; /** Listening progress for a library item */ export type ListeningStatus = { finishedAt?: Date; isFinished?: boolean; percentComplete?: number; timeRemainingSeconds?: number; }; /** Where the reader last stopped in a library item. * * This is the reliable progress signal: `ListeningStatus.percentComplete` on a * library item is often stale (0 on a title two hours in), while the position * is what the player itself saves. */ export type LastPosition = { asin: string; /** Milliseconds from the start of the recording. */ positionMs: number; /** When the player last saved the position, in UTC. */ lastUpdatedAt: Date; }; /** An audiobook item from Audible */ export type AudibleItem = { asin: string; title: string; subtitle?: string; isbn?: string; sku?: string; authors: string[]; narrators: string[]; durationMinutes: number; publisher?: string; language?: string; releaseDate?: Date; coverUrl?: string; summary?: string; description?: string; merchandisingSummary?: string; copyright?: string; formatType?: string; contentType?: string; contentDeliveryType?: string; programParticipation?: string; series?: { name: string; position?: number; }; categories: CategoryLadder[]; keywords: string[]; rating?: AudibleRating; listeningStatus?: ListeningStatus; purchaseDate?: Date; dateAdded?: Date; relationships: AudibleRelationship[]; isAdultProduct: boolean; productImages: Record; socialMediaImages: Record; }; /** Options for searching the Audible catalog */ export type CatalogOptions = { category?: import('./categories.js').AudibleGenre; categoryId?: string; sortBy?: 'MostVoted' | 'BestSellers' | 'AvgRating' | 'Relevance' | 'ReleaseDate' | '-ReleaseDate' | 'Title'; limit?: number | 'all'; keywords?: string; author?: string; narrator?: string; }; /** Options for searching the whole Audible catalog, without a category */ export type SearchOptions = { keywords?: string; title?: string; author?: string; narrator?: string; /** How many items to return, most relevant first (default 10, at most 50). */ limit?: number; }; /** PKCE auth session — returned by generateLoginUrl, passed back to registerDevice */ export type AuthSession = { codeVerifier: string; serial: string; locale: AudibleLocale; createdAt: Date; }; /** Cookie to set in the browser before redirecting to the login URL */ export type AudibleCookie = { name: string; value: string; domain: string; }; //# sourceMappingURL=types.d.ts.map