audible-api-ts 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/categories.d.ts +8 -2
- package/dist/categories.d.ts.map +1 -1
- package/dist/categories.int.test.d.ts +2 -0
- package/dist/categories.int.test.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +440 -444
- package/dist/library.d.ts +13 -1
- package/dist/library.d.ts.map +1 -1
- package/dist/library.unit.test.d.ts +2 -0
- package/dist/library.unit.test.d.ts.map +1 -0
- package/dist/schemas.d.ts +66 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,6 +118,7 @@ Available genres: `'science-fiction'`, `'fantasy'`, `'thriller'`, `'romance'`, `
|
|
|
118
118
|
| `refresh(credentials)` | Manually refresh an access token (usually not needed — auto-refresh is built-in) |
|
|
119
119
|
| `library(credentials)` | Fetch all library audiobooks |
|
|
120
120
|
| `wishlist(credentials)` | Fetch all wishlist audiobooks |
|
|
121
|
+
| `lastPositions(credentials, asins)` | Where the reader last stopped in each title, the reliable progress signal |
|
|
121
122
|
| `catalog(credentials, options)` | Search catalog by category with sorting |
|
|
122
123
|
| `verify(credentials)` | Check if credentials are valid |
|
|
123
124
|
|
package/dist/categories.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { AudibleLocale } from './types.js';
|
|
2
2
|
/** Human-readable genre and sub-genre names for catalog search */
|
|
3
|
-
export type AudibleGenre = 'science-fiction' | 'fantasy' | 'science-fiction-fantasy' | 'thriller' | 'mystery' | 'horror' | 'romance' | 'historical-fiction' | 'literary-fiction' | 'biography' | 'history' | 'business' | 'self-help' | 'science' | 'children' | 'young-adult' | 'comedy' | 'erotica' | 'religion' | 'sports' | 'travel' | 'lgbtq' | 'science-fiction/adventure' | 'science-fiction/adaptations' | 'science-fiction/cyberpunk' | 'science-fiction/dystopian' | 'science-fiction/first-contact' | 'science-fiction/galactic-empire' | 'science-fiction/genetic-engineering' | 'science-fiction/military' | 'science-fiction/post-apocalyptic' | 'science-fiction/space-exploration' | 'science-fiction/space-opera' | 'fantasy/action-adventure' | 'fantasy/adaptations' | 'fantasy/dragons' | 'fantasy/epic' | 'fantasy/historical' | 'fantasy/urban-paranormal' | 'thriller/suspense' | 'thriller/psychological' | 'thriller/domestic' | 'thriller/historical' | 'mystery/amateur-sleuth' | 'mystery/detective' | 'mystery/historical' | 'mystery/noir' | 'mystery/private-investigator' | 'mystery/traditional' | 'romance/action-adventure' | 'romance/comedy' | 'romance/contemporary' | 'romance/fantasy' | 'romance/historical' | 'romance/paranormal' | 'romance/science-fiction' | 'romance/sports' | 'romance/suspense' | 'literary-fiction/action-adventure' | 'literary-fiction/classics' | 'literary-fiction/coming-of-age' | 'literary-fiction/contemporary' | 'literary-fiction/drama' | 'literary-fiction/family-life' | 'literary-fiction/historical' | 'literary-fiction/sagas' | 'literary-fiction/sea-adventures' | 'literary-fiction/world-literature' | 'biography/entertainment' | 'history/europe' | 'children/action-adventure' | 'young-adult/literary-fiction' | 'young-adult/romance' | 'young-adult/science-fiction-fantasy' | 'young-adult/thriller';
|
|
4
|
-
/**
|
|
3
|
+
export type AudibleGenre = 'science-fiction' | 'fantasy' | 'science-fiction-fantasy' | 'mystery-thriller-suspense' | 'thriller' | 'mystery' | 'crime-fiction' | 'horror' | 'romance' | 'historical-fiction' | 'literary-fiction' | 'biography' | 'history' | 'business' | 'self-help' | 'science' | 'children' | 'young-adult' | 'comedy' | 'erotica' | 'religion' | 'sports' | 'travel' | 'lgbtq' | 'science-fiction/adventure' | 'science-fiction/adaptations' | 'science-fiction/cyberpunk' | 'science-fiction/dystopian' | 'science-fiction/first-contact' | 'science-fiction/galactic-empire' | 'science-fiction/genetic-engineering' | 'science-fiction/military' | 'science-fiction/post-apocalyptic' | 'science-fiction/space-exploration' | 'science-fiction/space-opera' | 'fantasy/action-adventure' | 'fantasy/adaptations' | 'fantasy/dragons' | 'fantasy/epic' | 'fantasy/historical' | 'fantasy/sword-sorcery' | 'fantasy/urban-paranormal' | 'thriller/suspense' | 'thriller/psychological' | 'thriller/domestic' | 'thriller/historical' | 'mystery/amateur-sleuth' | 'mystery/cozy' | 'mystery/detective' | 'mystery/hard-boiled' | 'mystery/historical' | 'mystery/noir' | 'mystery/police-procedural' | 'mystery/private-investigator' | 'mystery/traditional' | 'romance/action-adventure' | 'romance/comedy' | 'romance/contemporary' | 'romance/fantasy' | 'romance/historical' | 'romance/paranormal' | 'romance/science-fiction' | 'romance/sports' | 'romance/suspense' | 'literary-fiction/action-adventure' | 'literary-fiction/classics' | 'literary-fiction/coming-of-age' | 'literary-fiction/contemporary' | 'literary-fiction/drama' | 'literary-fiction/family-life' | 'literary-fiction/fiction' | 'literary-fiction/historical' | 'literary-fiction/sagas' | 'literary-fiction/sea-adventures' | 'literary-fiction/world-literature' | 'biography/entertainment' | 'history/europe' | 'children/action-adventure' | 'children/mystery' | 'children/science-fiction-fantasy' | 'children/fantasy' | 'children/science-fiction' | 'young-adult/literary-fiction' | 'young-adult/romance' | 'young-adult/science-fiction-fantasy' | 'young-adult/fantasy' | 'young-adult/science-fiction' | 'young-adult/thriller';
|
|
4
|
+
/**
|
|
5
|
+
* Mapping from genre name to locale-specific Audible category ID.
|
|
6
|
+
*
|
|
7
|
+
* Every id is checked against the live catalogue by `categories.int.test.ts`, which
|
|
8
|
+
* asserts the name Audible gives it. A category can sit under several parents, so
|
|
9
|
+
* the id is the same wherever the store shows it.
|
|
10
|
+
*/
|
|
5
11
|
export declare const GENRE_CATEGORIES: Record<AudibleGenre, Partial<Record<AudibleLocale, string>>>;
|
|
6
12
|
/**
|
|
7
13
|
* Resolve a genre name to a locale-specific Audible category ID.
|
package/dist/categories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,kEAAkE;AAClE,MAAM,MAAM,YAAY,GAEpB,iBAAiB,GACjB,SAAS,GACT,yBAAyB,GACzB,UAAU,GACV,SAAS,GACT,QAAQ,GACR,SAAS,GACT,oBAAoB,GACpB,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,UAAU,GACV,WAAW,GACX,SAAS,GACT,UAAU,GACV,aAAa,GACb,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,OAAO,GAEP,2BAA2B,GAC3B,6BAA6B,GAC7B,2BAA2B,GAC3B,2BAA2B,GAC3B,+BAA+B,GAC/B,iCAAiC,GACjC,qCAAqC,GACrC,0BAA0B,GAC1B,kCAAkC,GAClC,mCAAmC,GACnC,6BAA6B,GAE7B,0BAA0B,GAC1B,qBAAqB,GACrB,iBAAiB,GACjB,cAAc,GACd,oBAAoB,GACpB,0BAA0B,GAE1B,mBAAmB,GACnB,wBAAwB,GACxB,mBAAmB,GACnB,qBAAqB,GAErB,wBAAwB,GACxB,mBAAmB,GACnB,oBAAoB,GACpB,cAAc,GACd,8BAA8B,GAC9B,qBAAqB,GAErB,0BAA0B,GAC1B,gBAAgB,GAChB,sBAAsB,GACtB,iBAAiB,GACjB,oBAAoB,GACpB,oBAAoB,GACpB,yBAAyB,GACzB,gBAAgB,GAChB,kBAAkB,GAElB,mCAAmC,GACnC,2BAA2B,GAC3B,gCAAgC,GAChC,+BAA+B,GAC/B,wBAAwB,GACxB,8BAA8B,GAC9B,6BAA6B,GAC7B,wBAAwB,GACxB,iCAAiC,GACjC,mCAAmC,GAEnC,yBAAyB,GAEzB,gBAAgB,GAEhB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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GAC9B,qBAAqB,GACrB,qCAAqC,GACrC,qBAAqB,GACrB,6BAA6B,GAC7B,sBAAsB,CAAA;AAE1B;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CA8GzF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,YAAY,EAAE,QAAQ,aAAa,WAQxE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"categories.int.test.d.ts","sourceRoot":"","sources":["../src/categories.int.test.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { catalog } from './catalog.js';
|
|
|
2
2
|
export type { AudibleGenre } from './categories.js';
|
|
3
3
|
export { GENRE_CATEGORIES, resolveGenreId } from './categories.js';
|
|
4
4
|
export { login, refresh, register } from './client.js';
|
|
5
|
-
export { library, verify, wishlist } from './library.js';
|
|
5
|
+
export { lastPositions, library, verify, wishlist } from './library.js';
|
|
6
6
|
export { AUDIBLE_LOCALES } from './locales.js';
|
|
7
|
-
export type { AudibleCategory, AudibleCookie, AudibleCredentials, AudibleItem, AudibleLocale, AudibleRating, AudibleRelationship, AuthSession, CatalogOptions, CategoryLadder, ListeningStatus, LocaleConfig, RatingDistribution, } from './types.js';
|
|
7
|
+
export type { AudibleCategory, AudibleCookie, AudibleCredentials, AudibleItem, AudibleLocale, AudibleRating, AudibleRelationship, AuthSession, CatalogOptions, CategoryLadder, LastPosition, ListeningStatus, LocaleConfig, RatingDistribution, } from './types.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EACV,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,YAAY,CAAA"}
|