openings 0.1.22 → 0.1.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openings",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "A free, candidate-safe job-search substrate for AI agents",
5
5
  "license": "MIT",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/abhay-avagama/hiring-agent.git" },
@@ -157,7 +157,7 @@ function withAttempt(lead: EnrichmentLead, attempt: LeadAttempt): EnrichmentLead
157
157
  }
158
158
 
159
159
  function uniqueSlug(lead: EnrichmentLead, used: Set<string>): string | null {
160
- const raw = lead.ats === "workday" ? (lead.token.split("/")[1] ?? lead.token) : lead.token;
160
+ const raw = lead.ats === "workday" ? (lead.token.split("/")[1] ?? lead.token) : lead.ats === "keka" ? lead.token.split("/")[0]! : lead.ats === "zohorecruit" ? lead.token.split(".")[0]! : lead.token;
161
161
  const base = raw.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || lead.ats;
162
162
  for (const candidate of [base, `${lead.ats}-${base}`]) if (!used.has(candidate)) return candidate;
163
163
  return null;
package/src/providers.ts CHANGED
@@ -192,10 +192,11 @@ const keka: ProviderSpec = {
192
192
  resolve(url) {
193
193
  const tenant = /^([a-z0-9-]+)\.keka\.com$/i.exec(url.hostname)?.[1]?.toLowerCase();
194
194
  if (!tenant || ["www", "app", "hr", "academy", "developers", "help", "cdn", "api"].includes(tenant) && tenant !== "hr") return null;
195
- const org = /\/(?:careers\/api\/embedjobs\/default\/active|ats\/documents)\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i.exec(url.pathname)?.[1];
195
+ const org = /\/(?:careers\/api\/embedjobs(?:\/default\/active)?|ats\/documents)\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i.exec(url.pathname)?.[1];
196
196
  return org ? `${tenant}/${org.toLowerCase()}` : null;
197
197
  },
198
- canonicalUrl: (token) => `https://${token.split("/")[0]}.keka.com/careers`,
198
+ // The embed page is a real listing a person can open and it carries the org id, so the canonical URL round-trips through resolve().
199
+ canonicalUrl: (token) => `https://${token.split("/")[0]}.keka.com/careers/api/embedjobs/${token.split("/")[1] ?? ""}`,
199
200
  endpoint: (token) => `https://${token.split("/")[0]}.keka.com/careers/api/embedjobs/default/active/${token.split("/")[1] ?? ""}`,
200
201
  jobsFromBody: (body) => asRecords(body),
201
202
  providerName: () => "",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.1.22";
1
+ export const VERSION = "0.1.23";