@adaptware/eagles-db 0.6.21 → 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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-3e5a725fe27459090e27c7747609f51d05077b562ccea6362a59012e9af7b7c3",
2
+ "name": "prisma-client-c949bdd87e94a30f8a329744e2b28331e98abcc6ecd9bd28cc1b0dc249ab86f4",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -1252,9 +1252,11 @@ model CompetencyDictionary {
1252
1252
 
1253
1253
  enum ConsentType {
1254
1254
  PLATFORM_TERMS
1255
+ /// Retained until the next production push. Catalog rows move to EVALUATION_CONSENT.
1255
1256
  INTERVIEW_SESSION
1256
- /// Read-only catalog document; no ConsentRecord submit flow
1257
+ /// Read-only catalog document; no ConsentRecord submit flow. Retained until the next production push.
1257
1258
  PRIVACY_POLICY
1259
+ EVALUATION_CONSENT
1258
1260
 
1259
1261
  @@schema("public")
1260
1262
  }
@@ -1393,7 +1395,9 @@ model ConsentRecord {
1393
1395
  // Dual-existence for non-breaking migration
1394
1396
  reference_type ConsentReferenceType?
1395
1397
  reference_id String?
1398
+ /// OngoingEvaluation.id. Reference columns stay until the next production push.
1396
1399
  evaluation_id String?
1400
+ evaluation OngoingEvaluation? @relation(fields: [evaluation_id], references: [id], onDelete: SetNull)
1397
1401
 
1398
1402
  ip_address String?
1399
1403
  user_agent String?
@@ -1647,6 +1651,10 @@ enum EvaluationCategory {
1647
1651
  BUSINESS_SCREENING
1648
1652
  BUSINESS_ROUND
1649
1653
  BEHAVIORAL_ROUND
1654
+ FILTERING
1655
+ EVALUATION
1656
+ DECISION
1657
+ OFFER
1650
1658
 
1651
1659
  @@schema("public")
1652
1660
  }
@@ -3081,6 +3089,8 @@ model LicensePackage {
3081
3089
  cost_price Decimal @default(0) @db.Decimal(18, 2)
3082
3090
  currency String @default("INR")
3083
3091
  status LicensePackageStatus @default(DRAFT)
3092
+ /// REGULAR creates hiring units. TOP_UP is inventory assigned later.
3093
+ product_type LicenseProductType @default(REGULAR)
3084
3094
  /// Number of PurchasedHiringUnit rows created per package purchase.
3085
3095
  units_per_purchase Int
3086
3096
 
@@ -3100,6 +3110,7 @@ model LicensePackage {
3100
3110
  is_active Boolean @default(true)
3101
3111
 
3102
3112
  purchased_license_packages PurchasedLicensePackage[]
3113
+ purchased_top_ups PurchasedTopUp[]
3103
3114
  organisations LicensePackageOrganisation[]
3104
3115
 
3105
3116
  @@unique([code, version])
@@ -3139,6 +3150,13 @@ enum LicensePackageStatus {
3139
3150
  @@schema("licensing")
3140
3151
  }
3141
3152
 
3153
+ enum LicenseProductType {
3154
+ REGULAR
3155
+ TOP_UP
3156
+
3157
+ @@schema("licensing")
3158
+ }
3159
+
3142
3160
  enum PurchasedLicensePackageStatus {
3143
3161
  ACTIVE
3144
3162
  EXPIRED
@@ -3156,14 +3174,6 @@ enum PurchasedHiringUnitStatus {
3156
3174
  @@schema("licensing")
3157
3175
  }
3158
3176
 
3159
- enum PurchasedTopUpStatus {
3160
- ACTIVE
3161
- DEPLETED
3162
- CANCELLED
3163
-
3164
- @@schema("licensing")
3165
- }
3166
-
3167
3177
  enum PurchasedHiringUnitAssignmentEventKind {
3168
3178
  DEPARTMENT_ASSIGNED
3169
3179
  DEPARTMENT_UNASSIGNED
@@ -3207,6 +3217,7 @@ enum LicensingLedgerReason {
3207
3217
 
3208
3218
  enum AiCostLedgerReason {
3209
3219
  PURCHASE
3220
+ TOP_UP
3210
3221
  USAGE
3211
3222
  ADJUSTMENT
3212
3223
  REFUND
@@ -3316,6 +3327,7 @@ model PurchasedHiringUnit {
3316
3327
  assignment_events PurchasedHiringUnitAssignmentEvent[]
3317
3328
  ledger_entries LicensingLedgerEntry[]
3318
3329
  ai_cost_ledger_entries AiCostLedgerEntry[]
3330
+ purchased_top_ups PurchasedTopUp[]
3319
3331
 
3320
3332
  @@index([organisation_id])
3321
3333
  @@index([purchased_license_package_id])
@@ -3330,31 +3342,22 @@ model PurchasedHiringUnit {
3330
3342
  @@schema("licensing")
3331
3343
  }
3332
3344
 
3333
- /// Wide top-up purchase: org-level per-metric pool (purchased / remaining) before allocation to hiring units.
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`.
3334
3349
  model PurchasedTopUp {
3335
- id String @id @default(uuid())
3336
- organisation_id String
3337
- purchased_at DateTime @default(now())
3338
- status PurchasedTopUpStatus @default(ACTIVE)
3339
- total_price Decimal? @db.Decimal(18, 2)
3340
- currency String? @default("INR")
3341
- 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
3342
3355
 
3343
- interview_ai_assisted_hours_purchased Decimal? @db.Decimal(20, 4)
3344
- interview_full_ai_hours_purchased Decimal? @db.Decimal(20, 4)
3345
- interview_non_ai_hours_purchased Decimal? @db.Decimal(20, 4)
3346
- assignment_count_purchased Decimal? @db.Decimal(20, 4)
3347
- test_count_purchased Decimal? @db.Decimal(20, 4)
3348
- resume_count_purchased Decimal? @db.Decimal(20, 4)
3349
- credits_purchased Decimal? @db.Decimal(20, 4)
3350
-
3351
- interview_ai_assisted_hours_remaining Decimal? @db.Decimal(20, 4)
3352
- interview_full_ai_hours_remaining Decimal? @db.Decimal(20, 4)
3353
- interview_non_ai_hours_remaining Decimal? @db.Decimal(20, 4)
3354
- assignment_count_remaining Decimal? @db.Decimal(20, 4)
3355
- test_count_remaining Decimal? @db.Decimal(20, 4)
3356
- resume_count_remaining Decimal? @db.Decimal(20, 4)
3357
- 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?
3358
3361
 
3359
3362
  created_at DateTime @default(now())
3360
3363
  updated_at DateTime @updatedAt
@@ -3362,10 +3365,12 @@ model PurchasedTopUp {
3362
3365
  updated_by String
3363
3366
  is_active Boolean @default(true)
3364
3367
 
3365
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
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)
3366
3371
 
3367
3372
  @@index([organisation_id])
3368
- @@index([organisation_id, status])
3373
+ @@index([purchased_hiring_unit_id])
3369
3374
  @@map("purchased_top_ups")
3370
3375
  @@schema("licensing")
3371
3376
  }
@@ -3753,6 +3758,7 @@ model OngoingEvaluation {
3753
3758
  interview Interview? @relation(fields: [interview_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
3754
3759
  assignment Assignment?
3755
3760
  assessment Assessment? @relation(fields: [assessment_id], references: [id], onDelete: SetNull)
3761
+ consent_records ConsentRecord[]
3756
3762
 
3757
3763
  @@unique([application_id, evaluation_plan_id])
3758
3764
  @@index([application_id])
@@ -3990,6 +3996,7 @@ enum BillingTransactionType {
3990
3996
  PURCHASE
3991
3997
  TOP_UP
3992
3998
  REFUND
3999
+ SUBSCRIPTION
3993
4000
 
3994
4001
  @@schema("public")
3995
4002
  }
@@ -4008,6 +4015,9 @@ enum BillingTransactionFailureCategory {
4008
4015
  enum BillingPaymentMismatchStatus {
4009
4016
  DETECTED
4010
4017
  UNFULFILLED
4018
+ /// Razorpay captured a different amount or currency than the stored transaction: never applied, never
4019
+ /// recovered or refunded automatically (refund from the Razorpay dashboard).
4020
+ AMOUNT_MISMATCH
4011
4021
 
4012
4022
  @@schema("public")
4013
4023
  }
@@ -4063,6 +4073,7 @@ model BillingTransaction {
4063
4073
  /// What the invoice was raised for.
4064
4074
  enum InvoiceKind {
4065
4075
  PACKAGE
4076
+ SUBSCRIPTION
4066
4077
 
4067
4078
  @@schema("public")
4068
4079
  }