@prose-reader/metadata-fetcher 1.338.0 → 1.340.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/dist/fetchMetadata.d.ts +5 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +471 -149
- package/dist/index.js.map +1 -1
- package/dist/match/scoreMetadataCandidate.d.ts +8 -5
- package/dist/match/similarity.d.ts +2 -0
- package/dist/providers/openLibrary/createOpenLibraryProvider.d.ts +5 -5
- package/dist/providers/openLibrary/parse.d.ts +2 -1
- package/dist/providers/openLibrary/resolve.d.ts +7 -2
- package/dist/providers/projectGutenberg/createProjectGutenbergProvider.d.ts +17 -0
- package/dist/providers/projectGutenberg/createProjectGutenbergProvider.test.d.ts +1 -0
- package/dist/providers/projectGutenberg/identifier.d.ts +16 -0
- package/dist/providers/projectGutenberg/identifier.test.d.ts +1 -0
- package/dist/providers/projectGutenberg/parse.d.ts +31 -0
- package/dist/providers/projectGutenberg/parse.test.d.ts +1 -0
- package/dist/providers/projectGutenberg/resolve.d.ts +26 -0
- package/dist/providers/projectGutenberg/resolve.test.d.ts +1 -0
- package/dist/types/match.d.ts +7 -7
- package/dist/utils/hasSearchTerms.d.ts +2 -2
- package/package.json +5 -4
package/dist/types/match.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { ResolvedMetadata } from '@prose-reader/archive-reader';
|
|
|
3
3
|
* The fields the matcher compares — only ever when **both** sides state one,
|
|
4
4
|
* so what the query doesn't know cannot count against a candidate.
|
|
5
5
|
*/
|
|
6
|
-
export type MetadataMatchField = "isbn" | "gtin" | "identifiers" | "title" | "contributors" | "series" | "publisher" | "
|
|
6
|
+
export type MetadataMatchField = "isbn" | "gtin" | "identifiers" | "title" | "contributors" | "series" | "publication.original.date" | "publication.original.publisher" | "publication.edition.date" | "publication.edition.publisher" | "languages" | "numberOfPages";
|
|
7
7
|
/**
|
|
8
8
|
* One field comparison. The compared values sit next to the score so a match
|
|
9
|
-
* is explainable to a user — "same title, different publisher" —
|
|
10
|
-
* re-deriving anything.
|
|
9
|
+
* is explainable to a user — "same title, different edition publisher" —
|
|
10
|
+
* without re-deriving anything.
|
|
11
11
|
*/
|
|
12
12
|
export type MetadataMatchSignal = {
|
|
13
13
|
readonly field: MetadataMatchField;
|
|
@@ -28,10 +28,10 @@ export type MetadataMatch = {
|
|
|
28
28
|
readonly providerId: string;
|
|
29
29
|
/**
|
|
30
30
|
* Aggregate confidence, `0` to `1`: the weight-averaged score of every
|
|
31
|
-
* comparable field — except when
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* to compare.
|
|
31
|
+
* comparable field — except when an ISBN, GTIN or shared scheme-scoped
|
|
32
|
+
* identifier confirms identity, which settles it at `1`. A contradictory
|
|
33
|
+
* ISBN or GTIN settles it at `0`. `0` too when the two sides had no field in
|
|
34
|
+
* common to compare.
|
|
35
35
|
*/
|
|
36
36
|
readonly score: number;
|
|
37
37
|
readonly signals: ReadonlyArray<MetadataMatchSignal>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResolvedMetadata } from '@prose-reader/archive-reader';
|
|
2
2
|
/**
|
|
3
3
|
* Whether a catalog has anything to go on, so a lookup with nothing to ask
|
|
4
|
-
* about costs no round trip.
|
|
5
|
-
*
|
|
4
|
+
* about costs no round trip. Publication details, a language, or a page count
|
|
5
|
+
* narrow a search but cannot start one.
|
|
6
6
|
*/
|
|
7
7
|
export declare const hasSearchTerms: (metadata: ResolvedMetadata) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prose-reader/metadata-fetcher",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.340.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
"test:watch": "vitest watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@prose-reader/archive-reader": "^1.
|
|
33
|
-
"@prose-reader/shared": "^1.
|
|
32
|
+
"@prose-reader/archive-reader": "^1.340.0",
|
|
33
|
+
"@prose-reader/shared": "^1.340.0",
|
|
34
|
+
"xmldoc": "^2.0.0"
|
|
34
35
|
},
|
|
35
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "b8aea840260994b069963e15474aa1dfdbb685e7"
|
|
36
37
|
}
|