Refactor apply handlers: generic with extensions + domain auto-routing

Generic handler now accepts options (transformUrl, formDetector,
submitSelector, resumeSelector, beforeSubmit, verifySelector, etc.).
Each ATS handler passes its overrides instead of reimplementing.

Registry resolves handlers by: apply_type -> URL domain -> generic fallback.
New ATS handlers only need to export SUPPORTED_TYPES and an apply() that
calls genericApply with platform-specific options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 20:41:54 -08:00
parent 4f202a4e91
commit ae797d73eb
7 changed files with 155 additions and 177 deletions

View File

@@ -1,12 +1,13 @@
/**
* workday.mjs — Workday ATS handler
* Delegates to generic handler. Workday often requires account creation,
* so many will return skipped_login_required — that's expected.
* workday.mjs — Workday ATS handler (extends generic)
* Most Workday sites require account creation — generic will return skipped_login_required
*/
import { apply as genericApply } from './generic.mjs';
export const SUPPORTED_TYPES = ['workday'];
export async function apply(page, job, formFiller) {
return genericApply(page, job, formFiller);
return genericApply(page, job, formFiller, {
closedTexts: ['this job posting is no longer active'],
});
}