@adaptware/eagles-db 0.6.22 → 0.6.23
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/edge.js +55 -26
- package/client/index-browser.js +52 -23
- package/client/index.d.ts +4612 -1062
- package/client/index.js +55 -26
- package/client/package.json +1 -1
- package/client/schema.prisma +104 -41
- package/client/wasm.js +55 -26
- package/package.json +1 -1
- package/prisma/schema/interview.prisma +1 -0
- package/prisma/schema/licensing/licensePackageCatalog.prisma +3 -0
- package/prisma/schema/licensing/licensingEnums.prisma +8 -8
- package/prisma/schema/licensing/purchasedLicense.prisma +1 -0
- package/prisma/schema/licensing/purchasedTopUp.prisma +18 -25
package/client/package.json
CHANGED
package/client/schema.prisma
CHANGED
|
@@ -2188,6 +2188,8 @@ model Interview {
|
|
|
2188
2188
|
candidate_interview_metadata Json?
|
|
2189
2189
|
/// Data
|
|
2190
2190
|
room_name String?
|
|
2191
|
+
/// Active logical session while a sitting is in progress; null when no session is open.
|
|
2192
|
+
current_session_id String?
|
|
2191
2193
|
scheduled_start_time DateTime?
|
|
2192
2194
|
scheduled_end_time DateTime?
|
|
2193
2195
|
actual_start_time DateTime?
|
|
@@ -2237,6 +2239,7 @@ model Interview {
|
|
|
2237
2239
|
/// Candidate invite response (legal consent in ConsentRecord).
|
|
2238
2240
|
candidate_status String? @default("INVITED")
|
|
2239
2241
|
candidate_responded_at DateTime?
|
|
2242
|
+
decline_reason String?
|
|
2240
2243
|
/// When this timestamp moves forward, prior INTERVIEW_SESSION consent grants are stale.
|
|
2241
2244
|
consent_epoch_at DateTime @default(now())
|
|
2242
2245
|
|
|
@@ -2260,20 +2263,21 @@ model Interview {
|
|
|
2260
2263
|
proctoringSession ProctoringSession?
|
|
2261
2264
|
|
|
2262
2265
|
// Relations
|
|
2263
|
-
candidate User?
|
|
2264
|
-
interviewer User?
|
|
2265
|
-
organisation Organisation?
|
|
2266
|
-
recording_document Document?
|
|
2267
|
-
job_description JobDescription?
|
|
2268
|
-
resume Resume
|
|
2269
|
-
evaluation_plan EvaluationPlan?
|
|
2270
|
-
application Application?
|
|
2266
|
+
candidate User? @relation("CandidateInterviews", fields: [candidate_id], references: [id], onDelete: SetNull)
|
|
2267
|
+
interviewer User? @relation("InterviewerInterviews", fields: [interviewer_id], references: [id], onDelete: SetNull)
|
|
2268
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2269
|
+
recording_document Document? @relation(fields: [recording_document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2270
|
+
job_description JobDescription? @relation(fields: [job_description_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2271
|
+
resume Resume @relation(fields: [resume_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2272
|
+
evaluation_plan EvaluationPlan? @relation(fields: [evaluation_plan_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2273
|
+
application Application? @relation(fields: [application_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2271
2274
|
ongoing_evaluation OngoingEvaluation?
|
|
2272
2275
|
transcripts Transcript[]
|
|
2273
2276
|
suggestions Suggestion[]
|
|
2274
2277
|
interviewNotes InterviewNotes[]
|
|
2275
2278
|
liveAnalysis LiveAnalysis[]
|
|
2276
2279
|
zoom_meeting ZoomMeeting?
|
|
2280
|
+
activities InterviewActivity[]
|
|
2277
2281
|
|
|
2278
2282
|
// Indexes
|
|
2279
2283
|
@@index([candidate_id])
|
|
@@ -2286,6 +2290,67 @@ model Interview {
|
|
|
2286
2290
|
@@schema("public")
|
|
2287
2291
|
}
|
|
2288
2292
|
|
|
2293
|
+
enum InterviewActivityType {
|
|
2294
|
+
SESSION_STARTED
|
|
2295
|
+
SESSION_ENDED
|
|
2296
|
+
|
|
2297
|
+
PARTICIPANT_JOINED
|
|
2298
|
+
PARTICIPANT_LEFT
|
|
2299
|
+
PARTICIPANT_DISCONNECTED
|
|
2300
|
+
PARTICIPANT_RECONNECTED
|
|
2301
|
+
|
|
2302
|
+
REQUESTED_RESCHEDULE
|
|
2303
|
+
|
|
2304
|
+
INTERVIEW_CREATED
|
|
2305
|
+
INTERVIEW_RESCHEDULED
|
|
2306
|
+
INTERVIEW_CANCELLED
|
|
2307
|
+
INTERVIEW_COMPLETED
|
|
2308
|
+
|
|
2309
|
+
@@schema("public")
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
enum InterviewParticipantType {
|
|
2313
|
+
CANDIDATE
|
|
2314
|
+
INTERVIEWER
|
|
2315
|
+
HOST
|
|
2316
|
+
|
|
2317
|
+
@@schema("public")
|
|
2318
|
+
}
|
|
2319
|
+
|
|
2320
|
+
model InterviewActivity {
|
|
2321
|
+
id String @id @default(uuid())
|
|
2322
|
+
organisation_id String?
|
|
2323
|
+
application_id String?
|
|
2324
|
+
session_id String?
|
|
2325
|
+
session_number Int?
|
|
2326
|
+
interview_id String
|
|
2327
|
+
|
|
2328
|
+
event_type InterviewActivityType
|
|
2329
|
+
|
|
2330
|
+
participant_id String?
|
|
2331
|
+
participant_type InterviewParticipantType?
|
|
2332
|
+
|
|
2333
|
+
occurred_at DateTime
|
|
2334
|
+
recorded_at DateTime @default(now())
|
|
2335
|
+
|
|
2336
|
+
source String?
|
|
2337
|
+
idempotency_key String? @unique
|
|
2338
|
+
provider_event_id String? @unique
|
|
2339
|
+
|
|
2340
|
+
metadata Json?
|
|
2341
|
+
|
|
2342
|
+
interview Interview @relation(fields: [interview_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
2343
|
+
organisation Organisation? @relation(fields: [organisation_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
2344
|
+
|
|
2345
|
+
@@index([interview_id, occurred_at])
|
|
2346
|
+
@@index([session_id, occurred_at])
|
|
2347
|
+
@@index([participant_id, occurred_at])
|
|
2348
|
+
@@index([organisation_id, occurred_at])
|
|
2349
|
+
@@index([application_id, occurred_at])
|
|
2350
|
+
@@map("interview_activities")
|
|
2351
|
+
@@schema("public")
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2289
2354
|
model InterviewNotes {
|
|
2290
2355
|
id String @id @default(uuid())
|
|
2291
2356
|
interview_id String
|
|
@@ -3024,6 +3089,8 @@ model LicensePackage {
|
|
|
3024
3089
|
cost_price Decimal @default(0) @db.Decimal(18, 2)
|
|
3025
3090
|
currency String @default("INR")
|
|
3026
3091
|
status LicensePackageStatus @default(DRAFT)
|
|
3092
|
+
/// REGULAR creates hiring units. TOP_UP is inventory assigned later.
|
|
3093
|
+
product_type LicenseProductType @default(REGULAR)
|
|
3027
3094
|
/// Number of PurchasedHiringUnit rows created per package purchase.
|
|
3028
3095
|
units_per_purchase Int
|
|
3029
3096
|
|
|
@@ -3043,6 +3110,7 @@ model LicensePackage {
|
|
|
3043
3110
|
is_active Boolean @default(true)
|
|
3044
3111
|
|
|
3045
3112
|
purchased_license_packages PurchasedLicensePackage[]
|
|
3113
|
+
purchased_top_ups PurchasedTopUp[]
|
|
3046
3114
|
organisations LicensePackageOrganisation[]
|
|
3047
3115
|
|
|
3048
3116
|
@@unique([code, version])
|
|
@@ -3082,6 +3150,13 @@ enum LicensePackageStatus {
|
|
|
3082
3150
|
@@schema("licensing")
|
|
3083
3151
|
}
|
|
3084
3152
|
|
|
3153
|
+
enum LicenseProductType {
|
|
3154
|
+
REGULAR
|
|
3155
|
+
TOP_UP
|
|
3156
|
+
|
|
3157
|
+
@@schema("licensing")
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3085
3160
|
enum PurchasedLicensePackageStatus {
|
|
3086
3161
|
ACTIVE
|
|
3087
3162
|
EXPIRED
|
|
@@ -3099,14 +3174,6 @@ enum PurchasedHiringUnitStatus {
|
|
|
3099
3174
|
@@schema("licensing")
|
|
3100
3175
|
}
|
|
3101
3176
|
|
|
3102
|
-
enum PurchasedTopUpStatus {
|
|
3103
|
-
ACTIVE
|
|
3104
|
-
DEPLETED
|
|
3105
|
-
CANCELLED
|
|
3106
|
-
|
|
3107
|
-
@@schema("licensing")
|
|
3108
|
-
}
|
|
3109
|
-
|
|
3110
3177
|
enum PurchasedHiringUnitAssignmentEventKind {
|
|
3111
3178
|
DEPARTMENT_ASSIGNED
|
|
3112
3179
|
DEPARTMENT_UNASSIGNED
|
|
@@ -3150,6 +3217,7 @@ enum LicensingLedgerReason {
|
|
|
3150
3217
|
|
|
3151
3218
|
enum AiCostLedgerReason {
|
|
3152
3219
|
PURCHASE
|
|
3220
|
+
TOP_UP
|
|
3153
3221
|
USAGE
|
|
3154
3222
|
ADJUSTMENT
|
|
3155
3223
|
REFUND
|
|
@@ -3259,6 +3327,7 @@ model PurchasedHiringUnit {
|
|
|
3259
3327
|
assignment_events PurchasedHiringUnitAssignmentEvent[]
|
|
3260
3328
|
ledger_entries LicensingLedgerEntry[]
|
|
3261
3329
|
ai_cost_ledger_entries AiCostLedgerEntry[]
|
|
3330
|
+
purchased_top_ups PurchasedTopUp[]
|
|
3262
3331
|
|
|
3263
3332
|
@@index([organisation_id])
|
|
3264
3333
|
@@index([purchased_license_package_id])
|
|
@@ -3273,31 +3342,22 @@ model PurchasedHiringUnit {
|
|
|
3273
3342
|
@@schema("licensing")
|
|
3274
3343
|
}
|
|
3275
3344
|
|
|
3276
|
-
///
|
|
3345
|
+
/// Commercial top-up inventory. Directly assigned to a hiring unit upon purchase.
|
|
3346
|
+
/// Purchase credits `licensing.licensing_ledger` and `licensing.ai_cost_ledger`
|
|
3347
|
+
/// for the linked hiring unit in a single atomic transaction.
|
|
3348
|
+
/// Display entitlements and product name come from `license_package_id`.
|
|
3277
3349
|
model PurchasedTopUp {
|
|
3278
|
-
id
|
|
3279
|
-
organisation_id
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
currency String? @default("INR")
|
|
3284
|
-
description String?
|
|
3350
|
+
id String @id @default(uuid())
|
|
3351
|
+
organisation_id String
|
|
3352
|
+
license_package_id String
|
|
3353
|
+
/// Directly assigned to exactly one hiring unit at purchase time.
|
|
3354
|
+
purchased_hiring_unit_id String
|
|
3285
3355
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
resume_count_purchased Decimal? @db.Decimal(20, 4)
|
|
3292
|
-
credits_purchased Decimal? @db.Decimal(20, 4)
|
|
3293
|
-
|
|
3294
|
-
interview_ai_assisted_hours_remaining Decimal? @db.Decimal(20, 4)
|
|
3295
|
-
interview_full_ai_hours_remaining Decimal? @db.Decimal(20, 4)
|
|
3296
|
-
interview_non_ai_hours_remaining Decimal? @db.Decimal(20, 4)
|
|
3297
|
-
assignment_count_remaining Decimal? @db.Decimal(20, 4)
|
|
3298
|
-
test_count_remaining Decimal? @db.Decimal(20, 4)
|
|
3299
|
-
resume_count_remaining Decimal? @db.Decimal(20, 4)
|
|
3300
|
-
credits_remaining Decimal? @db.Decimal(20, 4)
|
|
3356
|
+
total_price Decimal @db.Decimal(18, 2)
|
|
3357
|
+
currency String @default("INR")
|
|
3358
|
+
purchased_at DateTime @default(now())
|
|
3359
|
+
/// Reserved for a later expiry policy. Null means no expiry. V1 does not enforce it.
|
|
3360
|
+
expires_at DateTime?
|
|
3301
3361
|
|
|
3302
3362
|
created_at DateTime @default(now())
|
|
3303
3363
|
updated_at DateTime @updatedAt
|
|
@@ -3305,10 +3365,12 @@ model PurchasedTopUp {
|
|
|
3305
3365
|
updated_by String
|
|
3306
3366
|
is_active Boolean @default(true)
|
|
3307
3367
|
|
|
3308
|
-
organisation
|
|
3368
|
+
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
3369
|
+
license_package LicensePackage @relation(fields: [license_package_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
3370
|
+
purchased_hiring_unit PurchasedHiringUnit @relation(fields: [purchased_hiring_unit_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
3309
3371
|
|
|
3310
3372
|
@@index([organisation_id])
|
|
3311
|
-
@@index([
|
|
3373
|
+
@@index([purchased_hiring_unit_id])
|
|
3312
3374
|
@@map("purchased_top_ups")
|
|
3313
3375
|
@@schema("licensing")
|
|
3314
3376
|
}
|
|
@@ -3868,6 +3930,7 @@ model Organisation {
|
|
|
3868
3930
|
hiring_unit_assignment_scope HiringUnitAssignmentScope @default(DEPARTMENT)
|
|
3869
3931
|
organisation_configs OrganisationConfig[]
|
|
3870
3932
|
activity_events ActivityEvent[]
|
|
3933
|
+
interview_activities InterviewActivity[]
|
|
3871
3934
|
usage_ledger_entries UsageLedgerEntry[]
|
|
3872
3935
|
usage_aggregates UsageAggregate[]
|
|
3873
3936
|
channel_provider_configs ChannelProviderConfig[]
|