[WIP] mappings
This commit is contained in:
118
schema-mappings/recruiters-mapping.js
Normal file
118
schema-mappings/recruiters-mapping.js
Normal file
@@ -0,0 +1,118 @@
|
||||
// Recruiters schema mapping - recruiter natural language support
|
||||
import { createSchemaMapping } from "./base-mapping.js";
|
||||
import fs from "node:fs";
|
||||
|
||||
const SCHEMA_PATH = "../smatchitObjectOdmdb/schema/recruiters.json";
|
||||
|
||||
let recruitersSchema = null;
|
||||
try {
|
||||
if (fs.existsSync(SCHEMA_PATH)) {
|
||||
recruitersSchema = JSON.parse(fs.readFileSync(SCHEMA_PATH, "utf-8"));
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(`Warning: Could not load recruiters schema: ${error.message}`);
|
||||
}
|
||||
|
||||
export const recruitersMapping = createSchemaMapping(
|
||||
recruitersSchema,
|
||||
"recruiters"
|
||||
);
|
||||
|
||||
// Additional recruiters-specific enhancements
|
||||
if (recruitersMapping.available) {
|
||||
const recruitersEnhancements = {
|
||||
// Identity & Contact
|
||||
"recruiter id": "alias",
|
||||
"recruiter name": "alias",
|
||||
"hr id": "alias",
|
||||
"hiring manager": "alias",
|
||||
|
||||
// Contact Information
|
||||
"contact email": "email",
|
||||
"recruiter email": "email",
|
||||
"hiring email": "email",
|
||||
"hr email": "email",
|
||||
"contact phone": "phone",
|
||||
"recruiter phone": "phone",
|
||||
telephone: "phone",
|
||||
"phone number": "phone",
|
||||
|
||||
// Company Associations
|
||||
companies: "sirets",
|
||||
employers: "sirets",
|
||||
clients: "sirets",
|
||||
businesses: "sirets",
|
||||
organizations: "sirets",
|
||||
"company list": "sirets",
|
||||
"employer list": "sirets",
|
||||
|
||||
// Professional Information
|
||||
tips: "tipsadvice",
|
||||
advice: "tipsadvice",
|
||||
articles: "tipsadvice",
|
||||
guidance: "tipsadvice",
|
||||
recommendations: "tipsadvice",
|
||||
"help articles": "tipsadvice",
|
||||
|
||||
// Activity & Dates
|
||||
joined: "dt_create",
|
||||
registration: "dt_create",
|
||||
"sign up": "dt_create",
|
||||
"account created": "dt_create",
|
||||
"last updated": "dt_update",
|
||||
"profile updated": "dt_update",
|
||||
modified: "dt_update",
|
||||
|
||||
// Status & Activity
|
||||
"active recruiter": "status",
|
||||
"recruiter status": "status",
|
||||
"hiring status": "status",
|
||||
availability: "status",
|
||||
|
||||
// Job Management
|
||||
"job postings": "jobads",
|
||||
"job ads": "jobads",
|
||||
postings: "jobads",
|
||||
advertisements: "jobads",
|
||||
vacancies: "jobads",
|
||||
openings: "jobads",
|
||||
|
||||
// Recruitment Activity
|
||||
candidates: "candidates",
|
||||
applicants: "applicants",
|
||||
seekers: "seekers",
|
||||
prospects: "prospects",
|
||||
"talent pool": "candidates",
|
||||
|
||||
// Performance & Metrics
|
||||
placements: "placements",
|
||||
hires: "hires",
|
||||
"successful hires": "placements",
|
||||
"recruitment success": "placements",
|
||||
};
|
||||
|
||||
// Merge enhancements into synonyms
|
||||
Object.entries(recruitersEnhancements).forEach(([synonym, fieldName]) => {
|
||||
recruitersMapping.synonyms[synonym.toLowerCase()] = fieldName;
|
||||
});
|
||||
|
||||
// Add recruiter-specific context
|
||||
recruitersMapping.context = {
|
||||
description:
|
||||
"Recruiters create and manage job postings, recruit for companies (sirets), and manage the hiring process",
|
||||
primaryActions: [
|
||||
"create jobads",
|
||||
"manage candidates",
|
||||
"process applications",
|
||||
"schedule interviews",
|
||||
],
|
||||
relationships: {
|
||||
sirets: "Companies the recruiter works for",
|
||||
jobads: "Job postings created by this recruiter",
|
||||
candidates: "People being recruited",
|
||||
seekers: "Job seekers in recruitment process",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default recruitersMapping;
|
Reference in New Issue
Block a user