@zivue/zuuid 0.2.2 → 0.2.5
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/CHANGELOG.md +17 -0
- package/README.md +123 -6
- package/dist/client.d.ts +36 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +142 -0
- package/dist/providers/comicvine/client.d.ts +40 -0
- package/dist/providers/comicvine/client.d.ts.map +1 -0
- package/dist/providers/comicvine/client.js +190 -0
- package/dist/providers/comicvine/constants.d.ts +2 -0
- package/dist/providers/comicvine/constants.d.ts.map +1 -1
- package/dist/providers/comicvine/constants.js +2 -0
- package/dist/providers/comicvine/index.d.ts +2 -0
- package/dist/providers/comicvine/index.d.ts.map +1 -1
- package/dist/providers/comicvine/index.js +2 -0
- package/dist/providers/comicvine/types.d.ts +26 -0
- package/dist/providers/comicvine/types.d.ts.map +1 -0
- package/dist/providers/comicvine/types.js +1 -0
- package/dist/providers/imdb/client.d.ts +1 -0
- package/dist/providers/imdb/client.d.ts.map +1 -1
- package/dist/providers/imdb/client.js +4 -2
- package/dist/providers/imdb/constants.d.ts +1 -0
- package/dist/providers/imdb/constants.d.ts.map +1 -1
- package/dist/providers/imdb/constants.js +1 -0
- package/dist/providers/imdb/movie.js +51 -6
- package/dist/providers/imdb/types.d.ts +2 -0
- package/dist/providers/imdb/types.d.ts.map +1 -1
- package/dist/providers/musicbrainz/client.d.ts +41 -0
- package/dist/providers/musicbrainz/client.d.ts.map +1 -0
- package/dist/providers/musicbrainz/client.js +169 -0
- package/dist/providers/musicbrainz/constants.d.ts +2 -0
- package/dist/providers/musicbrainz/constants.d.ts.map +1 -1
- package/dist/providers/musicbrainz/constants.js +2 -0
- package/dist/providers/musicbrainz/index.d.ts +2 -0
- package/dist/providers/musicbrainz/index.d.ts.map +1 -1
- package/dist/providers/musicbrainz/index.js +2 -0
- package/dist/providers/musicbrainz/types.d.ts +21 -0
- package/dist/providers/musicbrainz/types.d.ts.map +1 -0
- package/dist/providers/musicbrainz/types.js +1 -0
- package/dist/providers/openstreetmap/city.d.ts +2 -0
- package/dist/providers/openstreetmap/city.d.ts.map +1 -0
- package/dist/providers/openstreetmap/city.js +1 -0
- package/dist/providers/openstreetmap/client.d.ts +31 -0
- package/dist/providers/openstreetmap/client.d.ts.map +1 -0
- package/dist/providers/openstreetmap/client.js +146 -0
- package/dist/providers/openstreetmap/constants.d.ts +2 -0
- package/dist/providers/openstreetmap/constants.d.ts.map +1 -1
- package/dist/providers/openstreetmap/constants.js +2 -0
- package/dist/providers/openstreetmap/country.d.ts +2 -0
- package/dist/providers/openstreetmap/country.d.ts.map +1 -0
- package/dist/providers/openstreetmap/country.js +1 -0
- package/dist/providers/openstreetmap/index.d.ts +4 -0
- package/dist/providers/openstreetmap/index.d.ts.map +1 -1
- package/dist/providers/openstreetmap/index.js +4 -0
- package/dist/providers/openstreetmap/types.d.ts +16 -0
- package/dist/providers/openstreetmap/types.d.ts.map +1 -0
- package/dist/providers/openstreetmap/types.js +1 -0
- package/package.json +21 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.5 - 2026-05-25
|
|
4
|
+
|
|
5
|
+
- Added live OpenStreetMap/Nominatim lookup and search support for cities, countries, places, and venues.
|
|
6
|
+
- Added `OpenStreetMapProvider`, `visit.openstreetmap` client facades, city/country subpath exports, examples, and README documentation.
|
|
7
|
+
|
|
8
|
+
## 0.2.4 - 2026-05-25
|
|
9
|
+
|
|
10
|
+
- Added live ComicVine API support for volumes, issues, story arcs, characters, people, and publishers.
|
|
11
|
+
- Added `ComicVineProvider`, ComicVine fetch/search helpers, category-first client facades, examples, and `providers/comicvine/client` export.
|
|
12
|
+
|
|
13
|
+
## 0.2.3 - 2026-05-25
|
|
14
|
+
|
|
15
|
+
- Added live MusicBrainz lookup/search support for releases, release groups, recordings, artists, labels, and works.
|
|
16
|
+
- Added MusicBrainz category-first client facades under `listen.musicbrainz` and `people.musicbrainz`, plus a `providers/musicbrainz/client` subpath export.
|
|
17
|
+
- Added MusicBrainz fetch/search examples and README usage documentation.
|
|
18
|
+
- Added an IMDb suggestion-data fallback for challenge pages so known title IDs still resolve core metadata such as title, year, poster, type, rank, and cast summary.
|
|
19
|
+
|
|
3
20
|
## 0.2.2 - 2026-05-25
|
|
4
21
|
|
|
5
22
|
- Added IMDb fetch-by-ID scraper support for movie and TV title pages.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Search, fetch, and normalize media metadata from external providers into a share
|
|
|
4
4
|
|
|
5
5
|
This package is meant to be used by apps that need provider-backed lookup and transformation, but do not want provider-specific response shapes leaking through the app.
|
|
6
6
|
|
|
7
|
-
TMDB, Open Library,
|
|
7
|
+
TMDB, Open Library, ComicVine, GamesDB, MusicBrainz, and OpenStreetMap include live search/fetch clients. IMDb includes a fetch-by-ID title-page scraper for movie and TV titles. Additional providers currently expose source-record transformers: you provide the raw provider payload, and this package normalizes it into `ZuuidData`.
|
|
8
8
|
|
|
9
9
|
Storage, caching, indexing, review state, object-store keys, and persistence belong in a layer outside this package.
|
|
10
10
|
|
|
@@ -109,20 +109,20 @@ Ratings are normalized to a `0-5` scale when the provider exposes a compatible n
|
|
|
109
109
|
| TMDB | person | yes | yes | yes |
|
|
110
110
|
| Open Library | book | yes | yes | yes |
|
|
111
111
|
| Open Library | author | yes | yes | yes |
|
|
112
|
-
| ComicVine | volume, issue, story_arc, character, person, publisher |
|
|
112
|
+
| ComicVine | volume, issue, story_arc, character, person, publisher | yes | yes | yes |
|
|
113
113
|
| IMDb | movie, tv | no | yes | yes |
|
|
114
114
|
| GamesDB | game | yes | yes | yes |
|
|
115
115
|
| GamesDB | platform | no | yes | yes |
|
|
116
116
|
| Jikan | anime, manga, producer, magazine, character, person | no | no | yes |
|
|
117
|
-
| MusicBrainz | release, release-group, recording, artist, label, work |
|
|
117
|
+
| MusicBrainz | release, release-group, recording, artist, label, work | yes | yes | yes |
|
|
118
118
|
| OpenFoodFacts | product | no | no | yes |
|
|
119
|
-
| OpenStreetMap | city, country, place, venue |
|
|
119
|
+
| OpenStreetMap | city, country, place, venue | yes | yes | yes |
|
|
120
120
|
| Podcast / iTunes | podcast | no | no | yes |
|
|
121
121
|
| Setlist.fm | setlist, artist, venue | no | no | yes |
|
|
122
122
|
| Ticketmaster | event, attraction, venue | no | no | yes |
|
|
123
123
|
| Wger | exercise, equipment | no | no | yes |
|
|
124
124
|
|
|
125
|
-
For IMDb, search is marked `no` because the scraper fetches known title IDs such as `tt0137523`; it does not implement IMDb search. GamesDB platform search is marked `no` because only game search and ID fetches are currently implemented. For transformer-only providers, "Search" and "Fetch" are marked `no` because this package does not perform those HTTP requests yet. Use your own provider client or stored payloads, wrap the payload in a `SourceRecord`, and call the category transformer.
|
|
125
|
+
For IMDb, search is marked `no` because the scraper fetches known title IDs such as `tt0137523`; it does not implement IMDb search. ComicVine and GamesDB require API keys for live API calls. GamesDB platform search is marked `no` because only game search and ID fetches are currently implemented. For transformer-only providers, "Search" and "Fetch" are marked `no` because this package does not perform those HTTP requests yet. Use your own provider client or stored payloads, wrap the payload in a `SourceRecord`, and call the category transformer.
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
@@ -154,9 +154,86 @@ const game = await zuuid.play.gamesdb?.game.fetch({ id: 17444 });
|
|
|
154
154
|
|
|
155
155
|
GamesDB transforms accept both simple flat payloads and native TheGamesDB API envelopes with `data.games`, `data.platforms`, lookup maps, and `boxart` image metadata.
|
|
156
156
|
|
|
157
|
+
## OpenStreetMap
|
|
158
|
+
|
|
159
|
+
`OpenStreetMapProvider` uses the public Nominatim API for OSM lookup and search. It sends a descriptive `User-Agent` by default and lets you override it. Fetch IDs must be OSM object IDs with a type prefix: `N` for node, `W` for way, or `R` for relation.
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
import { OpenStreetMapProvider } from "@zivue/zuuid/providers/openstreetmap";
|
|
163
|
+
|
|
164
|
+
const osm = new OpenStreetMapProvider({
|
|
165
|
+
userAgent: "your-app/1.0 (you@example.com)"
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
const city = await osm.fetchCity({ id: "R406091" });
|
|
169
|
+
const venues = await osm.searchVenues({ query: "Blue Note Oslo" });
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The category-first client exposes OpenStreetMap under `visit.openstreetmap`:
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
const zuuid = createZuuidClient({ providers: { openstreetmap: {} } });
|
|
176
|
+
|
|
177
|
+
const places = await zuuid.visit.openstreetmap?.place.search({ query: "Eiffel Tower" });
|
|
178
|
+
const country = await zuuid.visit.openstreetmap?.country.fetch({ id: "R2978650" });
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## ComicVine Credentials
|
|
182
|
+
|
|
183
|
+
`ComicVineProvider` uses the ComicVine API and requires an API key:
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
import { ComicVineProvider } from "@zivue/zuuid/providers/comicvine";
|
|
187
|
+
|
|
188
|
+
const comicvine = new ComicVineProvider({
|
|
189
|
+
apiKey: process.env.COMICVINE_API_KEY!
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const volume = await comicvine.fetchVolume({ id: 1 });
|
|
193
|
+
const issues = await comicvine.searchIssues({ query: "Saga" });
|
|
194
|
+
const publisher = await comicvine.fetchPublisher({ id: 10 });
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
The category-first client exposes ComicVine under `read.comicvine` and `people.comicvine`:
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
const zuuid = createZuuidClient({
|
|
201
|
+
providers: { comicvine: { apiKey: process.env.COMICVINE_API_KEY! } }
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
const volumes = await zuuid.read.comicvine?.volume.search({ query: "Saga" });
|
|
205
|
+
const character = await zuuid.people.comicvine?.character.search({ query: "Spider-Man" });
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
## MusicBrainz
|
|
210
|
+
|
|
211
|
+
`MusicBrainzProvider` uses the public MusicBrainz JSON web service. No API key is required, but the provider sends a descriptive `User-Agent` by default and lets you override it.
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
import { MusicBrainzProvider } from "@zivue/zuuid/providers/musicbrainz";
|
|
215
|
+
|
|
216
|
+
const musicbrainz = new MusicBrainzProvider({
|
|
217
|
+
userAgent: "your-app/1.0 (you@example.com)"
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
const release = await musicbrainz.fetchRelease({ id: "f5093c06-23e3-404f-aeaa-40f72885ee3a" });
|
|
221
|
+
const releaseGroups = await musicbrainz.searchReleaseGroups({ query: "Kind of Blue" });
|
|
222
|
+
const artist = await musicbrainz.fetchArtist({ id: "561d854a-6a28-4aa7-8c99-323e6ce46c2a" });
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The category-first client exposes MusicBrainz under `listen.musicbrainz` and `people.musicbrainz`:
|
|
226
|
+
|
|
227
|
+
```ts
|
|
228
|
+
const zuuid = createZuuidClient({ providers: { musicbrainz: {} } });
|
|
229
|
+
|
|
230
|
+
const album = await zuuid.listen.musicbrainz?.releaseGroup.search({ query: "Kind of Blue" });
|
|
231
|
+
const artist = await zuuid.people.musicbrainz?.artist.search({ query: "Miles Davis" });
|
|
232
|
+
```
|
|
233
|
+
|
|
157
234
|
## IMDb Scraper
|
|
158
235
|
|
|
159
|
-
IMDb can be used as a credential-free alternative source when you already have an IMDb title ID. It scrapes the title page, preserves the fetched HTML and extracted JSON-LD in the raw `SourceRecord`, and transforms the JSON-LD into normalized `ZuuidData`.
|
|
236
|
+
IMDb can be used as a credential-free alternative source when you already have an IMDb title ID. It scrapes the title page, preserves the fetched HTML and extracted JSON-LD in the raw `SourceRecord`, and transforms the JSON-LD into normalized `ZuuidData`. If IMDb serves a challenge page instead of title HTML, the provider falls back to IMDb suggestion data for core fields such as title, year, poster, type, rank, and cast summary.
|
|
160
237
|
|
|
161
238
|
```ts
|
|
162
239
|
import { ImdbProvider } from "@zivue/zuuid/providers/imdb";
|
|
@@ -202,6 +279,8 @@ const tvShows = await zuuid.tv.tmdb?.search({ query: "Game of Thrones" });
|
|
|
202
279
|
const people = await zuuid.people.tmdb?.search({ query: "Brad Pitt" });
|
|
203
280
|
const books = await zuuid.read.openlibrary?.search({ query: "The Lord of the Rings" });
|
|
204
281
|
const authors = await zuuid.people.openlibrary?.search({ query: "J. K. Rowling" });
|
|
282
|
+
const comics = await zuuid.read.comicvine?.volume.search({ query: "Saga" });
|
|
283
|
+
const places = await zuuid.visit.openstreetmap?.place.search({ query: "Eiffel Tower" });
|
|
205
284
|
```
|
|
206
285
|
|
|
207
286
|
Provider methods are also available directly:
|
|
@@ -220,6 +299,22 @@ const books = await openlibrary.searchBooks({ query: "The Lord of the Rings" });
|
|
|
220
299
|
const authors = await openlibrary.searchAuthors({ query: "J. K. Rowling" });
|
|
221
300
|
```
|
|
222
301
|
|
|
302
|
+
```ts
|
|
303
|
+
import { ComicVineProvider } from "@zivue/zuuid/providers/comicvine";
|
|
304
|
+
|
|
305
|
+
const comicvine = new ComicVineProvider({ apiKey: process.env.COMICVINE_API_KEY! });
|
|
306
|
+
const volumes = await comicvine.searchVolumes({ query: "Saga" });
|
|
307
|
+
const issues = await comicvine.searchIssues({ query: "Saga" });
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
```ts
|
|
311
|
+
import { OpenStreetMapProvider } from "@zivue/zuuid/providers/openstreetmap";
|
|
312
|
+
|
|
313
|
+
const osm = new OpenStreetMapProvider();
|
|
314
|
+
const places = await osm.searchPlaces({ query: "Eiffel Tower" });
|
|
315
|
+
const city = await osm.fetchCity({ id: "R406091" });
|
|
316
|
+
```
|
|
317
|
+
|
|
223
318
|
Search options include pagination and common TMDB filters:
|
|
224
319
|
|
|
225
320
|
```ts
|
|
@@ -374,6 +469,11 @@ zuuid.people.openlibrary?.fetch({ id: "OL23919A" });
|
|
|
374
469
|
|
|
375
470
|
zuuid.read.openlibrary?.search({ query: "The Lord of the Rings" });
|
|
376
471
|
zuuid.read.openlibrary?.fetch({ id: "OL82563W" });
|
|
472
|
+
|
|
473
|
+
zuuid.listen.musicbrainz?.release.search({ query: "Kind of Blue" });
|
|
474
|
+
zuuid.listen.musicbrainz?.releaseGroup.fetch({ id: "aaa50249-1e6b-3910-b830-7e2fb622a8c4" });
|
|
475
|
+
zuuid.listen.musicbrainz?.recording.search({ query: "So What" });
|
|
476
|
+
zuuid.people.musicbrainz?.artist.search({ query: "Miles Davis" });
|
|
377
477
|
```
|
|
378
478
|
|
|
379
479
|
## Example Scripts
|
|
@@ -396,6 +496,13 @@ npm run example:search -- tv "Game of Thrones"
|
|
|
396
496
|
npm run example:search -- people "Brad Pitt"
|
|
397
497
|
npm run example:search -- book "The Lord of the Rings"
|
|
398
498
|
npm run example:search -- author "J. K. Rowling"
|
|
499
|
+
npm run example:search -- release-group "Kind of Blue"
|
|
500
|
+
npm run example:search -- recording "So What"
|
|
501
|
+
npm run example:search -- artist "Miles Davis"
|
|
502
|
+
COMICVINE_API_KEY=... npm run example:search -- comicvine:volume "Saga"
|
|
503
|
+
COMICVINE_API_KEY=... npm run example:search -- comicvine:issue "Saga"
|
|
504
|
+
npm run example:search -- openstreetmap:place "Eiffel Tower"
|
|
505
|
+
npm run example:search -- openstreetmap:venue "Blue Note Oslo"
|
|
399
506
|
```
|
|
400
507
|
|
|
401
508
|
Fetch and transform a selected provider ID:
|
|
@@ -413,8 +520,15 @@ Fetch live provider examples:
|
|
|
413
520
|
```sh
|
|
414
521
|
npm run example:fetch -- imdb:movie tt0137523
|
|
415
522
|
npm run example:fetch -- imdb:tv tt0944947
|
|
523
|
+
COMICVINE_API_KEY=... npm run example:fetch -- comicvine:volume 1
|
|
524
|
+
COMICVINE_API_KEY=... npm run example:fetch -- comicvine:issue 101
|
|
416
525
|
GAMESDB_API_KEY=... npm run example:fetch -- gamesdb:game 17444
|
|
417
526
|
GAMESDB_API_KEY=... npm run example:fetch -- gamesdb:platform 6
|
|
527
|
+
npm run example:fetch -- musicbrainz:release f5093c06-23e3-404f-aeaa-40f72885ee3a
|
|
528
|
+
npm run example:fetch -- musicbrainz:release-group aaa50249-1e6b-3910-b830-7e2fb622a8c4
|
|
529
|
+
npm run example:fetch -- musicbrainz:artist 561d854a-6a28-4aa7-8c99-323e6ce46c2a
|
|
530
|
+
npm run example:fetch -- openstreetmap:city R406091
|
|
531
|
+
npm run example:fetch -- openstreetmap:country R2978650
|
|
418
532
|
```
|
|
419
533
|
|
|
420
534
|
Transformer-only providers do not have fetch examples. Wrap a real payload from your own provider client in a `SourceRecord` and call the transformer directly.
|
|
@@ -450,7 +564,10 @@ Provider exports:
|
|
|
450
564
|
- `TmdbProvider`
|
|
451
565
|
- `OpenLibraryProvider`
|
|
452
566
|
- `ImdbProvider`
|
|
567
|
+
- `ComicVineProvider`
|
|
453
568
|
- `GamesDbProvider`
|
|
569
|
+
- `MusicBrainzProvider`
|
|
570
|
+
- `OpenStreetMapProvider`
|
|
454
571
|
- `transformTmdbMovie(sourceRecord, options?)`
|
|
455
572
|
- `transformTmdbTv(sourceRecord, options?)`
|
|
456
573
|
- `transformTmdbPerson(sourceRecord, options?)`
|
package/dist/client.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import { type ComicVineProviderOptions, type ComicVineSearchInput, type FetchComicVineInput } from "./providers/comicvine/index.js";
|
|
1
2
|
import type { SearchResponse, ZuuidData, ZuuidSearchResult } from "./entity.js";
|
|
3
|
+
import { type FetchMusicBrainzInput, type MusicBrainzProviderOptions, type MusicBrainzSearchInput } from "./providers/musicbrainz/index.js";
|
|
2
4
|
import { type FetchOpenLibraryAuthorInput, type FetchOpenLibraryBookInput, type OpenLibraryProviderOptions, type OpenLibrarySearchInput } from "./providers/openlibrary/index.js";
|
|
5
|
+
import { type FetchOpenStreetMapInput, type OpenStreetMapProviderOptions, type OpenStreetMapSearchInput } from "./providers/openstreetmap/index.js";
|
|
3
6
|
import { type FetchTmdbMovieInput, type FetchTmdbPersonInput, type FetchTmdbTvInput, type TmdbProviderOptions, type TmdbSearchInput } from "./providers/tmdb/index.js";
|
|
4
7
|
import { type FetchGamesDbGameInput, type FetchGamesDbPlatformInput, type GamesDbProviderOptions, type GamesDbSearchInput } from "./providers/gamesdb/index.js";
|
|
5
8
|
import { type FetchImdbTitleInput, type ImdbProviderOptions } from "./providers/imdb/index.js";
|
|
6
9
|
import type { SourceRecord } from "./source.js";
|
|
7
10
|
export type ProviderConfigs = {
|
|
11
|
+
comicvine?: ComicVineProviderOptions;
|
|
8
12
|
gamesdb?: GamesDbProviderOptions;
|
|
9
13
|
imdb?: ImdbProviderOptions;
|
|
14
|
+
musicbrainz?: MusicBrainzProviderOptions;
|
|
10
15
|
openlibrary?: OpenLibraryProviderOptions;
|
|
16
|
+
openstreetmap?: OpenStreetMapProviderOptions;
|
|
11
17
|
tmdb?: TmdbProviderOptions;
|
|
12
18
|
};
|
|
13
19
|
export type ZuuidClientConfig = {
|
|
@@ -44,9 +50,31 @@ export type ZuuidClient = {
|
|
|
44
50
|
people: {
|
|
45
51
|
tmdb?: ProviderClient<FetchTmdbPersonInput, TmdbSearchInput>;
|
|
46
52
|
openlibrary?: ProviderClient<FetchOpenLibraryAuthorInput, OpenLibrarySearchInput>;
|
|
53
|
+
musicbrainz?: {
|
|
54
|
+
artist: ProviderClient<FetchMusicBrainzInput, MusicBrainzSearchInput>;
|
|
55
|
+
label: ProviderClient<FetchMusicBrainzInput, MusicBrainzSearchInput>;
|
|
56
|
+
};
|
|
57
|
+
comicvine?: {
|
|
58
|
+
character: ProviderClient<FetchComicVineInput, ComicVineSearchInput>;
|
|
59
|
+
person: ProviderClient<FetchComicVineInput, ComicVineSearchInput>;
|
|
60
|
+
publisher: ProviderClient<FetchComicVineInput, ComicVineSearchInput>;
|
|
61
|
+
};
|
|
47
62
|
};
|
|
48
63
|
read: {
|
|
49
64
|
openlibrary?: ProviderClient<FetchOpenLibraryBookInput, OpenLibrarySearchInput>;
|
|
65
|
+
comicvine?: {
|
|
66
|
+
volume: ProviderClient<FetchComicVineInput, ComicVineSearchInput>;
|
|
67
|
+
issue: ProviderClient<FetchComicVineInput, ComicVineSearchInput>;
|
|
68
|
+
storyArc: ProviderClient<FetchComicVineInput, ComicVineSearchInput>;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
listen: {
|
|
72
|
+
musicbrainz?: {
|
|
73
|
+
release: ProviderClient<FetchMusicBrainzInput, MusicBrainzSearchInput>;
|
|
74
|
+
releaseGroup: ProviderClient<FetchMusicBrainzInput, MusicBrainzSearchInput>;
|
|
75
|
+
recording: ProviderClient<FetchMusicBrainzInput, MusicBrainzSearchInput>;
|
|
76
|
+
work: ProviderClient<FetchMusicBrainzInput, MusicBrainzSearchInput>;
|
|
77
|
+
};
|
|
50
78
|
};
|
|
51
79
|
play: {
|
|
52
80
|
gamesdb?: {
|
|
@@ -54,6 +82,14 @@ export type ZuuidClient = {
|
|
|
54
82
|
platform: FetchOnlyProviderClient<FetchGamesDbPlatformInput>;
|
|
55
83
|
};
|
|
56
84
|
};
|
|
85
|
+
visit: {
|
|
86
|
+
openstreetmap?: {
|
|
87
|
+
city: ProviderClient<FetchOpenStreetMapInput, OpenStreetMapSearchInput>;
|
|
88
|
+
country: ProviderClient<FetchOpenStreetMapInput, OpenStreetMapSearchInput>;
|
|
89
|
+
place: ProviderClient<FetchOpenStreetMapInput, OpenStreetMapSearchInput>;
|
|
90
|
+
venue: ProviderClient<FetchOpenStreetMapInput, OpenStreetMapSearchInput>;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
57
93
|
};
|
|
58
94
|
export declare function createZuuidClient(config?: ZuuidClientConfig): ZuuidClient;
|
|
59
95
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"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C;SAC1E,CAAC;KACH,CAAC;CACH,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,iBAAsB,GAAG,WAAW,CAwO7E"}
|
package/dist/client.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { ComicVineProvider, transformComicVine } from "./providers/comicvine/index.js";
|
|
2
|
+
import { MusicBrainzProvider, transformMusicBrainzArtist, transformMusicBrainzLabel, transformMusicBrainzRecording, transformMusicBrainzRelease, transformMusicBrainzReleaseGroup, transformMusicBrainzWork } from "./providers/musicbrainz/index.js";
|
|
1
3
|
import { OpenLibraryProvider, transformOpenLibraryAuthor, transformOpenLibraryBook } from "./providers/openlibrary/index.js";
|
|
4
|
+
import { OpenStreetMapProvider, transformOpenStreetMapPlace } from "./providers/openstreetmap/index.js";
|
|
2
5
|
import { TmdbProvider, transformTmdbMovie, transformTmdbPerson, transformTmdbTv } from "./providers/tmdb/index.js";
|
|
3
6
|
import { GamesDbProvider, transformGamesDbGame, transformGamesDbPlatform } from "./providers/gamesdb/index.js";
|
|
4
7
|
import { ImdbProvider, transformImdbMovie, transformImdbTv } from "./providers/imdb/index.js";
|
|
5
8
|
export function createZuuidClient(config = {}) {
|
|
9
|
+
const comicvine = config.providers?.comicvine ? new ComicVineProvider(config.providers.comicvine) : undefined;
|
|
6
10
|
const gamesdb = config.providers?.gamesdb ? new GamesDbProvider(config.providers.gamesdb) : undefined;
|
|
7
11
|
const imdb = config.providers?.imdb ? new ImdbProvider(config.providers.imdb) : undefined;
|
|
12
|
+
const musicbrainz = config.providers?.musicbrainz ? new MusicBrainzProvider(config.providers.musicbrainz) : undefined;
|
|
8
13
|
const openlibrary = config.providers?.openlibrary ? new OpenLibraryProvider(config.providers.openlibrary) : undefined;
|
|
14
|
+
const openstreetmap = config.providers?.openstreetmap ? new OpenStreetMapProvider(config.providers.openstreetmap) : undefined;
|
|
9
15
|
const tmdb = config.providers?.tmdb ? new TmdbProvider(config.providers.tmdb) : undefined;
|
|
10
16
|
return Object.freeze({
|
|
11
17
|
movie: Object.freeze({
|
|
@@ -62,6 +68,49 @@ export function createZuuidClient(config = {}) {
|
|
|
62
68
|
searchSourceRecords: (input) => openlibrary.searchAuthorSourceRecords(input),
|
|
63
69
|
transform: (source) => transformOpenLibraryAuthor(source, openlibrary.transformOptions())
|
|
64
70
|
})
|
|
71
|
+
: undefined,
|
|
72
|
+
musicbrainz: musicbrainz
|
|
73
|
+
? Object.freeze({
|
|
74
|
+
artist: Object.freeze({
|
|
75
|
+
fetch: (input) => musicbrainz.fetchArtist(input),
|
|
76
|
+
fetchSourceRecord: (input) => musicbrainz.fetchArtistSourceRecord(input),
|
|
77
|
+
search: (input) => musicbrainz.searchArtists(input),
|
|
78
|
+
searchSourceRecords: (input) => musicbrainz.searchArtistSourceRecords(input),
|
|
79
|
+
transform: (source) => transformMusicBrainzArtist(source)
|
|
80
|
+
}),
|
|
81
|
+
label: Object.freeze({
|
|
82
|
+
fetch: (input) => musicbrainz.fetchLabel(input),
|
|
83
|
+
fetchSourceRecord: (input) => musicbrainz.fetchLabelSourceRecord(input),
|
|
84
|
+
search: (input) => musicbrainz.searchLabels(input),
|
|
85
|
+
searchSourceRecords: (input) => musicbrainz.searchLabelSourceRecords(input),
|
|
86
|
+
transform: (source) => transformMusicBrainzLabel(source)
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
: undefined,
|
|
90
|
+
comicvine: comicvine
|
|
91
|
+
? Object.freeze({
|
|
92
|
+
character: Object.freeze({
|
|
93
|
+
fetch: (input) => comicvine.fetchCharacter(input),
|
|
94
|
+
fetchSourceRecord: (input) => comicvine.fetchCharacterSourceRecord(input),
|
|
95
|
+
search: (input) => comicvine.searchCharacters(input),
|
|
96
|
+
searchSourceRecords: (input) => comicvine.searchCharacterSourceRecords(input),
|
|
97
|
+
transform: (source) => transformComicVine(source)
|
|
98
|
+
}),
|
|
99
|
+
person: Object.freeze({
|
|
100
|
+
fetch: (input) => comicvine.fetchPerson(input),
|
|
101
|
+
fetchSourceRecord: (input) => comicvine.fetchPersonSourceRecord(input),
|
|
102
|
+
search: (input) => comicvine.searchPeople(input),
|
|
103
|
+
searchSourceRecords: (input) => comicvine.searchPersonSourceRecords(input),
|
|
104
|
+
transform: (source) => transformComicVine(source)
|
|
105
|
+
}),
|
|
106
|
+
publisher: Object.freeze({
|
|
107
|
+
fetch: (input) => comicvine.fetchPublisher(input),
|
|
108
|
+
fetchSourceRecord: (input) => comicvine.fetchPublisherSourceRecord(input),
|
|
109
|
+
search: (input) => comicvine.searchPublishers(input),
|
|
110
|
+
searchSourceRecords: (input) => comicvine.searchPublisherSourceRecords(input),
|
|
111
|
+
transform: (source) => transformComicVine(source)
|
|
112
|
+
})
|
|
113
|
+
})
|
|
65
114
|
: undefined
|
|
66
115
|
}),
|
|
67
116
|
read: Object.freeze({
|
|
@@ -73,6 +122,65 @@ export function createZuuidClient(config = {}) {
|
|
|
73
122
|
searchSourceRecords: (input) => openlibrary.searchBookSourceRecords(input),
|
|
74
123
|
transform: (source) => transformOpenLibraryBook(source, openlibrary.transformOptions())
|
|
75
124
|
})
|
|
125
|
+
: undefined,
|
|
126
|
+
comicvine: comicvine
|
|
127
|
+
? Object.freeze({
|
|
128
|
+
volume: Object.freeze({
|
|
129
|
+
fetch: (input) => comicvine.fetchVolume(input),
|
|
130
|
+
fetchSourceRecord: (input) => comicvine.fetchVolumeSourceRecord(input),
|
|
131
|
+
search: (input) => comicvine.searchVolumes(input),
|
|
132
|
+
searchSourceRecords: (input) => comicvine.searchVolumeSourceRecords(input),
|
|
133
|
+
transform: (source) => transformComicVine(source)
|
|
134
|
+
}),
|
|
135
|
+
issue: Object.freeze({
|
|
136
|
+
fetch: (input) => comicvine.fetchIssue(input),
|
|
137
|
+
fetchSourceRecord: (input) => comicvine.fetchIssueSourceRecord(input),
|
|
138
|
+
search: (input) => comicvine.searchIssues(input),
|
|
139
|
+
searchSourceRecords: (input) => comicvine.searchIssueSourceRecords(input),
|
|
140
|
+
transform: (source) => transformComicVine(source)
|
|
141
|
+
}),
|
|
142
|
+
storyArc: Object.freeze({
|
|
143
|
+
fetch: (input) => comicvine.fetchStoryArc(input),
|
|
144
|
+
fetchSourceRecord: (input) => comicvine.fetchStoryArcSourceRecord(input),
|
|
145
|
+
search: (input) => comicvine.searchStoryArcs(input),
|
|
146
|
+
searchSourceRecords: (input) => comicvine.searchStoryArcSourceRecords(input),
|
|
147
|
+
transform: (source) => transformComicVine(source)
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
: undefined
|
|
151
|
+
}),
|
|
152
|
+
listen: Object.freeze({
|
|
153
|
+
musicbrainz: musicbrainz
|
|
154
|
+
? Object.freeze({
|
|
155
|
+
release: Object.freeze({
|
|
156
|
+
fetch: (input) => musicbrainz.fetchRelease(input),
|
|
157
|
+
fetchSourceRecord: (input) => musicbrainz.fetchReleaseSourceRecord(input),
|
|
158
|
+
search: (input) => musicbrainz.searchReleases(input),
|
|
159
|
+
searchSourceRecords: (input) => musicbrainz.searchReleaseSourceRecords(input),
|
|
160
|
+
transform: (source) => transformMusicBrainzRelease(source, { coverArtBaseUrl: musicbrainz.coverArtBaseUrl })
|
|
161
|
+
}),
|
|
162
|
+
releaseGroup: Object.freeze({
|
|
163
|
+
fetch: (input) => musicbrainz.fetchReleaseGroup(input),
|
|
164
|
+
fetchSourceRecord: (input) => musicbrainz.fetchReleaseGroupSourceRecord(input),
|
|
165
|
+
search: (input) => musicbrainz.searchReleaseGroups(input),
|
|
166
|
+
searchSourceRecords: (input) => musicbrainz.searchReleaseGroupSourceRecords(input),
|
|
167
|
+
transform: (source) => transformMusicBrainzReleaseGroup(source, { coverArtBaseUrl: musicbrainz.releaseGroupCoverArtBaseUrl })
|
|
168
|
+
}),
|
|
169
|
+
recording: Object.freeze({
|
|
170
|
+
fetch: (input) => musicbrainz.fetchRecording(input),
|
|
171
|
+
fetchSourceRecord: (input) => musicbrainz.fetchRecordingSourceRecord(input),
|
|
172
|
+
search: (input) => musicbrainz.searchRecordings(input),
|
|
173
|
+
searchSourceRecords: (input) => musicbrainz.searchRecordingSourceRecords(input),
|
|
174
|
+
transform: (source) => transformMusicBrainzRecording(source)
|
|
175
|
+
}),
|
|
176
|
+
work: Object.freeze({
|
|
177
|
+
fetch: (input) => musicbrainz.fetchWork(input),
|
|
178
|
+
fetchSourceRecord: (input) => musicbrainz.fetchWorkSourceRecord(input),
|
|
179
|
+
search: (input) => musicbrainz.searchWorks(input),
|
|
180
|
+
searchSourceRecords: (input) => musicbrainz.searchWorkSourceRecords(input),
|
|
181
|
+
transform: (source) => transformMusicBrainzWork(source)
|
|
182
|
+
})
|
|
183
|
+
})
|
|
76
184
|
: undefined
|
|
77
185
|
}),
|
|
78
186
|
play: Object.freeze({
|
|
@@ -92,6 +200,40 @@ export function createZuuidClient(config = {}) {
|
|
|
92
200
|
})
|
|
93
201
|
})
|
|
94
202
|
: undefined
|
|
203
|
+
}),
|
|
204
|
+
visit: Object.freeze({
|
|
205
|
+
openstreetmap: openstreetmap
|
|
206
|
+
? Object.freeze({
|
|
207
|
+
city: Object.freeze({
|
|
208
|
+
fetch: (input) => openstreetmap.fetchCity(input),
|
|
209
|
+
fetchSourceRecord: (input) => openstreetmap.fetchCitySourceRecord(input),
|
|
210
|
+
search: (input) => openstreetmap.searchCities(input),
|
|
211
|
+
searchSourceRecords: (input) => openstreetmap.searchCitySourceRecords(input),
|
|
212
|
+
transform: (source) => transformOpenStreetMapPlace(source)
|
|
213
|
+
}),
|
|
214
|
+
country: Object.freeze({
|
|
215
|
+
fetch: (input) => openstreetmap.fetchCountry(input),
|
|
216
|
+
fetchSourceRecord: (input) => openstreetmap.fetchCountrySourceRecord(input),
|
|
217
|
+
search: (input) => openstreetmap.searchCountries(input),
|
|
218
|
+
searchSourceRecords: (input) => openstreetmap.searchCountrySourceRecords(input),
|
|
219
|
+
transform: (source) => transformOpenStreetMapPlace(source)
|
|
220
|
+
}),
|
|
221
|
+
place: Object.freeze({
|
|
222
|
+
fetch: (input) => openstreetmap.fetchPlace(input),
|
|
223
|
+
fetchSourceRecord: (input) => openstreetmap.fetchPlaceSourceRecord(input),
|
|
224
|
+
search: (input) => openstreetmap.searchPlaces(input),
|
|
225
|
+
searchSourceRecords: (input) => openstreetmap.searchPlaceSourceRecords(input),
|
|
226
|
+
transform: (source) => transformOpenStreetMapPlace(source)
|
|
227
|
+
}),
|
|
228
|
+
venue: Object.freeze({
|
|
229
|
+
fetch: (input) => openstreetmap.fetchVenue(input),
|
|
230
|
+
fetchSourceRecord: (input) => openstreetmap.fetchVenueSourceRecord(input),
|
|
231
|
+
search: (input) => openstreetmap.searchVenues(input),
|
|
232
|
+
searchSourceRecords: (input) => openstreetmap.searchVenueSourceRecords(input),
|
|
233
|
+
transform: (source) => transformOpenStreetMapPlace(source)
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
: undefined
|
|
95
237
|
})
|
|
96
238
|
});
|
|
97
239
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SearchResponse, ZuuidData, ZuuidSearchResult } from "../../entity.js";
|
|
2
|
+
import { type SourceRecord } from "../../source.js";
|
|
3
|
+
import type { ComicVineApiResponse, ComicVineProviderOptions, ComicVineSearchInput, FetchComicVineInput } from "./types.js";
|
|
4
|
+
export declare class ComicVineProvider {
|
|
5
|
+
readonly apiBase: string;
|
|
6
|
+
readonly userAgent: string;
|
|
7
|
+
private readonly apiKey;
|
|
8
|
+
private readonly fetchImpl;
|
|
9
|
+
constructor(options: ComicVineProviderOptions);
|
|
10
|
+
getJson<T>(path: string, params: Record<string, string>): Promise<T | undefined>;
|
|
11
|
+
getEnvelope<T>(path: string, params: Record<string, string>): Promise<ComicVineApiResponse<T>>;
|
|
12
|
+
fetchVolumeSourceRecord(input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
13
|
+
fetchVolume(input: FetchComicVineInput): Promise<ZuuidData | undefined>;
|
|
14
|
+
searchVolumeSourceRecords(input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
15
|
+
searchVolumes(input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
16
|
+
fetchIssueSourceRecord(input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
17
|
+
fetchIssue(input: FetchComicVineInput): Promise<ZuuidData | undefined>;
|
|
18
|
+
searchIssueSourceRecords(input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
19
|
+
searchIssues(input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
20
|
+
fetchStoryArcSourceRecord(input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
21
|
+
fetchStoryArc(input: FetchComicVineInput): Promise<ZuuidData | undefined>;
|
|
22
|
+
searchStoryArcSourceRecords(input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
23
|
+
searchStoryArcs(input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
24
|
+
fetchCharacterSourceRecord(input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
25
|
+
fetchCharacter(input: FetchComicVineInput): Promise<ZuuidData | undefined>;
|
|
26
|
+
searchCharacterSourceRecords(input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
27
|
+
searchCharacters(input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
28
|
+
fetchPersonSourceRecord(input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
29
|
+
fetchPerson(input: FetchComicVineInput): Promise<ZuuidData | undefined>;
|
|
30
|
+
searchPersonSourceRecords(input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
31
|
+
searchPeople(input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
32
|
+
fetchPublisherSourceRecord(input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
33
|
+
fetchPublisher(input: FetchComicVineInput): Promise<ZuuidData | undefined>;
|
|
34
|
+
searchPublisherSourceRecords(input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
35
|
+
searchPublishers(input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
36
|
+
}
|
|
37
|
+
export declare function fetchComicVineSourceRecord(provider: ComicVineProvider, category: string, input: FetchComicVineInput): Promise<SourceRecord | undefined>;
|
|
38
|
+
export declare function searchComicVineSourceRecords(provider: ComicVineProvider, category: string, input: ComicVineSearchInput): Promise<SearchResponse<SourceRecord>>;
|
|
39
|
+
export declare function searchComicVine(provider: ComicVineProvider, category: string, input: ComicVineSearchInput): Promise<SearchResponse<ZuuidSearchResult>>;
|
|
40
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/providers/comicvine/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpF,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAexE,OAAO,KAAK,EAAE,oBAAoB,EAAsB,wBAAwB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAahJ,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;gBAEnC,OAAO,EAAE,wBAAwB;IAQvC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAqBhF,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE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