@adaptware/eagles-db 0.4.14 → 0.4.18

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.
Files changed (40) hide show
  1. package/README.md +5 -105
  2. package/client/edge.js +202 -88
  3. package/client/index-browser.js +197 -83
  4. package/client/index.d.ts +51665 -31859
  5. package/client/index.js +202 -88
  6. package/client/package.json +1 -1
  7. package/client/schema.prisma +419 -212
  8. package/client/wasm.js +197 -83
  9. package/package.json +1 -1
  10. package/prisma/.DS_Store +0 -0
  11. package/prisma/schema/applications.prisma +6 -4
  12. package/prisma/schema/assessmentLibrary.prisma +14 -14
  13. package/prisma/schema/assignment.prisma +42 -36
  14. package/prisma/schema/calendly.prisma +13 -13
  15. package/prisma/schema/communication.prisma +156 -0
  16. package/prisma/schema/document.prisma +37 -0
  17. package/prisma/schema/evaluationPlan.prisma +0 -9
  18. package/prisma/schema/google.prisma +11 -11
  19. package/prisma/schema/interview.prisma +3 -0
  20. package/prisma/schema/jobApplicationFields.prisma +37 -0
  21. package/prisma/schema/jobApplicationResponse.prisma +33 -0
  22. package/prisma/schema/jobApplicationTemplate.prisma +30 -0
  23. package/prisma/schema/jobDescription.prisma +34 -33
  24. package/prisma/schema/migrations/20260519120000_interview_deadline/migration.sql +2 -0
  25. package/prisma/schema/migrations/20260520120000_interview_duration_drop_deadline/migration.sql +30 -0
  26. package/prisma/schema/migrations/20260602120000_resume_file_hash_drop_unique/migration.sql +2 -0
  27. package/prisma/schema/migrations/20260603120000_job_application_field_is_mandatory/migration.sql +2 -0
  28. package/prisma/schema/migrations/20260604120000_job_application_response_updated_by_organisation/migration.sql +2 -0
  29. package/prisma/schema/migrations/20260605120000_drop_document_application_id/migration.sql +3 -0
  30. package/prisma/schema/migrations/20260610120000_jaf_template_model/migration.sql +70 -0
  31. package/prisma/schema/migrations/20260610130000_assignment_document_fks/migration.sql +15 -0
  32. package/prisma/schema/migrations/20260610140000_jaf_draft_activation/migration.sql +12 -0
  33. package/prisma/schema/notes.prisma +15 -15
  34. package/prisma/schema/organisation.prisma +34 -30
  35. package/prisma/schema/organisationConfig.prisma +9 -9
  36. package/prisma/schema/refreshToken.prisma +8 -8
  37. package/prisma/schema/resume.prisma +5 -1
  38. package/prisma/schema/user.prisma +1 -1
  39. package/client/libquery_engine-darwin.dylib.node +0 -0
  40. package/prisma/schema/activityEvent.prisma +0 -115
package/README.md CHANGED
@@ -1,110 +1,10 @@
1
- # Treadspace DB
1
+ # eagles-db
2
2
 
3
- A Prisma client package for Treadspace database operations.
3
+ Prisma schema package for Treadspace (`@adaptware/eagles-db`).
4
4
 
5
- ## Installation
5
+ **Documentation:** [docs/packages/eagles-db/README.md](../docs/packages/eagles-db/README.md)
6
6
 
7
7
  ```bash
8
- npm install treadspace-db
8
+ yarn generate
9
+ yarn db:migrate
9
10
  ```
10
-
11
- ## Usage
12
-
13
- ### Basic Usage
14
-
15
- ```typescript
16
- import { prisma } from "treadspace-db";
17
-
18
- // Use the prisma client
19
- const users = await prisma.user.findMany();
20
- ```
21
-
22
- ### With TypeScript
23
-
24
- ```typescript
25
- import { prisma, PrismaClient } from "treadspace-db";
26
-
27
- // The prisma instance is already configured and ready to use
28
- const user = await prisma.user.create({
29
- data: {
30
- email: "user@example.com",
31
- name: "John Doe",
32
- },
33
- });
34
- ```
35
-
36
- ## Environment Setup
37
-
38
- Make sure to set your `DATABASE_URL` environment variable:
39
-
40
- ```bash
41
- DATABASE_URL="postgresql://username:password@localhost:5432/database_name"
42
- ```
43
-
44
- ## Development
45
-
46
- ### Prerequisites
47
-
48
- - Node.js 16+
49
- - PostgreSQL database
50
-
51
- ### Setup
52
-
53
- 1. Install dependencies:
54
-
55
- ```bash
56
- npm install
57
- ```
58
-
59
- 2. Set up your database URL in `.env`:
60
-
61
- ```bash
62
- DATABASE_URL="postgresql://username:password@localhost:5432/database_name"
63
- ```
64
-
65
- 3. Add your database models to `prisma/schema.prisma`
66
-
67
- 4. Generate Prisma client:
68
-
69
- ```bash
70
- npm run generate
71
- ```
72
-
73
- 5. Push schema to database:
74
-
75
- ```bash
76
- npm run db:push
77
- ```
78
-
79
- ### Available Scripts
80
-
81
- - `npm run build` - Build the TypeScript code
82
- - `npm run dev` - Watch mode for development
83
- - `npm run generate` - Generate Prisma client
84
- - `npm run db:push` - Push schema changes to database
85
- - `npm run db:migrate` - Create and apply migrations
86
- - `npm run db:studio` - Open Prisma Studio
87
-
88
- ## Adding Tables
89
-
90
- To add tables to your database:
91
-
92
- 1. Edit `prisma/schema.prisma` and add your models
93
- 2. Run `npm run generate` to update the Prisma client
94
- 3. Run `npm run db:push` to apply changes to your database
95
-
96
- Example model:
97
-
98
- ```prisma
99
- model User {
100
- id Int @id @default(autoincrement())
101
- email String @unique
102
- name String?
103
- createdAt DateTime @default(now())
104
- updatedAt DateTime @updatedAt
105
- }
106
- ```
107
-
108
- ## License
109
-
110
- MIT