@adaptware/eagles-db 0.5.45 → 0.5.47

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 +31 -88
  2. package/client/index-browser.js +25 -81
  3. package/client/index.d.ts +1163 -5391
  4. package/client/index.js +31 -88
  5. package/client/package.json +1 -1
  6. package/client/schema.prisma +43 -123
  7. package/client/wasm.js +31 -88
  8. package/package.json +1 -1
  9. package/prisma/schema/evaluationPlan.prisma +0 -7
  10. package/prisma/schema/integration.prisma +0 -1
  11. package/prisma/schema/migrations/20260907120000_add_resume_ai_intake/migration.sql +20 -0
  12. package/prisma/schema/migrations/20260908120000_add_resume_jd_tailoring/migration.sql +15 -0
  13. package/prisma/schema/organisation.prisma +0 -2
  14. package/prisma/schema/resume.prisma +45 -0
  15. package/prisma/schema/user.prisma +2 -0
  16. package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +0 -25
  17. package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +0 -24
  18. package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +0 -2
  19. package/prisma/schema/migrations/20260710120000_add_resume_rendered_export_fields/migration.sql +0 -9
  20. package/prisma/schema/migrations/20260714120000_add_job_description_display_html_document/migration.sql +0 -8
  21. package/prisma/schema/migrations/20260716120000_add_offer_letters/migration.sql +0 -183
  22. package/prisma/schema/migrations/20260716140000_offer_schema_refinements/migration.sql +0 -13
  23. package/prisma/schema/migrations/20260716160000_offer_schema_hardening/migration.sql +0 -95
  24. package/prisma/schema/migrations/20260716180000_offer_letter_template_config/migration.sql +0 -2
  25. package/prisma/schema/migrations/20260716190000_add_evaluation_focus_areas/migration.sql +0 -6
  26. package/prisma/schema/migrations/20260717120000_offer_workflow_approval/migration.sql +0 -30
  27. package/prisma/schema/migrations/20260720120000_offer_letter_template_is_draft/migration.sql +0 -5
  28. package/prisma/schema/migrations/20260720140000_offer_status_split/migration.sql +0 -51
  29. package/prisma/schema/migrations/20260720140001_offer_status_split_backfill/migration.sql +0 -37
  30. package/prisma/schema/migrations/20260722120000_offer_draft_edited_html/migration.sql +0 -13
  31. package/prisma/schema/migrations/20260723150000_offer_withdraw_actor_no_show_reason/migration.sql +0 -10
  32. package/prisma/schema/migrations/20260724120000_open_job_offer_accepted_declined_counts/migration.sql +0 -7
  33. package/prisma/schema/migrations/20260811120000_add_integration_provider_razorpay/migration.sql +0 -6
  34. package/prisma/schema/migrations/20260812120000_add_billing_transactions/migration.sql +0 -49
  35. package/prisma/schema/migrations/20260812130000_drop_billing_transaction_gst_snapshots/migration.sql +0 -3
  36. package/prisma/schema/migrations/20260812180000_billing_transaction_invoice_number/migration.sql +0 -5
  37. package/prisma/schema/migrations/20260813120000_payment_webhooks_gst_refunds/migration.sql +0 -79
  38. package/prisma/schema/migrations/20260813140000_platform_gst_profiles/migration.sql +0 -49
  39. package/prisma/schema/migrations/20260813150000_rename_gst_profiles/migration.sql +0 -53
  40. package/prisma/schema/migrations/20260813160000_remove_gst_billing/migration.sql +0 -16
  41. package/prisma/schema/migrations/20260813170000_billing_licensing_unrecoverable/migration.sql +0 -2
  42. package/prisma/schema/migrations/20260813180000_billing_transaction_payment_method/migration.sql +0 -2
  43. package/prisma/schema/migrations/20260814090000_billing_transaction_purchaser_email/migration.sql +0 -2
  44. package/prisma/schema/migrations/20260816100000_billing_product_organisations/migration.sql +0 -35
  45. package/prisma/schema/migrations/20260816120000_merge_billing_product_organisations/migration.sql +0 -25
  46. package/prisma/schema/migrations/20260817120000_billing_payment_mismatch/migration.sql +0 -7
  47. package/prisma/schema/migrations/20260819120000_billing_product_prices/migration.sql +0 -62
  48. package/prisma/schema/migrations/20260819140000_billing_exchange_rates/migration.sql +0 -25
  49. package/prisma/schema/migrations/20260820120000_billing_transaction_failure_category/migration.sql +0 -31
  50. package/prisma/schema/migrations/20260820130000_backfill_billing_transaction_failure_details/migration.sql +0 -23
  51. package/prisma/schema/migrations/20260820140000_drop_billing_product_price_overrides/migration.sql +0 -2
  52. package/prisma/schema/migrations/20260821120000_drop_billing_product_and_mock_licensing/migration.sql +0 -38
  53. package/prisma/schema/migrations/20260824120000_billing_transaction_purchase_display_name/migration.sql +0 -2
  54. package/prisma/schema/migrations/20260831120000_user_communication_email/migration.sql +0 -6
  55. package/prisma/schema/migrations/20260901143000_assessment_question_bank_state/migration.sql +0 -15
  56. package/prisma/schema/migrations/20260902120000_question_category_two_values/migration.sql +0 -16
  57. package/prisma/schema/migrations/20260902143000_question_bank_item_key/migration.sql +0 -17
  58. package/prisma/schema/migrations/20260903120000_split_round_type_assessment/migration.sql +0 -9
  59. package/prisma/schema/migrations/20260904110000_restore_round_type_assessment_enum/migration.sql +0 -5
  60. package/prisma/schema/migrations/20260904120000_revert_wrong_split_assessment_round_types/migration.sql +0 -42
  61. package/prisma/schema/payment/billingTransaction.prisma +0 -83
  62. package/prisma/schema/payment/paymentWebhookEvent.prisma +0 -28
