-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatches.ts
34 lines (30 loc) · 1.18 KB
/
patches.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import _external from "./data/external_ids.json" with { type: "json" };
import _from from "./data/from.json" with { type: "json" };
import type { Akvaplanist } from "./types.ts";
// "openalex" resolve at https://api.openalex.org/people/{openalex}
// "orcid" resolve at https://orcid.org/{orcid}
// "cristin" resolve at https://api.cristin.no/v2/persons/{cristin}
export const externalIdentities = new Map<
string,
Pick<Akvaplanist, "orcid" | "openalex" | "cristin">
>(_external.map(({ id, ...ids }) => [id, ids]));
export const fromPatches = new Map(
_from.map(([id, from]) => [id, new Date(from)]),
);
const manualPatches: [string, Partial<Akvaplanist>][] = [
["aen", { management: true, section: "LEDELS" }],
["aki", {
given: "Albert K. D.",
}],
["der", { from: new Date("2024-12-01") }],
["fma", { workplace: "Sortland" }],
["lli", { workplace: "Sortland" }],
["mjh", {
from: new Date("2023-08-15"),
expired: new Date("2024-10-31T16:00:00Z"),
}],
["odj", { given: "Ólöf Dóra Bartels", family: "Jónsdóttir" }],
["ote", { from: new Date("2024-03-11"), workplace: "Tromsø" }],
["per", { given: "Paul E." }],
];
export const patches = new Map(manualPatches);