@adaptware/eagles-db 0.6.17 → 0.6.19

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 (62) hide show
  1. package/client/edge.js +14 -123
  2. package/client/index-browser.js +7 -117
  3. package/client/index.d.ts +440 -10685
  4. package/client/index.js +14 -123
  5. package/client/libquery_engine-darwin.dylib.node +0 -0
  6. package/client/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  7. package/client/package.json +1 -1
  8. package/client/query_engine-windows.dll.node +0 -0
  9. package/client/schema.prisma +5 -214
  10. package/client/wasm.js +14 -123
  11. package/package.json +1 -1
  12. package/prisma/schema/evaluationPlan.prisma +4 -0
  13. package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +25 -0
  14. package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +24 -0
  15. package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +2 -0
  16. package/prisma/schema/migrations/20260710120000_add_resume_rendered_export_fields/migration.sql +9 -0
  17. package/prisma/schema/migrations/20260714120000_add_job_description_display_html_document/migration.sql +8 -0
  18. package/prisma/schema/migrations/20260716120000_add_offer_letters/migration.sql +183 -0
  19. package/prisma/schema/migrations/20260716140000_offer_schema_refinements/migration.sql +13 -0
  20. package/prisma/schema/migrations/20260716160000_offer_schema_hardening/migration.sql +95 -0
  21. package/prisma/schema/migrations/20260716180000_offer_letter_template_config/migration.sql +2 -0
  22. package/prisma/schema/migrations/20260716190000_add_evaluation_focus_areas/migration.sql +6 -0
  23. package/prisma/schema/migrations/20260717120000_offer_workflow_approval/migration.sql +30 -0
  24. package/prisma/schema/migrations/20260720120000_offer_letter_template_is_draft/migration.sql +5 -0
  25. package/prisma/schema/migrations/20260720140000_offer_status_split/migration.sql +51 -0
  26. package/prisma/schema/migrations/20260720140001_offer_status_split_backfill/migration.sql +37 -0
  27. package/prisma/schema/migrations/20260722120000_offer_draft_edited_html/migration.sql +13 -0
  28. package/prisma/schema/migrations/20260723150000_offer_withdraw_actor_no_show_reason/migration.sql +10 -0
  29. package/prisma/schema/migrations/20260724120000_open_job_offer_accepted_declined_counts/migration.sql +7 -0
  30. package/prisma/schema/migrations/20260811120000_add_integration_provider_razorpay/migration.sql +6 -0
  31. package/prisma/schema/migrations/20260812120000_add_billing_transactions/migration.sql +49 -0
  32. package/prisma/schema/migrations/20260812130000_drop_billing_transaction_gst_snapshots/migration.sql +3 -0
  33. package/prisma/schema/migrations/20260812180000_billing_transaction_invoice_number/migration.sql +5 -0
  34. package/prisma/schema/migrations/20260813120000_payment_webhooks_gst_refunds/migration.sql +79 -0
  35. package/prisma/schema/migrations/20260813140000_platform_gst_profiles/migration.sql +49 -0
  36. package/prisma/schema/migrations/20260813150000_rename_gst_profiles/migration.sql +53 -0
  37. package/prisma/schema/migrations/20260813160000_remove_gst_billing/migration.sql +16 -0
  38. package/prisma/schema/migrations/20260813170000_billing_licensing_unrecoverable/migration.sql +2 -0
  39. package/prisma/schema/migrations/20260813180000_billing_transaction_payment_method/migration.sql +2 -0
  40. package/prisma/schema/migrations/20260814090000_billing_transaction_purchaser_email/migration.sql +2 -0
  41. package/prisma/schema/migrations/20260816100000_billing_product_organisations/migration.sql +35 -0
  42. package/prisma/schema/migrations/20260816120000_merge_billing_product_organisations/migration.sql +25 -0
  43. package/prisma/schema/migrations/20260817120000_billing_payment_mismatch/migration.sql +7 -0
  44. package/prisma/schema/migrations/20260819120000_billing_product_prices/migration.sql +62 -0
  45. package/prisma/schema/migrations/20260819140000_billing_exchange_rates/migration.sql +25 -0
  46. package/prisma/schema/migrations/20260820120000_billing_transaction_failure_category/migration.sql +31 -0
  47. package/prisma/schema/migrations/20260820130000_backfill_billing_transaction_failure_details/migration.sql +23 -0
  48. package/prisma/schema/migrations/20260820140000_drop_billing_product_price_overrides/migration.sql +2 -0
  49. package/prisma/schema/migrations/20260821120000_drop_billing_product_and_mock_licensing/migration.sql +38 -0
  50. package/prisma/schema/migrations/20260824120000_billing_transaction_purchase_display_name/migration.sql +2 -0
  51. package/prisma/schema/migrations/20260831120000_user_communication_email/migration.sql +6 -0
  52. package/prisma/schema/migrations/20260901143000_assessment_question_bank_state/migration.sql +15 -0
  53. package/prisma/schema/migrations/20260902120000_question_category_two_values/migration.sql +16 -0
  54. package/prisma/schema/migrations/20260902143000_question_bank_item_key/migration.sql +17 -0
  55. package/prisma/schema/migrations/20260903120000_split_round_type_assessment/migration.sql +9 -0
  56. package/prisma/schema/migrations/20260904110000_restore_round_type_assessment_enum/migration.sql +5 -0
  57. package/prisma/schema/migrations/20260904120000_revert_wrong_split_assessment_round_types/migration.sql +42 -0
  58. package/prisma/schema/migrations/20260909140000_profile_interview_session/migration.sql +99 -0
  59. package/prisma/schema/migrations/20260911120000_unify_profile_interview_into_interview/migration.sql +139 -0
  60. package/prisma/schema/migrations/20260929120000_add_evaluation_type_in_person/migration.sql +2 -0
  61. package/prisma/schema/migrations/20261015130000_interview_whiteboard_scene/migration.sql +2 -0
  62. package/prisma/schema/ongoingEvaluation.prisma +49 -49
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-f0391a01c267ab1f703c4b9658aa0d675b0ffaa064f1069e1a145d0508245379",
2
+ "name": "prisma-client-6e9b15fc4dc8e19c9fd94b0f46501ffb5b8838bf06a676eec2a962249dd79a93",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "default.js",
@@ -1647,6 +1647,10 @@ enum EvaluationCategory {
1647
1647
  BUSINESS_SCREENING
1648
1648
  BUSINESS_ROUND
1649
1649
  BEHAVIORAL_ROUND
1650
+ FILTERING
1651
+ EVALUATION
1652
+ DECISION
1653
+ OFFER
1650
1654
 
1651
1655
  @@schema("public")
1652
1656
  }