@@ -1,9 +0,0 @@
1
- -- Add explicit MCQ round types for NEW aptitude / domain knowledge tests.
2
- --
3
- -- Keep RoundType.ASSESSMENT for backward compatibility.
4
- -- Do NOT rewrite EvaluationPlan, OngoingEvaluation, or analytics rows.
5
- -- Do NOT drop or recreate the enum.
6
- -- Do NOT touch ActivityEventType.ASSESSMENT_* or ActivityEntityType.ASSESSMENT.
7
-
8
- ALTER TYPE "RoundType" ADD VALUE IF NOT EXISTS 'GENERAL_APTITUDE_ASSESSMENT';
9
- ALTER TYPE "RoundType" ADD VALUE IF NOT EXISTS 'DOMAIN_KNOWLEDGE_ASSESSMENT';
@@ -1,5 +0,0 @@
1
- -- Restore legacy RoundType.ASSESSMENT when an older enum swap dropped it.
2
- -- Must run in its own migration: PostgreSQL requires new enum values to be
3
- -- committed before they can be assigned to rows (see revert migration next).
4
-
5
- ALTER TYPE "RoundType" ADD VALUE IF NOT EXISTS 'ASSESSMENT';
@@ -1,42 +0,0 @@
1
- -- Revert evaluation plans that were incorrectly stored as split MCQ round types
2
- -- back to legacy ASSESSMENT.
3
- --
4
- -- Does NOT change rows already on ASSESSMENT.
5
- -- Keeps intentional new GENERAL_APTITUDE_ASSESSMENT / DOMAIN_KNOWLEDGE_ASSESSMENT
6
- -- rounds when title or details show an explicit split-type configuration.
7
- --
8
- -- Requires 20260904110000_restore_round_type_assessment_enum to run first so
9
- -- RoundType.ASSESSMENT exists (some DBs lost it during an earlier bad enum swap).
10
-
11
- UPDATE "EvaluationPlan"
12
- SET type_of_round = 'ASSESSMENT'
13
- WHERE is_active = true
14
- AND type_of_round IN ('GENERAL_APTITUDE_ASSESSMENT', 'DOMAIN_KNOWLEDGE_ASSESSMENT')
15
- AND (
16
- (
17
- COALESCE((details #>> '{question_category_distribution,GENERAL_APTITUDE}')::int, 0) > 0
18
- AND COALESCE((details #>> '{question_category_distribution,DOMAIN_KNOWLEDGE}')::int, 0) > 0
19
- )
20
- OR (
21
- upper(COALESCE(details->>'primary_question_category', '')) = 'GENERAL_APTITUDE'
22
- AND type_of_round = 'DOMAIN_KNOWLEDGE_ASSESSMENT'
23
- )
24
- OR (
25
- upper(COALESCE(details->>'primary_question_category', '')) = 'DOMAIN_KNOWLEDGE'
26
- AND type_of_round = 'GENERAL_APTITUDE_ASSESSMENT'
27
- )
28
- OR (
29
- type_of_round = 'DOMAIN_KNOWLEDGE_ASSESSMENT'
30
- AND lower(title) !~* '(domain knowledge|domain test|backend domain|frontend domain|\mdomain\M)'
31
- AND COALESCE((details #>> '{question_category_distribution,GENERAL_APTITUDE}')::int, 0) = 0
32
- AND COALESCE((details #>> '{question_category_distribution,DOMAIN_KNOWLEDGE}')::int, 0) = 0
33
- AND NULLIF(trim(COALESCE(details->>'primary_question_category', '')), '') IS NULL
34
- )
35
- OR (
36
- type_of_round = 'GENERAL_APTITUDE_ASSESSMENT'
37
- AND lower(title) !~* '(aptitude|general aptitude|numerical|verbal reasoning|logical reasoning)'
38
- AND COALESCE((details #>> '{question_category_distribution,GENERAL_APTITUDE}')::int, 0) = 0
39
- AND COALESCE((details #>> '{question_category_distribution,DOMAIN_KNOWLEDGE}')::int, 0) = 0
40
- AND NULLIF(trim(COALESCE(details->>'primary_question_category', '')), '') IS NULL
41
- )
42
- );
@@ -1,83 +0,0 @@
1
- // PAYMENT SERVICE boundary — portable payment microservice owns these enums/columns.
2
-
3
- enum BillingTransactionStatus {
4
- INITIATED
5
- ORDER_CREATED
6
- PAYMENT_PENDING
7
- SUCCESS
8
- FAILED
9
- CANCELLED
10
- REFUND_PENDING
11
- REFUND_FAILED
12
- REFUNDED
13
-
14
- @@schema("public")
15
- }
16
-
17
- enum BillingTransactionType {
18
- PURCHASE
19
- TOP_UP
20
- REFUND
21
-
22
- @@schema("public")
23
- }
24
-
25
- enum BillingTransactionFailureCategory {
26
- RAZORPAY_ORDER
27
- RAZORPAY_PAYMENT
28
- REFUND
29
- INTERNAL
30
-
31
- @@schema("public")
32
- }
33
-
34
- /// Payment reconciliation state when Treadspace status is FAILED but Razorpay captured payment.
35
- enum BillingPaymentMismatchStatus {
36
- DETECTED
37
- UNFULFILLED
38
-
39
- @@schema("public")
40
- }
41
-
42
- /// Financial transaction lifecycle for organisation billing purchases.
43
- model BillingTransaction {
44
- id String @id @default(uuid())
45
- organisation_id String
46
- /// Opaque plan/product identity supplied at checkout. Not a catalog FK.
47
- purchase_reference String
48
- /// Human-readable snapshot captured at checkout for invoices and receipts.
49
- purchase_display_name String?
50
- transaction_type BillingTransactionType
51
- status BillingTransactionStatus @default(INITIATED)
52
- failure_category BillingTransactionFailureCategory?
53
- /// Human-readable or provider detail (e.g. Razorpay error_description).
54
- failure_reason String?
55
- amount Int
56
- currency String @default("INR")
57
- razorpay_order_id String?
58
- razorpay_payment_id String? @unique
59
- /// Razorpay payment method at capture (card, netbanking, upi, wallet, etc.).
60
- payment_method String?
61
- razorpay_subscription_id String?
62
- razorpay_refund_id String?
63
- refund_reason String?
64
- refund_amount Int?
65
- idempotency_key String @unique
66
- invoice_number String? @unique
67
- /// Email of the org Admin who initiated checkout (bill-to).
68
- purchaser_email String?
69
- /// Set when FAILED but Razorpay order/payment is captured (reconciliation path).
70
- payment_mismatch_status BillingPaymentMismatchStatus?
71
- /// Strict same-intent SUCCESS transaction that fulfilled the purchase (UNFULFILLED only).
72
- payment_mismatch_fulfilled_by_id String?
73
- created_at DateTime @default(now())
74
- updated_at DateTime @updatedAt
75
-
76
- organisation Organisation @relation(fields: [organisation_id], references: [id])
77
-
78
- @@index([organisation_id, status])
79
- @@index([purchase_reference])
80
- @@index([razorpay_order_id])
81
- @@map("billing_transactions")
82
- @@schema("public")
83
- }
@@ -1,28 +0,0 @@
1
- enum PaymentWebhookEventStatus {
2
- RECEIVED
3
- PROCESSED
4
- FAILED
5
-
6
- @@schema("public")
7
- }
8
-
9
- /// Idempotent record of payment provider webhook deliveries.
10
- model PaymentWebhookEvent {
11
- id String @id @default(uuid())
12
- organisation_id String?
13
- provider String
14
- provider_event_id String
15
- event_type String
16
- status PaymentWebhookEventStatus @default(RECEIVED)
17
- billing_transaction_id String?
18
- error_message String?
19
- processed_at DateTime?
20
- created_at DateTime @default(now())
21
-
22
- organisation Organisation? @relation(fields: [organisation_id], references: [id])
23
-
24
- @@unique([provider, provider_event_id])
25
- @@index([status, created_at])
26
- @@map("payment_webhook_events")
27
- @@schema("public")
28
- }