@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.
@@ -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" | "published" | "languages" | "numberOfPages";
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" — without
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 both sides state an identifier, which
32
- * settles it outright: `1` if it agrees (an ISBN/GTIN match *is* the book),
33
- * `0` if it contradicts. `0` too when the two sides had no field in common
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. Descriptive fields alone — a publisher, a
5
- * language, a page count — narrow a search but cannot start one.
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.338.0",
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.338.0",
33
- "@prose-reader/shared": "^1.338.0"
32
+ "@prose-reader/archive-reader": "^1.340.0",
33
+ "@prose-reader/shared": "^1.340.0",
34
+ "xmldoc": "^2.0.0"
34
35
  },
35
- "gitHead": "0a8e7928c8bf22daac728b87edb9b062187c37b7"
36
+ "gitHead": "b8aea840260994b069963e15474aa1dfdbb685e7"
36
37
  }