@@ -3183,212 +3187,6 @@ model LicensingLedgerEntry {
3183
3187
  @@schema("licensing")
3184
3188
  }
3185
3189
 
3186
- // Org-level platform subscription: a recurring fee per organisation. Each period is a SubscriptionCharge, paid through
3187
- // a Razorpay Order (BillingTransaction with transaction_type SUBSCRIPTION); the tax Invoice (kind SUBSCRIPTION) is issued
3188
- // only once the charge is paid. Prices are all-inclusive (GST and fees are backed out on the invoice). Amounts are minor units.
3189
- // Plan: docs/eagles-db/platform-subscription-implementation-plan.md.
3190
- // Design sheet: https://docs.google.com/spreadsheets/d/1R-EBGAMdju_P78Qs05g4_NouSbCM_7W-IyCd8gyZCUI (Sheet2).
3191
-
3192
- enum BillingCycle {
3193
- MONTHLY
3194
- ANNUAL
3195
-
3196
- @@schema("licensing")
3197
- }
3198
-
3199
- enum SubscriptionPlanType {
3200
- TRIAL
3201
- REGULAR
3202
- /// Internal and demo orgs: amount 0, never charged, never PAST_DUE or SUSPENDED.
3203
- INTERNAL
3204
-
3205
- @@schema("licensing")
3206
- }
3207
-
3208
- enum PlatformSubscriptionStatus {
3209
- TRIALING
3210
- ACTIVE
3211
- /// Grace: charge OPEN until due_at; everyone in the org keeps full access.
3212
- PAST_DUE
3213
- /// After due_at (or a trial ending unpaid): only org admins can log in, payment screen only.
3214
- SUSPENDED
3215
- CANCELLED
3216
-
3217
- @@schema("licensing")
3218
- }
3219
-
3220
- enum SubscriptionChargeStatus {
3221
- OPEN
3222
- PAID
3223
- VOID
3224
-
3225
- @@schema("licensing")
3226
- }
3227
-
3228
- /// Tells the payment-captured handler what to do: RENEWAL keeps the current record;
3229
- /// CONVERSION, REACTIVATION and UPGRADE close it and start a new one on the payment day.
3230
- enum SubscriptionChargeKind {
3231
- RENEWAL
3232
- CONVERSION
3233
- REACTIVATION
3234
- UPGRADE
3235
-
3236
- @@schema("licensing")
3237
- }
3238
-
3239
- enum SubscriptionAccessAudience {
3240
- /// Anyone in the suspended org (e.g. candidate-facing flows).
3241
- ALL_USERS
3242
- /// Org admins only (e.g. the payment screen).
3243
- ADMIN_ONLY
3244
-
3245
- @@schema("licensing")
3246
- }
3247
-
3248
- /// Platform fee catalogue, one row per (currency, billing_cycle, type).
3249
- /// A TRIAL plan has amount 0; trial_days sets the default trial length.
3250
- /// An INTERNAL plan has amount 0 and is never billed (internal and demo orgs, assigned by org id).
3251
- /// GST and fee rates come from the platform billing settings, not the plan.
3252
- model SubscriptionPlan {
3253
- id String @id @default(uuid())
3254
- name String
3255
- /// INR or USD; matched against Organisation.billing_currency.
3256
- currency String @default("INR")
3257
- /// All-inclusive price per billing cycle, minor units (1000000 = Rs 10,000): exactly what the org pays.
3258
- amount Int
3259
- billing_cycle BillingCycle @default(MONTHLY)
3260
- type SubscriptionPlanType
3261
- /// TRIAL plans only: default trial length in days, editable by Super Admin. Null otherwise.
3262
- trial_days Int?
3263
- /// Days to pay after a period starts unpaid.
3264
- grace_days Int @default(7)
3265
- created_at DateTime @default(now())
3266
- updated_at DateTime @updatedAt
3267
- created_by String
3268
- updated_by String
3269
- is_active Boolean @default(true)
3270
-
3271
- subscriptions PlatformSubscription[] @relation("PlatformSubscriptionPlan")
3272
- pending_downgrades PlatformSubscription[] @relation("PlatformSubscriptionNextPlan")
3273
- subscription_charges SubscriptionCharge[]
3274
-
3275
- @@unique([currency, billing_cycle, type])
3276
- @@map("subscription_plans")
3277
- @@schema("licensing")
3278
- }
3279
-
3280
- /// History of an org's subscription: one record per plan/billing-anchor span.
3281
- /// The current record has effective_end_date null and current_organisation_id set; the unique constraint on
3282
- /// current_organisation_id allows at most one current record per org.
3283
- model PlatformSubscription {
3284
- id String @id @default(uuid())
3285
- organisation_id String
3286
- /// Equals organisation_id on the current record, null once the record is closed. Unique: one current record per org.
3287
- current_organisation_id String? @unique
3288
- plan_id String
3289
- /// Pending downgrade, applied at the next billing date (billing date unchanged). Null when none.
3290
- next_plan_id String?
3291
- status PlatformSubscriptionStatus @default(TRIALING)
3292
- /// Org's all-inclusive fee per billing cycle, minor units; copied from the plan, overridable.
3293
- amount Int
3294
- /// Billing anchor: the payment date that started this record (after a trial, after grace, or an
3295
- /// upgrade). Unchanged when a renewal is paid within grace.
3296
- effective_start_date DateTime
3297
- /// Null on the current record; set to the date the next record starts.
3298
- effective_end_date DateTime?
3299
- /// TRIAL records only: start + plan.trial_days when the trial starts; Super Admin can change it
3300
- /// per org. Unpaid at this time: SUSPENDED (no grace after a trial). Null otherwise.
3301
- trial_ends_at DateTime?
3302
- /// Copied from the plan.
3303
- grace_days Int
3304
- created_at DateTime @default(now())
3305
- updated_at DateTime @updatedAt
3306
- created_by String
3307
- updated_by String
3308
- is_active Boolean @default(true)
3309
-
3310
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3311
- plan SubscriptionPlan @relation("PlatformSubscriptionPlan", fields: [plan_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3312
- next_plan SubscriptionPlan? @relation("PlatformSubscriptionNextPlan", fields: [next_plan_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3313
- charges SubscriptionCharge[]
3314
-
3315
- @@index([organisation_id, effective_end_date])
3316
- @@index([status, trial_ends_at])
3317
- @@index([plan_id])
3318
- @@index([next_plan_id])
3319
- @@map("platform_subscriptions")
3320
- @@schema("licensing")
3321
- }
3322
-
3323
- /// What the org owes for one billing period, reactivation or upgrade; paid through one Razorpay Order.
3324
- /// Not a tax invoice: the Invoice (kind SUBSCRIPTION) is issued when the charge is paid and linked via invoice_id.
3325
- /// Total = subscription_amount + grace_amount - credit_amount (all-inclusive, not stored).
3326
- model SubscriptionCharge {
3327
- /// Sent to Razorpay as billing_transactions.purchase_reference (subscription_charge:{id}).
3328
- id String @id @default(uuid())
3329
- subscription_id String
3330
- /// Plan this charge bills for; for an upgrade, the new plan.
3331
- plan_id String
3332
- organisation_id String
3333
- kind SubscriptionChargeKind
3334
- status SubscriptionChargeStatus @default(OPEN)
3335
- period_start DateTime
3336
- period_end DateTime
3337
- /// period_start + grace_days, end of day in the org's timezone. Unpaid after this: SUSPENDED.
3338
- due_at DateTime
3339
- subscription_amount Int
3340
- /// Prorated days used but not paid: grace days when paid after grace, or days from period_start
3341
- /// to the upgrade date when upgrading with an OPEN charge (which is voided).
3342
- grace_amount Int @default(0)
3343
- /// Upgrade only: prorated unused days of the old plan's paid period.
3344
- credit_amount Int @default(0)
3345
- /// Successful payment. No FK: payment-service boundary.
3346
- billing_transaction_id String? @unique
3347
- /// Tax invoice issued when the charge was paid.
3348
- invoice_id String? @unique
3349
- paid_at DateTime?
3350
- /// Stops the billing job issuing the same charge twice.
3351
- idempotency_key String @unique
3352
- created_at DateTime @default(now())
3353
- updated_at DateTime @updatedAt
3354
- created_by String
3355
- updated_by String
3356
-
3357
- subscription PlatformSubscription @relation(fields: [subscription_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3358
- plan SubscriptionPlan @relation(fields: [plan_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3359
- organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3360
- invoice Invoice? @relation(fields: [invoice_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
3361
-
3362
- @@index([organisation_id, status])
3363
- @@index([subscription_id])
3364
- @@index([plan_id])
3365
- @@index([status, due_at])
3366
- @@map("subscription_charges")
3367
- @@schema("licensing")
3368
- }
3369
-
3370
- /// Routes that stay open while an org is SUSPENDED (access level ADMIN_PAYMENT_ONLY).
3371
- /// Managed by Super Admin; seeded with defaults (auth, payment screen, candidate portal).
3372
- /// Everything not matched is blocked with 402 SUBSCRIPTION_SUSPENDED.
3373
- model SubscriptionAccessRule {
3374
- id String @id @default(uuid())
3375
- /// API path pattern, `*` wildcard, e.g. /candidate/*.
3376
- route_pattern String
3377
- /// GET, POST, ... or * for any method.
3378
- http_method String @default("*")
3379
- audience SubscriptionAccessAudience @default(ADMIN_ONLY)
3380
- description String?
3381
- created_at DateTime @default(now())
3382
- updated_at DateTime @updatedAt
3383
- created_by String
3384
- updated_by String
3385
- is_active Boolean @default(true)
3386
-
3387
- @@unique([route_pattern, http_method])
3388
- @@map("subscription_access_rules")
3389
- @@schema("licensing")
3390
- }
3391
-
3392
3190
  /// Historical package purchase by an organisation (independent per transaction).
3393
3191
  model PurchasedLicensePackage {
3394
3192
  id String @id @default(uuid())
@@ -4089,8 +3887,6 @@ model Organisation {
4089
3887
  license_package_organisations LicensePackageOrganisation[]
4090
3888
  ai_cost_ledger_entries AiCostLedgerEntry[]
4091
3889
  consent_documents ConsentDocument[]
4092
- platform_subscriptions PlatformSubscription[]
4093
- subscription_charges SubscriptionCharge[]
4094
3890
  billing_transactions BillingTransaction[]
4095
3891
  payment_webhook_events PaymentWebhookEvent[]
4096
3892
  invoices Invoice[]
@@ -4133,8 +3929,6 @@ enum BillingTransactionType {
4133
3929
  PURCHASE
4134
3930
  TOP_UP
4135
3931
  REFUND
4136
- /// Platform subscription charge (purchase_reference subscription_charge:{id}).
4137
- SUBSCRIPTION
4138
3932
 
4139
3933
  @@schema("public")
4140
3934
  }
@@ -4206,13 +4000,11 @@ model BillingTransaction {
4206
4000
  @@schema("public")
4207
4001
  }
4208
4002
 
4209
- // Tax invoices issued by Treadspace. Shared by license package purchases and platform subscriptions.
4003
+ // Tax invoices issued by Treadspace. Shared by license package purchases and (later) platform subscriptions.
4210
4004
 
4211
4005
  /// What the invoice was raised for.
4212
4006
  enum InvoiceKind {
4213
4007
  PACKAGE
4214
- /// A paid platform subscription charge (licensing.subscription_charges.invoice_id).
4215
- SUBSCRIPTION
4216
4008
 
4217
4009
  @@schema("public")
4218
4010
  }
@@ -4259,7 +4051,6 @@ model Invoice {
4259
4051
  organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Restrict)
4260
4052
  billing_transaction BillingTransaction? @relation(fields: [billing_transaction_id], references: [id], onDelete: Restrict)
4261
4053
  purchased_license_package PurchasedLicensePackage?
4262
- subscription_charge SubscriptionCharge?
4263
4054
 
4264
4055
  @@index([organisation_id, issued_at])
4265
4056
  @@map("invoices")