@adaptware/eagles-db 0.4.23 → 0.4.24
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 +15 -15
- package/bin/db-cli.js +91 -91
- package/client/edge.js +9 -15
- package/client/index-browser.js +1 -8
- package/client/index.d.ts +565 -234
- package/client/index.js +15 -21
- package/client/{query_engine-windows.dll.node → 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 +1 -1
- package/client/schema.prisma +15 -22
- package/client/wasm.js +9 -15
- package/package.json +58 -58
- package/prisma/schema/CandidateQuestionResponse.prisma +24 -24
- package/prisma/schema/UserRole.prisma +20 -20
- package/prisma/schema/action.prisma +35 -35
- package/prisma/schema/activityLog.prisma +22 -22
- package/prisma/schema/applications.prisma +56 -57
- package/prisma/schema/approval.prisma +14 -14
- package/prisma/schema/assessment.prisma +39 -39
- package/prisma/schema/assessmentLibrary.prisma +21 -21
- package/prisma/schema/assessmentQuestion.prisma +17 -17
- package/prisma/schema/assignment.prisma +48 -48
- package/prisma/schema/assignmentLibrary.prisma +20 -20
- package/prisma/schema/authModule.prisma +36 -36
- package/prisma/schema/budget.prisma +38 -38
- package/prisma/schema/calendly.prisma +18 -18
- package/prisma/schema/candidateProfile.prisma +26 -26
- package/prisma/schema/communication.prisma +156 -156
- package/prisma/schema/contactUs.prisma +12 -12
- package/prisma/schema/document.prisma +38 -37
- package/prisma/schema/evaluationPlan.prisma +74 -83
- package/prisma/schema/feedback.prisma +18 -18
- package/prisma/schema/fitCheck.prisma +58 -58
- package/prisma/schema/google.prisma +16 -16
- package/prisma/schema/integration.prisma +98 -98
- package/prisma/schema/interview.prisma +112 -112
- package/prisma/schema/interviewNotes.prisma +17 -17
- package/prisma/schema/jobApplicationFields.prisma +37 -37
- package/prisma/schema/jobApplicationResponse.prisma +33 -33
- package/prisma/schema/jobApplicationTemplate.prisma +30 -30
- package/prisma/schema/jobDescription.prisma +59 -57
- package/prisma/schema/jobDescriptionData.prisma +15 -15
- package/prisma/schema/jobProfile.prisma +56 -56
- package/prisma/schema/liveAnalysis.prisma +17 -17
- package/prisma/schema/message.prisma +15 -15
- package/prisma/schema/migrations/20260415120000_remove_job_profile_current_phase/migration.sql +2 -2
- package/prisma/schema/migrations/20260422120000_add_integration_provider_zoom/migration.sql +2 -2
- package/prisma/schema/migrations/20260422140000_add_zoom_meeting_tables/migration.sql +57 -57
- package/prisma/schema/migrations/20260422180000_add_zoom_webhook_event/migration.sql +18 -18
- package/prisma/schema/migrations/20260423140000_add_interview_platform/migration.sql +6 -6
- package/prisma/schema/migrations/20260423150000_remove_interview_zoom_topic/migration.sql +2 -2
- package/prisma/schema/migrations/20260423160000_zoom_meeting_uuid/migration.sql +4 -4
- package/prisma/schema/migrations/20260423170000_zoom_meeting_uuid_prisma_sync/migration.sql +2 -2
- package/prisma/schema/migrations/20260424120000_auth_module_user_provider_unique/migration.sql +5 -5
- package/prisma/schema/migrations/20260424130000_zoom_meeting_zoom_host_user_id/migration.sql +6 -6
- package/prisma/schema/migrations/20260425100000_zoom_participant_user_enum/migration.sql +22 -22
- package/prisma/schema/migrations/20260425110000_zoom_participant_zoom_id_required/migration.sql +13 -13
- package/prisma/schema/migrations/20260425120000_zoom_participant_id_nullable/migration.sql +4 -4
- package/prisma/schema/migrations/20260429140000_drop_evaluation_plan_job_order_unique/migration.sql +5 -5
- package/prisma/schema/migrations/20260429180000_eval_plan_timeline_optional_ongoing_duration/migration.sql +15 -15
- package/prisma/schema/migrations/20260430120000_drop_assessment_library_metadata_fields/migration.sql +8 -8
- package/prisma/schema/migrations/20260430140000_drop_question_question_type/migration.sql +5 -5
- package/prisma/schema/migrations/20260513120000_add_organisation_config/migration.sql +56 -56
- package/prisma/schema/migrations/20260514120000_dedupe_organisation_config/migration.sql +20 -20
- package/prisma/schema/migrations/20260515120000_add_interview_ai_assistance_mode/migration.sql +5 -5
- package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +25 -0
- package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +24 -0
- package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +2 -0
- package/prisma/schema/migrations/migration_lock.toml +3 -3
- package/prisma/schema/notes.prisma +19 -19
- package/prisma/schema/ongoingEvaluation.prisma +72 -72
- package/prisma/schema/organisation.prisma +57 -57
- package/prisma/schema/organisationConfig.prisma +12 -12
- package/prisma/schema/permission.prisma +13 -13
- package/prisma/schema/promise.prisma +39 -39
- package/prisma/schema/questions.prisma +28 -28
- package/prisma/schema/refreshToken.prisma +10 -10
- package/prisma/schema/resume.prisma +34 -34
- package/prisma/schema/resumeData.prisma +15 -15
- package/prisma/schema/schema.prisma +16 -16
- package/prisma/schema/suggestion.prisma +20 -20
- package/prisma/schema/transcript.prisma +25 -25
- package/prisma/schema/user.prisma +93 -93
- package/prisma/schema/userProfile.prisma +15 -15
- package/prisma/schema/zoomMeeting.prisma +79 -79
- package/prisma/schema/migrations/20260626120000_add_evaluation_plan_share_scope/migration.sql +0 -14
- package/prisma/schema/migrations/20260626140000_add_evaluation_comment/migration.sql +0 -2
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# @adaptware/eagles-db
|
|
2
|
-
|
|
3
|
-
Prisma schema and client for the Treadspace hiring database.
|
|
4
|
-
|
|
5
|
-
**Package name:** `@adaptware/eagles-db`
|
|
6
|
-
**CLI binary:** `treadspace-db` (see [docs/eagles-db/cli-reference.md](./docs/eagles-db/cli-reference.md))
|
|
7
|
-
|
|
8
|
-
**Local documentation:** [docs/README.md](./docs/README.md)
|
|
9
|
-
**Central monorepo hub:** [docs/README.md](../docs/README.md)
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
yarn install
|
|
13
|
-
export DATABASE_URL=postgresql://...
|
|
14
|
-
yarn generate
|
|
15
|
-
```
|
|
1
|
+
# @adaptware/eagles-db
|
|
2
|
+
|
|
3
|
+
Prisma schema and client for the Treadspace hiring database.
|
|
4
|
+
|
|
5
|
+
**Package name:** `@adaptware/eagles-db`
|
|
6
|
+
**CLI binary:** `treadspace-db` (see [docs/eagles-db/cli-reference.md](./docs/eagles-db/cli-reference.md))
|
|
7
|
+
|
|
8
|
+
**Local documentation:** [docs/README.md](./docs/README.md)
|
|
9
|
+
**Central monorepo hub:** [docs/README.md](../docs/README.md)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn install
|
|
13
|
+
export DATABASE_URL=postgresql://...
|
|
14
|
+
yarn generate
|
|
15
|
+
```
|
package/bin/db-cli.js
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { spawn } from "child_process";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import { dirname, resolve } from "path";
|
|
5
|
-
import { existsSync } from "fs";
|
|
6
|
-
|
|
7
|
-
const args = process.argv.slice(2);
|
|
8
|
-
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
11
|
-
const packageSchemaPath = resolve(__dirname, "../prisma/schema");
|
|
12
|
-
|
|
13
|
-
function ensureSchemaArg(passedArgs = []) {
|
|
14
|
-
const hasInline = passedArgs.some((a) => a.startsWith("--schema="));
|
|
15
|
-
const hasSplit = passedArgs.some(
|
|
16
|
-
(a, i) => a === "--schema" && passedArgs[i + 1]
|
|
17
|
-
);
|
|
18
|
-
if (hasInline || hasSplit) return passedArgs;
|
|
19
|
-
return ["--schema", packageSchemaPath, ...passedArgs];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function resolveLocalPrismaBin() {
|
|
23
|
-
const candidate = resolve(__dirname, "../node_modules/.bin/prisma");
|
|
24
|
-
if (existsSync(candidate)) return candidate;
|
|
25
|
-
try {
|
|
26
|
-
// Attempt to resolve prisma package location and derive bin path
|
|
27
|
-
const prismaPkgPath = require.resolve("prisma/package.json", {
|
|
28
|
-
paths: [resolve(__dirname, "..")],
|
|
29
|
-
});
|
|
30
|
-
const prismaDir = dirname(prismaPkgPath);
|
|
31
|
-
const binCandidate = resolve(prismaDir, "../.bin/prisma");
|
|
32
|
-
if (existsSync(binCandidate)) return binCandidate;
|
|
33
|
-
} catch {}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function runPrisma(subcommandParts, extra = []) {
|
|
38
|
-
const finalArgs = ensureSchemaArg(extra);
|
|
39
|
-
const localBin = resolveLocalPrismaBin();
|
|
40
|
-
const command = localBin || "npx";
|
|
41
|
-
const args = localBin
|
|
42
|
-
? [...subcommandParts, ...finalArgs]
|
|
43
|
-
: ["--yes", "prisma", ...subcommandParts, ...finalArgs];
|
|
44
|
-
const child = spawn(command, args, {
|
|
45
|
-
stdio: "inherit",
|
|
46
|
-
shell: process.platform === "win32",
|
|
47
|
-
});
|
|
48
|
-
child.on("close", (code) => process.exit(code));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const [cmd, ...rest] = args;
|
|
52
|
-
|
|
53
|
-
switch (cmd) {
|
|
54
|
-
case "migrate":
|
|
55
|
-
runPrisma(["migrate"], rest);
|
|
56
|
-
break;
|
|
57
|
-
case "migrate:deploy":
|
|
58
|
-
runPrisma(["migrate", "deploy"], rest);
|
|
59
|
-
break;
|
|
60
|
-
case "migrate:dev":
|
|
61
|
-
runPrisma(["migrate", "dev"], rest);
|
|
62
|
-
break;
|
|
63
|
-
case "migrate:reset":
|
|
64
|
-
runPrisma(["migrate", "reset"], rest);
|
|
65
|
-
break;
|
|
66
|
-
case "studio":
|
|
67
|
-
runPrisma(["studio"], rest);
|
|
68
|
-
break;
|
|
69
|
-
case "generate":
|
|
70
|
-
runPrisma(["generate"], rest);
|
|
71
|
-
break;
|
|
72
|
-
case "db:push":
|
|
73
|
-
runPrisma(["db", "push"], rest);
|
|
74
|
-
break;
|
|
75
|
-
case "db":
|
|
76
|
-
if (rest[0] === "push") {
|
|
77
|
-
runPrisma(["db", "push"], rest.slice(1));
|
|
78
|
-
} else {
|
|
79
|
-
console.log("Unknown db subcommand. Available: db push");
|
|
80
|
-
process.exit(1);
|
|
81
|
-
}
|
|
82
|
-
break;
|
|
83
|
-
case "reset:all":
|
|
84
|
-
// Convenience alias: full reset using migrate reset
|
|
85
|
-
runPrisma(["migrate", "reset"], rest);
|
|
86
|
-
break;
|
|
87
|
-
default:
|
|
88
|
-
console.log(`Unknown command: ${cmd}`);
|
|
89
|
-
console.log(
|
|
90
|
-
"Available: migrate | migrate:deploy | migrate:dev | migrate:reset | db:push | db push | studio | generate | reset:all"
|
|
91
|
-
);
|
|
92
|
-
}
|
|
2
|
+
import { spawn } from "child_process";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { dirname, resolve } from "path";
|
|
5
|
+
import { existsSync } from "fs";
|
|
6
|
+
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
const packageSchemaPath = resolve(__dirname, "../prisma/schema");
|
|
12
|
+
|
|
13
|
+
function ensureSchemaArg(passedArgs = []) {
|
|
14
|
+
const hasInline = passedArgs.some((a) => a.startsWith("--schema="));
|
|
15
|
+
const hasSplit = passedArgs.some(
|
|
16
|
+
(a, i) => a === "--schema" && passedArgs[i + 1]
|
|
17
|
+
);
|
|
18
|
+
if (hasInline || hasSplit) return passedArgs;
|
|
19
|
+
return ["--schema", packageSchemaPath, ...passedArgs];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function resolveLocalPrismaBin() {
|
|
23
|
+
const candidate = resolve(__dirname, "../node_modules/.bin/prisma");
|
|
24
|
+
if (existsSync(candidate)) return candidate;
|
|
25
|
+
try {
|
|
26
|
+
// Attempt to resolve prisma package location and derive bin path
|
|
27
|
+
const prismaPkgPath = require.resolve("prisma/package.json", {
|
|
28
|
+
paths: [resolve(__dirname, "..")],
|
|
29
|
+
});
|
|
30
|
+
const prismaDir = dirname(prismaPkgPath);
|
|
31
|
+
const binCandidate = resolve(prismaDir, "../.bin/prisma");
|
|
32
|
+
if (existsSync(binCandidate)) return binCandidate;
|
|
33
|
+
} catch {}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function runPrisma(subcommandParts, extra = []) {
|
|
38
|
+
const finalArgs = ensureSchemaArg(extra);
|
|
39
|
+
const localBin = resolveLocalPrismaBin();
|
|
40
|
+
const command = localBin || "npx";
|
|
41
|
+
const args = localBin
|
|
42
|
+
? [...subcommandParts, ...finalArgs]
|
|
43
|
+
: ["--yes", "prisma", ...subcommandParts, ...finalArgs];
|
|
44
|
+
const child = spawn(command, args, {
|
|
45
|
+
stdio: "inherit",
|
|
46
|
+
shell: process.platform === "win32",
|
|
47
|
+
});
|
|
48
|
+
child.on("close", (code) => process.exit(code));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const [cmd, ...rest] = args;
|
|
52
|
+
|
|
53
|
+
switch (cmd) {
|
|
54
|
+
case "migrate":
|
|
55
|
+
runPrisma(["migrate"], rest);
|
|
56
|
+
break;
|
|
57
|
+
case "migrate:deploy":
|
|
58
|
+
runPrisma(["migrate", "deploy"], rest);
|
|
59
|
+
break;
|
|
60
|
+
case "migrate:dev":
|
|
61
|
+
runPrisma(["migrate", "dev"], rest);
|
|
62
|
+
break;
|
|
63
|
+
case "migrate:reset":
|
|
64
|
+
runPrisma(["migrate", "reset"], rest);
|
|
65
|
+
break;
|
|
66
|
+
case "studio":
|
|
67
|
+
runPrisma(["studio"], rest);
|
|
68
|
+
break;
|
|
69
|
+
case "generate":
|
|
70
|
+
runPrisma(["generate"], rest);
|
|
71
|
+
break;
|
|
72
|
+
case "db:push":
|
|
73
|
+
runPrisma(["db", "push"], rest);
|
|
74
|
+
break;
|
|
75
|
+
case "db":
|
|
76
|
+
if (rest[0] === "push") {
|
|
77
|
+
runPrisma(["db", "push"], rest.slice(1));
|
|
78
|
+
} else {
|
|
79
|
+
console.log("Unknown db subcommand. Available: db push");
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
case "reset:all":
|
|
84
|
+
// Convenience alias: full reset using migrate reset
|
|
85
|
+
runPrisma(["migrate", "reset"], rest);
|
|
86
|
+
break;
|
|
87
|
+
default:
|
|
88
|
+
console.log(`Unknown command: ${cmd}`);
|
|
89
|
+
console.log(
|
|
90
|
+
"Available: migrate | migrate:deploy | migrate:dev | migrate:reset | db:push | db push | studio | generate | reset:all"
|
|
91
|
+
);
|
|
92
|
+
}
|