feat(api,shared): métadonnées multi-providers et automatisation des scans/enrichissements
Chaîne de résolution metadata (local, Open Library, Google Books, BNF) avec activation/priorité/clé API par provider, colonnes isbn13 et identifiers sur les livres, et intégration au scanner pour compléter métadonnées et jaquettes manquantes. Module automation: réglages persistés, planifications scan/enrichissement et déclenchement manuel, exposés via des endpoints admin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
14
apps/api/src/automation/automation.service.test.ts
Normal file
14
apps/api/src/automation/automation.service.test.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { nextRunAt } from "./automation.service.js";
|
||||
|
||||
describe("automation scheduling", () => {
|
||||
it("computes the next daily run", () => {
|
||||
const next = nextRunAt({ frequency: "daily", time: "03:30", dayOfWeek: 1 }, new Date("2026-08-23T02:00:00.000Z"));
|
||||
expect(next.toISOString()).toBe("2026-08-23T03:30:00.000Z");
|
||||
});
|
||||
|
||||
it("moves elapsed weekly runs to the next week", () => {
|
||||
const next = nextRunAt({ frequency: "weekly", time: "03:30", dayOfWeek: 0 }, new Date("2026-08-23T04:00:00.000Z"));
|
||||
expect(next.toISOString()).toBe("2026-08-30T03:30:00.000Z");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user