@adaptware/eagles-db 0.5.46 → 0.5.48
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 +30 -6
- package/client/index-browser.js +25 -1
- package/client/index.d.ts +1043 -3
- package/client/index.js +30 -6
- package/client/package.json +1 -1
- package/client/schema.prisma +46 -7
- package/client/wasm.js +30 -6
- package/package.json +1 -1
- package/prisma/.DS_Store +0 -0
- package/prisma/schema/.DS_Store +0 -0
- package/prisma/schema/evaluationPlan.prisma +0 -7
- package/prisma/schema/interview.prisma +39 -38
- package/prisma/schema/migrations/.DS_Store +0 -0
- package/prisma/schema/migrations/20260826160000_add_application_fit_check_report_document/.DS_Store +0 -0
- package/prisma/schema/migrations/20260907120000_add_resume_ai_intake/migration.sql +20 -0
- package/prisma/schema/migrations/20260908120000_add_resume_jd_tailoring/migration.sql +15 -0
- package/prisma/schema/resume.prisma +45 -0
- package/prisma/schema/migrations/20260522120000_ongoing_evaluation_record_kind/migration.sql +0 -25
- package/prisma/schema/migrations/20260523120000_replace_record_kind_with_is_committed/migration.sql +0 -24
- package/prisma/schema/migrations/20260528120000_drop_job_description_recommendation_config/migration.sql +0 -2
- package/prisma/schema/migrations/20260710120000_add_resume_rendered_export_fields/migration.sql +0 -9
- package/prisma/schema/migrations/20260714120000_add_job_description_display_html_document/migration.sql +0 -8
- package/prisma/schema/migrations/20260716120000_add_offer_letters/migration.sql +0 -183
- package/prisma/schema/migrations/20260716140000_offer_schema_refinements/migration.sql +0 -13
- package/prisma/schema/migrations/20260716160000_offer_schema_hardening/migration.sql +0 -95
- package/prisma/schema/migrations/20260716180000_offer_letter_template_config/migration.sql +0 -2
- package/prisma/schema/migrations/20260716190000_add_evaluation_focus_areas/migration.sql +0 -6
- package/prisma/schema/migrations/20260717120000_offer_workflow_approval/migration.sql +0 -30
- package/prisma/schema/migrations/20260720120000_offer_letter_template_is_draft/migration.sql +0 -5
- package/prisma/schema/migrations/20260720140000_offer_status_split/migration.sql +0 -51
- package/prisma/schema/migrations/20260720140001_offer_status_split_backfill/migration.sql +0 -37
- package/prisma/schema/migrations/20260722120000_offer_draft_edited_html/migration.sql +0 -13
- package/prisma/schema/migrations/20260723150000_offer_withdraw_actor_no_show_reason/migration.sql +0 -10
- package/prisma/schema/migrations/20260724120000_open_job_offer_accepted_declined_counts/migration.sql +0 -7
- package/prisma/schema/migrations/20260811120000_add_integration_provider_razorpay/migration.sql +0 -6
- package/prisma/schema/migrations/20260812120000_add_billing_transactions/migration.sql +0 -49
- package/prisma/schema/migrations/20260812130000_drop_billing_transaction_gst_snapshots/migration.sql +0 -3
- package/prisma/schema/migrations/20260812180000_billing_transaction_invoice_number/migration.sql +0 -5
- package/prisma/schema/migrations/20260813120000_payment_webhooks_gst_refunds/migration.sql +0 -79
- package/prisma/schema/migrations/20260813140000_platform_gst_profiles/migration.sql +0 -49
- package/prisma/schema/migrations/20260813150000_rename_gst_profiles/migration.sql +0 -53
- package/prisma/schema/migrations/20260813160000_remove_gst_billing/migration.sql +0 -16
- package/prisma/schema/migrations/20260813170000_billing_licensing_unrecoverable/migration.sql +0 -2
- package/prisma/schema/migrations/20260813180000_billing_transaction_payment_method/migration.sql +0 -2
- package/prisma/schema/migrations/20260814090000_billing_transaction_purchaser_email/migration.sql +0 -2
- package/prisma/schema/migrations/20260816100000_billing_product_organisations/migration.sql +0 -35
- package/prisma/schema/migrations/20260816120000_merge_billing_product_organisations/migration.sql +0 -25
- package/prisma/schema/migrations/20260817120000_billing_payment_mismatch/migration.sql +0 -7
- package/prisma/schema/migrations/20260819120000_billing_product_prices/migration.sql +0 -62
- package/prisma/schema/migrations/20260819140000_billing_exchange_rates/migration.sql +0 -25
- package/prisma/schema/migrations/20260820120000_billing_transaction_failure_category/migration.sql +0 -31
- package/prisma/schema/migrations/20260820130000_backfill_billing_transaction_failure_details/migration.sql +0 -23
- package/prisma/schema/migrations/20260820140000_drop_billing_product_price_overrides/migration.sql +0 -2
- package/prisma/schema/migrations/20260821120000_drop_billing_product_and_mock_licensing/migration.sql +0 -38
- package/prisma/schema/migrations/20260824120000_billing_transaction_purchase_display_name/migration.sql +0 -2
- package/prisma/schema/migrations/20260831120000_user_communication_email/migration.sql +0 -6
- package/prisma/schema/migrations/20260901143000_assessment_question_bank_state/migration.sql +0 -15
- package/prisma/schema/migrations/20260902120000_question_category_two_values/migration.sql +0 -16
- package/prisma/schema/migrations/20260902143000_question_bank_item_key/migration.sql +0 -17
- package/prisma/schema/migrations/20260903120000_split_round_type_assessment/migration.sql +0 -9
- package/prisma/schema/migrations/20260904110000_restore_round_type_assessment_enum/migration.sql +0 -5
- package/prisma/schema/migrations/20260904120000_revert_wrong_split_assessment_round_types/migration.sql +0 -42
- package/prisma/sql/add_user_deleted_at.sql +0 -8
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
-- Preserve all billing_transactions rows.
|
|
2
|
-
-- Rename product identity to an opaque purchase_reference (values unchanged).
|
|
3
|
-
-- Drop catalog tables and mock licensing column only.
|
|
4
|
-
|
|
5
|
-
-- 1. Drop FK + rename product identity column
|
|
6
|
-
ALTER TABLE "billing_transactions" DROP CONSTRAINT IF EXISTS "billing_transactions_product_id_fkey";
|
|
7
|
-
ALTER TABLE "billing_transactions" RENAME COLUMN "product_id" TO "purchase_reference";
|
|
8
|
-
DROP INDEX IF EXISTS "billing_transactions_product_id_idx";
|
|
9
|
-
CREATE INDEX "billing_transactions_purchase_reference_idx" ON "billing_transactions"("purchase_reference");
|
|
10
|
-
|
|
11
|
-
-- 2. Drop mock licensing columns/indexes
|
|
12
|
-
DROP INDEX IF EXISTS "billing_transactions_licensing_status_idx";
|
|
13
|
-
ALTER TABLE "billing_transactions" DROP COLUMN IF EXISTS "licensing_status";
|
|
14
|
-
|
|
15
|
-
-- 3. Remap mock licensing failure category, then rebuild enum without LICENSING
|
|
16
|
-
UPDATE "billing_transactions"
|
|
17
|
-
SET "failure_category" = 'INTERNAL'::"BillingTransactionFailureCategory"
|
|
18
|
-
WHERE "failure_category" = 'LICENSING'::"BillingTransactionFailureCategory";
|
|
19
|
-
|
|
20
|
-
CREATE TYPE "BillingTransactionFailureCategory_new" AS ENUM ('RAZORPAY_ORDER', 'RAZORPAY_PAYMENT', 'REFUND', 'INTERNAL');
|
|
21
|
-
|
|
22
|
-
ALTER TABLE "billing_transactions"
|
|
23
|
-
ALTER COLUMN "failure_category" TYPE "BillingTransactionFailureCategory_new"
|
|
24
|
-
USING ("failure_category"::text::"BillingTransactionFailureCategory_new");
|
|
25
|
-
|
|
26
|
-
DROP TYPE "BillingTransactionFailureCategory";
|
|
27
|
-
ALTER TYPE "BillingTransactionFailureCategory_new" RENAME TO "BillingTransactionFailureCategory";
|
|
28
|
-
|
|
29
|
-
-- 4. Drop catalog tables (order: prices → products)
|
|
30
|
-
DROP TABLE IF EXISTS "billing_product_prices";
|
|
31
|
-
DROP TABLE IF EXISTS "billing_products";
|
|
32
|
-
|
|
33
|
-
-- 5. Drop catalog FX table
|
|
34
|
-
DROP TABLE IF EXISTS "billing_exchange_rates";
|
|
35
|
-
|
|
36
|
-
-- 6. Drop unused enums
|
|
37
|
-
DROP TYPE IF EXISTS "BillingLicensingStatus";
|
|
38
|
-
DROP TYPE IF EXISTS "BillingProductType";
|
package/prisma/schema/migrations/20260901143000_assessment_question_bank_state/migration.sql
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
-- Question bank: category + stable plan identity on reusable Question rows.
|
|
2
|
-
CREATE TYPE "QuestionCategory" AS ENUM (
|
|
3
|
-
'GENERAL_APTITUDE',
|
|
4
|
-
'DOMAIN_APTITUDE',
|
|
5
|
-
'DOMAIN_KNOWLEDGE'
|
|
6
|
-
);
|
|
7
|
-
|
|
8
|
-
ALTER TABLE "Question" ADD COLUMN IF NOT EXISTS "category" "QuestionCategory";
|
|
9
|
-
ALTER TABLE "Question" ADD COLUMN IF NOT EXISTS "plan_index" INTEGER;
|
|
10
|
-
|
|
11
|
-
CREATE INDEX IF NOT EXISTS "Question_assessment_library_id_candidate_id_plan_index_idx"
|
|
12
|
-
ON "Question" ("assessment_library_id", "candidate_id", "plan_index");
|
|
13
|
-
|
|
14
|
-
-- Incremental bank generation state on the reusable AssessmentLibrary.
|
|
15
|
-
ALTER TABLE "AssessmentLibrary" ADD COLUMN IF NOT EXISTS "generation_state" JSONB;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
-- Collapse QuestionCategory to GENERAL_APTITUDE + DOMAIN_KNOWLEDGE (drop DOMAIN_APTITUDE).
|
|
2
|
-
UPDATE "Question"
|
|
3
|
-
SET category = 'DOMAIN_KNOWLEDGE'
|
|
4
|
-
WHERE category = 'DOMAIN_APTITUDE';
|
|
5
|
-
|
|
6
|
-
CREATE TYPE "QuestionCategory_new" AS ENUM (
|
|
7
|
-
'GENERAL_APTITUDE',
|
|
8
|
-
'DOMAIN_KNOWLEDGE'
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
ALTER TABLE "Question"
|
|
12
|
-
ALTER COLUMN "category" TYPE "QuestionCategory_new"
|
|
13
|
-
USING ("category"::text::"QuestionCategory_new");
|
|
14
|
-
|
|
15
|
-
DROP TYPE "QuestionCategory";
|
|
16
|
-
ALTER TYPE "QuestionCategory_new" RENAME TO "QuestionCategory";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
-- Replace plan_index on Question with deterministic bank_item_key for idempotent persist.
|
|
2
|
-
|
|
3
|
-
ALTER TABLE "Question" ADD COLUMN IF NOT EXISTS "bank_item_key" TEXT;
|
|
4
|
-
|
|
5
|
-
UPDATE "Question"
|
|
6
|
-
SET "bank_item_key" = 'legacy:' || "assessment_library_id" || ':' || "plan_index"::text
|
|
7
|
-
WHERE "candidate_id" IS NULL
|
|
8
|
-
AND "plan_index" IS NOT NULL
|
|
9
|
-
AND "bank_item_key" IS NULL
|
|
10
|
-
AND "assessment_library_id" IS NOT NULL;
|
|
11
|
-
|
|
12
|
-
DROP INDEX IF EXISTS "Question_assessment_library_id_candidate_id_plan_index_idx";
|
|
13
|
-
|
|
14
|
-
ALTER TABLE "Question" DROP COLUMN IF EXISTS "plan_index";
|
|
15
|
-
|
|
16
|
-
CREATE UNIQUE INDEX IF NOT EXISTS "Question_assessment_library_id_bank_item_key_key"
|
|
17
|
-
ON "Question" ("assessment_library_id", "bank_item_key");
|
|
@@ -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';
|
package/prisma/schema/migrations/20260904110000_restore_round_type_assessment_enum/migration.sql
DELETED
|
@@ -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,8 +0,0 @@
|
|
|
1
|
-
-- Add soft-delete timestamp for team member removal (distinct from is_active deactivate).
|
|
2
|
-
ALTER TABLE "public"."User"
|
|
3
|
-
ADD COLUMN IF NOT EXISTS "deleted_at" TIMESTAMP(3);
|
|
4
|
-
|
|
5
|
-
-- Optional: allow re-inviting the same email after soft delete (PostgreSQL partial unique index).
|
|
6
|
-
-- Run only if product requires re-invite while tombstone row exists.
|
|
7
|
-
-- DROP INDEX IF EXISTS "User_email_key";
|
|
8
|
-
-- CREATE UNIQUE INDEX "User_email_active_key" ON "public"."User" ("email") WHERE "deleted_at" IS NULL;
|