openings 0.1.60 → 0.1.61
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/data/companies.json +15637 -0
- package/package.json +1 -1
- package/src/board-verification.ts +20 -2
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import excludedData from "../data/excluded.json" with { type: "json" };
|
|
1
2
|
import { atomicJson } from "./atomic-file.ts";
|
|
2
3
|
import { readEnrichmentRegistry, mergeEnrichmentLeads, type EnrichmentLead, type LeadAttempt } from "./enrichment-registry.ts";
|
|
3
4
|
import { withFileLock } from "./file-lock.ts";
|
|
@@ -7,6 +8,22 @@ import type { Ats, Company, SourceVerification } from "./types.ts";
|
|
|
7
8
|
|
|
8
9
|
type Fetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Sources that must never be admitted, by provider and token.
|
|
13
|
+
*
|
|
14
|
+
* Deleting a row from the catalog does not hold: the lead stays in the registry and the next verification run
|
|
15
|
+
* puts it straight back, which is how two employers excluded on terms grounds could have quietly returned. The
|
|
16
|
+
* reason travels with the entry so a later reader does not have to guess why.
|
|
17
|
+
*/
|
|
18
|
+
const EXCLUDED: ReadonlySet<string> = new Set(
|
|
19
|
+
excludedData.entries.map((entry) => `${entry.ats}:${entry.token.toLowerCase()}`),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
/** Why a given source is excluded, for reporting. */
|
|
23
|
+
export function exclusionReason(ats: string, token: string): string | undefined {
|
|
24
|
+
return excludedData.entries.find((entry) => entry.ats === ats && entry.token.toLowerCase() === token.toLowerCase())?.reason;
|
|
25
|
+
}
|
|
26
|
+
|
|
10
27
|
/** Providers whose public board is accepted as identity on its own. Workday boards are identified by tenant; their crawls are heavier but they carry the large employers. */
|
|
11
28
|
export const BOARD_TIER_PROVIDERS: ReadonlySet<Ats> = new Set(["greenhouse", "lever", "ashby", "recruitee", "smartrecruiters", "workable", "breezy", "workday", "freshteam", "keka", "zohorecruit"]);
|
|
12
29
|
|
|
@@ -24,7 +41,7 @@ export interface BoardVerificationReport {
|
|
|
24
41
|
generatedAt: string;
|
|
25
42
|
considered: number;
|
|
26
43
|
selected: number;
|
|
27
|
-
skipped: { inCatalog: number; coolingDown: number; unsupported: number; deferred: number };
|
|
44
|
+
skipped: { inCatalog: number; coolingDown: number; unsupported: number; deferred: number; excluded: number };
|
|
28
45
|
verified: number;
|
|
29
46
|
added: string[];
|
|
30
47
|
rejected: Array<{ sourceKey: string; reason: "unreachable" | "invalid_payload" | "empty_board" | "duplicate_slug"; detail: string }>;
|
|
@@ -50,10 +67,11 @@ export async function verifyBoards(registryPath: string, catalogPath: string, op
|
|
|
50
67
|
const catalog = await readCatalog(catalogPath);
|
|
51
68
|
const registry = await readEnrichmentRegistry(registryPath);
|
|
52
69
|
const knownSources = new Set(Object.values(catalog).map((entry) => `${entry.ats}:${entry.token.toLowerCase()}`));
|
|
53
|
-
const skipped = { inCatalog: 0, coolingDown: 0, unsupported: 0, deferred: 0 };
|
|
70
|
+
const skipped = { inCatalog: 0, coolingDown: 0, unsupported: 0, deferred: 0, excluded: 0 };
|
|
54
71
|
const eligible: EnrichmentLead[] = [];
|
|
55
72
|
for (const lead of registry.leads) {
|
|
56
73
|
if (!BOARD_TIER_PROVIDERS.has(lead.ats) || !resolveSource(lead.sourceUrl)) { skipped.unsupported += 1; continue; }
|
|
74
|
+
if (EXCLUDED.has(`${lead.ats}:${lead.token.toLowerCase()}`)) { skipped.excluded += 1; continue; }
|
|
57
75
|
if (knownSources.has(`${lead.ats}:${lead.token.toLowerCase()}`)) { skipped.inCatalog += 1; continue; }
|
|
58
76
|
// Keka tokens contain tenant/UUID; the provider-issued routing UUID is not a company name.
|
|
59
77
|
const boardName = lead.ats === "keka" ? lead.token.split("/")[0]! : lead.token;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.1.
|
|
1
|
+
export const VERSION = "0.1.61";
|