@adaptware/eagles-db 0.5.29 → 0.5.30
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/README.md +7 -2
- package/client/edge.js +9 -5
- package/client/index-browser.js +6 -2
- package/client/index.d.ts +428 -113
- package/client/index.js +9 -5
- package/client/package.json +1 -1
- package/client/schema.prisma +13 -10
- package/client/wasm.js +9 -5
- package/package.json +1 -1
- package/prisma/schema/jobProfile.prisma +13 -10
- package/prisma/schema/migrations/20260816120000_job_profile_opening_setup/migration.sql +13 -0
package/package.json
CHANGED
|
@@ -14,34 +14,37 @@ model JobProfile {
|
|
|
14
14
|
department_id String?
|
|
15
15
|
assigned_to String?
|
|
16
16
|
status JobProfileStatus @default(DRAFT)
|
|
17
|
-
// Basics
|
|
18
17
|
title String?
|
|
19
|
-
|
|
18
|
+
/// Requisition reason: new / replacement / backfill (not the seniority ladder).
|
|
19
|
+
role_type String?
|
|
20
|
+
/// Seniority ladder (JobRoleLevel), e.g. TRAINEE, SENIOR_IC, CXO.
|
|
21
|
+
job_role_level String?
|
|
20
22
|
work_arrangement String? // onsite / hybrid / remote
|
|
21
23
|
employment_type String? // full_time / part_time / contract / internship
|
|
24
|
+
/// ISO 3166-1 alpha-2 (e.g. IN). Currency is derived in the UI from this.
|
|
25
|
+
country_code String @default("IN")
|
|
26
|
+
/// CSC state iso2 (unique with country_code).
|
|
27
|
+
state_code String?
|
|
28
|
+
/// City display name from CSC (not a code).
|
|
29
|
+
city String?
|
|
30
|
+
/// @deprecated Use `city` + `state_code`. Not written by new setup/PATCH paths.
|
|
22
31
|
location String?
|
|
23
32
|
experience String?
|
|
24
33
|
experience_min String?
|
|
25
34
|
comp_range String?
|
|
26
35
|
budget String?
|
|
27
|
-
|
|
28
|
-
country_code String @default("IN")
|
|
29
|
-
// Requirements (structured from AI conversation)
|
|
36
|
+
openings Int @default(1)
|
|
30
37
|
responsibilities Json?
|
|
31
38
|
must_have_skills Json?
|
|
32
39
|
nice_to_have_skills Json?
|
|
33
40
|
culture Json?
|
|
34
|
-
// Competencies
|
|
35
41
|
competencies Json?
|
|
36
|
-
// Conversation state
|
|
37
42
|
conversation_history Json?
|
|
38
43
|
orion_execution_id String?
|
|
39
|
-
// Audit
|
|
40
|
-
created_at DateTime @default(now())
|
|
41
44
|
created_by String
|
|
45
|
+
created_at DateTime @default(now())
|
|
42
46
|
updated_at DateTime @updatedAt
|
|
43
47
|
is_active Boolean @default(true)
|
|
44
|
-
// Relations
|
|
45
48
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
46
49
|
department Department? @relation(fields: [department_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
47
50
|
hiring_manager User? @relation("JobProfileHiringManager", fields: [hiring_manager_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- Opening setup: seniority ladder, geo, and headcount on JobProfile.
|
|
2
|
+
ALTER TABLE "JobProfile" ADD COLUMN IF NOT EXISTS "job_role_level" TEXT;
|
|
3
|
+
ALTER TABLE "JobProfile" ADD COLUMN IF NOT EXISTS "state_code" TEXT;
|
|
4
|
+
ALTER TABLE "JobProfile" ADD COLUMN IF NOT EXISTS "city" TEXT;
|
|
5
|
+
ALTER TABLE "JobProfile" ADD COLUMN IF NOT EXISTS "openings" INTEGER NOT NULL DEFAULT 1;
|
|
6
|
+
|
|
7
|
+
-- Backfill city from free-text location when it is not a work-mode token.
|
|
8
|
+
UPDATE "JobProfile"
|
|
9
|
+
SET "city" = TRIM("location")
|
|
10
|
+
WHERE "city" IS NULL
|
|
11
|
+
AND "location" IS NOT NULL
|
|
12
|
+
AND TRIM("location") <> ''
|
|
13
|
+
AND LOWER(TRIM("location")) <> 'remote';
|