@adaptware/eagles-db 0.1.26 → 0.1.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/client/client.d.ts +1 -0
- package/client/client.js +4 -0
- package/client/default.d.ts +1 -0
- package/client/default.js +4 -0
- package/client/edge.d.ts +1 -0
- package/client/edge.js +1047 -0
- package/client/index-browser.js +1030 -0
- package/client/index.d.ts +95816 -0
- package/client/index.js +1072 -0
- package/client/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/client/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
- package/client/package.json +150 -0
- package/client/runtime/edge-esm.js +34 -0
- package/client/runtime/edge.js +34 -0
- package/client/runtime/index-browser.d.ts +370 -0
- package/client/runtime/index-browser.js +16 -0
- package/client/runtime/library.d.ts +3976 -0
- package/client/runtime/library.js +146 -0
- package/client/runtime/react-native.js +83 -0
- package/client/runtime/wasm-compiler-edge.js +83 -0
- package/client/runtime/wasm-engine-edge.js +35 -0
- package/client/schema.prisma +1166 -0
- package/client/wasm.d.ts +1 -0
- package/client/wasm.js +1030 -0
- package/dist/env.d.ts +18 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +30 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/evaluationPlan.prisma +9 -15
- package/prisma/schema/jobDescription.prisma +7 -5
- package/prisma/schema/ongoingEvaluation.prisma +12 -0
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized, type-safe environment parsing for the DB package.
|
|
3
|
+
* Consumers must provide DATABASE_URL in their environment.
|
|
4
|
+
*/
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
declare const EnvSchema: z.ZodObject<{
|
|
7
|
+
DATABASE_URL: z.ZodString;
|
|
8
|
+
PRISMA_LOG_LEVEL: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
error: "error";
|
|
10
|
+
query: "query";
|
|
11
|
+
info: "info";
|
|
12
|
+
warn: "warn";
|
|
13
|
+
}>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type Env = z.infer<typeof EnvSchema>;
|
|
16
|
+
export declare function loadEnv(): Env;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,SAAS;;;;;;;;iBAMb,CAAC;AAEH,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAI5C,wBAAgB,OAAO,IAAI,GAAG,CAgB7B"}
|
package/dist/env.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/env.ts
|
|
2
|
+
/**
|
|
3
|
+
* Centralized, type-safe environment parsing for the DB package.
|
|
4
|
+
* Consumers must provide DATABASE_URL in their environment.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
const EnvSchema = z.object({
|
|
8
|
+
DATABASE_URL: z.string().url("DATABASE_URL must be a valid URL"),
|
|
9
|
+
// Optional tuning knobs with defaults.
|
|
10
|
+
PRISMA_LOG_LEVEL: z
|
|
11
|
+
.enum(["query", "info", "warn", "error"])
|
|
12
|
+
.optional(),
|
|
13
|
+
});
|
|
14
|
+
let cached = null;
|
|
15
|
+
export function loadEnv() {
|
|
16
|
+
if (cached)
|
|
17
|
+
return cached;
|
|
18
|
+
const parsed = EnvSchema.safeParse({
|
|
19
|
+
DATABASE_URL: process.env.DATABASE_URL,
|
|
20
|
+
PRISMA_LOG_LEVEL: process.env.PRISMA_LOG_LEVEL
|
|
21
|
+
});
|
|
22
|
+
if (!parsed.success) {
|
|
23
|
+
// Surface a crisp error early.
|
|
24
|
+
const issues = parsed.error.issues.map(i => `${i.path.join(".")}: ${i.message}`).join("; ");
|
|
25
|
+
throw new Error(`[db] Invalid environment: ${issues}`);
|
|
26
|
+
}
|
|
27
|
+
cached = parsed.data;
|
|
28
|
+
return cached;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=env.js.map
|
package/dist/env.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,aAAa;AACb;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,kCAAkC,CAAC;IAChE,uCAAuC;IACvC,gBAAgB,EAAE,CAAC;SAChB,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SACxC,QAAQ,EAAE;CACd,CAAC,CAAC;AAIH,IAAI,MAAM,GAAe,IAAI,CAAC;AAE9B,MAAM,UAAU,OAAO;IACrB,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC;QACjC,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;QACtC,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAuB;KACtD,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,+BAA+B;QAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5F,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PrismaClient } from "../client/index.js";
|
|
2
|
+
export declare const prisma: PrismaClient<{
|
|
3
|
+
log: ("error" | "query" | "warn")[];
|
|
4
|
+
}, "error" | "query" | "warn", import("../client/runtime/library.js").DefaultArgs>;
|
|
5
|
+
export type { PrismaClient } from "../client/index.js";
|
|
6
|
+
export * from "../client/index.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlD,eAAO,MAAM,MAAM;;kFAKjB,CAAC;AAGH,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PrismaClient } from "../client/index.js";
|
|
2
|
+
// Create a singleton instance of PrismaClient
|
|
3
|
+
export const prisma = new PrismaClient({
|
|
4
|
+
log: process.env.NODE_ENV === "development"
|
|
5
|
+
? ["query", "error", "warn"]
|
|
6
|
+
: ["error"],
|
|
7
|
+
});
|
|
8
|
+
// Export all Prisma types
|
|
9
|
+
export * from "../client/index.js";
|
|
10
|
+
// Graceful shutdown
|
|
11
|
+
process.on("beforeExit", async () => {
|
|
12
|
+
await prisma.$disconnect();
|
|
13
|
+
});
|
|
14
|
+
process.on("SIGINT", async () => {
|
|
15
|
+
await prisma.$disconnect();
|
|
16
|
+
process.exit(0);
|
|
17
|
+
});
|
|
18
|
+
process.on("SIGTERM", async () => {
|
|
19
|
+
await prisma.$disconnect();
|
|
20
|
+
process.exit(0);
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC;IACrC,GAAG,EACD,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;QACpC,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;QAC5B,CAAC,CAAC,CAAC,OAAO,CAAC;CAChB,CAAC,CAAC;AAKH,0BAA0B;AAC1B,cAAc,oBAAoB,CAAC;AAEnC,oBAAoB;AACpB,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;IAClC,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC9B,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IAC/B,MAAM,MAAM,CAAC,WAAW,EAAE,CAAC;IAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
package/prisma/.DS_Store
ADDED
|
Binary file
|
|
@@ -5,13 +5,6 @@ enum RoundType {
|
|
|
5
5
|
SCREENING
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
// Old
|
|
9
|
-
enum WeightageLevel {
|
|
10
|
-
LOW
|
|
11
|
-
MEDIUM
|
|
12
|
-
HIGH
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
enum EvaluationRoundFormat {
|
|
16
9
|
// ────────────────
|
|
17
10
|
// Screening formats
|
|
@@ -42,16 +35,18 @@ enum EvaluationRoundFormat {
|
|
|
42
35
|
}
|
|
43
36
|
|
|
44
37
|
enum EvaluationType {
|
|
45
|
-
// Old
|
|
46
|
-
HUMAN_AI // Combination of human and AI evaluation
|
|
47
|
-
AI // Fully automated AI evaluation
|
|
48
|
-
HUMAN // Fully human-driven evaluation
|
|
49
38
|
// New (In active use now)
|
|
50
39
|
TREADSPACE_AI_ASSISTED
|
|
51
40
|
EXTERNAL_AI_ASSISTED
|
|
52
41
|
NON_AI_ASSISTED
|
|
53
42
|
}
|
|
54
43
|
|
|
44
|
+
enum EvaluationPlanType {
|
|
45
|
+
CUSTOM
|
|
46
|
+
GENERIC
|
|
47
|
+
DELETED
|
|
48
|
+
}
|
|
49
|
+
|
|
55
50
|
model EvaluationPlan {
|
|
56
51
|
id String @id @default(uuid())
|
|
57
52
|
job_description_id String
|
|
@@ -60,16 +55,15 @@ model EvaluationPlan {
|
|
|
60
55
|
title String
|
|
61
56
|
description String?
|
|
62
57
|
format EvaluationRoundFormat?
|
|
63
|
-
weightage WeightageLevel?
|
|
64
58
|
topics String[]
|
|
65
59
|
assignee String?
|
|
66
60
|
elimination_round Boolean @default(false)
|
|
67
61
|
evaluation_type EvaluationType
|
|
68
62
|
type_of_round RoundType
|
|
69
63
|
timeline Int
|
|
70
|
-
order_no Int
|
|
64
|
+
order_no Int?
|
|
71
65
|
details Json?
|
|
72
|
-
|
|
66
|
+
plan_type EvaluationPlanType @default(GENERIC)
|
|
73
67
|
created_by String
|
|
74
68
|
updated_by String
|
|
75
69
|
created_at DateTime @default(now())
|
|
@@ -81,7 +75,7 @@ model EvaluationPlan {
|
|
|
81
75
|
panelists Panelist[]
|
|
82
76
|
interviews Interview[]
|
|
83
77
|
applications Application[]
|
|
84
|
-
//
|
|
78
|
+
// New optional one-to-one relation with AssessmentLibrary
|
|
85
79
|
assessment AssessmentLibrary? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
|
|
86
80
|
assignment_library AssignmentLibrary? @relation(fields: [assignment_library_id], references: [id], onDelete: SetNull)
|
|
87
81
|
ongoing_evaluations OngoingEvaluation[]
|
|
@@ -8,22 +8,24 @@ enum JobDescriptionStatus {
|
|
|
8
8
|
|
|
9
9
|
model JobDescription {
|
|
10
10
|
id String @id @default(uuid())
|
|
11
|
+
organisation_id String
|
|
11
12
|
hiring_manager_id String?
|
|
12
13
|
status JobDescriptionStatus @default(DRAFT)
|
|
13
|
-
organisation_id String
|
|
14
14
|
screeningQuestions String[]
|
|
15
15
|
recommendedQuestions Json[]
|
|
16
|
+
uploaded_job_description_path String?
|
|
17
|
+
is_plan_locked Boolean? @default(false)
|
|
18
|
+
is_plan_published Boolean @default(false)
|
|
19
|
+
is_posted Boolean @default(false)
|
|
20
|
+
ai_insight Json?
|
|
21
|
+
// Audit fields
|
|
16
22
|
created_at DateTime @default(now())
|
|
17
23
|
updated_at DateTime @updatedAt
|
|
18
24
|
created_by String
|
|
19
25
|
updated_by String
|
|
20
|
-
uploaded_job_description_path String?
|
|
21
26
|
is_active Boolean @default(true)
|
|
22
|
-
is_plan_locked Boolean @default(false)
|
|
23
|
-
is_posted Boolean @default(false)
|
|
24
27
|
openings Int @default(1)
|
|
25
28
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
26
|
-
ai_insight Json?
|
|
27
29
|
applications Application[]
|
|
28
30
|
interviews Interview[]
|
|
29
31
|
fit_check FitCheck[] // one-to-many link
|
|
@@ -52,6 +52,18 @@ model OngoingEvaluation {
|
|
|
52
52
|
updated_by String
|
|
53
53
|
is_active Boolean @default(true)
|
|
54
54
|
is_current Boolean @default(false)
|
|
55
|
+
// Evaluation Plan Details Will be stored only when candidate starts for the evaluation round
|
|
56
|
+
title String?
|
|
57
|
+
description String?
|
|
58
|
+
order_no Int?
|
|
59
|
+
format EvaluationRoundFormat?
|
|
60
|
+
topics String[]
|
|
61
|
+
assignee String?
|
|
62
|
+
elimination_round Boolean? @default(false)
|
|
63
|
+
evaluation_type EvaluationType?
|
|
64
|
+
type_of_round RoundType?
|
|
65
|
+
timeline Int?
|
|
66
|
+
details Json?
|
|
55
67
|
|
|
56
68
|
@@unique([application_id, evaluation_plan_id])
|
|
57
69
|
@@index([application_id])
|