@adaptware/eagles-db 0.4.19 → 0.4.21

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-a02dba0e19f9c54fc9922de7e15a9f26b12da8617a09b4946c13a1a9e0578503",
2
+ "name": "prisma-client-21eaf0bc9a1622e21269ed75e52a7bd080767d8d3a6fa5ebe712d4469a450f69",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -1011,6 +1011,10 @@ model Interview {
1011
1011
  final_feedback Json?
1012
1012
  interview_analysis_ranges Json?
1013
1013
  interview_flow_summary String?
1014
+ /// When Orion AI feedback was last persisted on this interview.
1015
+ ai_feedback_generated_at DateTime?
1016
+ /// When recruiter human feedback was last saved (draft or final).
1017
+ human_feedback_updated_at DateTime?
1014
1018
 
1015
1019
  /// Self-scheduling
1016
1020
  reschedule_count Int @default(0)
package/client/wasm.js CHANGED
@@ -636,6 +636,8 @@ exports.Prisma.InterviewScalarFieldEnum = {
636
636
  final_feedback: 'final_feedback',
637
637
  interview_analysis_ranges: 'interview_analysis_ranges',
638
638
  interview_flow_summary: 'interview_flow_summary',
639
+ ai_feedback_generated_at: 'ai_feedback_generated_at',
640
+ human_feedback_updated_at: 'human_feedback_updated_at',
639
641
  reschedule_count: 'reschedule_count',
640
642
  last_rescheduled_at: 'last_rescheduled_at',
641
643
  first_assigned_at: 'first_assigned_at',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -66,6 +66,10 @@ model Interview {
66
66
  final_feedback Json?
67
67
  interview_analysis_ranges Json?
68
68
  interview_flow_summary String?
69
+ /// When Orion AI feedback was last persisted on this interview.
70
+ ai_feedback_generated_at DateTime?
71
+ /// When recruiter human feedback was last saved (draft or final).
72
+ human_feedback_updated_at DateTime?
69
73
 
70
74
  /// Self-scheduling
71
75
  reschedule_count Int @default(0)
@@ -0,0 +1,25 @@
1
+ -- Safe to re-run: adds record_kind without breaking existing ongoing evaluations.
2
+
3
+ DO $$ BEGIN
4
+ CREATE TYPE "OngoingEvaluationRecordKind" AS ENUM (
5
+ 'AI_RECOMMENDED',
6
+ 'PLAN_SELECTED',
7
+ 'COMMITTED'
8
+ );
9
+ EXCEPTION
10
+ WHEN duplicate_object THEN NULL;
11
+ END $$;
12
+
13
+ ALTER TABLE "OngoingEvaluation"
14
+ ADD COLUMN IF NOT EXISTS "record_kind" "OngoingEvaluationRecordKind";
15
+
16
+ ALTER TABLE "OngoingEvaluation"
17
+ ALTER COLUMN "evaluation_plan_id" DROP NOT NULL;
18
+
19
+ -- All existing rows are real pipeline rounds — not pre-Proceed drafts.
20
+ UPDATE "OngoingEvaluation"
21
+ SET "record_kind" = 'COMMITTED'
22
+ WHERE "record_kind" IS NULL;
23
+
24
+ CREATE INDEX IF NOT EXISTS "OngoingEvaluation_application_id_record_kind_idx"
25
+ ON "OngoingEvaluation"("application_id", "record_kind");
@@ -0,0 +1,24 @@
1
+ -- Replace record_kind enum with is_committed (null = legacy, false = draft, true = committed).
2
+
3
+ ALTER TABLE "OngoingEvaluation"
4
+ ADD COLUMN IF NOT EXISTS "is_committed" BOOLEAN;
5
+
6
+ UPDATE "OngoingEvaluation"
7
+ SET "is_committed" = false
8
+ WHERE "record_kind" IN ('AI_RECOMMENDED', 'PLAN_SELECTED');
9
+
10
+ UPDATE "OngoingEvaluation"
11
+ SET "is_committed" = true
12
+ WHERE "record_kind" = 'COMMITTED';
13
+
14
+ -- Legacy rows without record_kind stay null (treated as committed in app queries).
15
+
16
+ DROP INDEX IF EXISTS "OngoingEvaluation_application_id_record_kind_idx";
17
+
18
+ ALTER TABLE "OngoingEvaluation"
19
+ DROP COLUMN IF EXISTS "record_kind";
20
+
21
+ DROP TYPE IF EXISTS "OngoingEvaluationRecordKind";
22
+
23
+ CREATE INDEX IF NOT EXISTS "OngoingEvaluation_application_id_is_committed_idx"
24
+ ON "OngoingEvaluation"("application_id", "is_committed");
@@ -0,0 +1,2 @@
1
+ -- Drop unused per-job AI recommendation threshold storage (defaults live in application code).
2
+ ALTER TABLE "JobDescription" DROP COLUMN IF EXISTS "recommendation_config";
package/prisma/.DS_Store DELETED
Binary file
Binary file
@@ -1,84 +0,0 @@
1
- -- CreateSchema
2
- CREATE SCHEMA IF NOT EXISTS "analytics";
3
-
4
- -- CreateEnum
5
- CREATE TYPE "analytics"."RoundResult" AS ENUM ('PASSED', 'FAILED');
6
-
7
- -- CreateTable
8
- CREATE TABLE "analytics"."round_analytics" (
9
- "id" TEXT NOT NULL,
10
- "organisation_id" TEXT NOT NULL,
11
- "application_id" TEXT NOT NULL,
12
- "candidate_id" TEXT NOT NULL,
13
- "job_description_id" TEXT NOT NULL,
14
- "evaluation_plan_id" TEXT NOT NULL,
15
- "round_id" TEXT NOT NULL,
16
- "round_name" TEXT,
17
- "evaluation_category" "EvaluationCategory",
18
- "round_type" "RoundType",
19
- "assigned_at" TIMESTAMP(3),
20
- "interview_created_at" TIMESTAMP(3),
21
- "interview_scheduled_at" TIMESTAMP(3),
22
- "interview_started_at" TIMESTAMP(3),
23
- "interview_completed_at" TIMESTAMP(3),
24
- "interview_evaluated_at" TIMESTAMP(3),
25
- "round_completed_at" TIMESTAMP(3),
26
- "round_result" "analytics"."RoundResult",
27
- "round_result_at" TIMESTAMP(3),
28
- "scheduling_duration_minutes" INTEGER,
29
- "interview_duration_minutes" INTEGER,
30
- "feedback_duration_minutes" INTEGER,
31
- "decision_duration_minutes" INTEGER,
32
- "total_round_duration_minutes" INTEGER,
33
- "is_custom" BOOLEAN NOT NULL DEFAULT false,
34
- "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
35
- "updated_at" TIMESTAMP(3) NOT NULL,
36
-
37
- CONSTRAINT "round_analytics_pkey" PRIMARY KEY ("id")
38
- );
39
-
40
- -- CreateTable
41
- CREATE TABLE "analytics"."job_round_analytics" (
42
- "id" TEXT NOT NULL,
43
- "organisation_id" TEXT NOT NULL,
44
- "job_description_id" TEXT NOT NULL,
45
- "evaluation_plan_id" TEXT NOT NULL,
46
- "round_name" TEXT NOT NULL,
47
- "evaluation_category" "EvaluationCategory",
48
- "is_custom" BOOLEAN NOT NULL DEFAULT false,
49
- "assigned_count" INTEGER NOT NULL DEFAULT 0,
50
- "completed_count" INTEGER NOT NULL DEFAULT 0,
51
- "passed_count" INTEGER NOT NULL DEFAULT 0,
52
- "failed_count" INTEGER NOT NULL DEFAULT 0,
53
- "withdrawn_count" INTEGER NOT NULL DEFAULT 0,
54
- "no_show_count" INTEGER NOT NULL DEFAULT 0,
55
- "total_completion_minutes" BIGINT NOT NULL DEFAULT 0,
56
- "avg_completion_minutes" DOUBLE PRECISION,
57
- "updated_at" TIMESTAMP(3) NOT NULL,
58
-
59
- CONSTRAINT "job_round_analytics_pkey" PRIMARY KEY ("id")
60
- );
61
-
62
- -- CreateIndex
63
- CREATE UNIQUE INDEX "round_analytics_round_id_key" ON "analytics"."round_analytics"("round_id");
64
-
65
- -- CreateIndex
66
- CREATE INDEX "round_analytics_organisation_id_idx" ON "analytics"."round_analytics"("organisation_id");
67
-
68
- -- CreateIndex
69
- CREATE INDEX "round_analytics_job_description_id_idx" ON "analytics"."round_analytics"("job_description_id");
70
-
71
- -- CreateIndex
72
- CREATE INDEX "round_analytics_application_id_idx" ON "analytics"."round_analytics"("application_id");
73
-
74
- -- CreateIndex
75
- CREATE INDEX "round_analytics_candidate_id_idx" ON "analytics"."round_analytics"("candidate_id");
76
-
77
- -- CreateIndex
78
- CREATE INDEX "round_analytics_evaluation_category_idx" ON "analytics"."round_analytics"("evaluation_category");
79
-
80
- -- CreateIndex
81
- CREATE INDEX "round_analytics_round_result_idx" ON "analytics"."round_analytics"("round_result");
82
-
83
- -- CreateIndex
84
- CREATE UNIQUE INDEX "job_round_analytics_job_description_id_evaluation_plan_id_key" ON "analytics"."job_round_analytics"("job_description_id", "evaluation_plan_id");